-
Notifications
You must be signed in to change notification settings - Fork 14
/
louhelper.ahk
2619 lines (2375 loc) · 82.5 KB
/
louhelper.ahk
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
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; Gui Tooltips class
#Include Class_GuiControlTips.ahk
; Basic recommended AHK settings
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, Mouse, Window
; This is used because alt modifier would send the ctrl modifier as well. Check AHK docs.
#MenuMaskKey vk07
IsProcessElevated(ProcessID)
{
if !(hProcess := DllCall("OpenProcess", "uint", 0x1000, "int", 0, "uint", ProcessID, "ptr"))
throw Exception("OpenProcess failed", -1)
if !(DllCall("advapi32\OpenProcessToken", "ptr", hProcess, "uint", 0x0008, "ptr*", hToken))
throw Exception("OpenProcessToken failed", -1), DllCall("CloseHandle", "ptr", hProcess)
if !(DllCall("advapi32\GetTokenInformation", "ptr", hToken, "int", 20, "uint*", IsElevated, "uint", 4, "uint*", size))
throw Exception("GetTokenInformation failed", -1), DllCall("CloseHandle", "ptr", hToken) && DllCall("CloseHandle", "ptr", hProcess)
return IsElevated, DllCall("CloseHandle", "ptr", hToken) && DllCall("CloseHandle", "ptr", hProcess)
}
isAdmin := IsProcessElevated(DllCall("GetCurrentProcessId"))
if (!isAdmin)
{
MsgBox, Please run as admin, or most functionality will fail.
}
FileInstall, back.bmp, back.bmp
FileInstall, character.bmp, character.bmp
FileInstall, charplay.bmp, charplay.bmp
FileInstall, community.bmp, community.bmp
FileInstall, enter.bmp, enter.bmp
FileInstall, failed.bmp, failed.bmp
FileInstall, ingame.bmp, ingame.bmp
FileInstall, loultima.bmp, loultima.bmp
FileInstall, okerror.bmp, okerror.bmp
FileInstall, open.bmp, open.bmp
FileInstall, config.ini, config.ini
FileInstall, default.ini, default.ini
FileInstall, helper.ico, helper.ico
;Set our icon.
Menu, Tray, Icon, Helper.ico
;Basic Globals
Seperator := Chr(1)
;Get last loaded config
IniRead, UserConfig, config.ini, ConfigSetting, UserConfig
;Get the configs list
gosub, GetConfigs
TempConfig := Configs%UserConfig%
IniRead, MaxSpots, %TempConfig%, GuiSettings, MaxSpots
IniRead, MaxCustom, %TempConfig%, GuiSettings, MaxCustom
IniRead, MaxCustomKeys, %TempConfig%, GuiSettings, MaxCustomKeys
StringTrimRight, TempConfig, TempConfig, 4
guiname := "LoU Helper v1.95 - " . TempConfig
;Get Routine Messages
IniRead, RoutineMessages, config.ini, ConfigRoutineMessages
Loop Parse, RoutineMessages, `n
{
MessageArray := StrSplit(A_LoopField, "=")
RoutineMessage%A_Index% := MessageArray[2]
}
;Lists of settings to iterate
Tabs = General|GeneralKeys|Taming|Music|Healing|Hiding|Fishing|Offensive|Lockpicking|Custom|Harvesting|ItemID|ItemTransfer|CustomKeys
GuiSettingsList = MoveCycleCount,MoveToX,MoveToY,MoveFromX,MoveFromY,ItemTransfer,ItemTransferBreak,Survey,OnTop,FromName,WinName,AutoRelog,CharNumber,Sens,LagDelay,KeyDelay,Taming,TamingDelay,Release,ReleaseDelay,ReleaseSens,Lore,LoreDelay,Vet,VetDelay,Music,MusicDelay,Peace,PeaceDelay,Provo,ProvoDelay,Discord,DiscordDelay,Bandages,MagicHeal,CurePot,CureSpell,HealingDelay,Hiding,Stealth,Steps,HidingDelay,Fishing,FishingDelay,FishingX1,FishingY1,Fishing2,FishingX2,FishingY2,FishingTotal,Physical,PhysicalDuration,MagicAtk,DoubleTarget,OffensiveDelay,Lockpicking,LockpickDelay,Box1X,Box1Y,Lockpicking2,Box2X,Box2Y,LockpickingSens,ItemID,ItemIDSourceTLX,ItemIDSourceTLY,ItemIDSourceBRX,ItemIDSourceBRY,ItemIDContainerX,ItemIDContainerY,ItemIDSens,ItemIDDelay,CustomRoutineDelay,HarvestingRoutineDelay,HarvestSens
GuiDPSettingsList = BandagesTarget,MagicHealTarget,CurePotTarget,CureSpellTarget,MagicAtkTarget
GuiHotkeysList = SurveyKey,SelfKey,TargetKey,LastKey,SkillKey,SecondKey,NextTargetKey,LastObjectKey,CenterCamKey,BackpackKey,StopKey,StartKey,LeftKey,RightKey,UpKey,DownKey,TamingKey,ReleaseKey,LoreKey,AllKillKey,AllStopKey,MusicKey,PeaceKey,ProvoKey,DiscordKey,BandagesKey,MagicHealKey,CurePotKey,CureSpellKey,HidingKey,FishingKey1,FishingKey2,FishingKey3,FishingKey4,FishingKey5,FishingKey6,FishingKey7,FishingKey8,FishingKey9,PhysicalKey,MagicAtkKey,Box1Key,Box2Key,GlassKey,LockpickKey
GuiLabelsList = MoveCycleCountLabel,MoveToXLabel,MoveToYLabel,MoveFromXLabel,MoveFromYLabel,SurveyLabel,OptionTitle,TabsList,ConfigLabel,ClientNameLabel,FromNameLabel,ToNameLabel,CharNumberLabel,SensLabel,SelfKeyLabel,TargetKeyLabel,LastKeyLabel,LastObjectLabel,SkillKeyLabel,SecondKeyLabel,NextTargetKeyLabel,CenterCamKeyLabel,BackpackKeyLabel,KeyDelayLabel,LagDelayLabel,StopKeyLabel,StartKeyLabel,UpKeyLabel,LeftKeyLabel,DownKeyLabel,RightKeyLabel,TamingKeyLabel,TamingDelayLabel,ReleaseKeyLabel,ReleaseDelayLabel,ReleaseSensLabel,LoreKeyLabel,LoreDelayLabel,AllKillKeyLabel,AllStopKeyLabel,VetDelayLabel,MusicKeyLabel,MusicDelayLabel,PeaceKeyLabel,PeaceDelayLabel,ProvoKeyLabel,ProvoDelayLabel,DiscordKeyLabel,DiscordDelayLabel,BandagesKeyLabel,MagicHealKeyLabel,CurePotLabel,CureSpellLabel,HealingDelayLabel,HidingKeyLabel,HidingDelayLabel,StepsLabel,FishingTotalLabel,FishingDelayLabel,FishingX1Label,FishingY1Label,FishingX2Label,FishingY2Label,FishingKey1Label,FishingKey2Label,FishingKey3Label,FishingKey4Label,FishingKey5Label,FishingKey6Label,FishingKey7Label,FishingKey8Label,FishingKey9Label,PhysicalKeyLabel,PhysicalDurationLabel,MagicAtkKeyLabel,OffensiveDelayLabel,LockpickKeyLabel,LockpickDelayLabel,Box1XLabel,Box1YLabel,Box1KeyLabel,Box2XLabel,Box2YLabel,Box2KeyLabel,LockpickingSensLabel,ItemIDSourceTLXLabel,ItemIDSourceTLYLabel,ItemIDSourceBRXLabel,ItemIDSourceBRYLabel,ItemIDContainerXLabel,ItemIDContainerYLabel,GlassKeyLabel,ItemIDSensLabel,ItemIDDelayLabel,CustomRoutineDelayLabel,HarvestingRoutineDelayLabel,HarvestSensLabel
GuiSetButtonsList = LoadedConfig,SetName,SetFishing,SetBox,SetSpotTarget,SetCustomCoordsItem,SetCustomCoordsTarget
FishingOptionsList = Fishing2,FishingX2Label,FishingX2,FishingY2Label,FishingY2,SetFishing2
LockpickingOptionsList = Lockpicking2,Box2XLabel,Box2X,Box2YLabel,Box2Y,SetBox2
Loop, %MaxSpots%
{
GuiSettingsList = %GuiSettingsList%,Spot%A_Index%Active,Spot%A_Index%Scroll,Spot%A_Index%X1,Spot%A_Index%Y1,Spot%A_Index%X2,Spot%A_Index%Y2,Spot%A_Index%X3,Spot%A_Index%Y3,Spot%A_Index%X4,Spot%A_Index%Y4,Spot%A_Index%X5,Spot%A_Index%Y5,Spot%A_Index%X6,Spot%A_Index%Y6
GuiHotkeysList = %GuiHotkeysList%,Spot%A_Index%ToolKey,Spot%A_Index%RuneKey,Spot%A_Index%ScrollKey
GuiLabelsList = %GuiLabelsList%,Spot%A_Index%ToolLabel,Spot%A_Index%RuneKeyLabel,Spot%A_Index%ScrollLabel,Spot%A_Index%X1Label,Spot%A_Index%Y1Label,Spot%A_Index%X2Label,Spot%A_Index%Y2Label,Spot%A_Index%X3Label,Spot%A_Index%Y3Label,Spot%A_Index%X4Label,Spot%A_Index%Y4Label,Spot%A_Index%X5Label,Spot%A_Index%Y5Label,Spot%A_Index%X6Label,Spot%A_Index%Y6Label
Tabs = %Tabs%|Spot%A_Index%
}
Loop, %MaxCustom%
{
GuiSettingsList = %GuiSettingsList%,Custom%A_Index%Active,Custom%A_Index%CoordsItem,Custom%A_Index%CoordsTarget,Custom%A_Index%CoordsRight,Custom%A_Index%CoordsItemX,Custom%A_Index%CoordsItemY,Custom%A_Index%CoordsTargetX,Custom%A_Index%CoordsTargetY,Custom%A_Index%CoordsRightX,Custom%A_Index%CoordsRightY,Custom%A_Index%PreDelay,Custom%A_Index%PostDelay
GuiDPSettingsList = %GuiDPSettingsList%,Custom%A_Index%Target
GuiHotkeysList = %GuiHotkeysList%,Custom%A_Index%Key
GuiLabelsList = %GuiLabelsList%,Custom%A_Index%KeyLabel,Custom%A_Index%CoordsItemXLabel,Custom%A_Index%CoordsItemYLabel,Custom%A_Index%CoordsTargetXLabel,Custom%A_Index%CoordsTargetYLabel,Custom%A_Index%CoordsRightXLabel,Custom%A_Index%CoordsRightYLabel,Custom%A_Index%PreDelayLabel,Custom%A_Index%PostDelayLabel
Tabs = %Tabs%|Custom%A_Index%
}
Loop, %MaxCustomKeys%
{
GuiDPSettingsList = %GuiDPSettingsList%,CustomKeys%A_Index%Key1Mod,CustomKeys%A_Index%Key2Mod,CustomKeys%A_Index%Key3Mod,CustomKeys%A_Index%Key4Mod,CustomKeys%A_Index%Key5Mod
GuiHotkeysList = %GuiHotkeysList%,CustomKeys%A_Index%Key1InGame,CustomKeys%A_Index%Key2InGame,CustomKeys%A_Index%Key3InGame,CustomKeys%A_Index%Key4InGame,CustomKeys%A_Index%Key5InGame,CustomKeys%A_Index%Key1,CustomKeys%A_Index%Key2,CustomKeys%A_Index%Key3,CustomKeys%A_Index%Key4,CustomKeys%A_Index%Key5
GuiLabelsList = %GuiLabelsList%,CustomKeys%A_Index%Key1IngameLabel,CustomKeys%A_Index%Key2IngameLabel,CustomKeys%A_Index%Key3IngameLabel,CustomKeys%A_Index%Key4IngameLabel,CustomKeys%A_Index%Key5IngameLabel,CustomKeys%A_Index%Key1Label,CustomKeys%A_Index%Key2Label,CustomKeys%A_Index%Key3Label,CustomKeys%A_Index%Key4Label,CustomKeys%A_Index%Key5Label
Tabs = %Tabs%|CustomKeys%A_Index%
}
;Global GUI settings
Gui, New, hwndHGUI
Gui, -MinimizeBox
;;GUI elements fixed sizes
SelectionHeight := 197
LeftColumnWidth := 100
SettingsWidth := 340
Line1 := 45
LineHeight := 30
TextOffset := 3
SetOffset := 4
HotkeyWidth := 21
StdLabelWidth := 74
DelayLabelWidth := 61
DelayWidth := 34
CoordLabelWidth := 15
CoordWidth := 30
CheckBoxWidth := 100
SetButtonWidth := 28
ClientNameWidth := 110
;Calculated Sizes
SettingsWidthInside := SettingsWidth - 11
TabHeight := SelectionHeight - 33
TitleX := LeftColumnWidth + 20
Left := LeftColumnWidth + LineHeight
Line1Text := Line1 - TextOffset
Line1Set := Line1 - SetOffset
Line2 := Line1 + LineHeight
Line2Text := Line1Text + LineHeight
Line2Set := Line2 - SetOffset
Line3 := Line2 + LineHeight
Line3Text := Line2Text + LineHeight
Line3Set := Line3 - SetOffset
Line4 := Line3 + LineHeight
Line4Text := Line3Text + LineHeight
Line4Set := Line4 - SetOffset
Line5 := Line4 + LineHeight
Line5Text := Line4Text + LineHeight
Line5Set := Line5 - SetOffset
TT := New GuiControlTips(HGUI)
TT.SetDelayTimes(200, 3000, -1)
Gui, Add, DropDownList, w%LeftColumnWidth% AltSubmit hwndHLoadedConfig vLoadedConfig gLoadConfigReload
TT.Attach(HLoadedConfig, "Choose a custom profile")
Gui, Add, TreeView, R1 h%SelectionHeight% w%LeftColumnWidth% -0x4 AltSubmit -Buttons gTVLabel
P1 := TV_Add("General",,"Expand")
P2 := TV_Add("Hotkeys")
P3 := TV_Add("Taming")
P4 := TV_Add("Music")
P5 := TV_Add("Healing")
P6 := TV_Add("Hiding")
P7 := TV_Add("Fishing")
P8 := TV_Add("Offensive")
P9 := TV_Add("Lockpicking")
P10 := TV_Add("Item ID")
P11 := TV_Add("Harvesting",,"Expand")
Loop, %MaxSpots%
{
SpotTab = Spot %A_Index%
P11C%A_Index% := TV_Add(SpotTab,P11)
}
P12 := TV_Add("Custom",,"Expand")
Loop, %MaxCustom%
{
CustomTab = Custom %A_Index%
P12C%A_Index% := TV_Add(CustomTab,P12)
}
P13 := TV_Add("Custom Keys",,"Expand")
Loop, %MaxCustomKeys%
{
CustomKeysTab = Page %A_Index%
P13C%A_Index% := TV_Add(CustomKeysTab,P13)
}
P14 := TV_Add("Item Transfer")
;Here GUI coords offsets are still hard coded, havent figured a clean way to do it yet.
;;Tab Header
Gui, Font, s10 Bold
Gui, Add, Text, x%TitleX% y9 w%SettingsWidth% h20 Center vOptionTitle, General Settings
Gui, Font, s8 Norm
Gui, Add, GroupBox, xp yp+18 w%SettingsWidth% h%TabHeight%
Gui, Add, Tab2, xp yp w0 h0 -Wrap vTabsList, %Tabs%
;;General Settings
Gui, Tab, General
Gui, Add, Checkbox, x%Left% y%Line1% hwndHOnTop vOnTop gOnTop, Window always on top
TT.Attach(HOnTop, "Keep LoU Helper window always on top")
;Change Window name
Gui, Add, Text, x%Left% y%Line2% w%SettingsWidthInside% Center hwndHClientNameLabel vClientNameLabel, Change the client window name:
Gui, Add, Text, x%Left% y%Line3% w%HotkeyWidth% Right vFromNameLabel, Old
Gui, Add, Edit, xp+26 y%Line3Text% w%ClientNameWidth% hwndHFromName vFromName, Legends of Aria
TT.Attach(HFromName, "Initial name of the LoA client")
Gui, Add, Text, xp+125 y%Line3% w%HotkeyWidth% Right vToNameLabel, New
Gui, Add, Edit, xp+26 y%Line3Text% w%ClientNameWidth% hwndHWinName vWinName, Legends of Aria
TT.Attach(HWinName, "New name, this is the name that will be used by LoU Helper")
Gui, Add, Button, xp+115 y%Line3Set% w%SetButtonWidth% hwndHSetName vSetName gSetName, Set
TT.Attach(HSetName, "Set your LoA Client window to the new name")
;Auto-Relog
Gui, Add, Checkbox, x%Left% y%Line4% w%CheckBoxWidth% hwndHAutoRelog vAutoRelog, Auto-Relog (warning)
TT.Attach(HAutoRelog, "Activate the autorelog feature. Will make window active and block input each loop.")
Gui, Add, Text, xp+110 y%Line4% w81 Right vCharNumberLabel, Character #
Gui, Add, Edit, xp+86 y%Line4Text% w14 hwndHCharNumber vCharNumber, 1
TT.Attach(HCharNumber, "Character number, 1 to 4, top to bottom")
Gui, Add, Text, xp+24 y%Line4% w%StdLabelWidth% Right vSensLabel, Tolerance
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% hwndHSens vSens, 60
TT.Attach(HSens, "Tolerance for Image Search. Raise if it never matches")
;Misc
Gui, Add, Text, x%Left% y%Line5% w%DelayLabelWidth% Right vLagDelayLabel, Lag Delay
Gui, Add, Edit, xp+65 y%Line5Text% w%DelayWidth% vLagDelay
;;General Hotkey Settings
Gui, Tab, GeneralKeys
;Stop Keys
Gui, Add, Text, x%Left% y%Line1% w%StdLabelWidth% Right vStopKeyLabel, Stop Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vStopKey, F4
Gui, Add, Text, xp+31 y%Line1% w%StdLabelWidth% Right vStartKeyLabel, Start
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vStartKey, F5
Gui, Add, Text, xp+31 y%Line1% w%StdLabelWidth% Right vLastObjectLabel, Last Object
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vLastObjectKey,
;Targeting keys
Gui, Add, Text, x%Left% y%Line2% w%StdLabelWidth% Right vSelfKeyLabel, Target Self
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vSelfKey, g
Gui, Add, Text, xp+31 y%Line2% w%StdLabelWidth% Right vTargetKeyLabel, Current Target
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vTargetKey, y
Gui, Add, Text, xp+31 y%Line2% w%StdLabelWidth% Right vLastKeyLabel, Last Target
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vLastKey, t
;Skills
Gui, Add, Text, x%Left% y%Line3% w%StdLabelWidth% Right vSkillKeyLabel, Main Skill
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vSkillKey, q
Gui, Add, Text, xp+31 y%Line3% w%StdLabelWidth% Right vSecondKeyLabel, Second Skill
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vSecondKey, e
Gui, Add, Text, xp+31 y%Line3% w%StdLabelWidth% Right vNextTargetKeyLabel, Next Target
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vNextTargetKey
;Misc1
Gui, Add, Text, x%Left% y%Line4% w%StdLabelWidth% Right vCenterCamKeyLabel, Center Cam
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vCenterCamKey, z
Gui, Add, Text, xp+31 y%Line4% w%StdLabelWidth% Right vBackpackKeyLabel, Open Bag
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vBackpackKey, b
Gui, Add, Text, xp+31 y%Line4% w%StdLabelWidth% Right vKeyDelayLabel, Key Delay
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vKeyDelay, 60
;Movement
Gui, Add, Text, x%Left% y%Line5% w36 Right vUpKeyLabel, Up
Gui, Add, Edit, xp+41 y%Line5Text% w%DelayWidth% vUpKey, w
Gui, Add, Text, xp+40 y%Line5% w36 Right vLeftKeyLabel, Left
Gui, Add, Edit, xp+41 y%Line5Text% w%DelayWidth% vLeftKey, a
Gui, Add, Text, xp+41 y%Line5% w36 Right vDownKeyLabel, Down
Gui, Add, Edit, xp+41 y%Line5Text% w%DelayWidth% vDownKey, s
Gui, Add, Text, xp+41 y%Line5% w36 Right vRightKeyLabel, Right
Gui, Add, Edit, xp+41 y%Line5Text% w%DelayWidth% vRightKey, d
;;Taming Settings
Gui, Tab, Taming
;Taming
Gui, Add, Checkbox, x%Left% y%Line1% w%CheckBoxWidth% vTaming gTamingOptions, Taming
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vTamingKeyLabel, Taming Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vTamingKey
Gui, Add, Text, xp+31 y%Line1% w%DelayLabelWidth% Right vTamingDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line1Text% w%DelayWidth% vTamingDelay, 0
;Release
Gui, Add, Checkbox, x%Left% y%Line2% w%CheckBoxWidth% Disabled vRelease gReleaseOptions, Release
Gui, Add, Text, xp+110 y%Line2% w%StdLabelWidth% Right vReleaseKeyLabel, Release Key
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vReleaseKey
Gui, Add, Text, xp+31 y%Line2% w%DelayLabelWidth% Right vReleaseDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line2Text% w%DelayWidth% vReleaseDelay, 0
;Lore
Gui, Add, Checkbox, x%Left% y%Line3% w%CheckBoxWidth% vLore, Lore
Gui, Add, Text, xp+110 y%Line3% w%StdLabelWidth% Right vLoreKeyLabel, Lore Key
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vLoreKey
Gui, Add, Text, xp+31 y%Line3% w%DelayLabelWidth% Right vLoreDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line3Text% w%DelayWidth% vLoreDelay, 0
;Veterinary
Gui, Add, Checkbox, x%Left% y%Line4% w40 vVet, Vet
Gui, Add, Text, xp+58 y%Line4% w40 Right vAllKillKeyLabel, All Kill
Gui, Add, Edit, xp+45 y%Line4Text% w%HotkeyWidth% vAllKillKey
Gui, Add, Text, xp+41 y%Line4% w40 Right vAllStopKeyLabel, All Stop
Gui, Add, Edit, xp+45 y%Line4Text% w%HotkeyWidth% vAllStopKey
Gui, Add, Text, xp+31 y%Line4% w%DelayLabelWidth% Right vVetDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line4Text% w%DelayWidth% vVetDelay, 0
Gui, Add, Text, xp-151 y%Line5% w150 Right vReleaseSensLabel, Tolerance for image searching
Gui, Add, Edit, xp+155 y%Line5Text% w%CoordWidth% HwndHReleaseSens vReleaseSens, 100
TT.Attach(HReleaseSens, "Tolerance for Image Search. Raise if it never matches with the correct release.bmp. Over 100 is too much")
;;Music Settings
Gui, Tab, Music
;Music
Gui, Add, Checkbox, x%Left% y%Line1% w%CheckBoxWidth% vMusic gMusicOptions, Music
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vMusicKeyLabel, Music Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vMusicKey
Gui, Add, Text, xp+31 y%Line1% w%DelayLabelWidth% Right vMusicDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line1Text% w%DelayWidth% vMusicDelay, 0
;Peace
Gui, Add, Checkbox, x%Left% y%Line2% w%CheckBoxWidth% vPeace gMusicOptions, Peace
Gui, Add, Text, xp+110 y%Line2% w%StdLabelWidth% Right vPeaceKeyLabel, Peace Key
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vPeaceKey
Gui, Add, Text, xp+31 y%Line2% w%DelayLabelWidth% Right vPeaceDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line2Text% w%DelayWidth% vPeaceDelay, 0
;Provoke
Gui, Add, Checkbox, x%Left% y%Line3% w%CheckBoxWidth% vProvo gMusicOptions, Provoke
Gui, Add, Text, xp+110 y%Line3% w%StdLabelWidth% Right vProvoKeyLabel, Provoke Key
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vProvoKey
Gui, Add, Text, xp+31 y%Line3% w%DelayLabelWidth% Right vProvoDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line3Text% w%DelayWidth% vProvoDelay, 0
;Discord
Gui, Add, Checkbox, x%Left% y%Line4% w%CheckBoxWidth% vDiscord gMusicOptions, Discord
Gui, Add, Text, xp+110 y%Line4% w%StdLabelWidth% Right vDiscordKeyLabel, Discord Key
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vDiscordKey
Gui, Add, Text, xp+31 y%Line4% w%DelayLabelWidth% Right vDiscordDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line4Text% w%DelayWidth% vDiscordDelay, 0
;;Healing Settings
Gui, Tab, Healing
;Bandages
Gui, Add, Checkbox, x%Left% y%Line1% w%CheckBoxWidth% vBandages, Bandages
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vBandagesKeyLabel, Bandages Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vBandagesKey
Gui, Add, Dropdownlist, xp+31 y%Line1Text% w%CheckBoxWidth% AltSubmit vBandagesTarget, |Self|Current|Last
;Magic Heal
Gui, Add, Checkbox, x%Left% y%Line2% w%CheckBoxWidth% vMagicHeal, Magic
Gui, Add, Text, xp+110 y%Line2% w%StdLabelWidth% Right vMagicHealKeyLabel, Spell Key
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vMagicHealKey
Gui, Add, Dropdownlist, xp+31 y%Line2Text% w%CheckBoxWidth% AltSubmit vMagicHealTarget, |Self|Current|Last
;Cure Potion
Gui, Add, Checkbox, x%Left% y%Line3% w%CheckBoxWidth% vCurePot, Cure Potion
Gui, Add, Text, xp+110 y%Line3% w%StdLabelWidth% Right vCurePotLabel, Cure Potion Key
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vCurePotKey
Gui, Add, Dropdownlist, xp+31 y%Line3Text% w%CheckBoxWidth% AltSubmit vCurePotTarget, |Self|Current|Last
;Cure Spell
Gui, Add, Checkbox, x%Left% y%Line4% w%CheckBoxWidth% vCureSpell, Cure Spell
Gui, Add, Text, xp+110 y%Line4% w%StdLabelWidth% Right vCureSpellLabel, Cure Spell Key
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vCureSpellKey
Gui, Add, Dropdownlist, xp+31 y%Line4Text% w%CheckBoxWidth% AltSubmit vCureSpellTarget, |Self|Current|Last
;Healing Delay
Gui, Add, Text, x%Left% y%Line5% w%DelayLabelWidth% Right vHealingDelayLabel, Delay
Gui, Add, Edit, xp+72 y%Line5Text% w%DelayWidth% vHealingDelay
;;Hiding Settings
Gui, Tab, Hiding
;Hiding
Gui, Add, Checkbox, x%Left% y%Line1% w%CheckBoxWidth% vHiding gHidingOptions, Hiding
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vHidingKeyLabel, Hiding Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vHidingKey
Gui, Add, Text, xp+31 y%Line1% w%DelayLabelWidth% Right vHidingDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line1Text% w%DelayWidth% vHidingDelay, 0
;Stealth
Gui, Add, Checkbox, x%Left% y%Line2% w%CheckBoxWidth% vStealth Disabled, Stealth
Gui, Add, Text, xp+110 y%Line2% w%StdLabelWidth% Right vStepsLabel, Steps
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vSteps, 3
;;Fishing Settings
Gui, Tab, Fishing
;Fishing
Gui, Add, Checkbox, x%Left% y%Line1% vFishing gFishingOptions, Fishing
;Fishing Spot 1
Gui, Add, Text, xp+63 y%Line1% w%CoordLabelWidth% vFishingX1Label, X1
Gui, Add, Edit, xp+20 y%Line1Text% w%CoordWidth% vFishingX1
Gui, Add, Text, xp+40 y%Line1% w%CoordLabelWidth% vFishingY1Label, Y1
Gui, Add, Edit, xp+20 y%Line1Text% w%CoordWidth% vFishingY1
Gui, Add, Button, xp+40 y%Line1Set% w%SetButtonWidth% vSetFishing1 gSetFishing, Set
Gui, Add, Text, xp+37 y%Line1% w%DelayLabelWidth% Right vFishingDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line1Text% w%DelayWidth% vFishingDelay, 0
;Fishing Spot 2
Gui, Add, Checkbox, x%Left% y%Line2% vFishing2 Disabled, Fishing2
Gui, Add, Text, xp+63 y%Line2% w%CoordLabelWidth% vFishingX2Label Disabled, X2
Gui, Add, Edit, xp+20 y%Line2Text% w%CoordWidth% vFishingX2 Disabled
Gui, Add, Text, xp+40 y%Line2% w%CoordLabelWidth% vFishingY2Label Disabled, Y2
Gui, Add, Edit, xp+20 y%Line2Text% w%CoordWidth% vFishingY2 Disabled
Gui, Add, Button, xp+40 y%Line2Set% w%SetButtonWidth% vSetFishing2 gSetFishing Disabled, Set
Gui, Add, Text, xp+37 y%Line2% w%StdLabelWidth% Right vFishingTotalLabel, Total Rods
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vFishingTotal
;Fishing Rods
Gui, Add, Text, x%Left% y%Line3% w%StdLabelWidth% Right vFishingKey1Label, Fishing Rod 1
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vFishingKey1
Gui, Add, Text, xp+31 y%Line3% w%StdLabelWidth% Right vFishingKey2Label, Fishing Rod 2
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vFishingKey2
Gui, Add, Text, xp+31 y%Line3% w%StdLabelWidth% Right vFishingKey3Label, Fishing Rod 3
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vFishingKey3
Gui, Add, Text, x%Left% y%Line4% w%StdLabelWidth% Right vFishingKey4Label, Fishing Rod 4
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vFishingKey4
Gui, Add, Text, xp+31 y%Line4% w%StdLabelWidth% Right vFishingKey5Label, Fishing Rod 5
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vFishingKey5
Gui, Add, Text, xp+31 y%Line4% w%StdLabelWidth% Right vFishingKey6Label, Fishing Rod 6
Gui, Add, Edit, xp+79 y%Line4Text% w%HotkeyWidth% vFishingKey6
Gui, Add, Text, x%Left% y%Line5% w%StdLabelWidth% Right vFishingKey7Label, Fishing Rod 7
Gui, Add, Edit, xp+79 y%Line5Text% w%HotkeyWidth% vFishingKey7
Gui, Add, Text, xp+31 y%Line5% w%StdLabelWidth% Right vFishingKey8Label, Fishing Rod 8
Gui, Add, Edit, xp+79 y%Line5Text% w%HotkeyWidth% vFishingKey8
Gui, Add, Text, xp+31 y%Line5% w%StdLabelWidth% Right vFishingKey9Label, Fishing Rod 9
Gui, Add, Edit, xp+79 y%Line5Text% w%HotkeyWidth% vFishingKey9
;;Offensive Settings
Gui, Tab, Offensive
;Physical
Gui, Add, Checkbox, x%Left% y%Line1% w%CheckBoxWidth% vPhysical, Physical
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vPhysicalKeyLabel, Attack Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vPhysicalKey
Gui, Add, Text, xp+31 y%Line1% w%DelayLabelWidth% Right vPhysicalDurationLabel, Duration
Gui, Add, Edit, xp+66 y%Line1Text% w%DelayWidth% vPhysicalDuration
;Magic
Gui, Add, Checkbox, x%Left% y%Line2% w%CheckBoxWidth% vMagicAtk, Magical
Gui, Add, Text, xp+110 y%Line2% w%StdLabelWidth% Right vMagicAtkKeyLabel, Spell Key
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vMagicAtkKey
Gui, Add, Dropdownlist, xp+31 y%Line2Text% w%CheckBoxWidth% AltSubmit vMagicAtkTarget, |Self|Current|Last
;Misc
Gui, Add, Checkbox, x%Left% y%Line3% w%CheckBoxWidth% vDoubleTarget, Double Target
Gui, Add, Text, xp+110 y%Line3% w%DelayLabelWidth% Right vOffensiveDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line3Text% w%DelayWidth% vOffensiveDelay, 0
;;Lockpicking Settings
Gui, Tab, Lockpicking
;Lockpicking
Gui, Add, Checkbox, x%Left% y%Line1% w%CheckBoxWidth% vLockpicking gLockpickingOptions, Lockpicking
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vLockpickKeyLabel, Lockpick Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vLockpickKey
Gui, Add, Text, xp+31 y%Line1% w%DelayLabelWidth% Right vLockpickDelayLabel, Delay
Gui, Add, Edit, xp+66 y%Line1Text% w%DelayWidth% vLockpickDelay, 0
;Locked Box 1
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+63 y%Line2% w%CoordLabelWidth% vBox1XLabel, X1
Gui, Add, Edit, xp+20 y%Line2Text% w%CoordWidth% vBox1X
Gui, Add, Text, xp+40 y%Line2% w%CoordLabelWidth% vBox1YLabel, Y1
Gui, Add, Edit, xp+20 y%Line2Text% w%CoordWidth% vBox1Y
Gui, Add, Button, xp+40 y%Line2Set% w%SetButtonWidth% vSetBox1 gSetBox, Set
Gui, Add, Text, xp+37 y%Line2% w%StdLabelWidth% Right vBox1KeyLabel, Box 1 Key
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vBox1Key
;Locked Box 2
Gui, Add, Checkbox, x%Left% y%Line3% vLockpicking2 Disabled, Box 2
Gui, Add, Text, xp+63 y%Line3% w%CoordLabelWidth% vBox2XLabel Disabled, X2
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vBox2X Disabled
Gui, Add, Text, xp+40 y%Line3% w%CoordLabelWidth% vBox2YLabel Disabled, Y2
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vBox2Y Disabled
Gui, Add, Button, xp+40 y%Line3Set% w%SetButtonWidth% vSetBox2 gSetBox Disabled, Set
Gui, Add, Text, xp+37 y%Line3% w%StdLabelWidth% Right vBox2KeyLabel, Box 2 Key
Gui, Add, Edit, xp+79 y%Line3Text% w%HotkeyWidth% vBox2Key
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+135 y%Line4% w150 Right vLockpickingSensLabel, Tolerance for image searching
Gui, Add, Edit, xp+155 y%Line4Text% w%CoordWidth% HwndHLockpickingSens vLockpickingSens, 100
TT.Attach(HLockpickingSens, "Tolerance for Image Search. Raise if it never matches with the correct charge.bmp. Over 100 is too much")
;;ItemID Settings
Gui, Tab, ItemID
Gui, Add, Checkbox, x%Left% y%Line1% vItemID gItemIDOptions, Item ID
;Top left corner
Gui, Add, Text, xp+58 y%Line1% w64 Right vItemIDSourceTLXLabel, Top Left X
Gui, Add, Edit, xp+77 y%Line1Text% w%CoordWidth% vItemIDSourceTLX
Gui, Add, Text, xp+40 y%Line1% w64 Right vItemIDSourceTLYLabel, Top Left Y
Gui, Add, Edit, xp+77 y%Line1Text% w%CoordWidth% vItemIDSourceTLY
Gui, Add, Button, xp+40 y%Line1Set% w%SetButtonWidth% vSetItemIDSourceTL gSetItemID, Set
;Bottom right corner
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+58 y%Line2% w72 Right vItemIDSourceBRXLabel, Bottom Right X
Gui, Add, Edit, xp+77 y%Line2Text% w%CoordWidth% vItemIDSourceBRX
Gui, Add, Text, xp+40 y%Line2% w72 Right vItemIDSourceBRYLabel, Bottom Right Y
Gui, Add, Edit, xp+77 y%Line2Text% w%CoordWidth% vItemIDSourceBRY
Gui, Add, Button, xp+40 y%Line2Set% w%SetButtonWidth% vSetItemIDSourceBR gSetItemID, Set
;Container
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+58 y%Line3% w64 Right vItemIDContainerXLabel, Container X
Gui, Add, Edit, xp+77 y%Line3Text% w%CoordWidth% vItemIDContainerX
Gui, Add, Text, xp+40 y%Line3% w64 Right vItemIDContainerYLabel, Container Y
Gui, Add, Edit, xp+77 y%Line3Text% w%CoordWidth% vItemIDContainerY
Gui, Add, Button, xp+40 y%Line3Set% w%SetButtonWidth% vSetItemIDContainerT gSetItemID, Set
;Glass
Gui, Add, Text, x%Left% y%Line4% w80 Right vGlassKeyLabel, Magnifying Glass
Gui, Add, Edit, xp+85 y%Line4Text% w%HotkeyWidth% vGlassKey
Gui, Add, Text, xp+50 y%Line4% w150 Right vItemIDSensLabel, Tolerance for image searching
Gui, Add, Edit, xp+155 y%Line4Text% w%CoordWidth% HwndHItemIDSens vItemIDSens, 100
TT.Attach(HItemIDSens, "Tolerance for Image Search. Raise if it never matches with the correct unidentifed.bmp. Over 100 is too much")
;Delay
Gui, Add, Text, x%Left% y%Line5% w%DelayLabelWidth% Right vItemIDDelayLabel, Delay
Gui, Add, Edit, xp+72 y%Line5Text% w%DelayWidth% vItemIDDelay
;;Harvesting Settings
Gui, Tab, Harvesting
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Button, xp+60 y%Line1Set% w200 vAddSpotTab gAddSpotTab, Add a new harvesting spot
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Checkbox, x%Left% y%Line2% vSurvey, Survey
Gui, Add, Text, xp+25 y%Line2% w200 Right vSurveyLabel, Survey tool
Gui, Add, Edit, xp+205 y%Line2Text% w50 vSurveyKey
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Button, xp+60 y%Line3Set% w200 vRemoveSpotTab gRemoveSpotTab, Remove last harvesting spot
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+25 y%Line4% w200 Right vHarvestSensLabel, Tolerance for image searching
Gui, Add, Edit, xp+205 y%Line4Text% w%DelayWidth% HwndHHarvestSens vHarvestSens, 50
TT.Attach(HHarvestSens, "Tolerance for Image Search. Raise if it never matches with the correct charge.bmp. Over 100 is too much")
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+25 y%Line5% w200 Right vHarvestingRoutineDelayLabel, Delay between two harvesting spots
Gui, Add, Edit, xp+205 y%Line5Text% w%DelayWidth% vHarvestingRoutineDelay, 0
Loop, %MaxSpots%
{
Gui, Tab, Spot%A_Index%
;Tool and Rune
Gui, Add, Checkbox, x%Left% y%Line1% vSpot%A_Index%Active, Harvest this spot
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vSpot%A_Index%ToolLabel, Tool Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vSpot%A_Index%ToolKey
Gui, Add, Text, xp+31 y%Line1% w%StdLabelWidth% Right vSpot%A_Index%RuneKeyLabel, Rune Key
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vSpot%A_Index%RuneKey
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+110 y%Line2% w%StdLabelWidth% Right vSpot%A_Index%ScrollLabel, Recall Scroll
Gui, Add, Edit, xp+79 y%Line2Text% w%HotkeyWidth% vSpot%A_Index%ScrollKey
Gui, Add, Checkbox, xp+31 y%Line2% vSpot%A_Index%Scroll, Use Scroll
;Target 1
Gui, Add, Text, x%Left% y%Line3% w%CoordLabelWidth% vSpot%A_Index%X1Label, X1
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vSpot%A_Index%X1
Gui, Add, Text, xp+40 y%Line3% w%CoordLabelWidth% vSpot%A_Index%Y1Label, Y1
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vSpot%A_Index%Y1
Gui, Add, Button, xp+40 y%Line3Set% w%SetButtonWidth% vSetSpot%A_Index%Target1 gSetSpotTarget, Set
;Target 2
Gui, Add, Text, xp+52 y%Line3% w%CoordLabelWidth% vSpot%A_Index%X2Label, X2
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vSpot%A_Index%X2
Gui, Add, Text, xp+40 y%Line3% w%CoordLabelWidth% vSpot%A_Index%Y2Label, Y2
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vSpot%A_Index%Y2
Gui, Add, Button, xp+40 y%Line3Set% w%SetButtonWidth% vSetSpot%A_Index%Target2 gSetSpotTarget, Set
;Target 3
Gui, Add, Text, x%Left% y%Line4% w%CoordLabelWidth% vSpot%A_Index%X3Label, X3
Gui, Add, Edit, xp+20 y%Line4Text% w%CoordWidth% vSpot%A_Index%X3
Gui, Add, Text, xp+40 y%Line4% w%CoordLabelWidth% vSpot%A_Index%Y3Label, Y3
Gui, Add, Edit, xp+20 y%Line4Text% w%CoordWidth% vSpot%A_Index%Y3
Gui, Add, Button, xp+40 y%Line4Set% w%SetButtonWidth% vSetSpot%A_Index%Target3 gSetSpotTarget, Set
;Target 4
Gui, Add, Text, xp+52 y%Line4% w%CoordLabelWidth% vSpot%A_Index%X4Label, X4
Gui, Add, Edit, xp+20 y%Line4Text% w%CoordWidth% vSpot%A_Index%X4
Gui, Add, Text, xp+40 y%Line4% w%CoordLabelWidth% vSpot%A_Index%Y4Label, Y4
Gui, Add, Edit, xp+20 y%Line4Text% w%CoordWidth% vSpot%A_Index%Y4
Gui, Add, Button, xp+40 y%Line4Set% w%SetButtonWidth% vSetSpot%A_Index%Target4 gSetSpotTarget, Set
;Target 5
Gui, Add, Text, x%Left% y%Line5% w%CoordLabelWidth% vSpot%A_Index%X5Label, X5
Gui, Add, Edit, xp+20 y%Line5Text% w%CoordWidth% vSpot%A_Index%X5
Gui, Add, Text, xp+40 y%Line5% w%CoordLabelWidth% vSpot%A_Index%Y5Label, Y5
Gui, Add, Edit, xp+20 y%Line5Text% w%CoordWidth% vSpot%A_Index%Y5
Gui, Add, Button, xp+40 y%Line5Set% w%SetButtonWidth% vSetSpot%A_Index%Target5 gSetSpotTarget, Set
;Target 6
Gui, Add, Text, xp+52 y%Line5% w%CoordLabelWidth% vSpot%A_Index%X6Label, X6
Gui, Add, Edit, xp+20 y%Line5Text% w%CoordWidth% vSpot%A_Index%X6
Gui, Add, Text, xp+40 y%Line5% w%CoordLabelWidth% vSpot%A_Index%Y6Label, Y6
Gui, Add, Edit, xp+20 y%Line5Text% w%CoordWidth% vSpot%A_Index%Y6
Gui, Add, Button, xp+40 y%Line5Set% w%SetButtonWidth% vSetSpot%A_Index%Target6 gSetSpotTarget, Set
}
;;Custom Settings
Gui, Tab, Custom
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Button, xp+60 y%Line1Set% w200 vAddCustomTab gAddCustomTab, Add a new custom routine
Gui, Add, Button, xp y%Line3Set% w200 vRemoveCustomTab gRemoveCustomTab, Remove last custom routine
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+25 y%Line5% w200 Right vCustomRoutineDelayLabel, Delay between two custom routines
Gui, Add, Edit, xp+205 y%Line5Text% w%DelayWidth% vCustomRoutineDelay, 0
Loop, %MaxCustom%
{
Gui, Tab, Custom%A_Index%
;Custom basics
Gui, Add, Checkbox, x%Left% y%Line1% w%CheckBoxWidth% vCustom%A_Index%Active, Custom
Gui, Add, Text, xp+110 y%Line1% w%StdLabelWidth% Right vCustom%A_Index%KeyLabel, Skill Hotkey
Gui, Add, Edit, xp+79 y%Line1Text% w%HotkeyWidth% vCustom%A_Index%Key
Gui, Add, Dropdownlist, xp+31 y%Line1Text% w%CheckBoxWidth% AltSubmit vCustom%A_Index%Target, |Self|Current|Last|Last Object
;Checkbox and double mouse click coords
Gui, Add, Checkbox, x%Left% y%Line2% vCustom%A_Index%CoordsItem, Use Coords
Gui, Add, Text, xp+172 y%Line2% w%CoordLabelWidth% vCustom%A_Index%CoordsItemXLabel, X
Gui, Add, Edit, xp+20 y%Line2Text% w%CoordWidth% vCustom%A_Index%CoordsItemX
Gui, Add, Text, xp+40 y%Line2% w%CoordLabelWidth% vCustom%A_Index%CoordsItemYLabel, Y
Gui, Add, Edit, xp+20 y%Line2Text% w%CoordWidth% vCustom%A_Index%CoordsItemY
Gui, Add, Button, xp+40 y%Line2Set% w%SetButtonWidth% vSetCustom%A_Index%CoordsItem gSetCustomCoordsItem, Set
;Checkbox and double mouse click coords
Gui, Add, Checkbox, x%Left% y%Line3% vCustom%A_Index%CoordsTarget, Target Coords
Gui, Add, Text, xp+172 y%Line3% w%CoordLabelWidth% vCustom%A_Index%CoordsTargetXLabel, X
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vCustom%A_Index%CoordsTargetX
Gui, Add, Text, xp+40 y%Line3% w%CoordLabelWidth% vCustom%A_Index%CoordsTargetYLabel, Y
Gui, Add, Edit, xp+20 y%Line3Text% w%CoordWidth% vCustom%A_Index%CoordsTargetY
Gui, Add, Button, xp+40 y%Line3Set% w%SetButtonWidth% vSetCustom%A_Index%CoordsTarget gSetCustomCoordsTarget, Set
;Checkbox and right mouse click coords
Gui, Add, Checkbox, x%Left% y%Line4% vCustom%A_Index%CoordsRight, Right Click Coords
Gui, Add, Text, xp+172 y%Line4% w%CoordLabelWidth% vCustom%A_Index%CoordsRightXLabel, X
Gui, Add, Edit, xp+20 y%Line4Text% w%CoordWidth% vCustom%A_Index%CoordsRightX
Gui, Add, Text, xp+40 y%Line4% w%CoordLabelWidth% vCustom%A_Index%CoordsRightYLabel, Y
Gui, Add, Edit, xp+20 y%Line4Text% w%CoordWidth% vCustom%A_Index%CoordsRightY
Gui, Add, Button, xp+40 y%Line4Set% w%SetButtonWidth% vSetCustom%A_Index%CoordsRight gSetCustomCoordsRight, Set
;Delay After Using key
Gui, Add, Text, x%Left% y%Line5% w%DelayLabelWidth% Right vCustom%A_Index%PreDelayLabel, Pre Delay
Gui, Add, Edit, xp+72 y%Line5Text% w%DelayWidth% vCustom%A_Index%PreDelay
Gui, Add, Text, xp+148 y%Line5% w%DelayLabelWidth% Right vCustom%A_Index%PostDelayLabel, Post Delay
Gui, Add, Edit, xp+66 y%Line5Text% w%DelayWidth% vCustom%A_Index%PostDelay
}
;;Custom Keys
Gui, Tab, CustomKeys
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Button, xp+60 y%Line1Set% w200 vAddCustomKeysTab gAddCustomKeysTab, Add a new custom hotkeys page
Gui, Add, Button, xp y%Line3Set% w200 vRemoveCustomKeysTab gRemoveCustomKeysTab, Remove last custom hotkeys page
Loop, %MaxCustomKeys%
{
Gui, Tab, CustomKeys%A_Index%
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+20 y%Line1% w84 Right vCustomKeys%A_Index%Key1IngameLabel, In Game Hotkey
Gui, Add, Edit, xp+89 y%Line1Text% w%HotkeyWidth% vCustomKeys%A_Index%Key1InGame
Gui, Add, Text, xp+31 y%Line1% w80 Right vCustomKeys%A_Index%Key1Label, New Hotkey
Gui, Add, Dropdownlist, xp+85 y%Line1Text% w45 AltSubmit vCustomKeys%A_Index%Key1Mod, |Alt|Ctrl|Shift
Gui, Add, Edit, xp+55 y%Line1Text% w%HotkeyWidth% vCustomKeys%A_Index%Key1
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+20 y%Line2% w84 Right vCustomKeys%A_Index%Key2IngameLabel, In Game Hotkey
Gui, Add, Edit, xp+89 y%Line2Text% w%HotkeyWidth% vCustomKeys%A_Index%Key2InGame
Gui, Add, Text, xp+31 y%Line2% w80 Right vCustomKeys%A_Index%Key2Label, New Hotkey
Gui, Add, Dropdownlist, xp+85 y%Line2Text% w45 AltSubmit vCustomKeys%A_Index%Key2Mod, |Alt|Ctrl|Shift
Gui, Add, Edit, xp+55 y%Line2Text% w%HotkeyWidth% vCustomKeys%A_Index%Key2
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+20 y%Line3% w84 Right vCustomKeys%A_Index%Key3IngameLabel, In Game Hotkey
Gui, Add, Edit, xp+89 y%Line3Text% w%HotkeyWidth% vCustomKeys%A_Index%Key3InGame
Gui, Add, Text, xp+31 y%Line3% w80 Right vCustomKeys%A_Index%Key3Label, New Hotkey
Gui, Add, Dropdownlist, xp+85 y%Line3Text% w45 AltSubmit vCustomKeys%A_Index%Key3Mod, |Alt|Ctrl|Shift
Gui, Add, Edit, xp+55 y%Line3Text% w%HotkeyWidth% vCustomKeys%A_Index%Key3
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+20 y%Line4% w84 Right vCustomKeys%A_Index%Key4IngameLabel, In Game Hotkey
Gui, Add, Edit, xp+89 y%Line4Text% w%HotkeyWidth% vCustomKeys%A_Index%Key4InGame
Gui, Add, Text, xp+31 y%Line4% w80 Right vCustomKeys%A_Index%Key4Label, New Hotkey
Gui, Add, Dropdownlist, xp+85 y%Line4Text% w45 AltSubmit vCustomKeys%A_Index%Key4Mod, |Alt|Ctrl|Shift
Gui, Add, Edit, xp+55 y%Line4Text% w%HotkeyWidth% vCustomKeys%A_Index%Key4
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+20 y%Line5% w84 Right vCustomKeys%A_Index%Key5IngameLabel, In Game Hotkey
Gui, Add, Edit, xp+89 y%Line5Text% w%HotkeyWidth% vCustomKeys%A_Index%Key5InGame
Gui, Add, Text, xp+31 y%Line5% w80 Right vCustomKeys%A_Index%Key5Label, New Hotkey
Gui, Add, Dropdownlist, xp+85 y%Line5Text% w45 AltSubmit vCustomKeys%A_Index%Key5Mod, |Alt|Ctrl|Shift
Gui, Add, Edit, xp+55 y%Line5Text% w%HotkeyWidth% vCustomKeys%A_Index%Key5
}
;;ItemTransfer Settings
Gui, Tab, ItemTransfer
Gui, Add, Checkbox, x%Left% y%Line1% vItemTransfer, Item Transfer
;Item transfer cycles to run
Gui, Add, Text, xp+85 y%Line1% w30 Right vMoveCycleCountLabel, Move cycles
Gui, Add, Edit, xp+50 y%Line1% w30 vMoveCycleCount
;Move/drag FROM list location
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+58 y%Line2% w64 Right vMoveFromXLabel, Move From X
Gui, Add, Edit, xp+77 y%Line2Text% w%CoordWidth% vMoveFromX
Gui, Add, Text, xp+40 y%Line2% w64 Right vMoveFromYLabel, Move From Y
Gui, Add, Edit, xp+77 y%Line2Text% w%CoordWidth% vMoveFromY
Gui, Add, Button, xp+40 y%Line2Set% w%SetButtonWidth% vSetMoveF gSetMove, Set
;Move/drag TO location
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Text, xp+58 y%Line3% w64 Right vMoveToXLabel, Move To X
Gui, Add, Edit, xp+77 y%Line3Text% w%CoordWidth% vMoveToX
Gui, Add, Text, xp+40 y%Line3% w64 Right vMoveToYLabel, Move To Y
Gui, Add, Edit, xp+77 y%Line3Text% w%CoordWidth% vMoveToY
Gui, Add, Button, xp+40 y%Line3Set% w%SetButtonWidth% vSetMoveT gSetMove, Set
;Inside or outside main loop
Gui, Add, Text, x%Left% y0 w0
Gui, Add, Checkbox, x%Left% y%Line4% vItemTransferBreak, Stop After Running
Gui, Tab
;Routine indicator
Gui,Add,Text, cGreen x%Left% y%SelectionHeight% w190 Center vRoutine Hidden, Doing Stuff
;Loops indicator
Gui,Add,Text, cRed xp+20 yp+20 vLoopCounterLabel Hidden, Loops:
Gui,Add,Text, cRed xp+40 yp w%CoordWidth% Hidden vLoopCounter, 0
;Relogs indicator
Gui,Add,Text, cRed xp+40 yp Hidden vRelogCounterLabel, Relogs:
Gui,Add,Text, cRed xp+45 yp w20 Hidden vRelogCounter, 0
;Start/Stop
Gui,Font,Bold
Gui,Add,Button, xp+55 yp-19 w60 h30 vSave gSave, Save
Gui,Add,Button, xp+70 yp w60 h30 vMainGo gMainLoop, Start
Gui,Add,Button, xp yp w60 h30 Hidden vMainStop gStop, Stop
Gui,Font,Norm
;Get the configs list
GoSub, GetConfigs
;Seleft the one from config.ini
GuiControl,choose,LoadedConfig,%UserConfig%
;Load config settings
GoSub, LoadConfig
;Adjust gui settings
GoSub, AdjustGui
; Start GUI
Gui, Show , , %guiname%
return
TVLABEL:
if (A_GuiEvent == "Normal")
{
if (A_EventInfo == P1)
{
GuiControl,, OptionTitle, General Settings
GuiControl, choose, TabsList, General
}
else if (A_EventInfo == P2)
{
GuiControl,, OptionTitle, General Hotkey Settings
GuiControl, choose, TabsList, GeneralKeys
}
else if (A_EventInfo == P3)
{
GuiControl,, OptionTitle, Taming Settings
GuiControl, choose, TabsList, Taming
}
else if (A_EventInfo == P4)
{
GuiControl,, OptionTitle, Music Settings
GuiControl, choose, TabsList, Music
}
else if (A_EventInfo == P5)
{
GuiControl,, OptionTitle, Healing Settings
GuiControl, choose, TabsList, Healing
}
else if (A_EventInfo == P6)
{
GuiControl,, OptionTitle, Hiding Settings
GuiControl, choose, TabsList, Hiding
}
else if (A_EventInfo == P7)
{
GuiControl,, OptionTitle, Fishing Settings
GuiControl, choose, TabsList, Fishing
}
else if (A_EventInfo == P8)
{
GuiControl,, OptionTitle, Offensive Settings
GuiControl, choose, TabsList, Offensive
}
else if (A_EventInfo == P9)
{
GuiControl,, OptionTitle, Lockpicking Settings
GuiControl, choose, TabsList, Lockpicking
}
else if (A_EventInfo == P10)
{
GuiControl,, OptionTitle, Item ID Settings
GuiControl, choose, TabsList, ItemID
}
else if (A_EventInfo == P11)
{
GuiControl,, OptionTitle, Harvesting Settings
GuiControl, choose, TabsList, Harvesting
}
else if (A_EventInfo == P12)
{
GuiControl,, OptionTitle, Custom Settings
GuiControl, choose, TabsList, Custom
}
else if (A_EventInfo == P13)
{
GuiControl,, OptionTitle, Custom Hotkeys Settings
GuiControl, choose, TabsList, CustomKeys
}
else if (A_EventInfo == P14)
{
GuiControl,, OptionTitle, Item Transfer
GuiControl, choose, TabsList, ItemTransfer
}
Loop, %MaxSpots%
{
if (A_EventInfo == P11C%A_Index%)
{
GuiControl,, OptionTitle, Harvesting Spot %A_Index% Settings
GuiControl, choose, TabsList, Spot%A_Index%
}
}
Loop, %MaxCustom%
{
if (A_EventInfo == P12C%A_Index%)
{
GuiControl,, OptionTitle, Custom Routine %A_Index% Settings
GuiControl, choose, TabsList, Custom%A_Index%
}
}
Loop, %MaxCustomKeys%
{
if (A_EventInfo == P13C%A_Index%)
{
GuiControl,, OptionTitle, Custom Hotkeys Page %A_Index%
GuiControl, choose, TabsList, CustomKeys%A_Index%
}
}
}
return
GETCONFIGS:
ItemList := ""
Loop, *.ini
{
if (A_LoopFileName != "config.ini")
{
FilePath := A_LoopFileLongPath
StringSplit, Item, A_LoopReadLine, .
ItemList .= A_LoopFileName . Seperator . FilePath . "`n"
}
}
StringTrimRight, ItemList, ItemList, 1
Sort, ItemList
ConfigIndex := 0
Loop, Parse, ItemList, `n
{
StringSplit, Item, A_LoopField, %Seperator%
GuiControl, , LoadedConfig, %Item1%
ConfigIndex += 1
Configs%ConfigIndex% := Item1
}
ItemList := ""
; GuiControl, Choose, PFL, 1
Return
LOADCONFIGRELOAD:
gosub, LoadConfig
Reload
return
LOADCONFIG:
Gui, Submit, NoHide
UserConfig := Configs%LoadedConfig%
;Load gui config
Loop, parse, GuiSettingsList, `,
{
IniRead, %A_LoopField%, %UserConfig%, GuiSettings, % A_LoopField
guicontrol,,%A_LoopField%,% %A_LoopField%
}
Loop, parse, GuiDPSettingsList, `,
{
IniRead, %A_LoopField%, %UserConfig%, GuiSettings, % A_LoopField
guicontrol,choose,%A_LoopField%,% %A_LoopField%
}
;Load hotkeys config
Loop, parse, GuiHotkeysList, `,
{
IniRead, %A_LoopField%, %UserConfig%, Hotkeys, % A_LoopField
guicontrol,,%A_LoopField%,% %A_LoopField%
}
;Register hotkeys
try
{
Hotkey,%StopKey%,Stop
Hotkey,%StartKey%,Start
Loop, %MaxCustomKeys%
{
i := 1
while (i < 6)
{
if CustomKeys%A_Index%Key%i%Mod = 2
CustomModifier := "!"
else if CustomKeys%A_Index%Key%i%Mod = 3
CustomModifier := "^"
else if CustomKeys%A_Index%Key%i%Mod = 4
CustomModifier := "+"
CustomHotkey := CustomModifier . CustomKeys%A_Index%Key%i%
;Hotkey,%customHotkey%,CustomKeys%A_Index%Key%i%Routine
Hotkey,%CustomHotkey%,CUSTOMKEYSROUTINE
i++
}
}
}
;Save loaded config
IniWrite, %LoadedConfig%, config.ini, ConfigSetting, UserConfig
return
Loop, %MaxCustomKeys%
{
i := 1
while (i < 6)
{
CustomKeys%A_Index%Key%i%Routine:
MsgBox, Pushed
return
i++
}
}
ADJUSTGUI:
;Adjust Gui according to config values
if (OnTop)
Gui,+AlwaysOnTop
if (!Taming)
GuiControl, Disable, Release
else
GuiControl, Enable, Release
if (Music)
{
GuiControl, Disable, Provo
GuiControl, Disable, Peace
GuiControl, Disable, Discord
}
else if (Provo)
{
GuiControl, Disable, Music
GuiControl, Disable, Peace
GuiControl, Disable, Discord
}
else if (Peace)
{
GuiControl, Disable, Provo
GuiControl, Disable, Music
GuiControl, Disable, Discord
}
else if (Discord)
{
GuiControl, Disable, Provo
GuiControl, Disable, Peace
GuiControl, Disable, Music
}
if (Hiding)
GuiControl, Enable, Stealth
if (!Fishing) {
Loop, parse, FishingOptionsList, `,
GuiControl, Disable, %A_LoopField%
}
else
{
Loop, parse, FishingOptionsList, `,
GuiControl, Enable, %A_LoopField%
}
if (!Lockpicking) {
Loop, parse, LockpickingOptionsList, `,
GuiControl, Disable, %A_LoopField%
}
else
{
Loop, parse, LockpickingOptionsList, `,
GuiControl, Enable, %A_LoopField%
}
SetKeyDelay,%KeyDelay%
return
STOP:
Gui, Submit, NoHide
breakvar := 1
return
SAVE:
Gui, Submit, NoHide
;Save gui config
Loop, parse, GuiSettingsList, `,
IniWrite, % %A_LoopField%, %UserConfig%, GuiSettings, % A_LoopField
Loop, parse, GuiDPSettingsList, `,
IniWrite, % %A_LoopField%, %UserConfig%, GuiSettings, % A_LoopField
;Save hotkeys config
Loop, parse, GuiHotkeysList, `,
IniWrite, % %A_LoopField%, %UserConfig%, Hotkeys, % A_LoopField
return
ONTOP:
Gui, Submit, NoHide
if (OnTop)
Gui,+AlwaysOnTop
else
Gui,-AlwaysOnTop
return