diff --git a/mod/scripts/vscripts/pulse.gnut b/mod/scripts/vscripts/pulse.gnut index 36c34e5..47495b0 100644 --- a/mod/scripts/vscripts/pulse.gnut +++ b/mod/scripts/vscripts/pulse.gnut @@ -6,28 +6,28 @@ table globalToneAPIKillData = {} void function GetStatsFromToneAPI() { //SetConVarString("ToneURL", "https://toneapi.sleepycat.date/v1") - print("[PULSE] Pulse Loaded") + print("[PULSE] Loaded, getting data...") HttpRequest getStats getStats.method = HttpRequestMethod.GET getStats.url = "https://tone.sleepycat.date/v1/client/weapons" getStats.queryParameters["player"] <- [NSGetLocalPlayerUID().tostring()] void functionref(HttpRequestResponse) onSuccess = void function(HttpRequestResponse response) { - print("[PULSE] Recieved kill data") + print("[PULSE] Kill data received, processing...") table JSONForConversion = DecodeJSON(response.body) foreach (var key, var value in JSONForConversion) { table test = expect table(value) //this won't work on v2 since kills will be an integer already string kills = expect string(test.kills) globalToneAPIKillData[string(key)] <- kills.tointeger() - print("[PULSE] " + key + " added") + print("[PULSE] " + key + " has been added.") } - print("[PULSE] kill data processed") + print("[PULSE] Kill data has been processed.") } void functionref(HttpRequestFailure) onFailure = void function(HttpRequestFailure failure) { - print("[PULSE] Encountered some error getting kill data...") + print("[PULSE] Encountered an error getting kill data...") } bool result = NSHttpRequest(getStats, onSuccess, onFailure)