├── .gitignore ├── .vscode └── settings.json ├── README.md ├── json.ahk ├── idledict.ahk └── IdleCombosbac.ahk /.gitignore: -------------------------------------------------------------------------------- 1 | IdleCombos.ahk.bak 2 | userdetails.json 3 | idlecombosettings.json 4 | idlecombolog.txt 5 | eos_loader_log.txt 6 | *.exe 7 | .vscode/settings.json 8 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "FSharp.suggestGitignore": false, 3 | "spellright.language": [ 4 | "en" 5 | ], 6 | "spellright.documentTypes": [ 7 | "markdown", 8 | "latex", 9 | "plaintext", 10 | "renpy" 11 | ], 12 | "spellright.parserByClass": { 13 | "renpy": { 14 | "parser": "code" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # idlecombos 2 | Because of Health No longer able to maintain. 3 | 3.00 is supported Version.
4 | IMPORTANT - When opening chests with the idlecombos app:
5 | The game client can save an outdated inventory, overwriting some consumables.
6 | It's recommended to exit the game first to avoid losing items.
7 |
8 | IMPORTANT - Epic Launcher will not open Idlechampions if
9 | Idlecombos is open first.
10 |
11 | IdleCombos.ahk (current AHK version)
12 | idledict.ahk (id definitions file)
13 | json.ahk (json parsing, included in exe)
14 | README.md (this file)
15 |
16 |
17 | Companion App for Idle Champions, written in AHK.
18 | Features:
19 | - Simple account statistics display
20 | - Easy buying/opening many chests
21 | - (Can log results to file)
22 | - Enter multiple combinations at once
23 | - () 24 | - Briv Stack Calculator [github.com/Deatho0ne]
25 | - Manual starting/stopping adventures
26 | - (Sometimes can fix stuck accounts)
27 | - Can reload game client on crash (Steam only)
28 |
29 | Requirements:
30 | Steam install, or able to enter your user_id & hash if on another platform.
31 |
32 | Includes:
33 | json.ahk [github.com/Chunjee]
34 |
35 | Discord Support Server:
36 | https://discord.com/invite/N3U8xtB 37 | -------------------------------------------------------------------------------- /json.ahk: -------------------------------------------------------------------------------- 1 | class JSON 2 | { 3 | /** 4 | * Method: parse 5 | * Parses a JSON string into an AHK value 6 | * Syntax: 7 | * value := JSON.parse( text [, reviver ] ) 8 | * Parameter(s): 9 | * value [retval] - parsed value 10 | * text [in, ByRef] - JSON formatted string 11 | * reviver [in, opt] - function object, similar to JavaScript's 12 | * JSON.parse() 'reviver' parameter 13 | */ 14 | class parse extends JSON.Functor 15 | { 16 | Call(self, ByRef text, reviver:="") 17 | { 18 | this.rev := IsObject(reviver) ? reviver : false 19 | ; Object keys(and array indices) are temporarily stored in arrays so that 20 | ; we can enumerate them in the order they appear in the document/text instead 21 | ; of alphabetically. Skip if no reviver function is specified. 22 | this.keys := this.rev ? {} : false 23 | 24 | static quot := Chr(34), bashq := "\" . quot 25 | , json_value := quot . "{[01234567890-tfn" 26 | , json_value_or_array_closing := quot . "{[]01234567890-tfn" 27 | , object_key_or_object_closing := quot . "}" 28 | 29 | key := "" 30 | is_key := false 31 | root := {} 32 | stack := [root] 33 | next := json_value 34 | pos := 0 35 | 36 | while ((ch := SubStr(text, ++pos, 1)) != "") { 37 | if InStr(" `t`r`n", ch) 38 | continue 39 | if !InStr(next, ch, 1) 40 | this.ParseError(next, text, pos) 41 | 42 | holder := stack[1] 43 | is_array := holder.IsArray 44 | 45 | if InStr(",:", ch) { 46 | next := (is_key := !is_array && ch == ",") ? quot : json_value 47 | 48 | } else if InStr("}]", ch) { 49 | ObjRemoveAt(stack, 1) 50 | next := stack[1]==root ? "" : stack[1].IsArray ? ",]" : ",}" 51 | 52 | } else { 53 | if InStr("{[", ch) { 54 | ; Check if Array() is overridden and if its return value has 55 | ; the 'IsArray' property. If so, Array() will be called normally, 56 | ; otherwise, use a custom base object for arrays 57 | static json_array := Func("Array").IsBuiltIn || ![].IsArray ? {IsArray: true} : 0 58 | 59 | ; sacrifice readability for minor(actually negligible) performance gain 60 | (ch == "{") 61 | ? ( is_key := true 62 | , value := {} 63 | , next := object_key_or_object_closing ) 64 | ; ch == "[" 65 | : ( value := json_array ? new json_array : [] 66 | , next := json_value_or_array_closing ) 67 | 68 | ObjInsertAt(stack, 1, value) 69 | 70 | if (this.keys) 71 | this.keys[value] := [] 72 | 73 | } else { 74 | if (ch == quot) { 75 | i := pos 76 | while (i := InStr(text, quot,, i+1)) { 77 | value := StrReplace(SubStr(text, pos+1, i-pos-1), "\\", "\u005c") 78 | 79 | static tail := A_AhkVersion<"2" ? 0 : -1 80 | if (SubStr(value, tail) != "\") 81 | break 82 | } 83 | 84 | if (!i) 85 | this.ParseError("'", text, pos) 86 | 87 | value := StrReplace(value, "\/", "/") 88 | , value := StrReplace(value, bashq, quot) 89 | , value := StrReplace(value, "\b", "`b") 90 | , value := StrReplace(value, "\f", "`f") 91 | , value := StrReplace(value, "\n", "`n") 92 | , value := StrReplace(value, "\r", "`r") 93 | , value := StrReplace(value, "\t", "`t") 94 | 95 | pos := i ; update pos 96 | 97 | i := 0 98 | while (i := InStr(value, "\",, i+1)) { 99 | if !(SubStr(value, i+1, 1) == "u") 100 | this.ParseError("\", text, pos - StrLen(SubStr(value, i+1))) 101 | 102 | uffff := Abs("0x" . SubStr(value, i+2, 4)) 103 | if (A_IsUnicode || uffff < 0x100) 104 | value := SubStr(value, 1, i-1) . Chr(uffff) . SubStr(value, i+6) 105 | } 106 | 107 | if (is_key) { 108 | key := value, next := ":" 109 | continue 110 | } 111 | 112 | } else { 113 | value := SubStr(text, pos, i := RegExMatch(text, "[\]\},\s]|$",, pos)-pos) 114 | 115 | static number := "number", integer :="integer" 116 | if value is %number% 117 | { 118 | if value is %integer% 119 | value += 0 120 | } 121 | else if (value == "true" || value == "false") 122 | value := %value% + 0 123 | else if (value == "null") 124 | value := "" 125 | else 126 | ; we can do more here to pinpoint the actual culprit 127 | ; but that's just too much extra work. 128 | this.ParseError(next, text, pos, i) 129 | 130 | pos += i-1 131 | } 132 | 133 | next := holder==root ? "" : is_array ? ",]" : ",}" 134 | } ; If InStr("{[", ch) { ... } else 135 | 136 | is_array? key := ObjPush(holder, value) : holder[key] := value 137 | 138 | if (this.keys && this.keys.HasKey(holder)) 139 | this.keys[holder].Push(key) 140 | } 141 | 142 | } ; while ( ... ) 143 | 144 | return this.rev ? this.Walk(root, "") : root[""] 145 | } 146 | 147 | ParseError(expect, ByRef text, pos, len:=1) 148 | { 149 | static quot := Chr(34), qurly := quot . "}" 150 | 151 | line := StrSplit(SubStr(text, 1, pos), "`n", "`r").Length() 152 | col := pos - InStr(text, "`n",, -(StrLen(text)-pos+1)) 153 | msg := Format("{1}`n`nLine:`t{2}`nCol:`t{3}`nChar:`t{4}" 154 | , (expect == "") ? "Extra data" 155 | : (expect == "'") ? "Unterminated string starting at" 156 | : (expect == "\") ? "Invalid \escape" 157 | : (expect == ":") ? "Expecting ':' delimiter" 158 | : (expect == quot) ? "Expecting object key enclosed in double quotes" 159 | : (expect == qurly) ? "Expecting object key enclosed in double quotes or object closing '}'" 160 | : (expect == ",}") ? "Expecting ',' delimiter or object closing '}'" 161 | : (expect == ",]") ? "Expecting ',' delimiter or array closing ']'" 162 | : InStr(expect, "]") ? "Expecting JSON value or array closing ']'" 163 | : "Expecting JSON value(string, number, true, false, null, object or array)" 164 | , line, col, pos) 165 | 166 | static offset := A_AhkVersion<"2" ? -3 : -4 167 | throw Exception(msg, offset, SubStr(text, pos, len)) 168 | } 169 | 170 | Walk(holder, key) 171 | { 172 | value := holder[key] 173 | if IsObject(value) { 174 | for i, k in this.keys[value] { 175 | ; check if ObjHasKey(value, k) ?? 176 | v := this.Walk(value, k) 177 | if (v != JSON.Undefined) 178 | value[k] := v 179 | else 180 | ObjDelete(value, k) 181 | } 182 | } 183 | 184 | return this.rev.Call(holder, key, value) 185 | } 186 | } 187 | 188 | /** 189 | * Method: stringify 190 | * Converts an AHK value into a JSON string 191 | * Syntax: 192 | * str := JSON.stringify( value [, replacer, space ] ) 193 | * Parameter(s): 194 | * str [retval] - JSON representation of an AHK value 195 | * value [in] - any value(object, string, number) 196 | * replacer [in, opt] - function object, similar to JavaScript's 197 | * JSON.stringify() 'replacer' parameter 198 | * space [in, opt] - similar to JavaScript's JSON.stringify() 199 | * 'space' parameter 200 | */ 201 | class stringify extends JSON.Functor 202 | { 203 | Call(self, value, replacer:="", space:="") 204 | { 205 | this.rep := IsObject(replacer) ? replacer : "" 206 | 207 | this.gap := "" 208 | if (space) { 209 | static integer := "integer" 210 | if space is %integer% 211 | Loop, % ((n := Abs(space))>10 ? 10 : n) 212 | this.gap .= " " 213 | else 214 | this.gap := SubStr(space, 1, 10) 215 | 216 | this.indent := "`n" 217 | } 218 | 219 | return this.Str({"": value}, "") 220 | } 221 | 222 | Str(holder, key) 223 | { 224 | value := holder[key] 225 | 226 | if (this.rep) 227 | value := this.rep.Call(holder, key, ObjHasKey(holder, key) ? value : JSON.Undefined) 228 | 229 | if IsObject(value) { 230 | ; Check object type, skip serialization for other object types such as 231 | ; ComObject, Func, BoundFunc, FileObject, RegExMatchObject, Property, etc. 232 | static type := A_AhkVersion<"2" ? "" : Func("Type") 233 | if (type ? type.Call(value) == "Object" : ObjGetCapacity(value) != "") { 234 | if (this.gap) { 235 | stepback := this.indent 236 | this.indent .= this.gap 237 | } 238 | 239 | is_array := value.IsArray 240 | ; Array() is not overridden, rollback to old method of 241 | ; identifying array-like objects. Due to the use of a for-loop 242 | ; sparse arrays such as '[1,,3]' are detected as objects({}). 243 | if (!is_array) { 244 | for i in value 245 | is_array := i == A_Index 246 | until !is_array 247 | } 248 | 249 | str := "" 250 | if (is_array) { 251 | Loop, % value.Length() { 252 | if (this.gap) 253 | str .= this.indent 254 | 255 | v := this.Str(value, A_Index) 256 | str .= (v != "") ? v . "," : "null," 257 | } 258 | } else { 259 | colon := this.gap ? ": " : ":" 260 | for k in value { 261 | v := this.Str(value, k) 262 | if (v != "") { 263 | if (this.gap) 264 | str .= this.indent 265 | 266 | str .= this.Quote(k) . colon . v . "," 267 | } 268 | } 269 | } 270 | 271 | if (str != "") { 272 | str := RTrim(str, ",") 273 | if (this.gap) 274 | str .= stepback 275 | } 276 | 277 | if (this.gap) 278 | this.indent := stepback 279 | 280 | return is_array ? "[" . str . "]" : "{" . str . "}" 281 | } 282 | 283 | } else ; is_number ? value : "value" 284 | return ObjGetCapacity([value], 1)=="" ? value : this.Quote(value) 285 | } 286 | 287 | Quote(string) 288 | { 289 | static quot := Chr(34), bashq := "\" . quot 290 | 291 | if (string != "") { 292 | string := StrReplace(string, "\", "\\") 293 | ; , string := StrReplace(string, "/", "\/") ; optional in ECMAScript 294 | , string := StrReplace(string, quot, bashq) 295 | , string := StrReplace(string, "`b", "\b") 296 | , string := StrReplace(string, "`f", "\f") 297 | , string := StrReplace(string, "`n", "\n") 298 | , string := StrReplace(string, "`r", "\r") 299 | , string := StrReplace(string, "`t", "\t") 300 | 301 | static rx_escapable := A_AhkVersion<"2" ? "O)[^\x20-\x7e]" : "[^\x20-\x7e]" 302 | while RegExMatch(string, rx_escapable, m) 303 | string := StrReplace(string, m.Value, Format("\u{1:04x}", Ord(m.Value))) 304 | } 305 | 306 | return quot . string . quot 307 | } 308 | } 309 | 310 | /** 311 | * Property: Undefined 312 | * Proxy for 'undefined' type 313 | * Syntax: 314 | * undefined := JSON.Undefined 315 | * Remarks: 316 | * For use with reviver and replacer functions since AutoHotkey does not 317 | * have an 'undefined' type. Returning blank("") or 0 won't work since these 318 | * can't be distnguished from actual JSON values. This leaves us with objects. 319 | * Replacer() - the caller may return a non-serializable AHK objects such as 320 | * ComObject, Func, BoundFunc, FileObject, RegExMatchObject, and Property to 321 | * mimic the behavior of returning 'undefined' in JavaScript but for the sake 322 | * of code readability and convenience, it's better to do 'return JSON.Undefined'. 323 | * Internally, the property returns a ComObject with the variant type of VT_EMPTY. 324 | */ 325 | Undefined[] 326 | { 327 | get { 328 | static empty := {}, vt_empty := ComObject(0, &empty, 1) 329 | return vt_empty 330 | } 331 | } 332 | 333 | class Functor 334 | { 335 | __Call(method, ByRef arg, args*) 336 | { 337 | ; When casting to Call(), use a new instance of the "function object" 338 | ; so as to avoid directly storing the properties(used across sub-methods) 339 | ; into the "function object" itself. 340 | if IsObject(method) 341 | return (new this).Call(method, arg, args*) 342 | else if (method == "") 343 | return (new this).Call(arg, args*) 344 | } 345 | } 346 | } 347 | -------------------------------------------------------------------------------- /idledict.ahk: -------------------------------------------------------------------------------- 1 | global DictionaryVersion := "2.00" 2 | 3 | PatronFromID(patronid) { 4 | switch patronid { 5 | case "0": namefromid := "None" 6 | case "1": namefromid := "Mirt" 7 | case "2": namefromid := "Vajra" 8 | case "3": namefromid := "Strahd" 9 | case "4": namefromid := "Zariel" 10 | } 11 | return namefromid 12 | } 13 | 14 | campaignFromID(campaignid) { 15 | switch campaignid { 16 | case "1": namefromid := "Grand Tour of the Sword Coast" 17 | case "2": namefromid := "Tomb of Annihilation" 18 | case "15": namefromid := "Waterdeep: Dragon Heist" 19 | case "22": namefromid := "Baldur's Gate: Descent into Avernus" 20 | case "24": namefromid := "Icewind Dale: Rime of the Frostmaiden" 21 | case "23": namefromid := "Special" 22 | case "17": namefromid := "Time Gates" 23 | case "3": namefromid := "Highharvestide" 24 | case "4": namefromid := "Liars' Night" 25 | case "5": namefromid := "Feast of the Moon" 26 | case "6": namefromid := "Simril" 27 | case "7": namefromid := "Wintershield" 28 | case "8": namefromid := "Midwinter" 29 | case "9": namefromid := "Grand Revel" 30 | case "10": namefromid := "Fleetswake" 31 | case "11": namefromid := "Festival of Fools" 32 | case "12": namefromid := "Greengrass" 33 | case "13": namefromid := "The Running" 34 | case "14": namefromid := "The Great Modron March" 35 | case "16": namefromid := "Dragondown" 36 | case "18": namefromid := "Founders' Day" 37 | case "19": namefromid := "Midsummer" 38 | case "20": namefromid := "Ahghairon's Day" 39 | case "21": namefromid := "Brightswords" 40 | default: namefromid := "Error: " campaignid 41 | } 42 | return namefromid 43 | } 44 | 45 | ChampFromID(id) { 46 | if (id < 21) { 47 | switch id { 48 | case "1": namefromid := "Bruenor" 49 | case "2": namefromid := "Celeste" 50 | case "3": namefromid := "Nayeli" 51 | case "4": namefromid := "Jarlaxle" 52 | case "5": namefromid := "Calliope" 53 | case "6": namefromid := "Asharra" 54 | case "7": namefromid := "Minsc" 55 | case "8": namefromid := "Delina" 56 | case "9": namefromid := "Makos" 57 | case "10": namefromid := "Tyril" 58 | case "11": namefromid := "Jamilah" 59 | case "12": namefromid := "Arkhan" 60 | case "13": namefromid := "Hitch" 61 | case "14": namefromid := "Stoki" 62 | case "15": namefromid := "Krond" 63 | case "16": namefromid := "Gromma" 64 | case "17": namefromid := "Dhadius" 65 | case "18": namefromid := "Drizzt" 66 | case "19": namefromid := "Barrowin" 67 | case "20": namefromid := "Regis" 68 | } 69 | } 70 | else if (id < 41) { 71 | switch id { 72 | case "21": namefromid := "Birdsong" 73 | case "22": namefromid := "Zorbu" 74 | case "23": namefromid := "Strix" 75 | case "24": namefromid := "Nrakk" 76 | case "25": namefromid := "Catti-brie" 77 | case "26": namefromid := "Evelyn" 78 | case "27": namefromid := "Binwin" 79 | case "28": namefromid := "Deekin" 80 | case "29": namefromid := "Xander" 81 | case "30": namefromid := "Azaka" 82 | case "31": namefromid := "Ishi" 83 | case "32": namefromid := "Wulfgar" 84 | case "33": namefromid := "Farideh" 85 | case "34": namefromid := "Donaar" 86 | case "35": namefromid := "Vlahnya" 87 | case "36": namefromid := "Warden" 88 | case "37": namefromid := "Nerys" 89 | case "38": namefromid := "K'thriss" 90 | case "39": namefromid := "Paultin" 91 | case "40": namefromid := "Black Viper" 92 | } 93 | } 94 | else if (id < 61) { 95 | switch id { 96 | case "41": namefromid := "Rosie" 97 | case "42": namefromid := "Aila" 98 | case "43": namefromid := "Spurt" 99 | case "44": namefromid := "Qillek" 100 | case "45": namefromid := "Korth" 101 | case "46": namefromid := "Walnut" 102 | case "47": namefromid := "Shandie" 103 | case "48": namefromid := "Jim" 104 | case "49": namefromid := "Turiel" 105 | case "50": namefromid := "Pwent" 106 | case "51": namefromid := "Avren" 107 | case "52": namefromid := "Sentry" 108 | case "53": namefromid := "Krull" 109 | case "54": namefromid := "Artemis" 110 | case "55": namefromid := "M" Chr(244) "rg" Chr(230) "n" 111 | case "56": namefromid := "Havilar" 112 | case "57": namefromid := "Sisaspia" 113 | case "58": namefromid := "Briv" 114 | case "59": namefromid := "Melf" 115 | case "60": namefromid := "Krydle" 116 | } 117 | } 118 | else if (id < 81) { 119 | switch id { 120 | case "61": namefromid := "Jaheira" 121 | case "62": namefromid := "Nova" 122 | case "63": namefromid := "Freely" 123 | case "64": namefromid := "B && G" 124 | case "65": namefromid := "Omin" 125 | case "66": namefromid := "Lazaapz" 126 | case "67": namefromid := "Dragonbait" 127 | case "68": namefromid := "Ulkoria" 128 | case "69": namefromid := "Torogar" 129 | case "70": namefromid := "Ezmerelda" 130 | case "71": namefromid := "Penelope" 131 | case "72": namefromid := "Lucius" 132 | case "73": namefromid := "Baeloth" 133 | case "74": namefromid := "Talin" 134 | case "75": namefromid := "Hew Maan" 135 | case "76": namefromid := "Orisha" 136 | case "77": namefromid := "Alyndra" 137 | case "78": namefromid := "Orkira" 138 | case "79": namefromid := "Shaka" 139 | case "80": namefromid := "Mehen" 140 | } 141 | } 142 | else if (id < 101) { 143 | switch id { 144 | case "81": namefromid := "Selise" 145 | case "82": namefromid := "Sgt Knox" 146 | case "83": namefromid := "Ellywick" 147 | case "84": namefromid := "Prudence" 148 | case "85": namefromid := "Corazon" 149 | case "86": namefromid := "Reya" 150 | case "87": namefromid := "NERDS" 151 | case "88": namefromid := "Xerophon" 152 | case "89": namefromid := "D'hani" 153 | case "90": namefromid := "Brig" 154 | case "91": namefromid := "Widdle" 155 | case "92": namefromid := "Yorven" 156 | case "93": namefromid := "Viconia" 157 | case "94": namefromid := "Rust" 158 | case "95": namefromid := "Vi" 159 | case "96": namefromid := "Desmond" 160 | case "97": namefromid := "Tatyana" 161 | case "98": namefromid := "Gazrick" 162 | case "99": namefromid := "Dungeon Master" 163 | case "100": namefromid := "Nordom" 164 | } 165 | } 166 | else if (id < 107) { 167 | switch id { 168 | case "101": namefromid := "Merilwen" 169 | case "102": namefromid := "Nahara" 170 | case "103": namefromid := "UNKNOWN (" id ")" 171 | case "104": namefromid := "UNKNOWN (" id ")" 172 | case "105": namefromid := "UNKNOWN (" id ")" 173 | case "106": namefromid := "Blooshi" 174 | case "107": namefromid := "UNKNOWN (" id ")" 175 | ; case "88": namefromid := "UNKNOWN (" id ")" 176 | ; case "100": namefromid := "UNKNOWN (" id ")" 177 | ; case "90": namefromid := "UNKNOWN (" id ")" 178 | ; case "91": namefromid := "UNKNOWN (" id ")" 179 | ; case "92": namefromid := "UNKNOWN (" id ")" 180 | ; case "93": namefromid := "UNKNOWN (" id ")" 181 | ; case "94": namefromid := "UNKNOWN (" id ")" 182 | ; case "95": namefromid := "UNKNOWN (" id ")" 183 | ; case "96": namefromid := "UNKNOWN (" id ")" 184 | ; case "97": namefromid := "UNKNOWN (" id ")" 185 | ; case "98": namefromid := "UNKNOWN (" id ")" 186 | ; case "99": namefromid := "UNKNOWN (" id ")" 187 | ; case "100": namefromid := "UNKNOWN (" id ")" 188 | } 189 | } 190 | ; else if (id < 107) { 191 | ; switch id { 192 | ; case "101": namefromid := "UNKNOWN (" id ")" 193 | ; case "102": namefromid := "UNKNOWN (" id ")" 194 | ; case "103": namefromid := "UNKNOWN (" id ")" 195 | ; case "104": namefromid := "UNKNOWN (" id ")" 196 | ; case "105": namefromid := "UNKNOWN (" id ")" 197 | ; case "106": namefromid := "UNKNOWN (" id ")" 198 | ; case "107": namefromid := "UNKNOWN (" id ")" 199 | ; case "88": namefromid := "UNKNOWN (" id ")" 200 | ; case "100": namefromid := "UNKNOWN (" id ")" 201 | ; case "90": namefromid := "UNKNOWN (" id ")" 202 | ; case "91": namefromid := "UNKNOWN (" id ")" 203 | ; case "92": namefromid := "UNKNOWN (" id ")" 204 | ; case "93": namefromid := "UNKNOWN (" id ")" 205 | ; case "94": namefromid := "UNKNOWN (" id ")" 206 | ; case "95": namefromid := "UNKNOWN (" id ")" 207 | ; case "96": namefromid := "UNKNOWN (" id ")" 208 | ; case "97": namefromid := "UNKNOWN (" id ")" 209 | ; case "98": namefromid := "UNKNOWN (" id ")" 210 | ; case "99": namefromid := "UNKNOWN (" id ")" 211 | ;; case "100": namefromid := "UNKNOWN (" id ")" 212 | ; } 213 | ;} 214 | else { 215 | namefromid := "UNKNOWN (" id ")" 216 | } 217 | return namefromid 218 | } 219 | 220 | FeatFromID(id) { 221 | if (id < 83) { 222 | switch id { 223 | case "3": namefromid := "Bruenor (Rally +40%)" 224 | case "6": namefromid := "Bruenor (CHA +1)" 225 | case "9": namefromid := "Celeste (Global DPS +25%)" 226 | case "12": namefromid := "Celeste (Mass Cure Wounds +30%)" 227 | case "19": namefromid := "Nayeli (Overwhelm point +10)" 228 | case "24": namefromid := "Jarlaxle (CHA +1)" 229 | case "26": namefromid := "Calliope (Global DPS +25%)" 230 | case "34": namefromid := "Asharra (CHA +1)" 231 | case "36": namefromid := "Minsc (Self DPS +60%)" 232 | case "44": namefromid := "Delina (Surge of Power +40%)" 233 | case "45": namefromid := "Delina (WIS +1)" 234 | case "51": namefromid := "Makos (Gold +25%)" 235 | case "53": namefromid := "Tyril (Global DPS +25%)" 236 | case "59": namefromid := "Tyril (Overwhelm point +10)" 237 | case "61": namefromid := "Jamilah (Self DPS +60%)" 238 | case "63": namefromid := "Jamilah (DEX +1)" 239 | case "68": namefromid := "Arkhan (Self DPS +60%)" 240 | case "71": namefromid := "Arkhan (DEX +1)" 241 | case "77": namefromid := "Hitch (Global DPS +25%)" 242 | case "82": namefromid := "Stoki (Gold +25%)" 243 | } 244 | } 245 | else if (id < 171) { 246 | switch id { 247 | case "87": namefromid := "Krond (Global DPS +25%)" 248 | case "89": namefromid := "Krond (WIS +1)" 249 | case "95": namefromid := "Gromma (Health +30%)" 250 | case "98": namefromid := "Dhadius (Self DPS +60%)" 251 | case "105": namefromid := "Drizzt (Gold +25%)" 252 | case "106": namefromid := "Drizzt (Companions of the Hall +40%)" 253 | case "112": namefromid := "Barrowin (Blessed Hammer +40%)" 254 | case "114": namefromid := "Regis (Global DPS +25%)" 255 | case "119": namefromid := "Birdsong (Self DPS +60%)" 256 | case "128": namefromid := "Zorbu (Hunter's Pack +40%)" 257 | case "132": namefromid := "Strix (Global DPS +25%)" 258 | case "135": namefromid := "Nrakk (Self DPS +60%)" 259 | case "143": namefromid := "Catti-brie (Death March +40%)" 260 | case "144": namefromid := "Catti-brie (CHA +1)" 261 | case "148": namefromid := "Evelyn (Health +30%)" 262 | case "150": namefromid := "Evelyn (Overwhelm point +10)" 263 | case "154": namefromid := "Binwin (Tallest in Faerûn +40%)" 264 | case "158": namefromid := "Deekin (Global DPS +25%)" 265 | case "164": namefromid := "Xander (Streetwise +40%)" 266 | case "170": namefromid := "Azaka (Gold +25%)" 267 | } 268 | } 269 | else if (id < 255) { 270 | switch id { 271 | case "172": namefromid := "Ishi (Self DPS +60%)" 272 | case "181": namefromid := "Wulfgar (Health +30%)" 273 | case "184": namefromid := "Farideh (Self DPS +60%)" 274 | case "191": namefromid := "Donaar (Aura of Vitality +30%)" 275 | case "193": namefromid := "Zorbu (INT +1)" 276 | case "195": namefromid := "Vlahnya (Global DPS +25%)" 277 | case "198": namefromid := "Vlahnya (DEX +1)" 278 | case "203": namefromid := "Warden (CON +1)" 279 | case "207": namefromid := "Nerys (War Healing +30%)" 280 | case "210": namefromid := "K'thriss (Global DPS +25%)" 281 | case "218": namefromid := "Paultin (WIS +1)" 282 | case "220": namefromid := "Black Viper (Self DPS +60%)" 283 | case "229": namefromid := "Rosie (INT +1)" 284 | case "231": namefromid := "Aila (Global DPS +25%)" 285 | case "236": namefromid := "Aila (Overwhelm point +10)" 286 | case "241": namefromid := "Spurt (CON +1)" 287 | case "243": namefromid := "Qillek (Global DPS +25%)" 288 | case "248": namefromid := "Korth (Global DPS +25%)" 289 | case "251": namefromid := "Korth (Calculated +40%)" 290 | case "254": namefromid := "Walnut (Global DPS +25%)" 291 | } 292 | } 293 | else if (id < 340) { 294 | switch id { 295 | case "262": namefromid := "Shandie (WIS +1)" 296 | case "263": namefromid := "Shandie (CHA +1)" 297 | case "265": namefromid := "Jim (Self DPS +60%)" 298 | case "269": namefromid := "Spurt (Pack Tactics +40%)" 299 | case "284": namefromid := "Turiel (Gold +25%)" 300 | case "288": namefromid := "Pwent (Global DPS +25%)" 301 | case "295": namefromid := "Avren (Mirror Image +40%)" 302 | case "296": namefromid := "Avren (Seeing Double +40%)" 303 | case "300": namefromid := "Sentry (Global DPS +25%)" 304 | case "302": namefromid := "Sentry (Health +30%)" 305 | case "308": namefromid := "Krull (Global DPS +25%)" 306 | case "309": namefromid := "Krull (Gold +25%)" 307 | case "316": namefromid := "Krull (Virulent Strain +100%)" 308 | case "320": namefromid := "Artemis (Gold +25%)" 309 | case "322": namefromid := "Artemis (Jeweled Power +40%)" 310 | case "326": namefromid := "Dragonbait (Health +30%)" 311 | case "329": namefromid := "Dragonbait (Overwhelm point +10)" 312 | case "333": namefromid := "M" Chr(244) "rg" Chr(230) "n (Paid Up Front +40%)" 313 | case "336": namefromid := "Havilar (Global DPS +25%)" 314 | case "339": namefromid := "Havilar (Leadership Summit +40%)" 315 | } 316 | } 317 | else if (id < 406) { 318 | switch id { 319 | case "342": namefromid := "Sisaspia (Global DPS +25%)" 320 | case "345": namefromid := "Sisaspia (Halo of Spores +40%)" 321 | case "351": namefromid := "Briv (Health +30%)" 322 | case "354": namefromid := "Briv (Overwhelm point +10)" 323 | case "355": namefromid := "Deekin (Confidence in the Boss +40%)" 324 | case "356": namefromid := "Birdsong (Tempo of Victory +40%)" 325 | case "357": namefromid := "Barrowin (Base Attack Cooldown -0.5s)" 326 | case "358": namefromid := "Hitch (Chance of Daggers Ricocheting +40%)" 327 | case "366": namefromid := "Melf (Melf's Adaptive Support Spell +40%)" 328 | case "367": namefromid := "Melf (Melf's Speedy Supplement +40%)" 329 | case "374": namefromid := "Krydle (Global DPS +25%)" 330 | case "376": namefromid := "Krydle (Charismatic Leader +40%)" 331 | case "380": namefromid := "Freely (Gold +25%)" 332 | case "381": namefromid := "Freely (Luck of Yondalla Requisition +40%)" 333 | case "385": namefromid := "Jaheira (Self DPS +60%)" 334 | case "388": namefromid := "Jaheira (Class Warfare +40%)" 335 | case "392": namefromid := "Beadle & Grimm (Global DPS +25%)" 336 | case "395": namefromid := "Beadle & Grimm (Get Buff +40%)" 337 | case "397": namefromid := "Beadle & Grimm (Long Rest +40%)" 338 | case "405": namefromid := "Nova (Global DPS +25%)" 339 | } 340 | } 341 | else if (id < 483) { 342 | switch id { 343 | case "410": namefromid := "Nova (Close Encounter +40%)" 344 | case "412": namefromid := "Omin (Global DPS +25%)" 345 | case "413": namefromid := "Omin (Gold +25%)" 346 | case "416": namefromid := "Omin (Contractual Obligations Gold Find +40%)" 347 | case "418": namefromid := "Ulkoria (Global DPS +25%)" 348 | case "421": namefromid := "Ulkoria (Watchful Order +40%)" 349 | case "422": namefromid := "Ulkoria (Watchful Order +40%)" 350 | case "426": namefromid := "Lazaapz (Global DPS +25%)" 351 | case "428": namefromid := "Lazaapz (Health +30%)" 352 | case "446": namefromid := "Torogar (Dark Order Synergy +40%)" 353 | case "448": namefromid := "Ezmerelda (Global DPS +25%)" 354 | case "450": namefromid := "Ezmerelda (Training Montage +40%)" 355 | case "454": namefromid := "Penelope (Global DPS +25%)" 356 | case "457": namefromid := "Penelope (Chwinga Mask +40%)" 357 | case "465": namefromid := "Lucius (Self DPS +60%)" 358 | case "467": namefromid := "Lucius (Arcane Chromat - Acid +40%)" 359 | case "471": namefromid := "Baeloth (Global DPS +25%)" 360 | case "473": namefromid := "Baeloth (Gold +25%)" 361 | case "477": namefromid := "Baeloth (Morbid Excitement +40%)" 362 | case "482": namefromid := "Talin (Global DPS +25%)" 363 | } 364 | } 365 | else if (id < 562) { 366 | switch id { 367 | case "485": namefromid := "Talin (Quick-Release Hook)" 368 | case "488": namefromid := "Hew Maan (Global DPS +25%)" 369 | case "490": namefromid := "Hew Maan (Hello, Fellow Humans +40%)" 370 | case "501": namefromid := "Orisha (Flaming Wings +40%)" 371 | case "503": namefromid := "Orisha (Bardic Connection +40%)" 372 | case "505": namefromid := "Orisha (Encore Performance)" 373 | case "511": namefromid := "Alyndra (Portent +40%)" 374 | case "513": namefromid := "Alyndra (Brows of Judgement +40%)" 375 | case "520": namefromid := "Reya (Searing Radiance +40%)" 376 | case "522": namefromid := "Reya (Echoes of Zariel +40%)" 377 | case "532": namefromid := "Orkira (Elemental Fire +40%)" 378 | case "533": namefromid := "Orkira (Healing Flame +25%)" 379 | case "539": namefromid := "Shaka (A Celestial Puzzle +40%)" 380 | case "539": namefromid := "Shaka (Celestial Resistance +30%)" 381 | case "550": namefromid := "Mehen (Gold +25%)" 382 | case "551": namefromid := "Mehen (Exiled +40%)" 383 | case "552": namefromid := "Mehen (Brimstone Angels +40%)" 384 | case "557": namefromid := "Selise (Shield of Psychomancy +40%)" 385 | case "560": namefromid := "Selise (Relentless Avenger +50%)" 386 | case "561": namefromid := "Selise (Eyes of Tiwaz)" 387 | } 388 | 389 | } 390 | else if (id < 668) { 391 | switch id { 392 | case "565": namefromid := "Sgt Knox (Health +30%)" 393 | case "567": namefromid := "Sgt Knox (Rallying Cry +40%)" 394 | case "574": namefromid := "Ellywick (Powerful Following +40%)" 395 | case "576": namefromid := "Ellywick (Fortunate Soul +40%)" 396 | case "588": namefromid := "Prudence (Glee +40%)" 397 | case "590": namefromid := "Prudence (Frustration +40%)" 398 | case "600": namefromid := "Corazón (Pirate's Code +40%)" 399 | case "601": namefromid := "Corazón (G.O.A.T. Pirate +40%)" 400 | case "613": namefromid := "D'hani (Paint Them Red +40%)" 401 | case "615": namefromid := "D'hani (Friendly Rivalry +40%)" 402 | case "636": namefromid := "Brig (Global DPS +25%)" 403 | case "638": namefromid := "Brig (Hype +40%)" 404 | case "642": namefromid := "Widdle (Global DPS +25%)" 405 | case "646": namefromid := "Widdle (Tasty Friends +40%)" 406 | case "652": namefromid := "Xerophon (Minion Meets Master +40%)" 407 | case "655": namefromid := "Xerophon (STR +1)" 408 | case "656": namefromid := "Xerophon (CON +1)" 409 | case "657": namefromid := "Xerophon (INT +1)" 410 | case "666": namefromid := "Yorven (Survivor's Alacrity)" 411 | case "667": namefromid := "Yorven (Bump in the Night)" 412 | } 413 | 414 | } 415 | else if (id < 746) { 416 | switch id { 417 | case "669": namefromid := "Yorven (Blood Fury Tattoo +40%)" 418 | case "672": namefromid := "Viconia (Global DPS +25%)" 419 | case "675": namefromid := "Viconia (Animate Dead +40%)" 420 | case "679": namefromid := "Rust (Global DPS +25%)" 421 | case "680": namefromid := "Rust (One Gold Piece +40%)" 422 | case "682": namefromid := "Rust (Rust For Hire +40%)" 423 | case "684": namefromid := "Rust (Close Friends +40%)" 424 | case "687": namefromid := "Evelyn (Divine Prayer +40%)" 425 | case "694": namefromid := "Walnut (Documancer +40%)" 426 | case "703": namefromid := "Vi (Gold +25%)" 427 | case "706": namefromid := "Vi (Catch and Release +40%)" 428 | case "707": namefromid := "Vi (I'm Too Old For This #*&! +40%)" 429 | case "718": namefromid := "Desmond (The Beast Within)" 430 | case "719": namefromid := "Desmond (What Lies in Shadow)" 431 | case "724": namefromid := "Desmond (Running with the Pack +40%)" 432 | case "725": namefromid := "Desmond (Lament the Lost +40%)" 433 | case "729": namefromid := "Mehen (Where my girls go, I go.)" 434 | case "741": namefromid := "Blooshi (Soul Gatherer +40%)" 435 | case "744": namefromid := "Blooshi (Hey! Skull guy! Look how good I'm doing!)" 436 | case "745": namefromid := "Tatyana (Health +30%)" 437 | } 438 | 439 | } 440 | else if (id < 726) { 441 | switch id { 442 | case "746": namefromid := "Tatyana (Faithful Friend +40%)" 443 | case "748": namefromid := "Tatyana (Rising Fury +40%)" 444 | case "754": namefromid := "Gazrick (Frosty Friendship +40%)" 445 | case "756": namefromid := "Gazrick (CON +1)" 446 | case "767": namefromid := "Tatyana (Overwhelm point +10)" 447 | case "769": namefromid := "Nova (Overwhelm point +10)" 448 | case "771": namefromid := "Blooshi (Overwhelm point +10)" 449 | case "775": namefromid := "Dungeon Master (Patience, Young Ones! +40%)" 450 | case "777": namefromid := "Dungeon Master (Words of Encouragement +40%)" 451 | case "784": namefromid := "Nordom (Rule of Law +40%)" 452 | case "706": namefromid := "Vi (Catch and Release +40%)" 453 | case "707": namefromid := "Vi (I'm Too Old For This #*&! +40%)" 454 | case "718": namefromid := "Desmond (The Beast Within)" 455 | case "719": namefromid := "Desmond (What Lies in Shadow)" 456 | case "724": namefromid := "Desmond (Running with the Pack +40%)" 457 | case "725": namefromid := "Desmond (Lament the Lost +40%)" 458 | ;case "638": namefromid := "Brig (Harmonies Hype +40%)" 459 | ;case "638": namefromid := "Brig (Harmonies Hype +40%)" 460 | ;case "638": namefromid := "Brig (Harmonies Hype +40%)" 461 | ;case "638": namefromid := "Brig (Harmonies Hype +40%)" 462 | } 463 | 464 | } 465 | 466 | else { 467 | namefromid := "UNKNOWN (" id ")" 468 | } 469 | return namefromid 470 | } 471 | 472 | ChestFromID(id) { 473 | if (id < 21) { 474 | switch id { 475 | case "1": namefromid := "Silver Chest" 476 | case "2": namefromid := "Gold Chest" 477 | case "3": namefromid := "Silver Stoki Chest" 478 | case "4": namefromid := "Gold Stoki Chest" 479 | case "5": namefromid := "Silver Krond Chest" 480 | case "6": namefromid := "Gold Krond Chest" 481 | case "7": namefromid := "Silver Gromma Chest" 482 | case "8": namefromid := "Gold Gromma Chest" 483 | case "9": namefromid := "Silver Dhadius Chest" 484 | case "10": namefromid := "Gold Dhadius Chest" 485 | case "11": namefromid := "Silver Barrowin Chest" 486 | case "12": namefromid := "Gold Barrowin Chest" 487 | case "13": namefromid := "Gold Snowy Chest" 488 | case "14": namefromid := "Gold Chultan Chest" 489 | case "15": namefromid := "Gold Wayside Chest" 490 | case "16": namefromid := "Silver Regis Chest" 491 | case "17": namefromid := "Gold Regis Chest" 492 | case "18": namefromid := "Silver Birdsong Chest" 493 | case "19": namefromid := "Gold Birdsong Chest" 494 | case "20": namefromid := "Gold Neutral Chest" 495 | } 496 | } 497 | else if (id < 41) { 498 | switch id { 499 | case "21": namefromid := "Silver Zorbu Chest" 500 | case "22": namefromid := "Gold Zorbu Chest" 501 | case "23": namefromid := "Gold Evil Chest" 502 | case "24": namefromid := "Gold Chaos Chest" 503 | case "25": namefromid := "Gold Good Chest" 504 | case "26": namefromid := "Silver Strix Chest" 505 | case "27": namefromid := "Gold Strix Chest" 506 | case "28": namefromid := "Gold Spring Chest" 507 | case "29": namefromid := "Silver Nrakk Chest" 508 | case "30": namefromid := "Gold Nrakk Chest" 509 | case "31": namefromid := "Gold Lawful Chest" 510 | case "32": namefromid := "Gold Companions' Chest" 511 | case "33": namefromid := "Gold Force Grey Chest" 512 | case "34": namefromid := "Gold Bird-Loving Chest" 513 | case "35": namefromid := "Silver Catti-brie Chest" 514 | case "36": namefromid := "Gold Catti-brie Chest" 515 | case "37": namefromid := "Gold Supply Chest" 516 | case "38": namefromid := "Gold Tough Chest" 517 | case "39": namefromid := "Gold Magic Chest" 518 | case "40": namefromid := "Silver Evelyn Chest" 519 | } 520 | } 521 | else if (id < 61) { 522 | switch id { 523 | case "41": namefromid := "Gold Evelyn Chest" 524 | case "42": namefromid := "Gold Warrior Chest" 525 | case "43": namefromid := "Gold Stuffed Chest" 526 | case "44": namefromid := "Gold Googly-Eyed Chest" 527 | case "45": namefromid := "Silver Binwin Chest" 528 | case "46": namefromid := "Gold Binwin Chest" 529 | case "47": namefromid := "Gold Gentlemen Chest" 530 | case "48": namefromid := "Gold Adventurers' Chest" 531 | case "49": namefromid := "Gold Minion Chest" 532 | case "50": namefromid := "Gold Scroll-Filled Chest" 533 | case "51": namefromid := "Gold Chaotic Chest" 534 | case "52": namefromid := "Gold Gate Chest" 535 | case "53": namefromid := "Silver Deekin Chest" 536 | case "54": namefromid := "Gold Deekin Chest" 537 | case "55": namefromid := "Silver Xander Chest" 538 | case "56": namefromid := "Gold Xander Chest" 539 | case "57": namefromid := "Silver Ishi Chest" 540 | case "58": namefromid := "Gold Ishi Chest" 541 | case "59": namefromid := "Gold Storyteller Chest" 542 | case "60": namefromid := "Gold Many-Horned Chest" 543 | } 544 | } 545 | else if (id < 81) { 546 | switch id { 547 | case "61": namefromid := "Gold Pummeled Chest" 548 | case "62": namefromid := "Gold Puzzle Cube Chest" 549 | case "63": namefromid := "Gold Friend Chest" 550 | case "64": namefromid := "Gold Warband Chest" 551 | case "65": namefromid := "Gold Weave-Bound Chest" 552 | case "66": namefromid := "Gold Band Chest" 553 | case "67": namefromid := "Silver Wulfgar Chest" 554 | case "68": namefromid := "Gold Wulfgar Chest" 555 | case "69": namefromid := "Gold Mithral Hall Chest" 556 | case "70": namefromid := "Gold Heist Chest" 557 | case "71": namefromid := "Silver Farideh Chest" 558 | case "72": namefromid := "Gold Farideh Chest" 559 | case "73": namefromid := "Silver Donaar Chest" 560 | case "74": namefromid := "Gold Donaar Chest" 561 | case "75": namefromid := "Silver Vlahnya Chest" 562 | case "76": namefromid := "Gold Vlahnya Chest" 563 | case "77": namefromid := "Gold Dice Chest" 564 | case "78": namefromid := "Gold Sheaf Chest" 565 | case "79": namefromid := "Gold Brimstone Chest" 566 | case "80": namefromid := "Gold Rampage Chest" 567 | } 568 | } 569 | else if (id < 101) { 570 | switch id { 571 | case "81": namefromid := "Silver Warden Chest" 572 | case "82": namefromid := "Gold Warden Chest" 573 | case "83": namefromid := "Silver Nerys Chest" 574 | case "84": namefromid := "Gold Nerys Chest" 575 | case "85": namefromid := "Silver K'thriss Chest" 576 | case "86": namefromid := "Gold K'thriss Chest" 577 | case "87": namefromid := "Silver Paultin Chest" 578 | case "88": namefromid := "Gold Paultin Chest" 579 | case "89": namefromid := "Silver Black Viper Chest" 580 | case "90": namefromid := "Gold Black Viper Chest" 581 | case "91": namefromid := "Silver Rosie Chest" 582 | case "92": namefromid := "Gold Rosie Chest" 583 | case "93": namefromid := "Silver Aila Chest" 584 | case "94": namefromid := "Gold Aila Chest" 585 | case "95": namefromid := "Silver Spurt Chest" 586 | case "96": namefromid := "Gold Spurt Chest" 587 | case "97": namefromid := "Silver Qillek Chest" 588 | case "98": namefromid := "Gold Qillek Chest" 589 | case "99": namefromid := "Silver Korth Chest" 590 | case "100": namefromid := "Gold Korth Chest" 591 | } 592 | } 593 | else if (id < 121) { 594 | switch id { 595 | case "101": namefromid := "Silver Walnut Chest" 596 | case "102": namefromid := "Gold Walnut Chest" 597 | case "103": namefromid := "Silver Shandie Chest" 598 | case "104": namefromid := "Gold Shandie Chest" 599 | case "105": namefromid := "Silver Jim Chest" 600 | case "106": namefromid := "Gold Jim Chest" 601 | case "107": namefromid := "Silver Turiel Chest" 602 | case "108": namefromid := "Gold Turiel Chest" 603 | case "109": namefromid := "Gold Story Chest" 604 | case "110": namefromid := "Gold Crew Chest" 605 | case "111": namefromid := "Gold Runic Chest" 606 | case "112": namefromid := "Gold Friend Chest" 607 | case "113": namefromid := "Gold Battlegroup Chest" 608 | case "114": namefromid := "Gold Returning Hero Chest" 609 | case "115": namefromid := "Gold Jungle Chest" 610 | case "116": namefromid := "Gold Welcome Chest" 611 | case "117": namefromid := "Gold Braggy Chest" 612 | case "118": namefromid := "Gold Protected Chest" 613 | case "119": namefromid := "Gold Wild Chest" 614 | case "120": namefromid := "Gold Watchful Chest" 615 | } 616 | } 617 | else if (id < 141) { 618 | switch id { 619 | case "121": namefromid := "Gold Exotic Chest" 620 | case "122": namefromid := "Gold Inventive Chest" 621 | case "123": namefromid := "Gold Cruel Chest" 622 | case "124": namefromid := "Gold Owlbear Chest" 623 | case "125": namefromid := "Gold Siren Chest" 624 | case "126": namefromid := "Gold Distressed Chest" 625 | case "127": namefromid := "Gold Trapped Chest" 626 | case "128": namefromid := "Gold Murderbot Chest" 627 | case "129": namefromid := "Gold Fit Chest" 628 | case "130": namefromid := "Gold Honeycomb Chest" 629 | case "131": namefromid := "Gold Spiritual Chest" 630 | case "132": namefromid := "Gold Non-Mimic Chest" 631 | case "133": namefromid := "Gold Misfit Chest" 632 | case "134": namefromid := "Gold Gust Chest" 633 | case "135": namefromid := "Gold Spider Climb Chest" 634 | case "136": namefromid := "Gold Feywild Chest" 635 | case "137": namefromid := "Gold Kobold Chest" 636 | case "138": namefromid := "Gold Descent Chest" 637 | case "139": namefromid := "Gold Scourge Chest" 638 | case "140": namefromid := "Gold Rage-Filled Chest" 639 | } 640 | } 641 | else if (id < 161) { 642 | switch id { 643 | case "141": namefromid := "Gold Well-Aligned Chest" 644 | case "142": namefromid := "Gold OK Chest" 645 | case "143": namefromid := "Gold Petrified Chest" 646 | case "144": namefromid := "Gold Feathered Chest" 647 | case "145": namefromid := "Gold Stock-Up Chest" 648 | case "146": namefromid := "Gold Zombiefied Chest" 649 | case "147": namefromid := "Gold Rebalanced Chest" 650 | case "148": namefromid := "Gold Ranged Chest" 651 | case "149": namefromid := "Gold Measured Chest" 652 | case "150": namefromid := "Gold Together Chest" 653 | case "151": namefromid := "Gold Documented Chest" 654 | case "152": namefromid := "Gold Mirt Patron Chest" 655 | case "153": namefromid := "Gold Vajra Patron Chest" 656 | case "154": namefromid := "Gold Allied Chest" 657 | case "155": namefromid := "Gold Welcoming Chest" 658 | case "156": namefromid := "Gold Skulking Chest" 659 | case "157": namefromid := "Gold Dashing Chest" 660 | case "158": namefromid := "Silver Pwent Chest" 661 | case "159": namefromid := "Gold Pwent Chest" 662 | case "160": namefromid := "Silver Avren Chest" 663 | } 664 | } 665 | else if (id < 181) { 666 | switch id { 667 | case "161": namefromid := "Gold Avren Chest" 668 | case "162": namefromid := "Silver Sentry Chest" 669 | case "163": namefromid := "Gold Sentry Chest" 670 | case "164": namefromid := "Silver Krull Chest" 671 | case "165": namefromid := "Gold Krull Chest" 672 | case "166": namefromid := "Silver Artemis Chest" 673 | case "167": namefromid := "Gold Artemis Chest" 674 | case "168": namefromid := "Silver M" Chr(244) "rg" Chr(230) "n Chest" 675 | case "169": namefromid := "Gold M" Chr(244) "rg" Chr(230) "n Chest" 676 | case "170": namefromid := "Silver Havilar Chest" 677 | case "171": namefromid := "Gold Havilar Chest" 678 | case "172": namefromid := "Silver Sisaspia Chest" 679 | case "173": namefromid := "Gold Sisaspia Chest" 680 | case "174": namefromid := "Silver Briv Chest" 681 | case "175": namefromid := "Gold Briv Chest" 682 | case "176": namefromid := "Silver Melf Chest" 683 | case "177": namefromid := "Gold Melf Chest" 684 | case "178": namefromid := "Silver Krydle Chest" 685 | case "179": namefromid := "Gold Krydle Chest" 686 | case "180": namefromid := "Silver Jaheira Chest" 687 | } 688 | } 689 | else if (id < 201) { 690 | switch id { 691 | case "181": namefromid := "Gold Jaheira Chest" 692 | case "182": namefromid := "Silver Nova Chest" 693 | case "183": namefromid := "Gold Nova Chest" 694 | case "184": namefromid := "Silver Freely Chest" 695 | case "185": namefromid := "Gold Freely Chest" 696 | case "186": namefromid := "Silver Beadle & Grimm Chest" 697 | case "187": namefromid := "Gold Beadle & Grimm Chest" 698 | case "188": namefromid := "Silver Omin Chest" 699 | case "189": namefromid := "Gold Omin Chest" 700 | case "190": namefromid := "Silver Lazaapz Chest" 701 | case "191": namefromid := "Gold Lazaapz Chest" 702 | case "192": namefromid := "Gold Lucky Chest" 703 | case "193": namefromid := "Gold Courageous Chest" 704 | case "194": namefromid := "Gold Heroic Chest" 705 | case "195": namefromid := "Gold Splattered Chest" 706 | case "196": namefromid := "Gold Magical Chest" 707 | case "197": namefromid := "Gold Versatile Chest" 708 | case "198": namefromid := "Gold Quest-Filled Chest" 709 | case "199": namefromid := "Gold Lowlands Chest" 710 | case "200": namefromid := "Gold Cloned Chest" 711 | } 712 | } 713 | else if (id < 221) { 714 | switch id { 715 | case "201": namefromid := "Gold Pristine Chest" 716 | case "202": namefromid := "Gold Dark Days Chest" 717 | case "203": namefromid := "Gold Dusty Chest" 718 | case "204": namefromid := "Gold Screened Chest" 719 | case "205": namefromid := "Gold Mithral Hall Chest (NOT USED)" 720 | case "206": namefromid := "Gold Hexed Chest" 721 | case "207": namefromid := "Gold Arkhan's Army Chest" 722 | case "208": namefromid := "Gold Stained Chest" 723 | case "209": namefromid := "Gold Broken Chest" 724 | case "210": namefromid := "Gold Arrow-Filled Chest" 725 | case "211": namefromid := "Gold Grubby Chest" 726 | case "212": namefromid := "Gold Ruby Chest" 727 | case "213": namefromid := "Gold Secret Chest" 728 | case "214": namefromid := "Gold Twothbrush Chest" 729 | case "215": namefromid := "Gold Packaged Chest" 730 | case "216": namefromid := "Gold Sprung Chest" 731 | case "217": namefromid := "Gold Shadow Chest" 732 | case "218": namefromid := "Gold Hooked Chest" 733 | case "219": namefromid := "Gold Strahd Patron Chest" 734 | case "220": namefromid := "Gold Extra-Golden Chest" 735 | } 736 | } 737 | else if (id < 241) { 738 | switch id { 739 | case "221": namefromid := "Gold Shelled Chest" 740 | case "222": namefromid := "Gold Hugged Chest" 741 | case "223": namefromid := "Gold Footprint Chest" 742 | case "224": namefromid := "Gold Armored Chest" 743 | case "225": namefromid := "Gold May Day Chest" 744 | case "226": namefromid := "Gold Solwynn Chest" 745 | case "227": namefromid := "Gold Hunted Chest" 746 | case "228": namefromid := "Gold Shielded Chest" 747 | case "229": namefromid := "Gold Pebbled Chest" 748 | case "230": namefromid := "Modron Component Chest" 749 | case "231": namefromid := "Gold Shifted Chest" 750 | case "232": namefromid := "Gold Kissed Chest" 751 | case "233": namefromid := "Gold Tartan Chest" 752 | case "234": namefromid := "Gold Legends Chest" 753 | case "235": namefromid := "Gold Wittled Chest" 754 | case "236": namefromid := "Gold Snakeskin Chest" 755 | case "237": namefromid := "Gold Book-End Chest" 756 | case "238": namefromid := "Gold Striking Chest" 757 | case "239": namefromid := "Gold Rainbowed Chest" 758 | case "240": namefromid := "Gold Whisker Chest" 759 | } 760 | } 761 | else if (id < 261) { 762 | switch id { 763 | case "241": namefromid := "Gold Egg Chest" 764 | case "242": namefromid := "Gold Undermountain Chest" 765 | case "243": namefromid := "Gold Historical Chest" 766 | case "244": namefromid := "Silver Torogar Chest" 767 | case "245": namefromid := "Gold Torogar Chest" 768 | case "246": namefromid := "Silver Ezmerelda Chest" 769 | case "247": namefromid := "Gold Ezmerelda Chest" 770 | case "248": namefromid := "Silver Penelope Chest" 771 | case "249": namefromid := "Gold Penelope Chest" 772 | case "250": namefromid := "Silver Lucius Chest" 773 | case "251": namefromid := "Gold Lucius Chest" 774 | case "252": namefromid := "Silver Baeloth Chest" 775 | case "253": namefromid := "Gold Baeloth Chest" 776 | case "254": namefromid := "Silver Talin Chest" 777 | case "255": namefromid := "Gold Talin Chest" 778 | case "256": namefromid := "Silver Hew Mann Chest" 779 | case "257": namefromid := "Gold Hew Mann Chest" 780 | case "258": namefromid := "Silver Orisha Chest" 781 | case "259": namefromid := "Gold Orisha Chest" 782 | case "260": namefromid := "Silver Alyndra Chest" 783 | } 784 | } 785 | else if (id < 281) { 786 | switch id { 787 | case "261": namefromid := "Gold Alyndra Chest" 788 | case "262": namefromid := "Silver Orkira Chest" 789 | case "263": namefromid := "Gold Orkira Chest" 790 | case "264": namefromid := "Silver Shaka Chest" 791 | case "265": namefromid := "Gold Shaka Chest" 792 | case "266": namefromid := "Silver Mehan Chest" 793 | case "267": namefromid := "Gold Mehan Chest" 794 | case "268": namefromid := "Silver Selise Chest" 795 | case "269": namefromid := "Gold Selise Chest" 796 | case "270": namefromid := "Silver Sgt Knox Chest" 797 | case "271": namefromid := "Gold Sgt Knox Chest" 798 | case "272": namefromid := "Silver Ellywick Chest" 799 | case "273": namefromid := "Gold Ellywick Chest" 800 | case "274": namefromid := "Silver Prudence Chest" 801 | case "275": namefromid := "Gold Prudence Chest" 802 | case "276": namefromid := "Silver Corazon Chest" 803 | case "277": namefromid := "Gold Corazon Chest" 804 | case "278": namefromid := "Gold Bold Chest" 805 | case "279": namefromid := "Gold Rime Chest" 806 | case "280": namefromid := "Gold Feathered Hat Chest" 807 | } 808 | } 809 | else if (id < 301) { 810 | switch id { 811 | case "281": namefromid := "Gold Experimental Chest" 812 | case "282": namefromid := "Electrum Chest" 813 | case "284": namefromid := "Gold Ichor Covered Chest" 814 | case "285": namefromid := "Gold Scrappy Chest" 815 | case "286": namefromid := "Gold Giant's Bane Chest" 816 | case "287": namefromid := "Gold Dragonscale Chest" 817 | case "288": namefromid := "Gold Maze Chest" 818 | case "289": namefromid := "Gold Freezing Chest" 819 | case "290": namefromid := "Gold Coin-Filled Chest" 820 | case "291": namefromid := "Gold Agile Chest" 821 | case "292": namefromid := "Gold Tactical Chest" 822 | case "293": namefromid := "Gold Starburst Chest" 823 | case "294": namefromid := "Gold Radiant Chest" 824 | case "295": namefromid := "Gold Heroes of Aerois Chest" 825 | case "296": namefromid := "Gold Holiday Chest" 826 | case "297": namefromid := "Gold Hunter Chest" 827 | case "298": namefromid := "Gold Cold Chest" 828 | case "299": namefromid := "Gold Grambars Blades Chest" 829 | case "300": namefromid := "Gold Bovine Chest" 830 | } 831 | } 832 | else if (id < 321) { 833 | switch id { 834 | case "301": namefromid := "Gold Dungeon Director Chest" 835 | case "302": namefromid := "Gold Add Venture Chest" 836 | case "303": namefromid := "Gold Glowing Chest" 837 | case "304": namefromid := "Gold Frilly Chest" 838 | case "305": namefromid := "Gold Sunken Chest" 839 | case "306": namefromid := "Gold Ancient Chest" 840 | case "307": namefromid := "Gold Speedy Chest" 841 | case "308": namefromid := "Gold Commentator Chest" 842 | case "309": namefromid := "Gold Orator Chest" 843 | case "310": namefromid := "Gold One-HewMaan-Band Chest" 844 | case "311": namefromid := "Gold Zariel Patron Chest" 845 | case "312": namefromid := "Gold Flaming Chest" 846 | case "313": namefromid := "Gold Tidal Chest" 847 | case "314": namefromid := "Gold Netherese Chest" 848 | case "315": namefromid := "Gold Smores Chest" 849 | ;case "316": namefromid := "UNKNOWN (" id ")" 850 | ;case "317": namefromid := "UNKNOWN (" id ")" 851 | ;case "318": namefromid := "UNKNOWN (" id ")" 852 | case "319": namefromid := "Gold Illusion Chest" 853 | case "320": namefromid := "Gold Coast Chest" 854 | } 855 | } 856 | else if (id < 341) { 857 | switch id { 858 | case "321": namefromid := "Gold Rock Star Chest" 859 | case "322": namefromid := "Gold Twin Chest" 860 | case "323": namefromid := "Glory of Bahamut Chest" 861 | case "324": namefromid := "Gold Winged Chest" 862 | case "325": namefromid := "Gold A-maze-ing Chest" 863 | case "326": namefromid := "Gold Spiky Chest" 864 | case "327": namefromid := "Gold Silvershield Chest" 865 | case "328": namefromid := "Gold Sun Chest" 866 | case "329": namefromid := "Gold Moon Chest" 867 | case "330": namefromid := "Gold Shard Chest" 868 | case "331": namefromid := "Gold Painted Chest" 869 | case "332": namefromid := "Gold Performance Chest" 870 | case "333": namefromid := "Gold Cloudy Chest" 871 | case "334": namefromid := "Silver D'hani Chest" 872 | case "335": namefromid := "Gold D'hani Chest" 873 | case "336": namefromid := "Silver Briv Chest" 874 | case "337": namefromid := "Gold Briv Chest" 875 | case "338": namefromid := "Silver Widdle Chest" 876 | case "339": namefromid := "Gold Widdle Chest" 877 | case "340": namefromid := "Silver Yorven Chest" 878 | } 879 | } 880 | else if (id < 361) { 881 | switch id { 882 | case "341": namefromid := "Gold Yorven Chest" 883 | case "342": namefromid := "Silver Viconia Chest" 884 | case "343": namefromid := "Gold Viconia Chest" 885 | case "344": namefromid := "Silver Rust Chest" 886 | case "345": namefromid := "Gold Rust Chest" 887 | case "346": namefromid := "Silver Vi Chest" 888 | case "347": namefromid := "Gold Vi Chest" 889 | case "348": namefromid := "Silver Desmond Chest" 890 | case "349": namefromid := "Gold Desmond Chest" 891 | case "350": namefromid := "Silver Tatyana Chest" 892 | case "351": namefromid := "Gold Tatyana Chest" 893 | case "352": namefromid := "Silver Gazrick Chest" 894 | case "353": namefromid := "Gold Gazrick Chest" 895 | case "354": namefromid := "Silver Dungeon Master Chest" 896 | case "355": namefromid := "Gold Dungeon Master Chest" 897 | case "356": namefromid := "Silver Nordom Chest" 898 | case "357": namefromid := "Gold Nordom Chest" 899 | case "358": namefromid := "Silver Merilwen Chest" 900 | case "359": namefromid := "Gold Merilwen Chest" 901 | case "360": namefromid := "Silver Nahara Chest" 902 | } 903 | } 904 | else if (id < 381) { 905 | switch id { 906 | case "361": namefromid := "Gold Nahara Chest" 907 | case "362": namefromid := "Silver Y5E15 Chest" 908 | case "363": namefromid := "Gold Y5E15 Chest" 909 | case "364": namefromid := "Silver Y5E16 Chest" 910 | case "365": namefromid := "Gold Y5E16 Chest" 911 | case "366": namefromid := "Silver Y5E17 Chest" 912 | case "367": namefromid := "Gold Y5E17 Chest" 913 | case "368": namefromid := "Gold Barred Chest" 914 | case "369": namefromid := "Gold Charred Chest" 915 | case "370": namefromid := "Gold Weighted Chest" 916 | case "371": namefromid := "Gold Fey Chest" 917 | case "372": namefromid := "Gold Contract Chest" 918 | case "373": namefromid := "Gold Blasted Chest" 919 | case "374": namefromid := "Gold Big Top Chest" 920 | case "375": namefromid := "Gold Spinnaker Chest" 921 | case "376": namefromid := "Gold Weapons Chest" 922 | case "377": namefromid := "Gold Powered Chest" 923 | case "378": namefromid := "Gold Pumpkin Chest" 924 | case "379": namefromid := "Gold Polymorphed Chest" 925 | case "380": namefromid := "Gold Captain Boo Chest" 926 | } 927 | } 928 | else if (id < 401) { 929 | switch id { 930 | case "381": namefromid := "Gold Freshly Painted Chest" 931 | case "382": namefromid := "Gold Branched Chest" 932 | case "383": namefromid := "Gold Blazed Chest" 933 | case "384": namefromid := "Gold Spotlight Chest" 934 | case "385": namefromid := "Gold Pirate Chest" 935 | case "386": namefromid := "Gold Gingerbread Chest" 936 | case "387": namefromid := "Gold Candy Cane Chest" 937 | case "388": namefromid := "Gold Carrot Chest" 938 | case "389": namefromid := "Gold Overstuffed Chest" 939 | case "390": namefromid := "Gold Ice Dagger Chest" 940 | case "391": namefromid := "Gold Spell-Covered Chest" 941 | case "392": namefromid := "Gold Elven Chest" 942 | case "393": namefromid := "Gold Gold Piece Chest" 943 | case "394": namefromid := "Gold Pouch Chest" 944 | case "395": namefromid := "Gold Tarrasque Chest" 945 | case "396": namefromid := "Gold Wheeled Chest" 946 | case "397": namefromid := "Gold Shadow Chest" 947 | case "398": namefromid := "Gold Shenanigan Chest" 948 | case "399": namefromid := "Gold Raven Queens Chest" 949 | case "400": namefromid := "Gold Shadow-Eberron Chest" 950 | } 951 | } 952 | else if (id < 412) { 953 | switch id { 954 | case "401": namefromid := "Gold Rescue Chest" 955 | case "402": namefromid := "Gold New Moon Chest" 956 | case "403": namefromid := "Gold Vampiric Chest" 957 | case "404": namefromid := "Gold Snack Chest" 958 | case "405": namefromid := "Gold Skewered Chest" 959 | case "406": namefromid := "Gold Swag Chest" 960 | case "407": namefromid := "Gold Savage Chest" 961 | case "408": namefromid := "Gold Dice Chest" 962 | case "409": namefromid := "Gold Clockwork Chest" 963 | case "410": namefromid := "Gold Marching Chest" 964 | case "411": namefromid := "Gold Toolbox Chest" 965 | ; case "412": namefromid := "Gold Elven Chest" 966 | ; case "413": namefromid := "Gold Gold Piece Chest" 967 | ; case "414": namefromid := "Gold Pouch Chest" 968 | ; case "415": namefromid := "Gold Tarrasque Chest" 969 | ; case "416": namefromid := "UNKNOWN (" id ")" 970 | ; case "417": namefromid := "UNKNOWN (" id ")" 971 | ; case "418": namefromid := "UNKNOWN (" id ")" 972 | ; case "419": namefromid := "UNKNOWN (" id ")" 973 | ; case "420": namefromid := "UNKNOWN (" id ")" 974 | } 975 | } 976 | else { 977 | namefromid := "UNKNOWN (" id ")" 978 | } 979 | return namefromid 980 | } 981 | 982 | KlehoFromID(id) { 983 | if (id < 21) { 984 | switch id { 985 | case "14": namefromid := "3a23" 986 | case "15": namefromid := "4a44" 987 | case "16": namefromid := "5a49" 988 | case "17": namefromid := "6a64" 989 | case "19": namefromid := "7a84" 990 | case "20": namefromid := "8a89" 991 | } 992 | } 993 | else if (id < 41) { 994 | switch id { 995 | case "21": namefromid := "9a104" 996 | case "22": namefromid := "10a119" 997 | case "23": namefromid := "11a134" 998 | case "24": namefromid := "12a139" 999 | case "25": namefromid := "13a144" 1000 | case "26": namefromid := "14a159" 1001 | case "27": namefromid := "16a174" 1002 | case "28": namefromid := "18a202" 1003 | case "29": namefromid := "19a218" 1004 | case "31": namefromid := "20a224" 1005 | case "32": namefromid := "21a240" 1006 | case "33": namefromid := "3a256" 1007 | case "34": namefromid := "4a272" 1008 | case "35": namefromid := "5a288" 1009 | case "36": namefromid := "6a293" 1010 | case "37": namefromid := "7a298" 1011 | case "38": namefromid := "8a303" 1012 | case "39": namefromid := "9a308" 1013 | case "40": namefromid := "10a313" 1014 | } 1015 | } 1016 | else if (id < 61) { 1017 | switch id { 1018 | case "41": namefromid := "11a318" 1019 | case "42": namefromid := "12a323" 1020 | case "43": namefromid := "13a328" 1021 | case "44": namefromid := "14a333" 1022 | case "45": namefromid := "16a338" 1023 | case "46": namefromid := "18a343" 1024 | case "47": namefromid := "19a348" 1025 | case "48": namefromid := "20a353" 1026 | case "49": namefromid := "21a358" 1027 | case "50": namefromid := "3a438" 1028 | case "51": namefromid := "4a443" 1029 | case "52": namefromid := "5a448" 1030 | case "53": namefromid := "6a453" 1031 | case "54": namefromid := "7a458" 1032 | case "55": namefromid := "8a463" 1033 | case "56": namefromid := "9a468" 1034 | case "57": namefromid := "10a473" 1035 | case "58": namefromid := "11a478" 1036 | case "59": namefromid := "12a483" 1037 | case "60": namefromid := "13a488" 1038 | } 1039 | } 1040 | else if (id < 81) { 1041 | switch id { 1042 | case "61": namefromid := "14a493" 1043 | case "62": namefromid := "16a498" 1044 | case "63": namefromid := "18a503" 1045 | case "64": namefromid := "19a508" 1046 | case "65": namefromid := "20a513" 1047 | case "66": namefromid := "21a518" 1048 | case "69": namefromid := "3a700" 1049 | case "70": namefromid := "4a705" 1050 | case "71": namefromid := "5a710" 1051 | case "72": namefromid := "6a715" 1052 | case "73": namefromid := "7a720" 1053 | case "74": namefromid := "8a725" 1054 | case "75": namefromid := "9a730" 1055 | case "76": namefromid := "10a735" 1056 | case "77": namefromid := "11a740" 1057 | case "78": namefromid := "12a745" 1058 | case "79": namefromid := "13a750" 1059 | case "80": namefromid := "14a755" 1060 | } 1061 | } 1062 | else if (id < 86) { 1063 | switch id { 1064 | case "81": namefromid := "16a760" 1065 | case "82": namefromid := "18a765" 1066 | case "83": namefromid := "19a770" 1067 | case "84": namefromid := "20a775" 1068 | case "85": namefromid := "21a780" 1069 | } 1070 | } 1071 | else { 1072 | namefromid := "UNKNOWN (" id ")" 1073 | } 1074 | return namefromid 1075 | } 1076 | 1077 | ChestIDFromChampID(id) { 1078 | if (id < 21) { 1079 | switch id { 1080 | case "14": chestfromchamp := "4" 1081 | case "15": chestfromchamp := "6" 1082 | case "16": chestfromchamp := "8" 1083 | case "17": chestfromchamp := "10" 1084 | case "19": chestfromchamp := "12" 1085 | case "20": chestfromchamp := "17" 1086 | } 1087 | } 1088 | else if (id < 41) { 1089 | switch id { 1090 | case "21": chestfromchamp := "19" 1091 | case "22": chestfromchamp := "22" 1092 | case "23": chestfromchamp := "27" 1093 | case "24": chestfromchamp := "30" 1094 | case "25": chestfromchamp := "36" 1095 | case "26": chestfromchamp := "41" 1096 | case "27": chestfromchamp := "46" 1097 | case "28": chestfromchamp := "54" 1098 | case "29": chestfromchamp := "56" 1099 | case "31": chestfromchamp := "58" 1100 | case "32": chestfromchamp := "68" 1101 | case "33": chestfromchamp := "72" 1102 | case "34": chestfromchamp := "74" 1103 | case "35": chestfromchamp := "76" 1104 | case "36": chestfromchamp := "82" 1105 | case "37": chestfromchamp := "84" 1106 | case "38": chestfromchamp := "86" 1107 | case "39": chestfromchamp := "88" 1108 | case "40": chestfromchamp := "90" 1109 | } 1110 | } 1111 | else if (id < 61) { 1112 | switch id { 1113 | case "41": chestfromchamp := "92" 1114 | case "42": chestfromchamp := "94" 1115 | case "43": chestfromchamp := "96" 1116 | case "44": chestfromchamp := "98" 1117 | case "45": chestfromchamp := "100" 1118 | case "46": chestfromchamp := "102" 1119 | case "47": chestfromchamp := "104" 1120 | case "48": chestfromchamp := "106" 1121 | case "49": chestfromchamp := "108" 1122 | case "50": chestfromchamp := "159" 1123 | case "51": chestfromchamp := "161" 1124 | case "52": chestfromchamp := "163" 1125 | case "53": chestfromchamp := "165" 1126 | case "54": chestfromchamp := "167" 1127 | case "55": chestfromchamp := "169" 1128 | case "56": chestfromchamp := "171" 1129 | case "57": chestfromchamp := "173" 1130 | case "58": chestfromchamp := "175" 1131 | case "59": chestfromchamp := "177" 1132 | case "60": chestfromchamp := "179" 1133 | } 1134 | } 1135 | else if (id < 81) { 1136 | switch id { 1137 | case "61": chestfromchamp := "181" 1138 | case "62": chestfromchamp := "183" 1139 | case "63": chestfromchamp := "185" 1140 | case "64": chestfromchamp := "187" 1141 | case "65": chestfromchamp := "189" 1142 | case "66": chestfromchamp := "191" 1143 | case "69": chestfromchamp := "245" 1144 | case "70": chestfromchamp := "247" 1145 | case "71": chestfromchamp := "249" 1146 | case "72": chestfromchamp := "251" 1147 | case "73": chestfromchamp := "253" 1148 | case "74": chestfromchamp := "255" 1149 | case "75": chestfromchamp := "257" 1150 | case "76": chestfromchamp := "259" 1151 | case "77": chestfromchamp := "261" 1152 | case "78": chestfromchamp := "263" 1153 | case "79": chestfromchamp := "265" 1154 | case "80": chestfromchamp := "267" 1155 | } 1156 | } 1157 | else if (id < 86) { 1158 | switch id { 1159 | case "81": chestfromchamp := "269" 1160 | case "82": chestfromchamp := "271" 1161 | case "93": chestfromchamp := "273" 1162 | case "84": chestfromchamp := "275" 1163 | case "85": chestfromchamp := "277" 1164 | } 1165 | } 1166 | else { 1167 | chestfromchamp := "UNKNOWN (" id ")" 1168 | } 1169 | return chestfromchamp 1170 | } -------------------------------------------------------------------------------- /IdleCombosbac.ahk: -------------------------------------------------------------------------------- 1 | #include %A_ScriptDir% 2 | #include JSON.ahk 3 | #include idledict.ahk 4 | ;1.96 5 | ;update dict file to latest content and versioned to 1.96 6 | ;1.95 7 | ;disabled opening chest while client is open, 8 | ;1.94 9 | ;Updated Cleaned up UI around redeam codes with mikebaldi1980 Help 10 | ;added in party 3 and core 3 with code from HPX 11 | ;updated Eunomiac code to copy and find code from discord combination channel 12 | ;should be robust enough to find chest code in most channel but haven't verified 13 | ;1.93 14 | ;more work to clean up window for combination code. 15 | ;Added in 1.92 16 | ;added Eunomiac code to copy and find code from discord combination channel 17 | ;Added in 1.91 18 | ;Added DeathoEye Server update 19 | ;Neal's Json escape code for redeaming codes 20 | ;updated dict file to 1.91 champs, chest and feats up to UserDetailsFile 21 | 22 | ;Added in 1.9 23 | ;-Patron Zariel 24 | ;-Dictionary file updated to 1.9 25 | ; 26 | ;Added in 1.8 27 | ;-Pity Timer for Golds on Inventory Tab 28 | ;-Event Pity Timers in the Chests menu 29 | ;-More info on number of tokens/FPs available 30 | ;-Kleho image now works for Events & TGs 31 | ;-Fix for "Chests Opened: 0" in log output 32 | ;-Dictionary file updated to 1.8 33 | ;-(Also resized the window finally) :P 34 | 35 | ;Special thanks to all the idle dragons who inspired and assisted me! 36 | global VersionNumber := "1.96" 37 | global CurrentDictionary := "1.96" 38 | 39 | ;Local File globals 40 | global OutputLogFile := "idlecombolog.txt" 41 | global SettingsFile := "idlecombosettings.json" 42 | global UserDetailsFile := "userdetails.json" 43 | global ChestOpenLogFile := "chestopenlog.json" 44 | global BlacksmithLogFile := "blacksmithlog.json" 45 | global RedeemCodeLogFile := "redeemcodelog.json" 46 | global JournalFile := "journal.json" 47 | global CurrentSettings := [] 48 | global GameInstallDir := "C:\Program Files (x86)\Steam\steamapps\common\IdleChampions\" 49 | global WRLFile := GameInstallDir "IdleDragons_Data\StreamingAssets\downloaded_files\webRequestLog.txt" 50 | global DictionaryFile := "https://raw.githubusercontent.com/QuickMythril/idlecombos/master/idledict.ahk" 51 | global LocalDictionary := "idledict.ahk" 52 | 53 | global ICSettingsFile := A_AppData 54 | StringTrimRight, ICSettingsFile, ICSettingsFile, 7 55 | ICSettingsFile := ICSettingsFile "LocalLow\Codename Entertainment\Idle Champions\localSettings.json" 56 | global GameClient := GameInstallDir "IdleDragons.exe" 57 | 58 | ;Settings globals 59 | global ServerName := "ps7" 60 | global GetDetailsonStart := 0 61 | global LaunchGameonStart := 0 62 | global FirstRun := 1 63 | global AlwaysSaveChests := 0 64 | global AlwaysSaveContracts := 0 65 | global AlwaysSaveCodes := 0 66 | global SettingsCheckValue := 10 ;used to check for outdated settings file 67 | global NewSettings := JSON.stringify({"servername":"ps7","firstrun":0,"user_id":0,"hash":0,"instance_id":0,"getdetailsonstart":0,"launchgameonstart":0,"alwayssavechests":1,"alwayssavecontracts":1,"alwayssavecodes":1}) 68 | 69 | ;Server globals 70 | global DummyData := "&language_id=1×tamp=0&request_id=0&network_id=11&mobile_client_version=999" 71 | global CodestoEnter := "" 72 | 73 | ;User info globals 74 | global UserID := 0 75 | global UserHash := 0 76 | global InstanceID := 0 77 | global UserDetails := [] 78 | global ActiveInstance := 0 79 | global CurrentAdventure := "" 80 | global CurrentArea := "" 81 | global CurrentPatron := "" 82 | global BackgroundAdventure := "" 83 | global BackgroundArea := "" 84 | global BackgroundPatron := "" 85 | global Background2Adventure := "" 86 | global Background2Area := "" 87 | global Background2Patron := "" 88 | global AchievementInfo := "This page intentionally left blank.`n`n`n`n`n`n`n" 89 | global BlessingInfo := "`n`n`n`n`n`n" 90 | global ChampDetails := "" 91 | global TotalChamps := 0 92 | ;Inventory globals 93 | global CurrentGems := "" 94 | global AvailableChests := "" 95 | global SpentGems := "" 96 | global CurrentGolds := "" 97 | global GoldPity := "" 98 | global CurrentSilvers := "" 99 | global CurrentTGPs := "" 100 | global AvailableTGs := "" 101 | global NextTGPDrop := "" 102 | global CurrentTokens := "" 103 | global CurrentTinyBounties := "" 104 | global CurrentSmBounties := "" 105 | global CurrentMdBounties := "" 106 | global CurrentLgBounties := "" 107 | global AvailableTokens := "" 108 | global AvailableFPs := "" 109 | global CurrentTinyBS := "" 110 | global CurrentSmBS := "" 111 | global CurrentMdBS := "" 112 | global CurrentLgBS := "" 113 | global AvailableBSLvs := "" 114 | ;Loot globals 115 | global EpicGearCount := 0 116 | global BrivSlot4 := 0 117 | global BrivZone := 0 118 | ;Modron globals 119 | global FGCore := "`n`n" 120 | global BGCore := "`n`n" 121 | global BG2Core := "`n`n" 122 | ;Patron globals 123 | global MirtVariants := "" 124 | global MirtCompleted := "" 125 | global MirtVariantTotal := "" 126 | global MirtFPCurrency := "" 127 | global MirtChallenges := "" 128 | global MirtRequires := "" 129 | global MirtCosts := "" 130 | global VajraVariants := "" 131 | global VajraCompleted := "" 132 | global VajraVariantTotal := "" 133 | global VajraFPCurrency := "" 134 | global VajraChallenges := "" 135 | global VajraRequires := "" 136 | global VajraCosts := "" 137 | global StrahdVariants := "" 138 | global StrahdCompleted := "" 139 | global StrahdVariantTotal := "" 140 | global StrahdFPCurrency := "" 141 | global StrahdChallenges := "" 142 | global StrahdRequires := "" 143 | global StrahdCosts := "" 144 | global ZarielVariants := "" 145 | global ZarielCompleted := "" 146 | global ZarielVariantTotal := "" 147 | global ZarielFPCurrency := "" 148 | global ZarielChallenges := "" 149 | global ZarielRequires := "" 150 | global ZarielCosts := "" 151 | 152 | 153 | ;GUI globals 154 | global oMyGUI := "" 155 | global OutputText := "Test" 156 | global OutputStatus := "Welcome to IdleCombos v" VersionNumber 157 | global CurrentTime := "" 158 | global CrashProtectStatus := "Crash Protect`nDisabled" 159 | global CrashCount := 0 160 | global LastUpdated := "No data loaded." 161 | global TrayIcon := systemroot "\system32\imageres.dll" 162 | global LastBSChamp := "" 163 | global foundCodeString := "" 164 | 165 | ;BEGIN: default run commands 166 | if FileExist(TrayIcon) { 167 | if (SubStr(A_OSVersion, 1, 2) == 10) { 168 | Menu, Tray, Icon, %TrayIcon%, 300 169 | } 170 | else if (A_OSVersion == "WIN_8") { 171 | Menu, Tray, Icon, %TrayIcon%, 284 172 | } 173 | else if (A_OSVersion == "WIN_7") { 174 | Menu, Tray, Icon, %TrayIcon%, 78 175 | } 176 | else if (A_OSVersion == "WIN_VISTA") { 177 | Menu, Tray, Icon, %TrayIcon%, 77 178 | } ; WIN_8.1, WIN_2003, WIN_XP, WIN_2000, WIN_NT4, WIN_95, WIN_98, WIN_ME 179 | } 180 | UpdateLogTime() 181 | FileAppend, (%CurrentTime%) IdleCombos v%VersionNumber% started.`n, %OutputLogFile% 182 | FileRead, OutputText, %OutputLogFile% 183 | if (!oMyGUI) { 184 | oMyGUI := new MyGui() 185 | } 186 | ;First run checks and setup 187 | if !FileExist(SettingsFile) { 188 | FileAppend, %NewSettings%, %SettingsFile% 189 | UpdateLogTime() 190 | FileAppend, (%CurrentTime%) Settings file "idlecombosettings.json" created.`n, %OutputLogFile% 191 | FileRead, OutputText, %OutputLogFile% 192 | oMyGUI.Update() 193 | } 194 | FileRead, rawsettings, %SettingsFile% 195 | CurrentSettings := JSON.parse(rawsettings) 196 | if !(CurrentSettings.Count() == SettingsCheckValue) { 197 | FileDelete, %SettingsFile% 198 | FileAppend, %NewSettings%, %SettingsFile% 199 | UpdateLogTime() 200 | FileAppend, (%CurrentTime%) Settings file "idlecombosettings.json" created.`n, %OutputLogFile% 201 | FileRead, OutputText, %OutputLogFile% 202 | FileRead, rawsettings, %SettingsFile% 203 | CurrentSettings := JSON.parse(rawsettings) 204 | oMyGUI.Update() 205 | MsgBox, Your settings file has been deleted due to an update to IdleCombos. Please verify that your settings are set as preferred. 206 | } 207 | if FileExist(A_ScriptDir "\webRequestLog.txt") { 208 | MsgBox, 4, , % "WRL File detected. Use file?" 209 | IfMsgBox, Yes 210 | { 211 | WRLFile := A_ScriptDir "\webRequestLog.txt" 212 | FirstRun() 213 | } 214 | } 215 | if !(CurrentSettings.firstrun) { 216 | FirstRun() 217 | } 218 | if (CurrentSettings.user_id && CurrentSettings.hash) { 219 | UserID := CurrentSettings.user_id 220 | UserHash := CurrentSettings.hash 221 | InstanceID := CurrentSettings.instance_id 222 | SB_SetText("User ID & Hash ready.") 223 | } 224 | else { 225 | SB_SetText("User ID & Hash not found!") 226 | } 227 | ;Loading current settings 228 | ServerName := CurrentSettings.servername 229 | GetDetailsonStart := CurrentSettings.getdetailsonstart 230 | LaunchGameonStart := CurrentSettings.launchgameonstart 231 | AlwaysSaveChests := CurrentSettings.alwayssavechests 232 | AlwaysSaveContracts := CurrentSettings.alwayssavecontracts 233 | AlwaysSaveCodes := CurrentSettings.alwayssavecodes 234 | if (GetDetailsonStart == "1") { 235 | GetUserDetails() 236 | } 237 | if (LaunchGameonStart == "1") { 238 | LaunchGame() 239 | } 240 | oMyGUI.Update() 241 | SendMessage, 0x115, 7, 0, Edit1, A 242 | return 243 | ;END: default run commands 244 | 245 | ;BEGIN: GUI Defs 246 | class MyGui { 247 | Width := "550" 248 | Height := "275" ;"250" 249 | 250 | __New() 251 | { 252 | Gui, MyWindow:New 253 | Gui, MyWindow:+Resize -MaximizeBox 254 | 255 | Menu, ICSettingsSubmenu, Add, &View Settings, ViewICSettings 256 | Menu, ICSettingsSubmenu, Add, &Framerate, SetFramerate 257 | Menu, ICSettingsSubmenu, Add, &Particles, SetParticles 258 | Menu, ICSettingsSubmenu, Add, &UI Scale, SetUIScale 259 | Menu, FileSubmenu, Add, &Idle Champions Settings, :ICSettingsSubmenu 260 | 261 | Menu, FileSubmenu, Add, &Launch Game Client, LaunchGame 262 | Menu, FileSubmenu, Add, &Update UserDetails, GetUserDetails 263 | Menu, FileSubmenu, Add 264 | Menu, FileSubmenu, Add, &Reload IdleCombos, Reload_Clicked 265 | Menu, FileSubmenu, Add, E&xit IdleCombos, Exit_Clicked 266 | Menu, IdleMenu, Add, &File, :FileSubmenu 267 | 268 | Menu, ChestsSubmenu, Add, Buy Gold, Buy_Gold 269 | Menu, ChestsSubmenu, Add, Buy Silver, Buy_Silver 270 | Menu, ChestsSubmenu, Add, Open Gold, Open_Gold 271 | Menu, ChestsSubmenu, Add, Open Silver, Open_Silver 272 | Menu, ChestsSubmenu, Add, Pity Timers, ShowPityTimers 273 | Menu, ToolsSubmenu, Add, &Chests, :ChestsSubmenu 274 | 275 | Menu, BlacksmithSubmenu, Add, Use Tiny Contracts, Tiny_Blacksmith 276 | Menu, BlacksmithSubmenu, Add, Use Small Contracts, Sm_Blacksmith 277 | Menu, BlacksmithSubmenu, Add, Use Medium Contracts, Med_Blacksmith 278 | Menu, BlacksmithSubmenu, Add, Use Large Contracts, Lg_Blacksmith 279 | Menu, BlacksmithSubmenu, Add, Item Level Report, GearReport 280 | Menu, BlacksmithSubmenu, Add, Active Patron Feats, PatronFeats 281 | Menu, ToolsSubmenu, Add, &Blacksmith, :BlacksmithSubmenu 282 | 283 | Menu, ToolsSubmenu, Add, &Redeem Codes, Open_Codes 284 | 285 | Menu, AdvSubmenu, Add, &Load New Adv, LoadAdventure 286 | Menu, AdvSubmenu, Add, &End Current Adv, EndAdventure 287 | ;Menu, AdvSubmenu, Add, Load New BG Adv, LoadBGAdventure 288 | Menu, AdvSubmenu, Add, End Background Adv, EndBGAdventure 289 | Menu, AdvSubmenu, Add, End Background2 Adv, EndBG2Adventure 290 | Menu, AdvSubmenu, Add, &Kleho Image, KlehoImage 291 | Menu, AdvSubmenu, Add, &Incomplete Variants, IncompleteVariants 292 | Menu, AdvSubmenu, Add, Adventure List, AdventureList 293 | Menu, ToolsSubmenu, Add, &Adventure Manager, :AdvSubmenu 294 | 295 | Menu, ToolsSubmenu, Add, &Briv Stack Calculator, Briv_Calc 296 | Menu, IdleMenu, Add, &Tools, :ToolsSubmenu 297 | 298 | Menu, HelpSubmenu, Add, &Run Setup, FirstRun 299 | Menu, HelpSubmenu, Add, Clear &Log, Clear_Log 300 | Menu, HelpSubmenu, Add, Download &Journal, Get_Journal 301 | Menu, HelpSubmenu, Add, CNE &Support Ticket, Open_Ticket 302 | Menu, HelpSubmenu, Add 303 | Menu, HelpSubmenu, Add, &List Champ IDs, List_ChampIDs 304 | Menu, HelpSubmenu, Add, &About IdleCombos, About_Clicked 305 | Menu, HelpSubmenu, Add, &Update Dictionary, Update_Dictionary 306 | Menu, HelpSubmenu, Add, &Discord Support Server, Discord_Clicked 307 | Menu, IdleMenu, Add, &Help, :HelpSubmenu 308 | Gui, Menu, IdleMenu 309 | 310 | col1_x := 5 311 | col2_x := 420 312 | col3_x := 480 313 | row_y := 5 314 | 315 | Gui, Add, StatusBar,, %OutputStatus% 316 | 317 | Gui, MyWindow:Add, Button, x%col2_x% y%row_y% w60 gReload_Clicked, Reload 318 | Gui, MyWindow:Add, Button, x%col3_x% y%row_y% w60 gExit_Clicked, Exit 319 | 320 | Gui, MyWindow:Add, Tab3, x%col1_x% y%row_y% w400 h230, Summary|Adventures|Inventory||Patrons|Champions|Settings|Log| 321 | Gui, Tab 322 | 323 | row_y := row_y + 25 324 | ;Gui, MyWindow:Add, Button, x%col3_x% y%row_y% w60 gUpdate_Clicked, Update 325 | row_y := row_y + 25 326 | 327 | Gui, MyWindow:Add, Text, x410 y53 vCrashProtectStatus, % CrashProtectStatus 328 | Gui, MyWindow:Add, Button, x%col3_x% y%row_y% w60 gCrash_Toggle, Toggle 329 | 330 | Gui, MyWindow:Add, Text, x410 y100, Data Timestamp: 331 | Gui, MyWindow:Add, Text, x410 y120 vLastUpdated w220, % LastUpdated 332 | Gui, MyWindow:Add, Button, x410 y140 w60 gUpdate_Clicked, Update 333 | 334 | Gui, Tab, Summary 335 | Gui, MyWindow:Add, Text, vAchievementInfo x15 y33 w300, % AchievementInfo 336 | Gui, MyWindow:Add, Text, vBlessingInfo x200 y33 w300, % BlessingInfo 337 | 338 | Gui, Tab, Adventures 339 | Gui, MyWindow:Add, Text, x15 y33 w130, Current Adventure: 340 | Gui, MyWindow:Add, Text, vCurrentAdventure x+2 w50, % CurrentAdventure 341 | Gui, MyWindow:Add, Text, x15 y+p w130, Current Patron: 342 | Gui, MyWindow:Add, Text, vCurrentPatron x+2 w50, % CurrentPatron 343 | Gui, MyWindow:Add, Text, x15 y+p w130, Current Area: 344 | Gui, MyWindow:Add, Text, vCurrentArea x+2 w50, % CurrentArea 345 | Gui, MyWindow:Add, Text, x15 y76 w130, Background Adventure: 346 | Gui, MyWindow:Add, Text, vBackgroundAdventure x+2 w50, % BackgroundAdventure 347 | Gui, MyWindow:Add, Text, x15 y+p w130, Background Patron: 348 | Gui, MyWindow:Add, Text, vBackgroundPatron x+2 w50, % BackgroundPatron 349 | Gui, MyWindow:Add, Text, x15 y+p w130, Background Area: 350 | Gui, MyWindow:Add, Text, vBackgroundArea x+2 w50, % BackgroundArea 351 | Gui, MyWindow:Add, Text, x15 y119 w130, Background2 Adventure: 352 | Gui, MyWindow:Add, Text, vBackground2Adventure x+2 w50, % Background2Adventure 353 | Gui, MyWindow:Add, Text, x15 y+p w130, Background2 Patron: 354 | Gui, MyWindow:Add, Text, vBackground2Patron x+2 w50, % Background2Patron 355 | Gui, MyWindow:Add, Text, x15 y+p w130, Background2 Area: 356 | Gui, MyWindow:Add, Text, vBackground2Area x+2 w50, % Background2Area 357 | 358 | Gui, MyWindow:Add, Text, vFGCore x200 y33 w150, % FGCore 359 | Gui, MyWindow:Add, Text, vBGCore x200 y76 w150, % BGCore 360 | Gui, MyWindow:Add, Text, vBG2Core x200 y119 w150, % BG2Core 361 | 362 | Gui, Tab, Inventory 363 | Gui, MyWindow:Add, Text, x15 y33 w70, Current Gems: 364 | Gui, MyWindow:Add, Text, vCurrentGems x+2 w75 right, % CurrentGems 365 | Gui, MyWindow:Add, Text, vAvailableChests x+10 w190, % AvailableChests 366 | Gui, MyWindow:Add, Text, x15 y+p w70, (Spent Gems): 367 | Gui, MyWindow:Add, Text, vSpentGems x+2 w75 right, % SpentGems 368 | 369 | Gui, MyWindow:Add, Text, x15 y+5+p w110, Gold Chests: 370 | Gui, MyWindow:Add, Text, vCurrentGolds x+2 w35 right, % CurrentGolds 371 | Gui, MyWindow:Add, Text, vGoldPity x+10 w190, % GoldPity 372 | Gui, MyWindow:Add, Text, x15 y+p w110, Silver Chests: 373 | Gui, MyWindow:Add, Text, vCurrentSilvers x+2 w35 right, % CurrentSilvers 374 | Gui, MyWindow:Add, Text, x+105 y+1 w185, Next TGP: 375 | Gui, MyWindow:Add, Text, x15 y+0 w110, Time Gate Pieces: 376 | Gui, MyWindow:Add, Text, vCurrentTGPs x+2 w35 right, % CurrentTGPs 377 | Gui, MyWindow:Add, Text, vAvailableTGs x+10 w85, % AvailableTGs 378 | Gui, MyWindow:Add, Text, vNextTGPDrop x+10 w220, % NextTGPDrop 379 | 380 | Gui, MyWindow:Add, Text, x15 y+5+p w110, Tiny Bounties: 381 | Gui, MyWindow:Add, Text, vCurrentTinyBounties x+2 w35 right, % CurrentTinyBounties 382 | Gui, MyWindow:Add, Text, x15 y+p w110, Small Bounties: 383 | Gui, MyWindow:Add, Text, vCurrentSmBounties x+2 w35 right, % CurrentSmBounties 384 | Gui, MyWindow:Add, Text, vAvailableTokens x+10 w220, % AvailableTokens 385 | Gui, MyWindow:Add, Text, x15 y+p w110, Medium Bounties: 386 | Gui, MyWindow:Add, Text, vCurrentMdBounties x+2 w35 right, % CurrentMdBounties 387 | Gui, MyWindow:Add, Text, vCurrentTokens x+10 w185, % CurrentTokens 388 | Gui, MyWindow:Add, Text, x15 y+p w110, Large Bounties: 389 | Gui, MyWindow:Add, Text, vCurrentLgBounties x+2 w35 right, % CurrentLgBounties 390 | Gui, MyWindow:Add, Text, vAvailableFPs x+10 w220, % AvailableFPs 391 | 392 | Gui, MyWindow:Add, Text, x15 y+5+p w110, Tiny Blacksmiths: 393 | Gui, MyWindow:Add, Text, vCurrentTinyBS x+2 w35 right, % CurrentTinyBS 394 | Gui, MyWindow:Add, Text, vAvailableBSLvs x+10 w175, % AvailableBSLvs 395 | Gui, MyWindow:Add, Text, x15 y+p w110, Small Blacksmiths: 396 | Gui, MyWindow:Add, Text, vCurrentSmBS x+2 w35 right, % CurrentSmBS 397 | Gui, MyWindow:Add, Text, x15 y+p w110, Medium Blacksmiths: 398 | Gui, MyWindow:Add, Text, vCurrentMdBS x+2 w35 right, % CurrentMdBS 399 | Gui, MyWindow:Add, Text, x15 y+p w110, Large Blacksmiths: 400 | Gui, MyWindow:Add, Text, vCurrentLgBS x+2 w35 right, % CurrentLgBS 401 | 402 | Gui, Tab, Patrons 403 | Gui, MyWindow:Add, Text, x15 y33 w75, Mirt Variants: 404 | Gui, MyWindow:Add, Text, vMirtVariants x+p w75 right cRed, % MirtVariants 405 | Gui, MyWindow:Add, Text, x15 y+p w95, Mirt FP Currency: 406 | Gui, MyWindow:Add, Text, vMirtFPCurrency x+p w55 right cRed, % MirtFPCurrency 407 | Gui, MyWindow:Add, Text, vMirtRequires x+2 w200 right, % MirtRequires 408 | Gui, MyWindow:Add, Text, x15 y+p w95, Mirt Challenges: 409 | Gui, MyWindow:Add, Text, vMirtChallenges x+p w55 right cRed, % MirtChallenges 410 | Gui, MyWindow:Add, Text, vMirtCosts x+2 w200 right, % MirtCosts 411 | 412 | Gui, MyWindow:Add, Text, x15 y+5+p w75, Vajra Variants: 413 | Gui, MyWindow:Add, Text, vVajraVariants x+p w75 right cRed, % VajraVariants 414 | Gui, MyWindow:Add, Text, x15 y+p w95, Vajra FP Currency: 415 | Gui, MyWindow:Add, Text, vVajraFPCurrency x+p w55 right cRed, % VajraFPCurrency 416 | Gui, MyWindow:Add, Text, vVajraRequires x+2 w200 right, % VajraRequires 417 | Gui, MyWindow:Add, Text, x15 y+p w95, Vajra Challenges: 418 | Gui, MyWindow:Add, Text, vVajraChallenges x+p w55 right cRed, % VajraChallenges 419 | Gui, MyWindow:Add, Text, vVajraCosts x+2 w200 right, % VajraCosts 420 | 421 | Gui, MyWindow:Add, Text, x15 y+5+p w75, Strahd Variants: 422 | Gui, MyWindow:Add, Text, vStrahdVariants x+p w75 right cRed, % StrahdVariants 423 | Gui, MyWindow:Add, Text, x15 y+p w95, Strahd FP Currency: 424 | Gui, MyWindow:Add, Text, vStrahdFPCurrency x+p w55 right cRed, % StrahdFPCurrency 425 | Gui, MyWindow:Add, Text, vStrahdRequires x+2 w200 right, % StrahdRequires 426 | Gui, MyWindow:Add, Text, x15 y+p w95, Strahd Challenges: 427 | Gui, MyWindow:Add, Text, vStrahdChallenges x+p w55 right cRed, % StrahdChallenges 428 | Gui, MyWindow:Add, Text, vStrahdCosts x+2 w200 right, % StrahdCosts 429 | 430 | Gui, MyWindow:Add, Text, x15 y+5+p w75, Zariel Variants: 431 | Gui, MyWindow:Add, Text, vZarielVariants x+p w75 right cRed, % ZarielVariants 432 | Gui, MyWindow:Add, Text, x15 y+p w95, Zariel FP Currency: 433 | Gui, MyWindow:Add, Text, vZarielFPCurrency x+p w55 right cRed, % ZarielFPCurrency 434 | Gui, MyWindow:Add, Text, vZarielRequires x+2 w200 right, % ZarielRequires 435 | Gui, MyWindow:Add, Text, x15 y+p w95, Zariel Challenges: 436 | Gui, MyWindow:Add, Text, vZarielChallenges x+p w55 right cRed, % ZarielChallenges 437 | Gui, MyWindow:Add, Text, vZarielCosts x+2 w200 right, % ZarielCosts 438 | 439 | Gui, Tab, Champions 440 | Gui, MyWindow:Add, Text, vChampDetails x15 y33 w300 h150, % ChampDetails 441 | 442 | Gui, Tab, Settings 443 | Gui, MyWindow:Add, Text,, Server Name: 444 | Gui, MyWindow:Add, Edit, vServerName w50 445 | Gui, MyWindow:Add, CheckBox, vGetDetailsonStart, Get User Details on start? 446 | Gui, MyWindow:Add, CheckBox, vLaunchGameonStart, Launch game client on start? 447 | Gui, MyWindow:Add, CheckBox, vAlwaysSaveChests, Always save Chest Open Results to file? 448 | Gui, MyWindow:Add, CheckBox, vAlwaysSaveContracts, Always save Blacksmith Results to file? 449 | Gui, MyWindow:Add, CheckBox, vAlwaysSaveCodes, Always save Code Redeem Results to file? 450 | Gui, MyWindow:Add, Button, gSave_Settings, Save Settings 451 | 452 | Gui, Tab, Log 453 | Gui, MyWindow:Add, Edit, r12 vOutputText ReadOnly w360, %OutputText% 454 | this.Show() 455 | } 456 | 457 | Show() { 458 | ;check if minimized if so leave it be 459 | WinGet, OutputVar , MinMax, IdleCombos v%VersionNumber% 460 | if (OutputVar = -1) { 461 | return 462 | } 463 | nW := this.Width 464 | nH := this.Height 465 | Gui, MyWindow:Show, w%nW% h%nH%, IdleCombos v%VersionNumber% 466 | } 467 | 468 | Hide() { 469 | Gui, MyWindow:Hide 470 | } 471 | 472 | Submit() { 473 | Gui, MyWindow:Submit, NoHide 474 | } 475 | 476 | Update() { 477 | GuiControl, MyWindow:, OutputText, % OutputText, w250 h210 478 | SendMessage, 0x115, 7, 0, Edit1 479 | GuiControl, MyWindow:, CrashProtectStatus, % CrashProtectStatus, w250 h210 480 | GuiControl, MyWindow:, AchievementInfo, % AchievementInfo, w250 h210 481 | GuiControl, MyWindow:, BlessingInfo, % BlessingInfo, w250 h210 482 | GuiControl, MyWindow:, LastUpdated, % LastUpdated, w250 h210 483 | ;adventures 484 | GuiControl, MyWindow:, CurrentAdventure, % CurrentAdventure, w250 h210 485 | GuiControl, MyWindow:, CurrentArea, % CurrentArea, w250 h210 486 | GuiControl, MyWindow:, CurrentPatron, % CurrentPatron, w250 h210 487 | GuiControl, MyWindow:, BackgroundAdventure, % BackgroundAdventure, w250 h210 488 | GuiControl, MyWindow:, BackgroundArea, % BackgroundArea, w250 h210 489 | GuiControl, MyWindow:, BackgroundPatron, % BackgroundPatron, w250 h210 490 | GuiControl, MyWindow:, Background2Adventure, % Background2Adventure, w250 h210 491 | GuiControl, MyWindow:, Background2Area, % Background2Area, w250 h210 492 | GuiControl, MyWindow:, Background2Patron, % Background2Patron, w250 h210 493 | GuiControl, MyWindow:, FGCore, % FGCore, w250 h210 494 | GuiControl, MyWindow:, BGCore, % BGCore, w250 h210 495 | GuiControl, MyWindow:, BG2Core, % BG2Core, w250 h210 496 | ;inventory 497 | GuiControl, MyWindow:, CurrentGems, % CurrentGems, w250 h210 498 | GuiControl, MyWindow:, SpentGems, % SpentGems, w250 h210 499 | GuiControl, MyWindow:, CurrentGolds, % CurrentGolds, w250 h210 500 | GuiControl, MyWindow:, GoldPity, % GoldPity, w250 h210 501 | GuiControl, MyWindow:, CurrentSilvers, % CurrentSilvers, w250 h210 502 | GuiControl, MyWindow:, CurrentTGPs, % CurrentTGPs, w250 h210 503 | GuiControl, MyWindow:, NextTGPDrop, % NextTGPDrop, w250 h210 504 | GuiControl, MyWindow:, AvailableTGs, % AvailableTGs, w250 h210 505 | GuiControl, MyWindow:, AvailableChests, % AvailableChests, w250 h210 506 | GuiControl, MyWindow:, CurrentTinyBounties, % CurrentTinyBounties, w250 h210 507 | GuiControl, MyWindow:, CurrentSmBounties, % CurrentSmBounties, w250 h210 508 | GuiControl, MyWindow:, CurrentMdBounties, % CurrentMdBounties, w250 h210 509 | GuiControl, MyWindow:, CurrentLgBounties, % CurrentLgBounties, w250 h210 510 | GuiControl, MyWindow:, AvailableTokens, % AvailableTokens, w250 h210 511 | GuiControl, MyWindow:, CurrentTokens, % CurrentTokens, w250 h210 512 | GuiControl, MyWindow:, AvailableFPs, % AvailableFPs, w250 h210 513 | GuiControl, MyWindow:, CurrentTinyBS, % CurrentTinyBS, w250 h210 514 | GuiControl, MyWindow:, CurrentSmBS, % CurrentSmBS, w250 h210 515 | GuiControl, MyWindow:, CurrentMdBS, % CurrentMdBS, w250 h210 516 | GuiControl, MyWindow:, CurrentLgBS, % CurrentLgBS, w250 h210 517 | GuiControl, MyWindow:, AvailableBSLvs, % AvailableBSLvs, w250 h210 518 | ;patrons 519 | GuiControl, MyWindow:, MirtVariants, % MirtVariants, w250 h210 520 | GuiControl, MyWindow:, MirtChallenges, % MirtChallenges, w250 h210 521 | GuiControl, MyWindow:, MirtFPCurrency, % MirtFPCurrency, w250 h210 522 | GuiControl, MyWindow:, MirtRequires, % MirtRequires, w250 h210 523 | GuiControl, MyWindow:, MirtCosts, % MirtCosts, w250 h210 524 | GuiControl, MyWindow:, VajraVariants, % VajraVariants, w250 h210 525 | GuiControl, MyWindow:, VajraChallenges, % VajraChallenges, w250 h210 526 | GuiControl, MyWindow:, VajraFPCurrency, % VajraFPCurrency, w250 h210 527 | GuiControl, MyWindow:, VajraRequires, % VajraRequires, w250 h210 528 | GuiControl, MyWindow:, VajraCosts, % VajraCosts, w250 h210 529 | GuiControl, MyWindow:, StrahdVariants, % StrahdVariants, w250 h210 530 | GuiControl, MyWindow:, StrahdChallenges, % StrahdChallenges, w250 h210 531 | GuiControl, MyWindow:, StrahdFPCurrency, % StrahdFPCurrency, w250 h210 532 | GuiControl, MyWindow:, StrahdRequires, % StrahdRequires, w250 h210 533 | GuiControl, MyWindow:, StrahdCosts, % StrahdCosts, w250 h210 534 | GuiControl, MyWindow:, ZarielVariants, % ZarielVariants, w250 h210 535 | GuiControl, MyWindow:, ZarielChallenges, % ZarielChallenges, w250 h210 536 | GuiControl, MyWindow:, ZarielFPCurrency, % ZarielFPCurrency, w250 h210 537 | GuiControl, MyWindow:, ZarielRequires, % ZarielRequires, w250 h210 538 | GuiControl, MyWindow:, ZarielCosts, % ZarielCosts, w250 h210 539 | ;champions 540 | GuiControl, MyWindow:, ChampDetails, % ChampDetails, w250 h210 541 | ;settings 542 | GuiControl, MyWindow:, ServerName, % ServerName, w50 h210 543 | GuiControl, MyWindow:, GetDetailsonStart, % GetDetailsonStart, w250 h210 544 | GuiControl, MyWindow:, LaunchGameonStart, % LaunchGameonStart, w250 h210 545 | GuiControl, MyWindow:, AlwaysSaveChests, % AlwaysSaveChests, w250 h210 546 | GuiControl, MyWindow:, AlwaysSaveContracts, % AlwaysSaveContracts, w250 h210 547 | GuiControl, MyWindow:, AlwaysSaveCodes, % AlwaysSaveCodes, w250 h210 548 | ;this.Show() - removed 549 | } 550 | } 551 | 552 | ;Hotkeys 553 | ;$F9::Reload 554 | ;$F10::ExitApp 555 | 556 | Update_Clicked: 557 | { 558 | GetUserDetails() 559 | return 560 | } 561 | 562 | Reload_Clicked: 563 | { 564 | Reload 565 | return 566 | } 567 | 568 | Exit_Clicked: 569 | { 570 | ExitApp 571 | return 572 | } 573 | 574 | Crash_Toggle: 575 | { 576 | switch CrashProtectStatus { 577 | case "Crash Protect`nDisabled": { 578 | CrashProtectStatus := "Crash Protect`nEnabled" 579 | oMyGUI.Update() 580 | SB_SetText("Crash Protect has been enabled!") 581 | CrashProtect() 582 | } 583 | case "Crash Protect`nEnabled": { 584 | CrashProtectStatus := "Crash Protect`nDisabled" 585 | CrashCount := 0 586 | oMyGUI.Update() 587 | SB_SetText("Crash Protect has been disabled.") 588 | } 589 | } 590 | return 591 | } 592 | 593 | CrashProtect() { 594 | loop { 595 | if (CrashProtectStatus == "Crash Protect`nDisabled") { 596 | return 597 | } 598 | While(Not WinExist("ahk_exe IdleDragons.exe")) { 599 | Sleep 2500 600 | Run, %GameClient% 601 | ++CrashCount 602 | SB_SetText("Crash Protect has restarted your client.") 603 | UpdateLogTime() 604 | FileAppend, (%CurrentTime%) Restarts since enabling Crash Protect: %CrashCount%`n, %OutputLogFile% 605 | FileRead, OutputText, %OutputLogFile% 606 | oMyGUI.Update() 607 | Sleep 10000 608 | } 609 | } 610 | return 611 | } 612 | 613 | Save_Settings: 614 | { 615 | oMyGUI.Submit() 616 | CurrentSettings.servername := ServerName 617 | CurrentSettings.getdetailsonstart := GetDetailsonStart 618 | CurrentSettings.launchgameonstart := LaunchGameonStart 619 | CurrentSettings.alwayssavechests := AlwaysSaveChests 620 | CurrentSettings.alwayssavecontracts := AlwaysSaveContracts 621 | CurrentSettings.alwayssavecodes := AlwaysSaveCodes 622 | newsettings := JSON.stringify(CurrentSettings) 623 | FileDelete, %SettingsFile% 624 | FileAppend, %newsettings%, %SettingsFile% 625 | SB_SetText("Settings have been saved.") 626 | return 627 | } 628 | 629 | About_Clicked: 630 | { 631 | MsgBox, , About IdleCombos v%VersionNumber%, IdleCombos v%VersionNumber% by QuickMythril Updates by Eldoen`n`nSpecial thanks to all the idle dragons who inspired and assisted me! 632 | return 633 | } 634 | 635 | Buy_Silver: 636 | { 637 | Buy_Chests(1) 638 | return 639 | } 640 | 641 | Buy_Gold: 642 | { 643 | Buy_Chests(2) 644 | return 645 | } 646 | 647 | Open_Silver: 648 | { 649 | if (Not WinExist("ahk_exe IdleDragons.exe")) { 650 | Open_Chests(1) 651 | return 652 | } 653 | else { 654 | MsgBox, 0, , % "Note: It's recommended to close the game client before opening chests." 655 | return 656 | ;MsgBox, 4, , % "Note: It's recommended to close the game client before opening chests.`nWould you like to continue anyway?" 657 | ;IfMsgBox, Yes 658 | ;{ 659 | ;Open_Chests(1) 660 | ; return 661 | ;} 662 | ;else IfMsgBox, No 663 | ;{ 664 | ; return 665 | ;} 666 | } 667 | } 668 | 669 | Open_Gold: 670 | { 671 | if (Not WinExist("ahk_exe IdleDragons.exe")) { 672 | Open_Chests(2) 673 | return 674 | } 675 | else { 676 | MsgBox, 0, , % "Note: It's recommended to close the game client before opening chests." 677 | return 678 | ;MsgBox, 4, , % "Note: It's recommended to close the game client before opening chests.`nWould you like to continue anyway?`n`n(Feats earned using this app do not count towards the related achievement.)" 679 | ;IfMsgBox, Yes 680 | ;{ 681 | ; ;Open_Chests(2) 682 | ; return 683 | ;} 684 | ;else IfMsgBox, No 685 | ;{ 686 | ; return 687 | ;} 688 | } 689 | } 690 | 691 | Open_Codes: 692 | { 693 | Gui, CodeWindow:New 694 | Gui, CodeWindow:+Resize -MaximizeBox 695 | Gui, CodeWindow:Show, w230 h230, Codes 696 | Gui, CodeWindow:Add, Edit, r12 vCodestoEnter w190 x20 y20, IDLE-CHAM-PION-SNOW 697 | Gui, CodeWindow:Add, Button, gRedeem_Codes, Submit 698 | Gui, CodeWindow:Add, Button, x+35 gPaste, Paste 699 | Gui, CodeWindow:Add, Button, x+35 gClose_Codes, Close 700 | Gui, CodeWindow:Add, Text, w190 x20 y+5 vCodesPending, Codes Pending: 0 701 | return 702 | } 703 | 704 | 705 | Paste: 706 | { 707 | getChestCodes() 708 | GuiControl,, CodestoEnter, %foundCodeString% 709 | return 710 | } 711 | 712 | Redeem_Codes: 713 | { 714 | Gui, CodeWindow:Submit, NoHide 715 | Gui, CodeWindow:Add, Text, x+45, Codes pending: 716 | CodeList := StrSplit(CodestoEnter, "`n") 717 | CodeCount := CodeList.Length() 718 | CodesPending := "Codes pending: " CodeCount 719 | GuiControl, , CodesPending, % CodesPending, w250 h210 720 | usedcodes := "" 721 | someonescodes := "" 722 | expiredcodes := "" 723 | earlycodes := "" 724 | invalidcodes := "" 725 | codegolds := 0 726 | codesilvers := 0 727 | codesupplys := 0 728 | otherchests := "" 729 | codeepics := "" 730 | codetgps := 0 731 | codepolish := 0 732 | tempsavesetting := 0 733 | tempnosavesetting := 0 734 | for k, v in CodeList 735 | { 736 | v := StrReplace(v, "`r") 737 | v := StrReplace(v, "`n") 738 | v := Trim(v) 739 | CurrentCode := v 740 | sCode := RegExReplace(CurrentCode, "&", Replacement := "%26") 741 | sCode := RegExReplace(sCode, "#", Replacement := "%23") 742 | if !UserID { 743 | MsgBox % "Need User ID & Hash." 744 | FirstRun() 745 | } 746 | codeparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&code=" sCode 747 | rawresults := ServerCall("redeemcoupon", codeparams) 748 | coderesults := JSON.parse(rawresults) 749 | rawloot := JSON.stringify(coderesults.loot_details) 750 | codeloot := JSON.parse(rawloot) 751 | if (coderesults.failure_reason == "Outdated instance id") { 752 | MsgBox, 4, , % "Outdated instance id. Update from server?" 753 | IfMsgBox, Yes 754 | { 755 | GetUserDetails() 756 | Gui, CodeWindow:Default 757 | while (InstanceID == 0) { 758 | sleep, 2000 759 | } 760 | codeparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&code=" sCode 761 | rawresults := ServerCall("redeemcoupon", codeparams) 762 | coderesults := JSON.parse(rawresults) 763 | } 764 | else { 765 | return 766 | } 767 | } 768 | if (coderesults.failure_reason == "You have already redeemed this combination.") { 769 | usedcodes := usedcodes sCode "`n" 770 | } 771 | else if (coderesults.failure_reason == "Someone has already redeemed this combination.") { 772 | someonescodes := someonescodes sCode "`n" 773 | } 774 | else if (coderesults.failure_reason == "This offer has expired") { 775 | expiredcodes := expiredcodes sCode "`n" 776 | } 777 | else if (coderesults.failure_reason == "You can not yet redeem this combination.") { 778 | earlycodes := earlycodes sCode "`n" 779 | } 780 | else if (coderesults.failure_reason == "This is not a valid combination.") { 781 | invalidcodes := invalidcodes sCode "`n" 782 | } 783 | else for kk, vv in codeloot 784 | { 785 | if (vv.chest_type_id == "2") { 786 | codegolds += vv.count 787 | } 788 | else if (vv.chest_type_id == "37") { 789 | codesupplys += vv.count 790 | } 791 | else if (vv.chest_type_id == "1") { 792 | codesilvers += vv.count 793 | } 794 | else if (vv.chest_type_id) { 795 | otherchests := otherchests ChestFromID(vv.chest_type_id) "`n" 796 | } 797 | else if (vv.add_time_gate_key_piece) { 798 | codetgps += vv.count 799 | } 800 | else if (vv.add_inventory_buff_id) { 801 | switch vv.add_inventory_buff_id 802 | { 803 | case 4: codeepics := codeepics "STR (" vv.count "), " 804 | case 8: codeepics := codeepics "GF (" vv.count "), " 805 | case 16: codeepics := codeepics "HP (" vv.count "), " 806 | case 20: codeepics := codeepics "Bounty (" vv.count "), " 807 | case 34: codeepics := codeepics "BS (" vv.count "), " 808 | case 35: codeepics := codeepics "Spec (" vv.count "), " 809 | case 40: codeepics := codeepics "FB (" vv.count "), " 810 | case 77: codeepics := codeepics "Spd (" vv.count "), " 811 | case 36: codepolish += vv.count 812 | default: codeepics := codeepics vv.add_inventory_buff_id " (" vv.count "), " 813 | } 814 | } 815 | } 816 | CodeCount := % (CodeCount-1) 817 | if (CurrentSettings.alwayssavecodes || tempsavesetting) { 818 | FileAppend, %sCode%`n, %RedeemCodeLogFile% 819 | FileAppend, %rawresults%`n, %RedeemCodeLogFile% 820 | } 821 | else if !(tempnosavesetting) { 822 | MsgBox, 4, , "Save to File?" 823 | IfMsgBox, Yes 824 | { 825 | tempsavesetting := 1 826 | FileAppend, %sCode%`n, %RedeemCodeLogFile% 827 | FileAppend, %rawresults%`n, %RedeemCodeLogFile% 828 | } 829 | else IfMsgBox, No 830 | { 831 | tempnosavesetting := 1 832 | } 833 | } 834 | sleep, 2000 835 | CodesPending := "Codes pending: " CodeCount 836 | GuiControl, , CodesPending, % CodesPending, w250 h210 837 | } 838 | CodesPending := "Codes submitted!" 839 | codemessage := "" 840 | if !(usedcodes == "") { 841 | codemessage := codemessage "You already used:`n" usedcodes "`n" 842 | } 843 | if !(someonescodes == "") { 844 | codemessage := codemessage "Someone else used:`n" someonescodes "`n" 845 | } 846 | if !(expiredcodes == "") { 847 | codemessage := codemessage "Expired:`n" expiredcodes "`n" 848 | } 849 | if !(invalidcodes == "") { 850 | codemessage := codemessage "Invalid:`n" invalidcodes "`n" 851 | } 852 | if !(earlycodes == "") { 853 | codemessage := codemessage "Cannot Redeem Yet:`n" earlycodes "`n" 854 | } 855 | if (codegolds > 0) { 856 | codemessage := codemessage "Gold Chests:`n" codegolds "`n" 857 | } 858 | if (codesilvers > 0) { 859 | codemessage := codemessage "Silver Chests:`n" codesilvers "`n" 860 | } 861 | if (codesupplys > 0) { 862 | codemessage := codemessage "Supply Chests:`n" codesupplys "`n" 863 | } 864 | if !(otherchests == "") { 865 | ;StringTrimRight, otherchests, otherchests, 2 866 | codemessage := codemessage "Other chests:`n" otherchests "`n" 867 | } 868 | if (codepolish > 0) { 869 | codemessage := codemessage "Potions of Polish:`n" codepolish "`n" 870 | } 871 | if (codetgps > 0) { 872 | codemessage := codemessage "Time Gate Pieces:`n" codetgps "`n" 873 | } 874 | if !(codeepics == "") { 875 | StringTrimRight, codeepics, codeepics, 2 876 | codemessage := codemessage "Epic consumables:`n" codeepics "`n" 877 | } 878 | if (codemessage == "") { 879 | codemessage := "Unknown or No Results." 880 | } 881 | GuiControl, , CodesPending, % CodesPending, w250 h210 882 | GetUserDetails() 883 | oMyGUI.Update() 884 | MsgBox, , Results, % codemessage 885 | return 886 | } 887 | 888 | Briv_Calc: 889 | { 890 | InputBox, BrivSlot4, Briv Slot 4, Please enter the percentage listed`non your Briv Slot 4 item., , 250, 150, , , , , %BrivSlot4% 891 | if (ErrorLevel=1) { 892 | return 893 | } 894 | InputBox, BrivZone, Area to Reset, Please enter the area you will reset at`nafter building up Steelbones stacks., , 250, 150, , , , , %BrivZone% 895 | if (ErrorLevel=1) { 896 | return 897 | } 898 | MsgBox, 0, BrivCalc Results, % SimulateBriv(10000) 899 | return 900 | } 901 | 902 | Close_Codes: 903 | { 904 | Gui, CodeWindow:Destroy 905 | return 906 | } 907 | 908 | Clear_Log: 909 | { 910 | MsgBox, 4, Clear Log, Are you sure? 911 | IfMsgBox, Yes 912 | { 913 | FileDelete, %OutputLogFile% 914 | OutputText := "" 915 | oMyGUI.Update() 916 | return 917 | } 918 | return 919 | } 920 | 921 | Buy_Extra_Chests(chestid,extracount) { 922 | chestparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&chest_type_id=" chestid "&count=" 923 | gemsspent := 0 924 | while (extracount > 0) { 925 | SB_SetText("Chests remaining to purchase: " extracount) 926 | if (extracount < 101) { 927 | rawresults := ServerCall("buysoftcurrencychest", chestparams extracount) 928 | extracount -= extracount 929 | } 930 | else { 931 | rawresults := ServerCall("buysoftcurrencychest", chestparams "100") 932 | extracount -= 100 933 | } 934 | chestresults := JSON.parse(rawresults) 935 | if (chestresults.success == "0") { 936 | MsgBox % "Error: " rawresults 937 | UpdateLogTime() 938 | FileAppend, (%CurrentTime%) Gems spent: %gemsspent%`n, %OutputLogFile% 939 | FileRead, OutputText, %OutputLogFile% 940 | oMyGUI.Update() 941 | GetUserDetails() 942 | SB_SetText("Chests remaining: " count " (Error: " chestresults.failure_reason ")") 943 | return 944 | } 945 | gemsspent += chestresults.currency_spent 946 | Sleep 1000 947 | } 948 | UpdateLogTime() 949 | FileAppend, (%CurrentTime%) Gems spent: %gemsspent%`n, %OutputLogFile% 950 | FileRead, OutputText, %OutputLogFile% 951 | SB_SetText("Chest purchase completed.") 952 | return gemsspent 953 | } 954 | 955 | Buy_Chests(chestid) { 956 | if !UserID { 957 | MsgBox % "Need User ID & Hash." 958 | FirstRun() 959 | } 960 | if !CurrentGems { 961 | MsgBox, 4, , No gems detected. Check server for user details? 962 | IfMsgBox, Yes 963 | { 964 | GetUserDetails() 965 | } 966 | } 967 | switch chestid 968 | { 969 | case 1: { 970 | maxbuy := Floor(CurrentGems/50) 971 | InputBox, count, Buying Chests, % "How many Silver Chests?`n(Max: " maxbuy ")", , 200, 180 972 | if ErrorLevel 973 | return 974 | if (count > maxbuy) { 975 | MsgBox, 4, , Insufficient gems detected for purchase.`nContinue anyway? 976 | IfMsgBox No 977 | return 978 | } 979 | } 980 | case 2: { 981 | maxbuy := Floor(CurrentGems/500) 982 | InputBox, count, Buying Chests, % "How many Gold Chests?`n(Max: " maxbuy ")", , 200, 180 983 | if ErrorLevel 984 | return 985 | if (count = "alpha5") { 986 | chestparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID 987 | rawresults := ServerCall("alphachests", chestparams) 988 | MsgBox % rawresults 989 | GetUserDetails() 990 | SB_SetText("Ai yi yi, Zordon!") 991 | return 992 | } 993 | if (count > maxbuy) { 994 | MsgBox, 4, , Insufficient gems detected for purchase.`nContinue anyway? 995 | IfMsgBox No 996 | return 997 | } 998 | } 999 | default: { 1000 | MsgBox, Invalid chest_id value. 1001 | return 1002 | } 1003 | } 1004 | chestparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&chest_type_id=" chestid "&count=" 1005 | gemsspent := 0 1006 | while (count > 0) { 1007 | SB_SetText("Chests remaining to purchase: " count) 1008 | if (count < 101) { 1009 | rawresults := ServerCall("buysoftcurrencychest", chestparams count) 1010 | count -= count 1011 | } 1012 | else { 1013 | rawresults := ServerCall("buysoftcurrencychest", chestparams "100") 1014 | count -= 100 1015 | } 1016 | chestresults := JSON.parse(rawresults) 1017 | if (chestresults.success == "0") { 1018 | MsgBox % "Error: " rawresults 1019 | UpdateLogTime() 1020 | FileAppend, (%CurrentTime%) Gems spent: %gemsspent%`n, %OutputLogFile% 1021 | FileRead, OutputText, %OutputLogFile% 1022 | oMyGUI.Update() 1023 | GetUserDetails() 1024 | SB_SetText("Chests remaining: " count " (Error: " chestresults.failure_reason ")") 1025 | return 1026 | } 1027 | gemsspent += chestresults.currency_spent 1028 | Sleep 1000 1029 | } 1030 | UpdateLogTime() 1031 | FileAppend, (%CurrentTime%) Gems spent: %gemsspent%`n, %OutputLogFile% 1032 | FileRead, OutputText, %OutputLogFile% 1033 | oMyGUI.Update() 1034 | GetUserDetails() 1035 | SB_SetText("Chest purchase completed.") 1036 | return 1037 | } 1038 | 1039 | Open_Chests(chestid) { 1040 | if !UserID { 1041 | MsgBox % "Need User ID & Hash." 1042 | FirstRun() 1043 | } 1044 | if (!CurrentGolds && !CurrentSilvers && !CurrentGems) { 1045 | MsgBox, 4, , No chests or gems detected. Check server for user details? 1046 | IfMsgBox, Yes 1047 | { 1048 | GetUserDetails() 1049 | } 1050 | } 1051 | switch chestid 1052 | { 1053 | case 1: { 1054 | InputBox, count, Opening Chests, % "How many Silver Chests?`n(Owned: " CurrentSilvers ")`n(Max: " (CurrentSilvers + Floor(CurrentGems/50)) ")", , 200, 180 1055 | if ErrorLevel 1056 | return 1057 | if (count > CurrentSilvers) { 1058 | MsgBox, 4, , % "Spend " ((count - CurrentSilvers)*50) " gems to purchase " (count - CurrentSilvers) " chests before opening?" 1059 | extracount := (count - CurrentSilvers) 1060 | IfMsgBox, Yes 1061 | extraspent := Buy_Extra_Chests(1,extracount) 1062 | else { 1063 | return 1064 | } 1065 | } 1066 | } 1067 | case 2: { 1068 | InputBox, count, Opening Chests, % "How many Gold Chests?`n(Owned: " CurrentGolds ")`n(Max: " (CurrentGolds + Floor(CurrentGems/500)) ")`n`n(Feats earned using this app do not`ncount towards the related achievement.)", , 360, 240 1069 | if ErrorLevel 1070 | return 1071 | if (count > CurrentGolds) { 1072 | MsgBox, 4, , % "Spend " ((count - CurrentGolds)*500) " gems to purchase " (count - CurrentGolds) " chests before opening?" 1073 | extracount := (count - CurrentGolds) 1074 | IfMsgBox, Yes 1075 | extraspent := Buy_Extra_Chests(2,extracount) 1076 | else { 1077 | return 1078 | } 1079 | } 1080 | } 1081 | default: { 1082 | MsgBox, Invalid chest_id value. 1083 | return 1084 | } 1085 | } 1086 | chestparams := "&gold_per_second=0&checksum=4c5f019b6fc6eefa4d47d21cfaf1bc68&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&chest_type_id=" chestid "&game_instance_id=" ActiveInstance "&count=" 1087 | tempsavesetting := 0 1088 | tempnosavesetting := 0 1089 | lastfeat := "" 1090 | newfeats := "" 1091 | lastshiny := "" 1092 | newshinies := "" 1093 | while (count > 0) { 1094 | SB_SetText("Chests remaining to open: " count) 1095 | if (count < 100) { 1096 | rawresults := ServerCall("opengenericchest", chestparams count) 1097 | count -= count 1098 | } 1099 | else { 1100 | rawresults := ServerCall("opengenericchest", chestparams "99") 1101 | count -= 99 1102 | } 1103 | if (CurrentSettings.alwayssavechests || tempsavesetting) { 1104 | FileAppend, %rawresults%`n, %ChestOpenLogFile% 1105 | } 1106 | else { 1107 | if !tempnosavesetting { 1108 | InputBox, dummyvar, Chest Results, Save to File?, , 250, 150, , , , , % rawresults 1109 | dummyvar := "" 1110 | if !ErrorLevel { 1111 | FileAppend, %rawresults%`n, %ChestOpenLogFile% 1112 | tempsavesetting := 1 1113 | } 1114 | if ErrorLevel { 1115 | tempnosavesetting := 1 1116 | } 1117 | } 1118 | } 1119 | chestresults := JSON.parse(rawresults) 1120 | if ((chestresults.success == "0") || (chestresults.loot_details == "0")) { 1121 | switch chestid 1122 | { 1123 | case "1": { 1124 | chestsopened := (CurrentSilvers - chestresults.chests_remaining) 1125 | if (extraspent) { 1126 | chestsopened += (extraspent/50) 1127 | } 1128 | MsgBox % "New Shinies:`n" newshinies 1129 | } 1130 | case "2": { 1131 | chestsopened := (CurrentGolds - chestresults.chests_remaining) 1132 | if (extraspent) { 1133 | chestsopened += (extraspent/500) 1134 | } 1135 | MsgBox % "New Feats:`n" newfeats "`nNew Shinies:`n" newshinies 1136 | } 1137 | } 1138 | MsgBox % "Error: " rawresults 1139 | UpdateLogTime() 1140 | FileAppend, % "(" CurrentTime ") Chests Opened: " Floor(chestsopened) "`n", %OutputLogFile% 1141 | FileRead, OutputText, %OutputLogFile% 1142 | oMyGUI.Update() 1143 | GetUserDetails() 1144 | SB_SetText("Chests remaining: " count " (Error)") 1145 | return 1146 | } 1147 | for k, v in chestresults.loot_details { 1148 | if (v.unlock_hero_feat) { 1149 | lastfeat := (FeatFromID(v.unlock_hero_feat) "`n") 1150 | newfeats := newfeats lastfeat 1151 | } 1152 | if (v.gilded) { 1153 | lastshiny := (ChampFromID(v.hero_id) " (Slot " v.slot_id ")") 1154 | if (v.disenchant_amount == 125) { 1155 | lastshiny := lastshiny " +125" 1156 | } 1157 | newshinies := newshinies lastshiny "`n" 1158 | } 1159 | } 1160 | } 1161 | tempsavesetting := 0 1162 | tempnosavesetting := 0 1163 | switch chestid 1164 | { 1165 | case "1": { 1166 | chestsopened := (CurrentSilvers - chestresults.chests_remaining) 1167 | if (extraspent) { 1168 | chestsopened += (extraspent/50) 1169 | } 1170 | UpdateLogTime() 1171 | FileAppend, % "(" CurrentTime ") Silver Chests Opened: " Floor(chestsopened) "`n", %OutputLogFile% 1172 | } 1173 | case "2": { 1174 | chestsopened := (CurrentGolds - chestresults.chests_remaining) 1175 | if (extraspent) { 1176 | chestsopened += (extraspent/500) 1177 | } 1178 | MsgBox % "New Feats:`n" newfeats "`nNew Shinies:`n" newshinies 1179 | UpdateLogTime() 1180 | FileAppend, % "(" CurrentTime ") Gold Chests Opened: " Floor(chestsopened) "`n", %OutputLogFile% 1181 | } 1182 | } 1183 | FileRead, OutputText, %OutputLogFile% 1184 | oMyGUI.Update() 1185 | GetUserDetails() 1186 | SB_SetText("Chest opening completed.") 1187 | return 1188 | } 1189 | 1190 | Tiny_Blacksmith: 1191 | { 1192 | UseBlacksmith(31) 1193 | return 1194 | } 1195 | 1196 | Sm_Blacksmith: 1197 | { 1198 | UseBlacksmith(32) 1199 | return 1200 | } 1201 | 1202 | Med_Blacksmith: 1203 | { 1204 | UseBlacksmith(33) 1205 | return 1206 | } 1207 | 1208 | Lg_Blacksmith: 1209 | { 1210 | UseBlacksmith(34) 1211 | return 1212 | } 1213 | 1214 | UseBlacksmith(buffid) { 1215 | if !UserID { 1216 | MsgBox % "Need User ID & Hash." 1217 | FirstRun() 1218 | } 1219 | switch buffid 1220 | { 1221 | case 31: currentcontracts := CurrentTinyBS 1222 | case 32: currentcontracts := CurrentSmBS 1223 | case 33: currentcontracts := CurrentMdBS 1224 | case 34: currentcontracts := CurrentLgBS 1225 | } 1226 | if !(currentcontracts) { 1227 | MsgBox, 4, , No Blacksmith Contracts of that size detected. Check server for user details? 1228 | IfMsgBox, Yes 1229 | { 1230 | GetUserDetails() 1231 | } 1232 | } 1233 | InputBox, count, Blacksmithing, % "How many Blacksmith Contracts?`n(Max: " currentcontracts ")", , 200, 180, , , , , %currentcontracts% 1234 | if ErrorLevel 1235 | return 1236 | if (count > currentcontracts) { 1237 | MsgBox, 4, , Insufficient blacksmith contracts detected for use.`nContinue anyway? 1238 | IfMsgBox No 1239 | return 1240 | } 1241 | heroid := "error" 1242 | InputBox, heroid, Blacksmithing, % "Use contracts on which Champ? (Enter ID)", , 200, 180, , , , , %LastBSChamp% 1243 | if ErrorLevel 1244 | return 1245 | while !(heroid is number) { 1246 | InputBox, heroid, Blacksmithing, % "Please enter a valid Champ ID number.", , 200, 180, , , , , %LastBSChamp% 1247 | if ErrorLevel 1248 | return 1249 | } 1250 | while !((heroid > 0) && (heroid < 100)) { 1251 | InputBox, heroid, Blacksmithing, % "Please enter a valid Champ ID number.", , 200, 180, , , , , %LastBSChamp% 1252 | if ErrorLevel 1253 | return 1254 | } 1255 | MsgBox, 4, , % "Use " count " contracts on " ChampFromID(heroid) "?" 1256 | IfMsgBox No 1257 | return 1258 | LastBSChamp := heroid 1259 | bscontractparams := "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&buff_id=" buffid "&hero_id=" heroid "&num_uses=" 1260 | tempsavesetting := 0 1261 | tempnosavesetting := 0 1262 | slot1lvs := 0 1263 | slot2lvs := 0 1264 | slot3lvs := 0 1265 | slot4lvs := 0 1266 | slot5lvs := 0 1267 | slot6lvs := 0 1268 | while (count > 0) { 1269 | SB_SetText("Contracts remaining to use: " count) 1270 | if (count < 50) { 1271 | rawresults := ServerCall("useserverbuff", bscontractparams count) 1272 | count -= count 1273 | } 1274 | else { 1275 | rawresults := ServerCall("useserverbuff", bscontractparams "50") 1276 | count -= 50 1277 | } 1278 | if (CurrentSettings.alwayssavecontracts || tempsavesetting) { 1279 | FileAppend, %rawresults%`n, %BlacksmithLogFile% 1280 | } 1281 | else { 1282 | if !tempnosavesetting { 1283 | InputBox, dummyvar, Contracts Results, Save to File?, , 250, 150, , , , , % rawresults 1284 | dummyvar := "" 1285 | if !ErrorLevel { 1286 | FileAppend, %rawresults%`n, %ContractLogFile% 1287 | tempsavesetting := 1 1288 | } 1289 | if ErrorLevel { 1290 | tempnosavesetting := 1 1291 | } 1292 | } 1293 | } 1294 | blacksmithresults := JSON.parse(rawresults) 1295 | if ((blacksmithresults.success == "0") || (blacksmithresults.okay == "0")) { 1296 | MsgBox % ChampFromID(heroid) " levels gained:`nSlot 1: " slot1lvs "`nSlot 2: " slot2lvs "`nSlot 3: " slot3lvs "`nSlot 4: " slot4lvs "`nSlot 5: " slot5lvs "`nSlot 6: " slot6lvs 1297 | MsgBox % "Error: " rawresults 1298 | switch buffid 1299 | { 1300 | case 31: contractsused := (CurrentTinyBS - blacksmithresults.buffs_remaining) 1301 | case 32: contractsused := (CurrentSmBS - blacksmithresults.buffs_remaining) 1302 | case 33: contractsused := (CurrentMdBS - blacksmithresults.buffs_remaining) 1303 | case 34: contractsused := (CurrentLgBS - blacksmithresults.buffs_remaining) 1304 | } 1305 | UpdateLogTime() 1306 | FileAppend, % "(" CurrentTime ") Contracts Used: " Floor(contractsused) "`n", %OutputLogFile% 1307 | FileRead, OutputText, %OutputLogFile% 1308 | oMyGUI.Update() 1309 | GetUserDetails() 1310 | SB_SetText("Contracts remaining: " count " (Error)") 1311 | return 1312 | } 1313 | rawactions := JSON.stringify(blacksmithresults.actions) 1314 | blacksmithactions := JSON.parse(rawactions) 1315 | for k, v in blacksmithactions 1316 | { 1317 | switch v.slot_id 1318 | { 1319 | case 1: slot1lvs += v.amount 1320 | case 2: slot2lvs += v.amount 1321 | case 3: slot3lvs += v.amount 1322 | case 4: slot4lvs += v.amount 1323 | case 5: slot5lvs += v.amount 1324 | case 6: slot6lvs += v.amount 1325 | } 1326 | } 1327 | } 1328 | MsgBox % ChampFromID(heroid) " levels gained:`nSlot 1: " slot1lvs "`nSlot 2: " slot2lvs "`nSlot 3: " slot3lvs "`nSlot 4: " slot4lvs "`nSlot 5: " slot5lvs "`nSlot 6: " slot6lvs 1329 | tempsavesetting := 0 1330 | tempnosavesetting := 0 1331 | switch buffid { 1332 | case 31: contractsused := (CurrentTinyBS - blacksmithresults.buffs_remaining) 1333 | case 32: contractsused := (CurrentSmBS - blacksmithresults.buffs_remaining) 1334 | case 33: contractsused := (CurrentMdBS - blacksmithresults.buffs_remaining) 1335 | case 34: contractsused := (CurrentLgBS - blacksmithresults.buffs_remaining) 1336 | } 1337 | UpdateLogTime() 1338 | FileAppend, % "(" CurrentTime ") Contracts used on " ChampFromID(heroid) ": " Floor(contractsused) "`n", %OutputLogFile% 1339 | FileRead, OutputText, %OutputLogFile% 1340 | oMyGUI.Update() 1341 | GetUserDetails() 1342 | SB_SetText("Blacksmith use completed.") 1343 | return 1344 | } 1345 | 1346 | LoadAdventure() { 1347 | while !(CurrentAdventure == "-1") { 1348 | MsgBox, 5, , Please end your current adventure first. 1349 | IfMsgBox Cancel 1350 | return 1351 | } 1352 | advtoload := 31 1353 | patrontoload := 0 1354 | InputBox, advtoload, Adventure to Load, Please enter the adventure_id`nyou would like to load., , 250, 150, , , , , %advtoload% 1355 | if (ErrorLevel=1) { 1356 | return 1357 | } 1358 | if !((advtoload > 0) && (advtoload < 999)) { 1359 | MsgBox % "Invalid adventure_id: " advtoload 1360 | return 1361 | } 1362 | InputBox, patrontoload, Patron to Load, Please enter the patron_id`nyou would like to load., , 250, 150, , , , , %patrontoload% 1363 | if (ErrorLevel=1) { 1364 | return 1365 | } 1366 | if !((patrontoload > -1) && (patrontoload < 4)) { 1367 | MsgBox % "Invalid patron_id: " patrontoload 1368 | return 1369 | } 1370 | advparams := DummyData "&patron_tier=0&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&game_instance_id=" ActiveInstance "&adventure_id=" advtoload "&patron_id=" patrontoload 1371 | sResult := ServerCall("setcurrentobjective", advparams) 1372 | GetUserDetails() 1373 | SB_SetText("Selected adventure has been loaded.") 1374 | return 1375 | } 1376 | 1377 | EndAdventure() { 1378 | while (CurrentAdventure == "-1") { 1379 | MsgBox, No current adventure active. 1380 | return 1381 | } 1382 | MsgBox, 4, , % "Are you sure you want to end your current adventure?`nParty: " ActiveInstance " AdvID: " CurrentAdventure " Patron: " CurrentPatron 1383 | IfMsgBox, No 1384 | { 1385 | return 1386 | } 1387 | advparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&game_instance_id=" ActiveInstance 1388 | sResult := ServerCall("softreset", advparams) 1389 | GetUserDetails() 1390 | SB_SetText("Current adventure has been ended.") 1391 | return 1392 | } 1393 | 1394 | EndBGAdventure() { 1395 | if (ActiveInstance == "1") { 1396 | bginstance := 2 1397 | } 1398 | else { 1399 | bginstance := 1 1400 | } 1401 | while (BackgroundAdventure == "-1" or BackgroundAdventure == "") { 1402 | MsgBox, No background adventure active. 1403 | return 1404 | } 1405 | MsgBox, 4, , % "Are you sure you want to end your background adventure?`nParty: " bginstance " AdvID: " BackgroundAdventure " Patron: " BackgroundPatron 1406 | IfMsgBox, No 1407 | { 1408 | return 1409 | } 1410 | advparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&game_instance_id=" bginstance 1411 | sResult := ServerCall("softreset", advparams) 1412 | GetUserDetails() 1413 | SB_SetText("Background adventure has been ended.") 1414 | return 1415 | } 1416 | 1417 | EndBG2Adventure() { 1418 | if (ActiveInstance == "3") { 1419 | bginstance := 2 1420 | } 1421 | else { 1422 | bginstance := 3 1423 | } 1424 | while (Background2Adventure == "-1" or Background2Adventure == "") { 1425 | MsgBox, No background2 adventure active. 1426 | return 1427 | } 1428 | MsgBox, 4, , % "Are you sure you want to end your background2 adventure ?`nParty: " bginstance " AdvID: " Background2Adventure " Patron: " Background2Patron 1429 | IfMsgBox, No 1430 | { 1431 | return 1432 | } 1433 | advparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&game_instance_id=" bginstance 1434 | sResult := ServerCall("softreset", advparams) 1435 | GetUserDetails() 1436 | SB_SetText("Background2 adventure has been ended.") 1437 | return 1438 | } 1439 | 1440 | FirstRun() { 1441 | MsgBox, 4, , Get User ID and Hash from webrequestlog.txt? 1442 | IfMsgBox, Yes 1443 | { 1444 | GetIdFromWRL() 1445 | UpdateLogTime() 1446 | FileAppend, (%CurrentTime%) User ID: %UserID% & Hash: %UserHash% detected in WRL.`n, %OutputLogFile% 1447 | } 1448 | else 1449 | { 1450 | MsgBox, 4, , Choose install directory manually? 1451 | IfMsgBox Yes 1452 | { 1453 | FileSelectFile, WRLFile, 1, webRequestLog.txt, Select webRequestLog file, webRequestLog.txt 1454 | if ErrorLevel 1455 | return 1456 | GetIdFromWRL() 1457 | GameInstallDir := SubStr(WRLFile, 1, -67) 1458 | GameClient := GameInstallDir "IdleDragons.exe" 1459 | } 1460 | else { 1461 | InputBox, UserID, user_id, Please enter your "user_id" value., , 250, 125 1462 | if ErrorLevel 1463 | return 1464 | InputBox, UserHash, hash, Please enter your "hash" value., , 250, 125 1465 | if ErrorLevel 1466 | return 1467 | UpdateLogTime() 1468 | FileAppend, (%CurrentTime%) User ID: %UserID% & Hash: %UserHash% manually entered.`n, %OutputLogFile% 1469 | } 1470 | } 1471 | FileRead, OutputText, %OutputLogFile% 1472 | oMyGUI.Update() 1473 | CurrentSettings.user_id := UserID 1474 | CurrentSettings.hash := UserHash 1475 | CurrentSettings.firstrun := 1 1476 | newsettings := JSON.stringify(CurrentSettings) 1477 | FileDelete, %SettingsFile% 1478 | FileAppend, %newsettings%, %SettingsFile% 1479 | UpdateLogTime() 1480 | FileAppend, (%CurrentTime%) IdleCombos setup completed.`n, %OutputLogFile% 1481 | FileRead, OutputText, %OutputLogFile% 1482 | oMyGUI.Update() 1483 | SB_SetText("User ID & Hash ready.") 1484 | } 1485 | 1486 | UpdateLogTime() { 1487 | FormatTime, CurrentTime, , yyyy-MM-dd HH:mm:ss 1488 | } 1489 | 1490 | GetIDFromWRL() { 1491 | FileRead, oData, %WRLFile% 1492 | if ErrorLevel { 1493 | MsgBox, 4, , Could not find webRequestLog.txt file.`nChoose install directory manually? 1494 | IfMsgBox Yes 1495 | { 1496 | FileSelectFile, WRLFile, 1, webRequestLog.txt, Select webRequestLog file, webRequestLog.txt 1497 | if ErrorLevel 1498 | return 1499 | FileRead, oData, %WRLFile% 1500 | } 1501 | else 1502 | return 1503 | } 1504 | FoundPos := InStr(oData, "getuserdetails&language_id=1&user_id=") 1505 | oData2 := SubStr(oData, (FoundPos + 37)) 1506 | FoundPos := InStr(oData2, "&hash=") 1507 | StringLeft, UserID, oData2, (FoundPos - 1) 1508 | oData := SubStr(oData2, (FoundPos + 6)) 1509 | FoundPos := InStr(oData, "&instance_key=") 1510 | StringLeft, UserHash, oData, (FoundPos - 1) 1511 | oData := ; Free the memory. 1512 | oData2 := ; Free the memory. 1513 | return 1514 | } 1515 | 1516 | GetUserDetails() { 1517 | Gui, MyWindow:Default 1518 | SB_SetText("Please wait a moment...") 1519 | getuserparams := DummyData "&include_free_play_objectives=true&instance_key=1&user_id=" UserID "&hash=" UserHash 1520 | rawdetails := ServerCall("getuserdetails", getuserparams) 1521 | FileDelete, %UserDetailsFile% 1522 | FileAppend, %rawdetails%, %UserDetailsFile% 1523 | UserDetails := JSON.parse(rawdetails) 1524 | InstanceID := UserDetails.details.instance_id 1525 | CurrentSettings.instance_id := InstanceID 1526 | ActiveInstance := UserDetails.details.active_game_instance_id 1527 | newsettings := JSON.stringify(CurrentSettings) 1528 | FileDelete, %SettingsFile% 1529 | FileAppend, %newsettings%, %SettingsFile% 1530 | ParseChampData() 1531 | ParseAdventureData() 1532 | ParseTimestamps() 1533 | ParseInventoryData() 1534 | ParsePatronData() 1535 | ParseLootData() 1536 | CheckAchievements() 1537 | CheckBlessings() 1538 | oMyGUI.Update() 1539 | SB_SetText("User details available.") 1540 | CheckPatronProgress() 1541 | return 1542 | } 1543 | 1544 | ParseAdventureData() { 1545 | bginstance := 0 1546 | for k, v in UserDetails.details.game_instances 1547 | if (v.game_instance_id == ActiveInstance) { 1548 | CurrentAdventure := v.current_adventure_id 1549 | CurrentArea := v.current_area 1550 | CurrentPatron := PatronFromID(v.current_patron_id) 1551 | } 1552 | else if (bginstance == 0){ 1553 | BackgroundAdventure := v.current_adventure_id 1554 | BackgroundArea := v.current_area 1555 | BackgroundPatron := PatronFromID(v.current_patron_id) 1556 | bginstance += 1 1557 | } 1558 | else { 1559 | Background2Adventure := v.current_adventure_id 1560 | Background2Area := v.current_area 1561 | Background2Patron := PatronFromID(v.current_patron_id) 1562 | } 1563 | ; 1564 | FGCore := "`n" 1565 | BGCore := "`n" 1566 | BG2Core := "`n" 1567 | If (ActiveInstance == 1) { 1568 | bginstance := 2 1569 | } 1570 | Else { 1571 | bginstance := 1 1572 | } 1573 | for k, v in UserDetails.details.modron_saves 1574 | if (v.instance_id == ActiveInstance) { 1575 | if (v.core_id == 1) { 1576 | FGCore := "Core: Modest" 1577 | } 1578 | else if (v.core_id == 2) { 1579 | FGCore := "Core: Strong" 1580 | } 1581 | else if (v.core_id == 3) { 1582 | FGCore := "Core: Fast" 1583 | } 1584 | if (v.properties.toggle_preferences.reset == true) { 1585 | FGCore := FGCore " (Reset at " v.area_goal ")" 1586 | } 1587 | xptolevel := v.exp_total 1588 | corelevel := 1 1589 | levelxp := 8000 1590 | while (xptolevel > (levelxp - 1)) { 1591 | corelevel += 1 1592 | xptolevel -= levelxp 1593 | levelxp += 4000 1594 | } 1595 | if (corelevel > 15) { 1596 | corelevel := corelevel " - Max 15" 1597 | } 1598 | percenttolevel := Floor((xptolevel / levelxp) * 100) 1599 | FGCore := FGCore "`nXP: " v.exp_total " (Lv " corelevel ")`n" xptolevel "/" levelxp " (" percenttolevel "%)" 1600 | } 1601 | else if (v.instance_id == bginstance and v.instance_id != 0) { 1602 | if (v.core_id == 1) { 1603 | BGCore := "Core: Modest" 1604 | } 1605 | else if (v.core_id == 2) { 1606 | BGCore := "Core: Strong" 1607 | } 1608 | else if (v.core_id == 3) { 1609 | BGCore := "Core: Fast" 1610 | } 1611 | if (v.properties.toggle_preferences.reset == true) { 1612 | BGCore := BGCore " (Reset at " v.area_goal ")" 1613 | } 1614 | xptolevel := v.exp_total 1615 | corelevel := 1 1616 | levelxp := 8000 1617 | while (xptolevel > (levelxp - 1)) { 1618 | corelevel += 1 1619 | xptolevel -= levelxp 1620 | levelxp += 4000 1621 | } 1622 | if (corelevel > 15) { 1623 | corelevel := corelevel " - Max 15" 1624 | } 1625 | percenttolevel := Floor((xptolevel / levelxp) * 100) 1626 | BGCore := BGCore "`nXP: " v.exp_total " (Lv " corelevel ")`n" xptolevel "/" levelxp " (" percenttolevel "%)" 1627 | } 1628 | else if(v.instance_id != 0){ 1629 | if (v.core_id == 1) { 1630 | BG2Core := "Core: Modest" 1631 | } 1632 | else if (v.core_id == 2) { 1633 | BG2Core := "Core: Strong" 1634 | } 1635 | else if (v.core_id == 3) { 1636 | BG2Core := "Core: Fast" 1637 | } 1638 | if (v.properties.toggle_preferences.reset == true) { 1639 | BG2Core := BG2Core " (Reset at " v.area_goal ")" 1640 | } 1641 | xptolevel := v.exp_total 1642 | corelevel := 1 1643 | levelxp := 8000 1644 | while (xptolevel > (levelxp - 1)) { 1645 | corelevel += 1 1646 | xptolevel -= levelxp 1647 | levelxp += 4000 1648 | } 1649 | if (corelevel > 15) { 1650 | corelevel := corelevel " - Max 15" 1651 | } 1652 | percenttolevel := Floor((xptolevel / levelxp) * 100) 1653 | BG2Core := BG2Core "`nXP: " v.exp_total " (Lv " corelevel ")`n" xptolevel "/" levelxp " (" percenttolevel "%)" 1654 | } 1655 | ; 1656 | } 1657 | 1658 | ParseTimestamps() { 1659 | localdiff := (A_Now - A_NowUTC) 1660 | if (localdiff < -28000000) { 1661 | localdiff += 70000000 1662 | } 1663 | if (localdiff < -250000) { 1664 | localdiff += 760000 1665 | } 1666 | StringTrimRight, localdiffh, localdiff, 4 1667 | localdiffm := SubStr(localdiff, -3) 1668 | StringTrimRight, localdiffm, localdiffm, 2 1669 | if (localdiffm > 59) { 1670 | localdiffm -= 40 1671 | } 1672 | timestampvalue := "19700101000000" 1673 | timestampvalue += UserDetails.current_time, s 1674 | EnvAdd, timestampvalue, localdiffh, h 1675 | EnvAdd, timestampvalue, localdiffm, m 1676 | FormatTime, LastUpdated, % timestampvalue, MMM d`, h:mm tt 1677 | tgptimevalue := "19700101000000" 1678 | tgptimevalue += UserDetails.details.stats.time_gate_key_next_time, s 1679 | EnvAdd, tgptimevalue, localdiffh, h 1680 | EnvAdd, tgptimevalue, localdiffm, m 1681 | FormatTime, NextTGPDrop, % tgptimevalue, MMM d`, h:mm tt 1682 | if (UserDetails.details.stats.time_gate_key_next_time < UserDetails.current_time) { 1683 | Gui, Font, cGreen 1684 | GuiControl, Font, NextTGPDrop 1685 | } 1686 | else { 1687 | Gui, Font, cBlack 1688 | GuiControl, Font, NextTGPDrop 1689 | } 1690 | } 1691 | 1692 | ParseInventoryData() { 1693 | CurrentGems := UserDetails.details.red_rubies 1694 | SpentGems := UserDetails.details.red_rubies_spent 1695 | CurrentGolds := UserDetails.details.chests.2 1696 | GoldPity := "(Epic in Next " UserDetails.details.stats.forced_win_counter_2 ")" 1697 | CurrentSilvers := UserDetails.details.chests.1 1698 | CurrentTGPs := UserDetails.details.stats.time_gate_key_pieces 1699 | AvailableTGs := "= " Floor(CurrentTGPs/6) " Time Gates" 1700 | for k, v in UserDetails.details.buffs 1701 | switch v.buff_id 1702 | { 1703 | case 17: CurrentTinyBounties := v.inventory_amount 1704 | case 18: CurrentSmBounties := v.inventory_amount 1705 | case 19: CurrentMdBounties := v.inventory_amount 1706 | case 20: CurrentLgBounties := v.inventory_amount 1707 | case 31: CurrentTinyBS := v.inventory_amount 1708 | case 32: CurrentSmBS := v.inventory_amount 1709 | case 33: CurrentMdBS := v.inventory_amount 1710 | case 34: CurrentLgBS := v.inventory_amount 1711 | } 1712 | AvailableChests := "= " Floor(CurrentGems/50) " Silver Chests" 1713 | tokencount := (CurrentTinyBounties*12)+(CurrentSmBounties*72)+(CurrentMdBounties*576)+(CurrentLgBounties*1152) 1714 | if (UserDetails.details.event_details[1].user_data.event_tokens) { 1715 | tokentotal := UserDetails.details.event_details[1].user_data.event_tokens 1716 | AvailableTokens := "= " tokencount " Tokens`t(" Round(tokencount/2500, 2) " FPs)" 1717 | CurrentTokens := "+ " tokentotal " Current`t(" Round(tokentotal/2500, 2) " FPs)" 1718 | AvailableFPs := "(Total: " (tokentotal+tokencount) " = " Round((tokentotal + tokencount)/2500, 2) " Free Plays)" 1719 | } 1720 | else { 1721 | AvailableTokens := "= " tokencount " Tokens" 1722 | CurrentTokens := "(" Round(tokencount/2500, 2) " Free Plays)" 1723 | } 1724 | AvailableBSLvs := "= " CurrentTinyBS+(CurrentSmBS*2)+(CurrentMdBS*6)+(CurrentLgBS*24) " Item Levels" 1725 | } 1726 | 1727 | ParsePatronData() { 1728 | for k, v in UserDetails.details.patrons 1729 | switch v.patron_id 1730 | { 1731 | case 1: { 1732 | if v.unlocked == False { 1733 | MirtVariants := "Locked" 1734 | MirtFPCurrency := "Requires:" 1735 | MirtChallenges := "Costs:" 1736 | MirtRequires := UserDetails.details.stats.total_hero_levels "/2000 Item Levels && " TotalChamps "/20 Champs" 1737 | if ((UserDetails.details.stats.total_hero_levels > 1999) && (TotalChamps > 19)) { 1738 | Gui, Font, cGreen 1739 | GuiControl, Font, MirtFPCurrency 1740 | } 1741 | MirtCosts := CurrentTGPs "/3 TGPs && " CurrentSilvers "/10 Silver Chests" 1742 | if ((CurrentTGPs > 2) && (CurrentSilvers > 9)) { 1743 | Gui, Font, cGreen 1744 | GuiControl, Font, MirtChallenges 1745 | } 1746 | } 1747 | else for kk, vv in v.progress_bars 1748 | switch vv.id 1749 | { 1750 | case "variants_completed": 1751 | MirtVariantTotal := vv.goal 1752 | MirtCompleted := vv.count 1753 | MirtVariants := MirtCompleted " / " MirtVariantTotal 1754 | case "free_play_limit": MirtFPCurrency := vv.count 1755 | case "weekly_challenge_porgress": MirtChallenges := vv.count 1756 | } 1757 | } 1758 | case 2: { 1759 | if v.unlocked == False { 1760 | VajraVariants := "Locked" 1761 | VajraFPCurrency := "Requires:" 1762 | VajraChallenges := "Costs:" 1763 | VajraRequires := UserDetails.details.stats.completed_adventures_variants_and_patron_variants_c15 "/15 WD:DH Advs && " TotalChamps "/30 Champs" 1764 | if ((UserDetails.details.stats.completed_adventures_variants_and_patron_variants_c15 > 14) && (TotalChamps > 29)) { 1765 | Gui, Font, cGreen 1766 | GuiControl, Font, VajraFPCurrency 1767 | } 1768 | VajraCosts := CurrentGems "/2500 Gems && " CurrentSilvers "/15 Silver Chests" 1769 | if ((CurrentGems > 2499) && (CurrentSilvers > 14)) { 1770 | Gui, Font, cGreen 1771 | GuiControl, Font, VajraChallenges 1772 | } 1773 | } 1774 | else for kk, vv in v.progress_bars 1775 | switch vv.id 1776 | { 1777 | case "variants_completed": 1778 | VajraVariantTotal := vv.goal 1779 | VajraCompleted := vv.count 1780 | VajraVariants := VajraCompleted " / " VajraVariantTotal 1781 | case "free_play_limit": VajraFPCurrency := vv.count 1782 | case "weekly_challenge_porgress": VajraChallenges := vv.count 1783 | } 1784 | } 1785 | case 3: { 1786 | if v.unlocked == False { 1787 | StrahdVariants := "Locked" 1788 | StrahdFPCurrency := "Requires:" 1789 | StrahdChallenges := "Costs:" 1790 | StrahdRequires := UserDetails.details.stats.highest_area_completed_ever_c413 "/250 in Adventure 413 && " TotalChamps "/40 Champs" 1791 | if ((UserDetails.details.stats.highest_area_completed_ever_c413 > 249) && (TotalChamps > 39)) { 1792 | Gui, Font, cGreen 1793 | GuiControl, Font, StrahdFPCurrency 1794 | } 1795 | StrahdCosts := CurrentLgBounties "/10 Lg Bounties && " CurrentSilvers "/20 Silver Chests" 1796 | if ((CurrentLgBounties > 9) && (CurrentSilvers > 19)) { 1797 | Gui, Font, cGreen 1798 | GuiControl, Font, StrahdChallenges 1799 | } 1800 | } 1801 | else for kk, vv in v.progress_bars 1802 | switch vv.id 1803 | { 1804 | case "variants_completed": 1805 | StrahdVariantTotal := vv.goal 1806 | StrahdCompleted := vv.count 1807 | StrahdVariants := StrahdCompleted " / " StrahdVariantTotal 1808 | case "free_play_limit": StrahdFPCurrency := vv.count 1809 | case "weekly_challenge_porgress": StrahdChallenges := vv.count 1810 | } 1811 | } 1812 | case 4: { 1813 | if v.unlocked == False { 1814 | ZarielVariants := "Locked" 1815 | ZarielFPCurrency := "Requires:" 1816 | ZarielChallenges := "Costs:" 1817 | ZarielRequires := UserDetails.details.stats.highest_area_completed_ever_c873 "/575 in Adventure 873 && " TotalChamps "/50 Champs" 1818 | if ((UserDetails.details.stats.highest_area_completed_ever_c873 > 574) && (TotalChamps > 49)) { 1819 | Gui, Font, cGreen 1820 | GuiControl, Font, ZarielFPCurrency 1821 | } 1822 | ZarielCosts := CurrentSilvers "/50 Silver Chests" 1823 | if (CurrentSilvers > 49) { 1824 | Gui, Font, cGreen 1825 | GuiControl, Font, ZarielChallenges 1826 | } 1827 | } 1828 | else for kk, vv in v.progress_bars 1829 | switch vv.id 1830 | { 1831 | case "variants_completed": 1832 | ZarielVariantTotal := vv.goal 1833 | ZarielCompleted := vv.count 1834 | ZarielVariants := ZarielCompleted " / " ZarielVariantTotal 1835 | case "free_play_limit": ZarielFPCurrency := vv.count 1836 | case "weekly_challenge_porgress": ZarielChallenges := vv.count 1837 | } 1838 | } 1839 | } 1840 | } 1841 | 1842 | ParseLootData() { 1843 | EpicGearCount := 0 1844 | todogear := "`nHighest Gear Level: " UserDetails.details.stats.highest_level_gear 1845 | for k, v in UserDetails.details.loot { 1846 | if (v.rarity == "4") { 1847 | EpicGearCount += 1 1848 | } 1849 | if ((v.hero_id == "58") && (v.slot_id == "4")) { 1850 | brivrarity := v.rarity 1851 | brivgild := v.gild 1852 | brivenchant := v.enchant 1853 | } 1854 | if ((v.enchant + 1) = UserDetails.details.stats.highest_level_gear) { 1855 | todogear := todogear "`n(" ChampFromID(v.hero_id) " Slot " v.slot_id ")`n" 1856 | } 1857 | } 1858 | AchievementInfo := "Achievement Details`n" todogear 1859 | switch brivrarity { 1860 | case "0": BrivSlot4 := 0 1861 | case "1": BrivSlot4 := 10 1862 | case "2": BrivSlot4 := 30 1863 | case "3": BrivSlot4 := 50 1864 | case "4": BrivSlot4 := 100 1865 | } 1866 | BrivSlot4 += brivenchant*0.4 1867 | BrivSlot4 *= 1+(brivgild*0.5) 1868 | for k, v in UserDetails.details.modron_saves 1869 | if (v.instance_id == ActiveInstance) { 1870 | BrivZone := v.area_goal 1871 | } 1872 | } 1873 | 1874 | ParseChampData() { 1875 | TotalChamps := 0 1876 | for k, v in UserDetails.details.heroes 1877 | if (v.owned == 1) { 1878 | TotalChamps += 1 1879 | } 1880 | ; 1881 | ChampDetails := "" 1882 | if (UserDetails.details.stats.black_viper_total_gems) { 1883 | ChampDetails := ChampDetails "Black Viper Red Gems: " UserDetails.details.stats.black_viper_total_gems "`n`n" 1884 | } 1885 | if (UserDetails.details.stats.total_paid_up_front_gold) { 1886 | morgaengold := SubStr(UserDetails.details.stats.total_paid_up_front_gold, 1, 4) 1887 | epos := InStr(UserDetails.details.stats.total_paid_up_front_gold, "E") 1888 | morgaengold := morgaengold SubStr(UserDetails.details.stats.total_paid_up_front_gold, epos) 1889 | ChampDetails := ChampDetails "M" Chr(244) "rg" Chr(230) "n Gold Collected: " morgaengold "`n`n" 1890 | } 1891 | if (UserDetails.details.stats.torogar_lifetime_zealot_stacks) { 1892 | torostacks := UserDetails.details.stats.torogar_lifetime_zealot_stacks 1893 | ChampDetails := ChampDetails "Torogar Zealot Stacks: " torostacks "`n`n" 1894 | } 1895 | 1896 | if (UserDetails.details.stats.zorbu_lifelong_hits_beast || UserDetails.details.stats.zorbu_lifelong_hits_undead || UserDetails.details.stats.zorbu_lifelong_hits_drow) { 1897 | ChampDetails := ChampDetails "Zorbu Kills:`n(Humanoid)`t" UserDetails.details.stats.zorbu_lifelong_hits_humanoid "`n(Beast)`t`t" UserDetails.details.stats.zorbu_lifelong_hits_beast "`n(Undead)`t" UserDetails.details.stats.zorbu_lifelong_hits_undead "`n(Drow)`t`t" UserDetails.details.stats.zorbu_lifelong_hits_drow 1898 | } 1899 | } 1900 | 1901 | CheckPatronProgress() { 1902 | if !(MirtVariants == "Locked") { 1903 | if (MirtFPCurrency = "5000") { 1904 | Gui, Font, cGreen 1905 | GuiControl, Font, MirtFPCurrency 1906 | } 1907 | else { 1908 | Gui, Font, cRed 1909 | GuiControl, Font, MirtFPCurrency 1910 | } 1911 | if (MirtChallenges = "10") { 1912 | Gui, Font, cGreen 1913 | GuiControl, Font, MirtChallenges 1914 | } 1915 | else { 1916 | Gui, Font, cRed 1917 | GuiControl, Font, MirtChallenges 1918 | } 1919 | if (MirtCompleted = MirtVariantTotal) { 1920 | Gui, Font, cGreen 1921 | GuiControl, Font, MirtVariants 1922 | } 1923 | else { 1924 | Gui, Font, cRed 1925 | GuiControl, Font, MirtVariants 1926 | } 1927 | } 1928 | if !(VajraVariants == "Locked") { 1929 | if (VajraFPCurrency = "5000") { 1930 | Gui, Font, cGreen 1931 | GuiControl, Font, VajraFPCurrency 1932 | } 1933 | else { 1934 | Gui, Font, cRed 1935 | GuiControl, Font, VajraFPCurrency 1936 | } 1937 | if (VajraChallenges = "10") { 1938 | Gui, Font, cGreen 1939 | GuiControl, Font, VajraChallenges 1940 | } 1941 | else { 1942 | Gui, Font, cRed 1943 | GuiControl, Font, VajraChallenges 1944 | } 1945 | if (VajraCompleted = VajraVariantTotal) { 1946 | Gui, Font, cGreen 1947 | GuiControl, Font, VajraVariants 1948 | } 1949 | else { 1950 | Gui, Font, cRed 1951 | GuiControl, Font, VajraVariants 1952 | } 1953 | } 1954 | if !(StrahdVariants == "Locked") { 1955 | if (StrahdChallenges = "10") { 1956 | Gui, Font, cGreen 1957 | GuiControl, Font, StrahdChallenges 1958 | } 1959 | else { 1960 | Gui, Font, cRed 1961 | GuiControl, Font, StrahdChallenges 1962 | } 1963 | if (StrahdFPCurrency = "5000") { 1964 | Gui, Font, cGreen 1965 | GuiControl, Font, StrahdFPCurrency 1966 | } 1967 | else { 1968 | Gui, Font, cRed 1969 | GuiControl, Font, StrahdFPCurrency 1970 | } 1971 | if (StrahdCompleted = StrahdVariantTotal) { 1972 | Gui, Font, cGreen 1973 | GuiControl, Font, StrahdVariants 1974 | } 1975 | else { 1976 | Gui, Font, cRed 1977 | GuiControl, Font, StrahdVariants 1978 | } 1979 | } 1980 | if !(ZarielVariants == "Locked") { 1981 | if (ZarielChallenges = "10") { 1982 | Gui, Font, cGreen 1983 | GuiControl, Font, ZarielChallenges 1984 | } 1985 | else { 1986 | Gui, Font, cRed 1987 | GuiControl, Font, ZarielChallenges 1988 | } 1989 | if (ZarielFPCurrency = "5000") { 1990 | Gui, Font, cGreen 1991 | GuiControl, Font, ZarielFPCurrency 1992 | } 1993 | else { 1994 | Gui, Font, cRed 1995 | GuiControl, Font, ZarielFPCurrency 1996 | } 1997 | if (ZarielCompleted = ZarielVariantTotal) { 1998 | Gui, Font, cGreen 1999 | GuiControl, Font, ZarielVariants 2000 | } 2001 | else { 2002 | Gui, Font, cRed 2003 | GuiControl, Font, ZarielVariants 2004 | } 2005 | } 2006 | } 2007 | 2008 | CheckAchievements() { 2009 | if (UserDetails.details.stats.asharra_bonds < 3) { 2010 | if !(UserDetails.details.stats.asharra_bond_human) 2011 | ashexotic := " human" 2012 | if !(UserDetails.details.stats.asharra_bond_elf) 2013 | ashelf := " elf" 2014 | if !(UserDetails.details.stats.asharra_bond_exotic) 2015 | ashhuman := " exotic" 2016 | todoasharra := "`nAsharra needs:" ashhuman ashelf ashexotic 2017 | } 2018 | if !((UserDetails.details.stats.area_175_gromma_spec_a + UserDetails.details.stats.area_175_gromma_spec_b + UserDetails.details.stats.area_175_gromma_spec_c) == 3) { 2019 | if !(UserDetails.details.stats.area_175_gromma_spec_a == 1) 2020 | groma := " mountain" 2021 | if !(UserDetails.details.stats.area_175_gromma_spec_b == 1) 2022 | gromb := " arctic" 2023 | if !(UserDetails.details.stats.area_175_gromma_spec_c == 1) 2024 | gromc := " swamp" 2025 | todogromma := "`nGromma needs:" groma gromb gromc 2026 | } 2027 | if !((UserDetails.details.stats.krond_cantrip_1_kills > 99) && (UserDetails.details.stats.krond_cantrip_2_kills > 99) && (UserDetails.details.stats.krond_cantrip_3_kills > 99)) { 2028 | if !(UserDetails.details.stats.krond_cantrip_1_kills > 99) 2029 | krond1 := " thunderclap" 2030 | if !(UserDetails.details.stats.krond_cantrip_2_kills > 99) 2031 | krond2 := " shockinggrasp" 2032 | if !(UserDetails.details.stats.krond_cantrip_3_kills > 99) 2033 | krond3 := " firebolt" 2034 | todokrond := "`nKrond needs:" krond1 krond2 krond3 2035 | } 2036 | if (UserDetails.details.stats.regis_specializations < 6) { 2037 | if !(UserDetails.details.stats.regis_back_magic == 1) 2038 | regis1 := " <-magic" 2039 | if !(UserDetails.details.stats.regis_back_melee == 1) 2040 | regis2 := " <-melee" 2041 | if !(UserDetails.details.stats.regis_back_ranged == 1) 2042 | regis3 := " <-ranged" 2043 | if !(UserDetails.details.stats.regis_front_magic == 1) 2044 | regis4 := " magic->" 2045 | if !(UserDetails.details.stats.regis_front_melee == 1) 2046 | regis5 := " melee->" 2047 | if !(UserDetails.details.stats.regis_front_ranged == 1) 2048 | regis6 := " ranged->" 2049 | todoregis := "`nRegis needs:" regis1 regis2 regis3 regis4 regis5 regis6 2050 | } 2051 | if (UserDetails.details.stats.krydle_return_to_baldurs_gate < 3) { 2052 | if !(UserDetails.details.stats.krydle_return_to_baldurs_gate_delina == 1) 2053 | krydle1 := " delina" 2054 | if !(UserDetails.details.stats.krydle_return_to_baldurs_gate_krydle == 1) 2055 | krydle2 := " krydle" 2056 | if !(UserDetails.details.stats.krydle_return_to_baldurs_gate_minsc == 1) 2057 | krydle3 := " minsc" 2058 | todokrydle := "`nKrydle needs:" krydle1 krydle2 krydle3 2059 | } 2060 | AchievementInfo := AchievementInfo todoasharra todogromma todokrond todoregis todokrydle 2061 | } 2062 | 2063 | CheckBlessings() { 2064 | epiccount := "" 2065 | epicvalue := Round((1.02 ** EpicGearCount), 2) 2066 | if (UserDetails.details.reset_upgrade_levels.44) { ;Helm-Slow and Steady (X Epics) 2067 | epiccount := "Slow and Steady:`nx" epicvalue " damage (" EpicGearCount " epics)`n`n" 2068 | } 2069 | veterancount := "" 2070 | veteranvalue := Round(1 + (0.1 * UserDetails.details.stats.completed_adventures_variants_and_patron_variants_c22), 2) 2071 | if (UserDetails.details.reset_upgrade_levels.56) { ;Tiamat-Veterans of Avernus (X Adventures) 2072 | veterancount := "Veterans of Avernus:`nx" veteranvalue " damage (" UserDetails.details.stats.completed_adventures_variants_and_patron_variants_c22 " adventures)`n`n" 2073 | } 2074 | BlessingInfo := "Blessing Details`n`n" epiccount veterancount 2075 | if (BlessingInfo == "Blessing Details`n`n") { 2076 | BlessingInfo := "Blessing Details: N/A" 2077 | } 2078 | } 2079 | 2080 | ServerCall(callname, parameters) { 2081 | URLtoCall := "http://ps7.idlechampions.com/~idledragons/post.php?call=" callname parameters 2082 | WR := ComObjCreate("WinHttp.WinHttpRequest.5.1") 2083 | WR.SetTimeouts("10000", "10000", "10000", "10000") 2084 | Try { 2085 | WR.Open("POST", URLtoCall, false) 2086 | WR.SetRequestHeader("Content-Type","application/x-www-form-urlencoded") 2087 | WR.Send() 2088 | WR.WaitForResponse(-1) 2089 | data := WR.ResponseText 2090 | } 2091 | UpdateLogTime() 2092 | FileAppend, (%CurrentTime%) Server request: "%callname%"`n, %OutputLogFile% 2093 | FileRead, OutputText, %OutputLogFile% 2094 | oMyGUI.Update() 2095 | return data 2096 | } 2097 | 2098 | LaunchGame() { 2099 | if (Not WinExist("ahk_exe IdleDragons.exe")) { 2100 | Run, %GameClient% 2101 | SB_SetText("Game client starting...") 2102 | WinWait, "ahk_exe IdleDragons.exe" 2103 | SB_SetText("Game client has started!") 2104 | } 2105 | else { 2106 | if !FirstRun { 2107 | SB_SetText("Game client is already running!") 2108 | } 2109 | } 2110 | return 2111 | } 2112 | 2113 | Get_Journal: 2114 | { 2115 | if !UserID { 2116 | MsgBox % "Need User ID & Hash." 2117 | FirstRun() 2118 | } 2119 | if (InstanceID = 0) { 2120 | MsgBox, 4, , No Instance ID detected. Check server for user details? 2121 | IfMsgBox, Yes 2122 | { 2123 | GetUserDetails() 2124 | } 2125 | else 2126 | return 2127 | } 2128 | journalparams := "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID "&page=" 2129 | InputBox, pagecount, Journal, % "How many pages of Journal to retreive?`n`n(This will overwrite any previous download.)", , 350, 180 2130 | if ErrorLevel 2131 | return 2132 | pagenum := 1 2133 | FileDelete, %JournalFile% 2134 | while !(pagenum > pagecount) { 2135 | SB_SetText("Journal pages remaining to download: " ((pagecount - pagenum) + 1)) 2136 | rawresults := ServerCall("getPlayHistory", journalparams pagenum) 2137 | FileAppend, %rawresults%`n, %JournalFile% 2138 | pagenum += 1 2139 | sleep 1000 2140 | } 2141 | UpdateLogTime() 2142 | FileAppend, % "(" CurrentTime ") Journal pages downloaded: " (pagenum - 1) "`n", %OutputLogFile% 2143 | FileRead, OutputText, %OutputLogFile% 2144 | oMyGUI.Update() 2145 | SB_SetText("Journal download completed.") 2146 | return 2147 | } 2148 | 2149 | Open_Ticket: 2150 | { 2151 | Run, % "https://help.idlechampions.com/?page=help&display=open_tickets&user_id=" UserID "&hash=" UserHash 2152 | return 2153 | } 2154 | 2155 | Discord_Clicked: 2156 | { 2157 | Run, % "https://discord.com/invite/N3U8xtB" 2158 | return 2159 | } 2160 | 2161 | Update_Dictionary() { 2162 | if !(DictionaryVersion == CurrentDictionary) { 2163 | FileDelete, %LocalDictionary% 2164 | UrlDownloadToFile, %DictionaryFile%, %LocalDictionary% 2165 | Reload 2166 | return 2167 | } 2168 | else { 2169 | MsgBox % "Dictionary file up to date." 2170 | } 2171 | return 2172 | } 2173 | 2174 | List_ChampIDs: 2175 | { 2176 | champnamelen := 0 2177 | champname := "" 2178 | id := 1 2179 | champidlist := "" 2180 | while (id < 87) { 2181 | champname := ChampFromID(id) 2182 | StringLen, champnamelen, champname 2183 | while (champnamelen < 16) 2184 | { 2185 | champname := champname " " 2186 | champnamelen += 1 2187 | } 2188 | if (!mod(id, 4)) 2189 | champidlist := champidlist id ": " champname "`n" 2190 | else 2191 | champidlist := champidlist id ": " champname "`t" 2192 | id += 1 2193 | } 2194 | ;MsgBox, , Champ ID List, % champidlist 2195 | CustomMsgBox("Champion IDs and Names",champidlist,"Courier New","Blue") 2196 | return 2197 | } 2198 | 2199 | CustomMsgBox(Title,Message,Font="",FontOptions="",WindowColor="") 2200 | { 2201 | Gui,66:Destroy 2202 | Gui,66:Color,%WindowColor% 2203 | 2204 | Gui,66:Font,%FontOptions%,%Font% 2205 | Gui,66:Add,Text,,%Message% 2206 | Gui,66:Font 2207 | 2208 | GuiControlGet,Text,66:Pos,Static1 2209 | 2210 | Gui,66:Add,Button,% "Default y+10 w75 g66OK xp+" (TextW / 2) - 38 ,OK 2211 | 2212 | Gui,66:-MinimizeBox 2213 | Gui,66:-MaximizeBox 2214 | 2215 | SoundPlay,*-1 2216 | Gui,66:Show,,%Title% 2217 | 2218 | Gui,66:+LastFound 2219 | WinWaitClose 2220 | Gui,66:Destroy 2221 | return 2222 | 2223 | 66OK: 2224 | Gui,66:Destroy 2225 | return 2226 | } 2227 | 2228 | ViewICSettings() { 2229 | rawicsettings := "" 2230 | FileRead, rawicsettings, %ICSettingsFile% 2231 | CurrentICSettings := JSON.parse(rawicsettings) 2232 | MsgBox, , localSettings.json file, % rawicsettings 2233 | } 2234 | 2235 | SetUIScale() { 2236 | FileRead, rawicsettings, %ICSettingsFile% 2237 | CurrentICSettings := JSON.parse(rawicsettings) 2238 | newuiscale := 1 2239 | InputBox, newuiscale, UI Scale, Please enter the desired UI Scale.`n(0.5 - 1.25), , 250, 150, , , , , % CurrentICSettings.UIScale 2240 | if ErrorLevel 2241 | return 2242 | while ((newuiscale < 0.5) || (newuiscale > 1.25)) { 2243 | InputBox, newuiscale, UI Scale, Please enter a valid UI Scale.`n(0.5 - 1.25), , 250, 150, , , , , % CurrentICSettings.UIScale 2244 | if ErrorLevel 2245 | return 2246 | } 2247 | if (InStr(newuiscale, ".") == 1) { 2248 | newuiscale := "0" newuiscale 2249 | } 2250 | newicsettings := "" 2251 | for k, v in CurrentICSettings { 2252 | if (k == "UIScale") { 2253 | newicsettings := newicsettings """" k """:" newuiscale "," 2254 | } 2255 | else { 2256 | newicsettings := newicsettings """" k """:" v "," 2257 | } 2258 | } 2259 | StringTrimRight, newicsettings, newicsettings, 1 2260 | newicsettings := "{" newicsettings "}" 2261 | MsgBox % newicsettings 2262 | FileDelete, %ICSettingsFile% 2263 | FileAppend, %newicsettings%, %ICSettingsFile% 2264 | UpdateLogTime() 2265 | FileAppend, % "(" CurrentTime ") UI Scale changed to " newuiscale "`n", %OutputLogFile% 2266 | FileRead, OutputText, %OutputLogFile% 2267 | oMyGUI.Update() 2268 | SB_SetText("UI Scale changed to " newuiscale) 2269 | } 2270 | 2271 | SetFramerate() { 2272 | FileRead, rawicsettings, %ICSettingsFile% 2273 | CurrentICSettings := JSON.parse(rawicsettings) 2274 | newframerate := 60 2275 | InputBox, newframerate, Framerate, Please enter the desired Framerate.`n(1 - 240), , 250, 150, , , , , % CurrentICSettings.TargetFramerate 2276 | if ErrorLevel 2277 | return 2278 | while ((newframerate < 1) || (newframerate > 240)) { 2279 | InputBox, newframerate, Framerate, Please enter a valid Framerate.`n(1 - 240), , 250, 150, , , , , % CurrentICSettings.TargetFramerate 2280 | if ErrorLevel 2281 | return 2282 | } 2283 | newicsettings := "" 2284 | for k, v in CurrentICSettings { 2285 | if (k == "TargetFramerate") { 2286 | newicsettings := newicsettings """" k """:" newframerate "," 2287 | } 2288 | else { 2289 | newicsettings := newicsettings """" k """:" v "," 2290 | } 2291 | } 2292 | StringTrimRight, newicsettings, newicsettings, 1 2293 | newicsettings := "{" newicsettings "}" 2294 | MsgBox % newicsettings 2295 | FileDelete, %ICSettingsFile% 2296 | FileAppend, %newicsettings%, %ICSettingsFile% 2297 | UpdateLogTime() 2298 | FileAppend, % "(" CurrentTime ") Framerate changed to " newframerate "`n", %OutputLogFile% 2299 | FileRead, OutputText, %OutputLogFile% 2300 | oMyGUI.Update() 2301 | SB_SetText("Framerate changed to " newframerate) 2302 | } 2303 | 2304 | SetParticles() { 2305 | FileRead, rawicsettings, %ICSettingsFile% 2306 | CurrentICSettings := JSON.parse(rawicsettings) 2307 | newparticles := 100 2308 | InputBox, newparticles, Particles, Please enter the desired Percentage.`n(0 - 100), , 250, 150, , , , , % CurrentICSettings.PercentOfParticlesSpawned 2309 | if ErrorLevel 2310 | return 2311 | while ((newparticles < 0) || (newparticles > 100)) { 2312 | InputBox, newparticles, Particles, Please enter a valid Percentage.`n(0 - 100), , 250, 150, , , , , % CurrentICSettings.PercentOfParticlesSpawned 2313 | if ErrorLevel 2314 | return 2315 | } 2316 | newicsettings := "" 2317 | for k, v in CurrentICSettings { 2318 | if (k == "PercentOfParticlesSpawned") { 2319 | newicsettings := newicsettings """" k """:" newparticles "," 2320 | } 2321 | else { 2322 | newicsettings := newicsettings """" k """:" v "," 2323 | } 2324 | } 2325 | StringTrimRight, newicsettings, newicsettings, 1 2326 | newicsettings := "{" newicsettings "}" 2327 | MsgBox % newicsettings 2328 | FileDelete, %ICSettingsFile% 2329 | FileAppend, %newicsettings%, %ICSettingsFile% 2330 | UpdateLogTime() 2331 | FileAppend, % "(" CurrentTime ") Paticles changed to " newparticles "`n", %OutputLogFile% 2332 | FileRead, OutputText, %OutputLogFile% 2333 | oMyGUI.Update() 2334 | SB_SetText("Particles changed to " newparticles) 2335 | } 2336 | 2337 | SimulateBriv(i) { 2338 | SB_SetText("Calculating...") 2339 | ;Original version by Gladio Stricto - pastebin.com/Rd8wWSVC 2340 | ;Copied from updated version - github.com/Deatho0ne 2341 | chance := ((BrivSlot4 / 100) + 1) * 0.25 2342 | trueChance := chance 2343 | skipLevels := 1 2344 | if (chance > 2) { 2345 | while chance >= 1 { 2346 | skipLevels++ 2347 | chance /= 2 2348 | } 2349 | ;trueChance := ((chance - Floor(chance)) / 2) 2350 | } else { 2351 | skipLevels := Floor(chance + 1) 2352 | If (skipLevels > 1) { 2353 | trueChance := 0.5 + ((chance - Floor(chance)) / 2) 2354 | } 2355 | } 2356 | totalLevels := 0 2357 | totalSkips := 0 2358 | Loop % i { 2359 | level := 0.0 2360 | skips := 0.0 2361 | Loop { 2362 | Random, x, 0.0, 1.0 2363 | If (x < trueChance) { 2364 | level += skipLevels 2365 | skips++ 2366 | } 2367 | level++ 2368 | } 2369 | Until level > BrivZone 2370 | totalLevels += level 2371 | totalSkips += skips 2372 | } 2373 | ;chance := Round(chance, 2) 2374 | if skipLevels < 3 2375 | trueChance := Round(trueChance * 100, 2) 2376 | else 2377 | trueChance := Round(chance * 100, 2) 2378 | avgSkips := Round(totalSkips / i, 2) 2379 | avgSkipped := Round(avgSkips * skipLevels, 2) 2380 | avgZones := Round(totalLevels / i, 2) 2381 | avgSkipRate := Round((avgSkipped / avgZones) * 100, 2) 2382 | avgStacks := Round((1.032**avgSkips) * 48, 2) 2383 | multiplier := 0.1346894362, additve := 41.86396406 2384 | roughTime := Round(((multiplier * avgStacks) + additve), 2) 2385 | message = With Briv skip %skipLevels% until zone %BrivZone%`n(%trueChance%`% chance to skip %skipLevels% zones)`n`n%i% simulations produced an average:`n%avgSkips% skips (%avgSkipped% zones skipped)`n%avgZones% end zone`n%avgSkipRate%`% true skip rate`n%avgStacks% required stacks with`n%roughTime% time in secs to build said stacks very rough guess 2386 | SB_SetText("Calculation has completed.") 2387 | Return message 2388 | } 2389 | 2390 | KlehoImage() 2391 | { 2392 | campaignid := 0 2393 | currenttimegate := "" 2394 | kleholink := "https://idle.kleho.ru/assets/fb/" 2395 | for k, v in UserDetails.defines.campaign_defines { 2396 | campaignid := v.id 2397 | } 2398 | if (campaignid == 17) { 2399 | for k, v in UserDetails.details.game_instances { 2400 | if (v.game_instance_id == ActiveInstance) { 2401 | currenttimegate := JSON.stringify(v.defines.adventure_defines[1].requirements[1].champion_id) 2402 | } 2403 | } 2404 | campaignid := KlehoFromID(currenttimegate) 2405 | } 2406 | else if !((campaignid < 3) or (campaignid == 15) or (campaignid > 21)) { 2407 | for k, v in UserDetails.details.game_instances { 2408 | if (v.game_instance_id == ActiveInstance) { 2409 | campaignid := campaignid "a" JSON.stringify(v.defines.adventure_defines[1].requirements[1].adventure_id) 2410 | } 2411 | } 2412 | } 2413 | kleholink := kleholink campaignid "/" 2414 | for k, v in UserDetails.details.game_instances { 2415 | if (v.game_instance_id == ActiveInstance) { 2416 | for kk, vv in v.formation { 2417 | if (vv > 0) { 2418 | kleholink := kleholink vv "_" 2419 | } 2420 | else { 2421 | kleholink := kleholink "_" 2422 | } 2423 | } 2424 | } 2425 | } 2426 | StringTrimRight, kleholink, kleholink, 1 2427 | kleholink := kleholink ".png" 2428 | InputBox, dummyvar, Kleho Image, % "Copy link for formation sharing.`n`nSave image to the following file?`nformationimages\Patron-" CurrentPatron "\AdvID-" CurrentAdventure "\Area-" CurrentArea ".png", , , , , , , , % kleholink 2429 | if ErrorLevel { 2430 | dummyvar := "" 2431 | return 2432 | } 2433 | if !(FileExist("\formationimages\")) { 2434 | FileCreateDir, formationimages 2435 | } 2436 | if !(FileExist("\formationimages\Patron-" CurrentPatron)) { 2437 | FileCreateDir, % "formationimages\Patron-" CurrentPatron 2438 | } 2439 | if !(FileExist("\formationimages\Patron-" CurrentPatron "\AdvID-" CurrentAdventure)) { 2440 | FileCreateDir, % "formationimages\Patron-" CurrentPatron "\AdvID-" CurrentAdventure 2441 | } 2442 | UrlDownloadToFile, %kleholink%, % "formationimages\Patron-" CurrentPatron "\AdvID-" CurrentAdventure "\Area-" CurrentArea ".png" 2443 | dummyvar := "" 2444 | return 2445 | } 2446 | 2447 | IncompleteVariants() 2448 | { 2449 | if !FileExist("advdefs.json") { 2450 | MsgBox % "Downloading adventure defines." 2451 | AdventureList() 2452 | } 2453 | idtocheck := 0 2454 | InputBox, idtocheck, Incomplete Adventures, Please enter the Patron to check.`nNone (0)`tMirt (1)`nVajra (2)`tStrahd (3)`nZariel (4), , 250, 200, , , , , % idtocheck 2455 | if ErrorLevel 2456 | return 2457 | while ((idtocheck < 0) or (idtocheck > 4)) { 2458 | InputBox, idtocheck, Incomplete Adventures, Please enter a valid Patron ID.`nMirt (1)`tVajra (2)`tStrahd (3)`nZariel (4), , 250, 200, , , , , % idtocheck 2459 | if ErrorLevel 2460 | return 2461 | } 2462 | if (idtocheck == 0) { 2463 | IncompleteBase() 2464 | } 2465 | else { 2466 | IncompletePatron(idtocheck) 2467 | } 2468 | return 2469 | } 2470 | 2471 | IncompleteBase() 2472 | { 2473 | FileRead, AdventureFile, advdefs.json 2474 | AdventureNames := JSON.parse(AdventureFile) 2475 | 2476 | missingvariants := "No Patron:" 2477 | campaignvariants := "" 2478 | availablelist := {} 2479 | completelist := {} 2480 | freeplaylist := {} 2481 | getparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID 2482 | sResult := ServerCall("getcampaigndetails", getparams) 2483 | FileDelete, campaign.json 2484 | FileAppend, %sResult%, campaign.json 2485 | campaignresults := JSON.parse(sResult) 2486 | for k, v in campaignresults.defines.adventure_defines { 2487 | if (v.repeatable) { 2488 | freeplaylist.push(v.id) 2489 | } 2490 | } 2491 | for k, v in campaignresults.campaigns { 2492 | for k2, v2 in v.available_adventure_ids { 2493 | availablelist.push(v2) 2494 | } 2495 | for k2, v2 in v.completed_adventure_ids { 2496 | completelist.push(v2) 2497 | } 2498 | if (availablelist[1]) { 2499 | campaignvariants := campaignvariants "`n" CampaignFromID(v.campaign_id) "- " 2500 | } 2501 | for k2, v2 in availablelist { 2502 | campaignvariants := campaignvariants v2 ", " 2503 | } 2504 | for k2, v2 in completelist { 2505 | campaignvariants := StrReplace(campaignvariants, " " v2 ", ", " ") 2506 | } 2507 | for k2, v2 in freeplaylist { 2508 | campaignvariants := StrReplace(campaignvariants, " " v2 ", ", " ") 2509 | } 2510 | if (availablelist[1]) { 2511 | StringTrimRight, campaignvariants, campaignvariants, 2 2512 | } 2513 | availablelist := {} 2514 | completelist := {} 2515 | if !(campaignvariants == ("`n" CampaignFromID(v.campaign_id))) { 2516 | missingvariants := missingvariants campaignvariants 2517 | } 2518 | campaignvariants := "" 2519 | } 2520 | missingvariants := StrReplace(missingvariants, "-", ":`n") 2521 | MsgBox % missingvariants 2522 | return 2523 | } 2524 | 2525 | IncompletePatron(patronid) 2526 | { 2527 | FileRead, AdventureFile, advdefs.json 2528 | AdventureNames := JSON.parse(AdventureFile) 2529 | 2530 | missingvariants := PatronFromID(patronid) ":" 2531 | campaignvariants := "" 2532 | availablelist := {} 2533 | completelist := {} 2534 | freeplaylist := {} 2535 | getparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID 2536 | sResult := ServerCall("getcampaigndetails", getparams) 2537 | FileDelete, campaign.json 2538 | FileAppend, %sResult%, campaign.json 2539 | campaignresults := JSON.parse(sResult) 2540 | for k, v in campaignresults.defines.adventure_defines { 2541 | if (v.repeatable) { 2542 | freeplaylist.push(v.id) 2543 | } 2544 | } 2545 | for k, v in campaignresults.campaigns { 2546 | for k2, v2 in v.available_patron_adventure_ids { 2547 | for k3, v3 in v2 { 2548 | if ((k3 == patronid) && (v3[1] == 1)) 2549 | availablelist.push(k2) 2550 | } 2551 | } 2552 | for k2, v2 in v.completed_patron_adventure_ids { 2553 | for k3, v3 in v2 { 2554 | if ((k3 == patronid) && (v3[1] == 1)) 2555 | completelist.push(k2) 2556 | } 2557 | } 2558 | if (availablelist[1]) { 2559 | campaignvariants := campaignvariants "`n" CampaignFromID(v.campaign_id) "- " 2560 | } 2561 | for k2, v2 in availablelist { 2562 | campaignvariants := campaignvariants v2 ", " 2563 | } 2564 | for k2, v2 in completelist { 2565 | campaignvariants := StrReplace(campaignvariants, " " v2 ", ", " ") 2566 | } 2567 | for k2, v2 in freeplaylist { 2568 | campaignvariants := StrReplace(campaignvariants, " " v2 ", ", " ") 2569 | } 2570 | if (availablelist[1]) { 2571 | StringTrimRight, campaignvariants, campaignvariants, 2 2572 | } 2573 | availablelist := {} 2574 | completelist := {} 2575 | if !(campaignvariants == ("`n" CampaignFromID(v.campaign_id))) { 2576 | missingvariants := missingvariants campaignvariants 2577 | } 2578 | campaignvariants := "" 2579 | } 2580 | missingvariants := StrReplace(missingvariants, "-", ":`n") 2581 | MsgBox % missingvariants 2582 | return 2583 | } 2584 | 2585 | AdventureList() { 2586 | getparams := DummyData "&user_id=" UserID "&hash=" UserHash "&instance_id=" InstanceID 2587 | sResult := ServerCall("getcampaigndetails", getparams) 2588 | campaignresults := JSON.parse(sResult) 2589 | freeplayids := {} 2590 | freeplaynames := {} 2591 | for k, v in campaignresults.defines.adventure_defines { 2592 | freeplayids.push(v.id) 2593 | freeplaynames.push(v.name) 2594 | } 2595 | count := 1 2596 | testvar := "{" 2597 | while (count < freeplayids.Count()) { 2598 | testvar := testvar """" JSON.stringify(freeplayids[count]) """:" 2599 | tempname := JSON.stringify(freeplaynames[count]) 2600 | testvar := testvar tempname "," 2601 | count += 1 2602 | } 2603 | StringTrimRight, testvar, testvar, 1 2604 | testvar := testvar "}" 2605 | FileDelete, advdefs.json 2606 | FileAppend, %testvar%, advdefs.json 2607 | MsgBox % "advdefs.json saved to file." 2608 | return 2609 | } 2610 | 2611 | GearReport() { 2612 | totalgearlevels := -1 2613 | totalgearitems := -1 2614 | totalcorelevels := -1 2615 | totalcoreitems := -1 2616 | totaleventlevels := 0 2617 | totaleventitems := 0 2618 | totalshinycore := 0 2619 | totalshinyevent := 0 2620 | highestcorelevel := 0 2621 | highesteventlevel := 0 2622 | highestcoreid := 0 2623 | highesteventid := 0 2624 | lowestcorelevel := 10000000000 2625 | lowesteventlevel := 10000000000 2626 | lowestcoreid := 0 2627 | lowesteventid := 0 2628 | currentchamplevel := 0 2629 | currentcount := 0 2630 | lastchamp := 0 2631 | lastshiny := 0 2632 | currentloot := UserDetails.details.loot 2633 | dummyitem := {} 2634 | currentloot.push(dummyitem) 2635 | 2636 | for k, v in currentloot { 2637 | totalgearlevels += (v.enchant + 1) 2638 | totalgearitems += 1 2639 | 2640 | if (lastchamp < 13) { 2641 | totalcorelevels += (v.enchant + 1) 2642 | totalcoreitems += 1 2643 | if (lastshiny) { 2644 | totalshinycore += 1 2645 | } 2646 | if ((v.hero_id != lastchamp) and (lastchamp != 0)) { 2647 | if (currentchamplevel > highestcorelevel) { 2648 | highestcorelevel := currentchamplevel 2649 | highestcoreid := lastchamp 2650 | } 2651 | if (currentchamplevel < lowestcorelevel) { 2652 | lowestcorelevel := currentchamplevel 2653 | lowestcoreid := lastchamp 2654 | } 2655 | currentchamplevel := 0 2656 | currentcount := 0 2657 | currentchamplevel := (v.enchant + 1) 2658 | currentcount += 1 2659 | } 2660 | else { 2661 | currentchamplevel += (v.enchant + 1) 2662 | currentcount += 1 2663 | } 2664 | } 2665 | else if ((lastchamp = 13) or (lastchamp = 18) or (lastchamp = 30) or (lastchamp = 67) or (lastchamp = 68) or (lastchamp = 86)){ 2666 | totalcorelevels += (v.enchant + 1) 2667 | totalcoreitems += 1 2668 | if (lastshiny) { 2669 | totalshinycore += 1 2670 | } 2671 | if (v.hero_id != lastchamp) { 2672 | if (currentchamplevel > highestcorelevel) { 2673 | highestcorelevel := currentchamplevel 2674 | highestcoreid := lastchamp 2675 | } 2676 | if (currentchamplevel < lowestcorelevel) { 2677 | lowestcorelevel := currentchamplevel 2678 | lowestcoreid := lastchamp 2679 | } 2680 | currentchamplevel := 0 2681 | currentcount := 0 2682 | currentchamplevel := (v.enchant + 1) 2683 | currentcount += 1 2684 | } 2685 | else { 2686 | currentchamplevel += (v.enchant + 1) 2687 | currentcount += 1 2688 | } 2689 | } 2690 | else { 2691 | totaleventlevels += (v.enchant + 1) 2692 | totaleventitems += 1 2693 | if (lastshiny) { 2694 | totalshinyevent += 1 2695 | } 2696 | if (v.hero_id != lastchamp) { 2697 | if (currentchamplevel > highesteventlevel) { 2698 | highesteventlevel := currentchamplevel 2699 | highesteventid := lastchamp 2700 | } 2701 | if (currentchamplevel < lowesteventlevel) { 2702 | lowesteventlevel := currentchamplevel 2703 | lowesteventid := lastchamp 2704 | } 2705 | currentchamplevel := 0 2706 | currentcount := 0 2707 | currentchamplevel := (v.enchant + 1) 2708 | currentcount += 1 2709 | } 2710 | else { 2711 | currentchamplevel += (v.enchant + 1) 2712 | currentcount += 1 2713 | } 2714 | } 2715 | 2716 | lastchamp := v.hero_id 2717 | lastshiny := v.gild 2718 | } 2719 | dummyitem := currentloot.pop() 2720 | shortreport := "" 2721 | 2722 | shortreport := shortreport "Avg item level:`t" Round(totalgearlevels/totalgearitems) 2723 | 2724 | shortreport := shortreport "`n`nAvg core level:`t" Round(totalcorelevels/totalcoreitems) 2725 | shortreport := shortreport "`nHighest avg core:`t" Round(highestcorelevel/6) " (" ChampFromID(highestcoreid) ")" 2726 | shortreport := shortreport "`nLowest avg core:`t" Round(lowestcorelevel/6) " (" ChampFromID(lowestcoreid) ")" 2727 | shortreport := shortreport "`nCore Shinies:`t" totalshinycore "/" totalcoreitems 2728 | 2729 | shortreport := shortreport "`n`nAvg event level:`t" Round(totaleventlevels/totaleventitems) 2730 | shortreport := shortreport "`nHighest avg event:`t" Round(highesteventlevel/6) " (" ChampFromID(highesteventid) ")" 2731 | shortreport := shortreport "`nLowest avg event:`t" Round(lowesteventlevel/6) " (" ChampFromID(lowesteventid) ")" 2732 | shortreport := shortreport "`nEvent Shinies:`t" totalshinyevent "/" totaleventitems 2733 | 2734 | MsgBox % shortreport 2735 | return 2736 | } 2737 | 2738 | PatronFeats() { 2739 | assignedfeats := "" 2740 | for k, v in UserDetails.details.heroes { 2741 | for k2, v2 in v.active_feats { 2742 | switch JSON.stringify(v2) { 2743 | case "272": assignedfeats := assignedfeats "Celeste CON+1`n" 2744 | case "13": assignedfeats := assignedfeats "Celeste INT+1`n" 2745 | case "107": assignedfeats := assignedfeats "Drizzt INT+1`n" 2746 | case "138": assignedfeats := assignedfeats "Nrakk INT+1`n" 2747 | case "193": assignedfeats := assignedfeats "Zorbu INT+1`n" 2748 | case "208": assignedfeats := assignedfeats "Nerys INT+1`n" 2749 | case "229": assignedfeats := assignedfeats "Rosie INT+1`n" 2750 | case "361": assignedfeats := assignedfeats "Gromma INT+1`n" 2751 | default: assignedfeats := assignedfeats 2752 | } 2753 | } 2754 | } 2755 | if (assignedfeats = "") { 2756 | assignedfeats := "None" 2757 | } 2758 | MsgBox % assignedfeats 2759 | return 2760 | } 2761 | 2762 | ShowPityTimers() { 2763 | pitylist := "" 2764 | pityjson := JSON.stringify(UserDetails.details.stats) 2765 | pityjson := StrReplace(pityjson, """forced_tutorial_done"":""0"",""", """forced_win"":{""") 2766 | pityjson := StrReplace(pityjson, "forced_win_counter_", "") 2767 | pityjson := StrReplace(pityjson, ",""free_plays_completed""", "},""free_plays_completed""") 2768 | pityjson := JSON.parse(pityjson) 2769 | newestchamp := JSON.stringify(UserDetails.details.heroes[UserDetails.details.heroes.MaxIndex()].hero_id) 2770 | newestchamp := StrReplace(newestchamp, """") 2771 | chestsforepic := 1 2772 | while (chestsforepic < 11) { 2773 | if (chestsforepic == 1) { 2774 | pitylist := pitylist "Epic in Next Chest for:`n " 2775 | } 2776 | else { 2777 | pitylist := pitylist "Epic in next " chestsforepic " Chests for:`n " 2778 | } 2779 | currentchamp := 14 2780 | currentcount := 0 2781 | currentchest := 0 2782 | currentpity := "" 2783 | while (currentchamp < newestchamp) { 2784 | currentchest := ChestIDFromChampID(currentchamp) 2785 | for k, v in (pityjson.forced_win) { 2786 | if (k = currentchest) { 2787 | currentpity := v 2788 | } 2789 | } 2790 | if (currentpity = chestsforepic) { 2791 | pitylist := pitylist ChampFromID(currentchamp) ", " 2792 | currentcount += 1 2793 | } 2794 | switch currentchamp { 2795 | case "17": currentchamp += 2 2796 | case "29": currentchamp += 2 2797 | case "66": currentchamp += 3 2798 | default: currentchamp += 1 2799 | } 2800 | } 2801 | if !(currentcount) { 2802 | pitylist := pitylist "(None)`n" 2803 | } 2804 | else { 2805 | StringTrimRight, pitylist, pitylist, 2 2806 | pitylist := pitylist "`n" 2807 | } 2808 | chestsforepic += 1 2809 | } 2810 | MsgBox % pitylist 2811 | return 2812 | } 2813 | 2814 | getChestCodes() { 2815 | clipContents := clipboard 2816 | regexpPattern = P)\b(?