mirror of
https://github.com/BubbaGumpShrump/AutoTrackR2.git
synced 2025-06-17 20:29:07 +00:00
Minor Bug fixes
This commit is contained in:
parent
10e88866f5
commit
abc9d663e0
2 changed files with 13 additions and 18 deletions
AutoTrackR2
|
@ -73,7 +73,8 @@ namespace AutoTrackR2
|
||||||
ProcessStartInfo psi = new ProcessStartInfo
|
ProcessStartInfo psi = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = "powershell.exe",
|
FileName = "powershell.exe",
|
||||||
Arguments = $"-NoProfile -ExecutionPolicy Bypass -File \"{scriptPath}\"",
|
Arguments = $"-NoProfile -ExecutionPolicy Bypass -File \"C:\\Program Files\\GrieferNET\\AutoTrackR2_Setup\\KillTrackR_MainScript.ps1\"",
|
||||||
|
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory,
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Path to the config file
|
# Path to the config file
|
||||||
$appName = "AutoTrackR2"
|
$appName = "AutoTrackR2"
|
||||||
$scriptFolder = Join-Path -Path (Join-Path -Path $env:LOCALAPPDATA -ChildPath $appName)
|
$scriptFolder = Join-Path -Path $env:LOCALAPPDATA -ChildPath $appName
|
||||||
$configFile = Join-Path -Path $scriptFolder -ChildPath "config.ini"
|
$configFile = Join-Path -Path $scriptFolder -ChildPath "config.ini"
|
||||||
|
|
||||||
# Read the config file into a hashtable
|
# Read the config file into a hashtable
|
||||||
|
@ -89,7 +89,7 @@ $versionPattern = "--system-trace-env-id='pub-sc-alpha-(?<gameversion>\d{4}-\d{7
|
||||||
$joinDatePattern = '<span class="label">Enlisted</span>\s*<strong class="value">([^<]+)</strong>'
|
$joinDatePattern = '<span class="label">Enlisted</span>\s*<strong class="value">([^<]+)</strong>'
|
||||||
$orgPattern = '<IMG[^>]*>\s*([^<]+)'
|
$orgPattern = '<IMG[^>]*>\s*([^<]+)'
|
||||||
$ueePattern = '<p class="entry citizen-record">\s*<span class="label">UEE Citizen Record<\/span>\s*<strong class="value">#?(n\/a|\d+)<\/strong>\s*<\/p>'
|
$ueePattern = '<p class="entry citizen-record">\s*<span class="label">UEE Citizen Record<\/span>\s*<strong class="value">#?(n\/a|\d+)<\/strong>\s*<\/p>'
|
||||||
|
$global:loadout = "Player"
|
||||||
|
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
|
@ -107,13 +107,9 @@ Do {
|
||||||
if ($line -match $loginPattern) {
|
if ($line -match $loginPattern) {
|
||||||
$global:userName = $matches['Player']
|
$global:userName = $matches['Player']
|
||||||
Write-Output "PlayerName=$global:userName"
|
Write-Output "PlayerName=$global:userName"
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
# Get Loadout
|
||||||
|
if ($line -match $loadoutPattern) {
|
||||||
# Get Loadout
|
|
||||||
foreach ($line in $authLog) {
|
|
||||||
if ($line -match $loadoutPattern){
|
|
||||||
$entity = $matches['Entity']
|
$entity = $matches['Entity']
|
||||||
$ownerGEID = $matches['OwnerGEID']
|
$ownerGEID = $matches['OwnerGEID']
|
||||||
|
|
||||||
|
@ -121,16 +117,13 @@ Do {
|
||||||
$global:loadOut = $entity
|
$global:loadOut = $entity
|
||||||
If ($global:loadOut -match $cleanupPattern){
|
If ($global:loadOut -match $cleanupPattern){
|
||||||
$global:loadOut = $matches[1]
|
$global:loadOut = $matches[1]
|
||||||
}
|
}
|
||||||
} else {
|
Write-Output "PlayerShip=$global:loadOut"
|
||||||
$global:loadout = "Player"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Write-Output "PlayerShip=$global:loadOut"
|
|
||||||
|
|
||||||
# Get gameVersion
|
Write-Output "PlayerShip=$global:loadOut"
|
||||||
Foreach ($line in $authlog){
|
|
||||||
If ($line -match $versionPattern){
|
If ($line -match $versionPattern){
|
||||||
$GameVersion = $matches['gameversion']
|
$GameVersion = $matches['gameversion']
|
||||||
}
|
}
|
||||||
|
@ -140,11 +133,12 @@ Do {
|
||||||
if ($line -match $puPattern){
|
if ($line -match $puPattern){
|
||||||
$GameMode = "PU"
|
$GameMode = "PU"
|
||||||
}
|
}
|
||||||
}
|
Write-Output "GameMode=$GameMode"
|
||||||
Write-Output "GameMode=$GameMode"
|
|
||||||
|
|
||||||
|
}
|
||||||
# If no match found, print "Logged In: False"
|
# If no match found, print "Logged In: False"
|
||||||
if (-not $global:userName) {
|
if (-not $global:userName) {
|
||||||
|
Write-Output "PlayerName=No Player Found..."
|
||||||
Start-Sleep -Seconds 30
|
Start-Sleep -Seconds 30
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue