forked from TSM-EVO/FlaskManager-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflaskmanager.ahk.bak
600 lines (514 loc) · 20.5 KB
/
flaskmanager.ahk.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
;#####################################################################################
if not A_IsAdmin
{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
;https://github.com/Kalamity/classMemory : memory reading library
#Include %A_ScriptDir%\libs\classMemory.ahk
SetBatchLines, -1
BF_timer := 0
Flask1_timer := 0
Flask2_timer := 0
Flask3_timer := 0
Flask4_timer := 0
Flask5_timer := 0
Enter_key_timer := 0
;#####################################################################################
IfNotExist, Settings.ini
{
defaultIni .= "[variables]`n"
defaultIni .= "Flask1dur=4000`n"
defaultIni .= "Flask2dur=4000`n"
defaultIni .= "Flask3dur=4000`n"
defaultIni .= "Flask4dur=4000`n"
defaultIni .= "Flask5dur=4000`n"
defaultIni .= "HealthPct=100`n"
defaultIni .= "ManaPct=100`n"
defaultIni .= "DebugX=514`n"
defaultIni .= "DebugY=1054`n"
defaultIni .= "MonitorNumber=1`n"
defaultIni .= "XPos=1920`n"
defaultIni .= "YPos=1080`n"
defaultIni .= "[Checkbox]`n"
defaultIni .= "Flaskbox1=1`n"
defaultIni .= "Flaskbox2=1`n"
defaultIni .= "Flaskbox3=1`n"
defaultIni .= "Flaskbox4=1`n"
defaultIni .= "Flaskbox5=1`n"
defaultIni .= "FlaskType1=Normal`n"
defaultIni .= "FlaskType2=Normal`n"
defaultIni .= "FlaskType3=Normal`n"
defaultIni .= "FlaskType4=Normal`n"
defaultIni .= "FlaskType5=Normal`n"
defaultIni .= "Steambox=0`n"
defaultIni .= "[hotkeys]`n"
defaultIni .= "Flask1key=1`n"
defaultIni .= "Flask2key=2`n"
defaultIni .= "Flask3key=3`n"
defaultIni .= "Flask4key=4`n"
defaultIni .= "Flask5key=5`n"
defaultIni .= "Flask1triggerkey=RButton`n"
defaultIni .= "Flask2triggerkey=RButton`n"
defaultIni .= "Flask3triggerkey=RButton`n"
defaultIni .= "Flask4triggerkey=RButton`n"
defaultIni .= "Flask5triggerkey=RButton`n"
FileAppend, %defaultIni%, Settings.ini, UTF-16
}
readFromFile()
global flasktrigger1 := flask1triggerkey
global flasktrigger2 := flask2triggerkey
global flasktrigger3 := flask3triggerkey
global flasktrigger4 := flask4triggerkey
global flasktrigger5 := flask5triggerkey
global flaskkeybind1 := flask1key
global flaskkeybind2 := flask2key
global flaskkeybind3 := flask3key
global flaskkeybind4 := flask4key
global flaskkeybind5 := flask5key
global flask1duration := flask1dur
global flask2duration := flask2dur
global flask3duration := flask3dur
global flask4duration := flask4dur
global flask5duration := flask5dur
global Flaskbox1
global Flaskbox2
global Flaskbox3
global Flaskbox4
global Flaskbox5
global FlaskType1
global FlaskType2
global FlaskType3
global FlaskType4
global FlaskType5
Gui Add, Tab3, vTab x4 y-1 w550 h396 -wrap, Flasks|Debug|Other stuff
values = |Normal|Health|Mana
Gui, Tab, 1 ; General stuff
Gui Add, Hotkey, vFlask1key x47 y31 w50 h21, %flask1key%
Gui Add, Edit, vFlask1dur x102 y31 w40 h21, %flask1dur%
Gui Add, Edit, vFlask1triggerkey x148 y30 w50 h21, %flask1triggerkey%
Gui Add, Text, x7 y34 w35 h13, Flask 1
Gui Add, Checkbox, vFlaskbox1 x208 y32 w50 h13, Flask 1
Gui, Add, ComboBox, vFlaskType1 x270 y32 w70 h80, %values%
Gui Add, Hotkey, vFlask2key x47 y57 w50 h21, %flask2key%
Gui Add, Edit, vFlask2triggerkey x148 y57 w50 h21, %flask2triggerkey%
Gui Add, Edit, vFlask2dur x102 y57 w40 h21, %flask2dur%
Gui Add, Checkbox, vFlaskbox2 x208 y60 w50 h13, Flask 2
Gui Add, Text, x7 y60 w35 h13, Flask 2
Gui, Add, ComboBox, vFlaskType2 x270 y60 w70 h80, %values%
Gui Add, Hotkey, vFlask3key x47 y83 w50 h21, %flask3key%
Gui Add, Edit, vFlask3dur x102 y83 w40 h21, %flask3dur%
Gui Add, Edit, vFlask3triggerkey x148 y83 w50 h21, %flask3triggerkey%
Gui Add, Text, x7 y86 w35 h13, Flask 3
Gui Add, Checkbox, vFlaskbox3 x208 y86 w50 h13, Flask 3
Gui, Add, ComboBox, vFlaskType3 x270 y86 w70 h80, %values%
Gui Add, Hotkey, vFlask4key x47 y109 w50 h21, %flask4key%
Gui Add, Edit, vFlask4dur x102 y109 w40 h21, %flask4dur%
Gui Add, Edit, vFlask4triggerkey x148 y109 w50 h21, %flask4triggerkey%
Gui Add, Text, x7 y112 w35 h13, Flask 4
Gui Add, Checkbox, vFlaskbox4 x208 y112 w50 h13, Flask 4
Gui, Add, ComboBox, vFlaskType4 x270 y112 w70 h80, %values%
Gui Add, Hotkey, vFlask5key x47 y134 w50 h21, %flask5key%
Gui Add, Edit, vFlask5dur x102 y134 w40 h21, %flask5dur%
Gui Add, Edit, vFlask5triggerkey x148 y134 w50 h21, %flask5triggerkey%
Gui Add, Text, x7 y137 w35 h13, Flask 5
Gui Add, Checkbox, vFlaskbox5 x208 y138 w50 h13, Flask 5
Gui, Add, ComboBox, vFlaskType5 x270 y138 w70 h80, %values%
;Steam check
Gui Add, Text, x450 y100 w100 h50, Enable this if you are running Steam!
Gui Add, Checkbox, vSteambox x500 y128 w50 h25
;Save Setting
Gui, Add, Button, x500 y23 w37 h23 default gupdateEverything, Save
;Health Stuff
Gui Add, Edit, vHealthPct x55 y210 w50 h21, %HealthPct%
Gui Add, Edit, vManaPct x175 y210 w50 h21, %ManaPct%
Gui, Font, s10 Arial
Gui Add, Text, x50 y170 w70 h40, Health Percentage
Gui Add, Text, x170 y170 w70 h40, Mana Percentage
Gui, Tab, 2 ;Debug stuff here
Gui Add, Text, x10 y40 w100 h30, X Position
Gui Add, Text, x80 y40 w100 h30, Y Position
Gui Add, Edit, vXPos x10 y60 w40 h21, %xPos%
Gui Add, Edit, vYPos x80 y60 w40 h21, %yPos%
Gui, Add, CheckBox, x170 y50 w100 h30 vDebugColors, Debugging Colors Enabled
Gui, Add, Button, x500 y23 w37 h23 default gupdateEverything, Save
Gui, Tab, 3 ;Debug stuff here
Gui, Add, Button, x500 y23 w37 h23 default gupdateEverything, Save
Gui,Show,w550 h281,Flask Manager GUI
global NormalFlaskCount=0
global HealthFlaskCount=0
global ManaFlaskCount=0
Loop 5
{
IfExist, Settings.ini
{
Iniread, Flaskbox%A_Index%, settings.ini, CheckBox, Flaskbox%A_index%
valueFlask := Flaskbox%A_Index%
Iniread, FlaskType%A_Index%, settings.ini, CheckBox, FlaskType%A_index%
valueFlaskType := FlaskType%A_Index%
;MsgBox %valueFlaskType%
Iniread, Steambox, settings.ini, CheckBox, Steambox
valueSteam := Steambox
GuiControl, , Flaskbox%A_Index%, %valueFlask%
GuiControl, , Steambox, %valueSteam%
GuiControl, ChooseString, FlaskType%A_Index%, %valueFlaskType%
}
}
;=================startup load the frameBase (IngameState)===============
;https://github.com/TehCheat/PoEHUD/tree/x64/src/Poe/Offsets.cs: private static readonly Pattern basePtrPattern = new Pattern(new byte[]
SetFormat, Integer, hex
basePtrPattern:=[0x40, 0x53, 0x48, 0x83, 0xEC, 0x50, 0x48, 0xC7, 0x44, 0x24, 0x20, 0xFE, 0xFF, 0xFF, 0xFF, 0xC7, 0x44, 0x24, 0x60, 0x00, 0x00, 0x00, 0x00, 0x48, 0x8b, 0x05]
if(Steambox == 0){
cliexe := "PathOfExile_x64.exe"
}
if(Steambox == 1){
cliexe := "PathOfExile_x64Steam.exe"
}
global poe := new _ClassMemory("ahk_exe " . cliexe, "", hProcessCopy)
PatternIsAt:=poe.modulePatternScan(cliexe, basePtrPattern*)-poe.BaseAddress
;https://github.com/TehCheat/PoEHUD/tree/x64/src/Poe/Offsets.cs : Base = m.ReadInt(m.AddressOfProcess + array[0] + 0x1A) + array[0] + 0x1E;
baseMgrPtr:=poe.read(poe.BaseAddress+PatternIsAt+0x1A, "UInt")+PatternIsAt+0x1E
;https://github.com/TehCheat/PoEHUD/tree/x64/src/Poe/RemoteMemoryObjects/TheGame.cs : Address = m.ReadLong(Offsets.Base + m.AddressOfProcess, 0x8, 0xf8);
;https://github.com/TehCheat/PoEHUD/tree/x64/src/Poe/RemoteMemoryObjects/TheGame.cs : public IngameState IngameState => ReadObject<IngameState>(Address + 0x38);
;mBase+baseMgrPtr,4,0xFC,0x1c
global frameBase:=poe.read(poe.BaseAddress+baseMgrPtr, "Int64", 0x8, 0xf8, 0x38)
global IngameState:=frameBase
;=======================retrieve current data============================
readPlayerStats(byRef PlayerStats){
global Steambox
;https://github.com/TehCheat/PoEHUD/tree/x64/src/Poe/RemoteMemoryObjects/IngameState.cs : public IngameData Data => ReadObject<IngameData>(Address + 0x160 + Offsets.IgsOffset);
if(Steambox == 1){
InGameData:=poe.read(IngameState+0x160+0x28, "Int64")
}
if(Steambox == 0){
InGameData:=poe.read(IngameState+0x160, "Int64")
}
uiBase:=poe.read(IngameState+0x5C0+0x28, "Int64")
ServerData:=poe.read(IngameState, "Int64", 0x168+0x28)
FlaskInvBase:=poe.read(ServerData, "Int64", 0x240, 0x9c8, 0x948, 0xa00, 0x20)
;FlaskLocalstatsPtr:=GetMultilevelPointer(ph,[currFlaskPtr,4,0x18,0x14,0xC])
FlaskLocalstatsPtr:=poe.read(ServerData, "Int64", 4, 0x18, 0x1C, 0xC)
;MsgBox %ServerData%
PlayerStats.isInGame:=False
if(InGameData>0xffff){
PlayerStats.isInGame:=True
;https://github.com/TehCheat/PoEHUD/tree/x64/src/Poe/RemoteMemoryObjects/IngameData.cs : public Entity LocalPlayer => ReadObject<Entity>(Address + 0x180);
LocalPlayer:=poe.read(InGameData+0x180, "Int64")
;https://github.com/badplayerr/beta-autopot/blob/master/Autopot.ahk : PlayerMain:=ReadMemUInt(pH,PlayerBase+4) PlayerStatsOffset:=ReadMemUInt(pH,PlayerMain+0xC)
LPLifeComponent:=poe.read(LocalPlayer+0x8, "Int64", 0x18)
;https://github.com/TehCheat/PoEHUD/tree/x64/src/Poe/Components/Life.cs : public int CurHP => Address != 0 ? M.ReadInt(Address + 0x54) : 1; public int CurMana => Address != 0 ? M.ReadInt(Address + 0x84) : 1;
poe.readRaw(LPLifeComponent, LifeStructure, 0xB8)
curHP:=NumGet(LifeStructure, 0x54, "UInt")
resHP:=NumGet(LifeStructure, 0x60, "Uint")
maxHP:=NumGet(LifeStructure, 0x50, "UInt")
curMana:=NumGet(LifeStructure, 0x84, "UInt")
resMana:=NumGet(LifeStructure, 0x90, "Uint")
maxMana:=NumGet(LifeStructure, 0x80, "UInt")
if(maxHP>0 and curHP>0){
PlayerStats.hpres:=resHP*100/100
PlayerStats.hp:=(curHP*100)/100/maxHP*100-resHP
PlayerStats.mp:=(curMana*100)/100/maxMana*100-resMana
}else{
PlayerStats.hp:=0
PlayerStats.mp:=0
}
}
}
PlayerStats:=Object()
Loop
{
global HealthFlaskCount
Iniread, FlaskType%A_Index%, settings.ini, CheckBox, FlaskType%A_index%
valueFlaskType := FlaskType%A_Index%
if(valueFlaskType == "Normal"){
NormalFlaskCount++
}
if(valueFlaskType == "Health"){
HealthFlaskCount++
;MsgBox %HealthFlaskCount%
}
if(valueFlaskType == "Mana"){
ManaFlaskCount++
}
if(HealthFlaskCount >= 1){
Random R, 1, %HealthFlaskCount%
;MsgBox %R%
}
IfWinActive, Path of Exile ahk_class POEWindowClass
{
;MsgBox %FlaskType5%
readPlayerStats(PlayerStats)
PlayerHP:=PlayerStats.hp
PlayerMP:=PlayerStats.mp
PlayerTest:=PlayerStats.flatresHP
if(PlayerHP>0){
;MsgBox %PlayerHP%
Flask1Logic()
Flask2Logic()
Flask3Logic()
Flask4Logic()
Flask5Logic()
}
}
Sleep, 50
}
global PlayerHP
global PlayerMP
global HealthPct
global ManaPct
;#####################################################################################
Flask1Logic() ; Atziri 3500 Base + 60% (20% quality, 12% alchemist, 20% druidic rite, 8% pathfinder) = 5600 ms
{
;MsgBox %PlayerMP% Player!
;MsgBox %ManaPct% Setting!
global Flask1_timer
if (A_TickCount - Flask1_timer > flask1duration) and Flaskbox1 == 1 and FlaskType1 == "Health" and PlayerHP <= HealthPct{
Sendinput, {%flaskkeybind1% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind1% Up}
Flask1_timer := A_TickCount
}
if (A_TickCount - Flask1_timer > flask1duration) and Flaskbox1 == 1 and FlaskType1 == "Mana" and PlayerMP <= ManaPct{
Sendinput, {%flaskkeybind1% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind1% Up}
Flask1_timer := A_TickCount
}
if (A_TickCount - Flask1_timer > flask1duration) and Flaskbox1 == 1 and FlaskType1 == "Normal" and GetKeyState(flasktrigger1, "P"){
Sendinput, {%flaskkeybind1% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind1% Up}
Flask1_timer := A_TickCount
}
}
;#####################################################################################
Flask2Logic() ; Atziri 3500 Base + 60% (20% quality, 12% alchemist, 20% druidic rite, 8% pathfinder) = 5600 ms
{
global Flask2_timer
if (A_TickCount - Flask2_timer > flask2duration) and Flaskbox2 == 1 and FlaskType2 == "Health" and PlayerHP <= HealthPct{
Sendinput, {%flaskkeybind2% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind2% Up}
Flask2_timer := A_TickCount
}
if (A_TickCount - Flask2_timer > flask2duration) and Flaskbox2 == 1 and FlaskType2 == "Mana" and PlayerMP <= ManaPct{
Sendinput, {%flaskkeybind2% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind2% Up}
Flask2_timer := A_TickCount
}
if (A_TickCount - Flask2_timer > flask2duration) and Flaskbox2 == 1 and FlaskType2 == "Normal" and GetKeyState(flasktrigger2, "P"){
Sendinput, {%flaskkeybind2% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind2% Up}
Flask2_timer := A_TickCount
}
}
;#####################################################################################
Flask3Logic() ; Jade 4000 Base + 60% (20% quality, 12% alchemist, 20% druidic rite, 8% pathfinder) = 6400 ms
{
global Flask3_timer
if (A_TickCount - Flask3_timer > flask3duration) and Flaskbox3 == 1 and FlaskType3 == "Health" and PlayerHP <= HealthPct{
Sendinput, {%flaskkeybind3% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind3% Up}
Flask3_timer := A_TickCount
}
if (A_TickCount - Flask3_timer > flask3duration) and Flaskbox3 == 1 and FlaskType3 == "Mana" and PlayerMP <= ManaPct{
Sendinput, {%flaskkeybind3% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind3% Up}
Flask3_timer := A_TickCount
}
if (A_TickCount - Flask3_timer > flask3duration) and Flaskbox3 == 1 and FlaskType3 == "Normal" and GetKeyState(flasktrigger3, "P"){
Sendinput, {%flaskkeybind3% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind3% Up}
Flask3_timer := A_TickCount
}
}
;#####################################################################################
Flask4Logic() ; witchfire 5000 Base + 60% (20% quality, 12% alchemist, 20% druidic rite, 8% pathfinder) = 8000 ms
{
global Flask4_timer
if (A_TickCount - Flask4_timer > flask4duration) and Flaskbox4 == 1 and FlaskType4 == "Health" and PlayerHP <= HealthPct{
Sendinput, {%flaskkeybind4% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind4% Up}
Flask4_timer := A_TickCount
}
if (A_TickCount - Flask4_timer > flask4duration) and Flaskbox4 == 1 and FlaskType4 == "Mana" and PlayerMP <= ManaPct{
Sendinput, {%flaskkeybind4% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind4% Up}
Flask4_timer := A_TickCount
}
if (A_TickCount - Flask4_timer > flask4duration) and Flaskbox4 == 1 and FlaskType4 == "Normal" and GetKeyState(flasktrigger4, "P"){
Sendinput, {%flaskkeybind4% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind4% Up}
Flask4_timer := A_TickCount
}
}
;#####################################################################################
Flask5Logic() ; witchfire 5000 Base + 60% (20% quality, 12% alchemist, 20% druidic rite, 8% pathfinder) = 8000 ms
{
global Flask5_timer
if (A_TickCount - Flask5_timer > flask5duration) and Flaskbox5 == 1 and FlaskType5 == "Health" and PlayerHP <= HealthPct{
Sendinput, {%flaskkeybind5% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind5% Up}
Flask5_timer := A_TickCount
}
if (A_TickCount - Flask5_timer > flask5duration) and Flaskbox5 == 1 and FlaskType5 == "Mana" and PlayerMP <= ManaPct{
Sendinput, {%flaskkeybind5% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind5% Up}
Flask5_timer := A_TickCount
}
if (A_TickCount - Flask5_timer > flask5duration) and Flaskbox5 == 1 and FlaskType5 == "Normal" and GetKeyState(flasktrigger5, "P"){
Sendinput, {%flaskkeybind5% Down}
RandSleep(0,100)
Sendinput, {%flaskkeybind5% Up}
Flask5_timer := A_TickCount
}
}
;#####################################################################################
BladeFlurryReleaseAt6()
{
if (A_TickCount - BF_timer > 500) {
if (RET > 0) {
if GetKeyState("RButton", "P") {
Sendinput, {RButton Up}
Sendinput, {RButton Down}
} else {
Sendinput, {RButton Up}
}
BF_timer := A_TickCount
}
}
}
;#####################################################################################
;ManaLogic()
;{
; UseManaFlask4()
;}
;#####################################################################################
;UseHealFlask5()
;{
; global FlaskHP_timer
; if (A_TickCount - FlaskHP_timer > 2500) and IsSameColors(Scan, 514, 1054, Stride, 80, 19, 9) { ;divine 4 flask is ready
; Sendinput, {5 Down}
; Sendinput, {5 Up}
; FlaskHP_timer := A_TickCount
; return true
;}
;return false
;}
;#####################################################################################
;UseManaFlask4()
;{
;global FlaskMP_timer
;if (A_TickCount - FlaskMP_timer > 1500) and IsSameColors(Scan, 469, 1059, Stride, 10, 33, 63) { ;divine 4 flask is ready
; Sendinput, {4 Down}
; Sendinput, {4 Up}
; FlaskMP_timer := A_TickCount
; return true
; }
; return false
;}
;#####################################################################################
RandSleep(x,y) {
Random, rand, %x%, %y%
Sleep %rand%
}
;#####################################################################################
~Enter:: ;Chat detection
Enter_key_timer := A_TickCount
return
;#####################################################################################
~Q:: ;Movement skill (WB)
if (A_TickCount - Enter_key_timer > 15000) {
IfWinActive, Path of Exile ahk_class POEWindowClass
{
}
}
return
;#####################################################################################
readFromFile(){
global
Hotkey,F10, optionsCommand, Off
;variables
IniRead, Flask1dur, settings.ini, variables, Flask1dur %A_Space%
IniRead, Flask2dur, settings.ini, variables, Flask2dur %A_Space%
IniRead, Flask3dur, settings.ini, variables, Flask3dur %A_Space%
IniRead, Flask4dur, settings.ini, variables, Flask4dur %A_Space%
IniRead, Flask5dur, settings.ini, variables, Flask5dur %A_Space%
IniRead, HealthPct, settings.ini, variables, HealthPct %A_Space%
IniRead, ManaPct, settings.ini, variables, ManaPct %A_Space%
;Monitor
IniRead, Monitor1number, settings.ini, variables, MonitorNumber %A_Space%
;debugstuff variables
IniRead, DebugX, settings.ini, variables, DebugX %A_Space%
IniRead, DebugY, settings.ini, variables, DebugY %A_Space%
IniRead, XPos, settings.ini, variables, xPos %A_Space%
IniRead, YPos, settings.ini, variables, yPos %A_Space%
;Hotkeys
IniRead, Flask1key, settings.ini, hotkeys, Flask1key %A_SPACE%
IniRead, Flask1triggerkey, settings.ini, hotkeys, Flask1triggerkey %A_Space%
IniRead, Flask2key, settings.ini, hotkeys, Flask2key %A_SPACE%
IniRead, Flask2triggerkey, settings.ini, hotkeys, Flask2triggerkey %A_Space%
IniRead, Flask3key, settings.ini, hotkeys, Flask3key %A_SPACE%
IniRead, Flask3triggerkey, settings.ini, hotkeys, Flask3triggerkey %A_Space%
IniRead, Flask4key, settings.ini, hotkeys, Flask4key %A_SPACE%
IniRead, Flask4triggerkey, settings.ini, hotkeys, Flask4triggerkey %A_Space%
IniRead, Flask5key, settings.ini, hotkeys, Flask5key %A_SPACE%
IniRead, Flask5triggerkey, settings.ini, hotkeys, Flask5triggerkey %A_Space%
Hotkey,F10, optionsCommand, On
Return
}
submit(){
updateEverything:
global
Gui, Submit
;Variables for Flasks and stuff
IniWrite, %Flask1dur%, Settings.ini, variables, Flask1dur %A_Space%
IniWrite, %Flask2dur%, Settings.ini, variables, Flask2dur %A_Space%
IniWrite, %Flask3dur%, Settings.ini, variables, Flask3dur %A_Space%
IniWrite, %Flask4dur%, Settings.ini, variables, Flask4dur %A_Space%
IniWrite, %Flask5dur%, Settings.ini, variables, Flask5dur %A_Space%
IniWrite, %HealthPct%, Settings.ini, variables, HealthPct %A_Space%
IniWrite, %ManaPct%, Settings.ini, variables, ManaPct %A_Space%
;Hotkeys and stuff
IniWrite, %Flask1key%, Settings.ini, hotkeys, Flask1key %A_Space%
IniWrite, %Flask1triggerkey%, Settings.ini, hotkeys, Flask1triggerkey %A_Space%
IniWrite, %Flaskbox1%, settings.ini, Checkbox, Flaskbox1 %A_Space%
IniWrite, %Flaskbox2%, settings.ini, Checkbox, Flaskbox2 %A_Space%
IniWrite, %Flaskbox3%, settings.ini, Checkbox, Flaskbox3 %A_Space%
IniWrite, %Flaskbox4%, settings.ini, Checkbox, Flaskbox4 %A_Space%
IniWrite, %Flaskbox5%, settings.ini, Checkbox, Flaskbox5 %A_Space%
IniWrite, %FlaskType1%, settings.ini, Checkbox, FlaskType1 %A_Space%
IniWrite, %FlaskType2%, settings.ini, Checkbox, FlaskType2 %A_Space%
IniWrite, %FlaskType3%, settings.ini, Checkbox, FlaskType3 %A_Space%
IniWrite, %FlaskType4%, settings.ini, Checkbox, FlaskType4 %A_Space%
IniWrite, %FlaskType5%, settings.ini, Checkbox, FlaskType5 %A_Space%
IniWrite, %Steambox%, settings.ini, Checkbox, Steambox %A_Space%
IniWrite, %Flask2key%, Settings.ini, hotkeys, Flask2key %A_Space%
IniWrite, %Flask2triggerkey%, Settings.ini, hotkeys, Flask2triggerkey %A_Space%
IniWrite, %Flask3key%, Settings.ini, hotkeys, Flask3key %A_Space%
IniWrite, %Flask3triggerkey%, Settings.ini, hotkeys, Flask3triggerkey %A_Space%
IniWrite, %Flask4key%, Settings.ini, hotkeys, Flask4key %A_Space%
IniWrite, %Flask4triggerkey%, Settings.ini, hotkeys, Flask4triggerkey %A_Space%
IniWrite, %Flask5key%, Settings.ini, hotkeys, Flask5key %A_Space%
IniWrite, %Flask5triggerkey%, Settings.ini, hotkeys, Flask5triggerkey %A_Space%
readFromFile()
return
}
hotkeys(){
optionsCommand:
global
Gui, Show,, Flask Manager GUI
processWarningFound := 0
Gui, 6:Hide
return
}