mirror of
https://github.com/BubbaGumpShrump/AutoTrackR2.git
synced 2025-05-22 16:55:31 +00:00
Error Fix - GameMode and GameVersion tracking
This commit is contained in:
parent
2a7a4ef692
commit
7592b1729c
3 changed files with 22 additions and 21 deletions
|
@ -1,4 +1,4 @@
|
|||
$TrackRver = "2.0"
|
||||
$TrackRver = "2.0r"
|
||||
|
||||
# Path to the config file
|
||||
$appName = "AutoTrackR2"
|
||||
|
@ -100,11 +100,12 @@ $ueePattern = '<p class="entry citizen-record">\s*<span class="label">UEE Citize
|
|||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$process = Get-Process | Where-Object {$_.Name -like "AutoTrackR2"}
|
||||
$global:killTally = 0
|
||||
|
||||
$global:GameMode = ""
|
||||
$global:GameVersion = ""
|
||||
|
||||
# Load historic kills from csv
|
||||
if (Test-Path "$scriptFolder\Kill-Log.csv") {
|
||||
$historicKills = Import-CSV "$scriptFolder\Kill-log.csv" | Sort-Object -Property KillTime
|
||||
$historicKills = Import-CSV "$scriptFolder\Kill-log.csv"
|
||||
foreach ($kill in $historicKills) {
|
||||
Write-Output "NewKill=throwaway,$($kill.EnemyPilot),$($kill.EnemyShip),$($kill.OrgAffiliation),$($kill.Enlisted),$($kill.RecordNumber),$($kill.KillTime),$($kill.PFP)"
|
||||
$global:killTally++
|
||||
|
@ -144,15 +145,15 @@ Do {
|
|||
Write-Output "PlayerShip=$global:loadOut"
|
||||
|
||||
If ($line -match $versionPattern){
|
||||
$GameVersion = $matches['gameversion']
|
||||
$global:GameVersion = $matches['gameversion']
|
||||
}
|
||||
if ($line -match $acPattern){
|
||||
$GameMode = "AC"
|
||||
$global:GameMode = "AC"
|
||||
}
|
||||
if ($line -match $puPattern){
|
||||
$GameMode = "PU"
|
||||
$global:GameMode = "PU"
|
||||
}
|
||||
Write-Output "GameMode=$GameMode"
|
||||
Write-Output "GameMode=$global:GameMode"
|
||||
|
||||
}
|
||||
# If no match found, print "Logged In: False"
|
||||
|
@ -237,7 +238,7 @@ function Read-LogEntry {
|
|||
$ship = $ship -replace '-00(1|2|3|4|5|6|7|8|9|0)$', ''
|
||||
}
|
||||
|
||||
$KillTime = (Get-Date).ToUniversalTime().ToString("d MMM yyyy H:mm 'UTC'")
|
||||
$KillTime = (Get-Date).ToUniversalTime().ToString("dd MMM yyyy HH:mm 'UTC'")
|
||||
|
||||
# Get Enlisted Date
|
||||
if ($($page1.content) -match $joinDatePattern) {
|
||||
|
@ -279,7 +280,7 @@ function Read-LogEntry {
|
|||
Write-Output "KillTally=$global:killTally"
|
||||
Write-Output "NewKill=throwaway,$enemyPilot,$enemyShip,$enemyOrgs,$joinDate2,$citizenRecord,$killTime,$victimPFP"
|
||||
|
||||
$GameMode = $GameMode.ToLower()
|
||||
$global:GameMode = $global:GameMode.ToLower()
|
||||
# Send to API
|
||||
# Define the data to send
|
||||
If ($null -ne $apiUrl -and $offlineMode -eq $false){
|
||||
|
@ -291,8 +292,8 @@ function Read-LogEntry {
|
|||
weapon = $weapon
|
||||
method = $damageType
|
||||
loadout_ship = $ship
|
||||
game_version = $GameVersion
|
||||
gamemode = $GameMode
|
||||
game_version = $global:GameVersion
|
||||
gamemode = $global:GameMode
|
||||
trackr_version = $TrackRver
|
||||
}
|
||||
|
||||
|
@ -332,8 +333,8 @@ function Read-LogEntry {
|
|||
Weapon = $weapon
|
||||
Ship = $ship
|
||||
Method = $damageType
|
||||
Mode = $GameMode
|
||||
GameVersion = $GameVersion
|
||||
Mode = $global:GameMode
|
||||
GameVersion = $global:GameVersion
|
||||
TrackRver = $TrackRver
|
||||
Logged = $logMode
|
||||
PFP = $victimPFP
|
||||
|
@ -405,12 +406,12 @@ function Read-LogEntry {
|
|||
|
||||
# Detect PU or AC
|
||||
if ($line -match $puPattern) {
|
||||
$GameMode = "PU"
|
||||
Write-Output "GameMode=$GameMode"
|
||||
$global:GameMode = "PU"
|
||||
Write-Output "GameMode=$global:GameMode"
|
||||
}
|
||||
if ($line -match $acPattern) {
|
||||
$GameMode = "AC"
|
||||
Write-Output "GameMode=$GameMode"
|
||||
$global:GameMode = "AC"
|
||||
Write-Output "GameMode=$global:GameMode"
|
||||
}
|
||||
|
||||
#Set loadout
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace AutoTrackR2
|
|||
{
|
||||
public partial class UpdatePage : UserControl
|
||||
{
|
||||
private string currentVersion = "v2.0-beta.3";
|
||||
private string currentVersion = "v2.0-release";
|
||||
private string latestVersion;
|
||||
|
||||
public UpdatePage()
|
||||
|
|
|
@ -198,15 +198,15 @@
|
|||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:AutoTrackR2_Setup"
|
||||
"ProductCode" = "8:{C1E9844A-80C7-4576-8F4C-12503B1F3036}"
|
||||
"PackageCode" = "8:{F0B55802-525C-4754-8265-85508C09D73E}"
|
||||
"ProductCode" = "8:{288819A9-947F-47BE-900E-205C7D7EAAF7}"
|
||||
"PackageCode" = "8:{94C078B7-DD3E-4091-9F5E-780DE3481E1C}"
|
||||
"UpgradeCode" = "8:{0B78A147-D0DE-4F72-8906-A62611787CA7}"
|
||||
"AspNetVersion" = "8:"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:FALSE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:2.0.13"
|
||||
"ProductVersion" = "8:2.0.2"
|
||||
"Manufacturer" = "8:GrieferNET"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:discord.gg/griefernet"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue