forked from Arturo-1212/PTCGPB
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPTCGPB.ahk
More file actions
4392 lines (4032 loc) · 184 KB
/
PTCGPB.ahk
File metadata and controls
4392 lines (4032 loc) · 184 KB
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
; Improved status display function
DisplayPackStatus(Message, X := 0, Y := 625) {
global SelectedMonitorIndex
static GuiName := "ScreenPackStatus"
; Fixed light theme colors
bgColor := "F0F5F9" ; Light background
textColor := "2E3440" ; Dark text for contrast
MaxRetries := 10
RetryCount := 0
try {
; Get monitor origin from index
SelectedMonitorIndex := RegExReplace(SelectedMonitorIndex, ":.*$")
SysGet, Monitor, Monitor, %SelectedMonitorIndex%
X := MonitorLeft + X
;Adjust Y position to be just above buttons
Y := MonitorTop + 503 ; This is approximately where the buttons start - 30 (status height)
; Check if GUI already exists
Gui %GuiName%:+LastFoundExist
if (PackGuiBuild) {
GuiControl, %GuiName%:, PackStatus, %Message%
}
else {
PackGuiBuild := 1
; Create a new GUI with light theme styling
OwnerWND := WinExist(1)
Gui, %GuiName%:Destroy
if(!OwnerWND)
Gui, %GuiName%:New, +ToolWindow -Caption +LastFound -DPIScale +AlwaysOnTop
else
Gui, %GuiName%:New, +Owner%OwnerWND% +ToolWindow -Caption +LastFound -DPIScale
Gui, %GuiName%:Color, %bgColor% ; Light background
Gui, %GuiName%:Margin, 2, 2
Gui, %GuiName%:Font, s8 c%textColor% ; Dark text
Gui, %GuiName%:Add, Text, vPackStatus c%textColor%, %Message%
; Show the GUI without activating it
Gui, %GuiName%:Show, NoActivate x%X% y%Y%, %GuiName%
}
} catch e {
; Silent error handling
}
}
;OPTIMIZATIONS START
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , A
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
DllCall("ntdll\ZwSetTimerResolution","Int",5000,"Int",1,"Int*",MyCurrentTimerResolution) ;setting the Windows Timer Resolution to 0.5ms, THIS IS A GLOBAL CHANGE
;OPTIMIZATIONS END
;YOUR SCRIPT GOES HERE
DllCall("Sleep","UInt",1) ;I just slept exactly 1ms!
DllCall("ntdll\ZwDelayExecution","Int",0,"Int64*",-5000) ;you can use this to sleep in increments of 0.5ms if you need even more granularity
#Include %A_ScriptDir%\Scripts\Include\
#Include Dictionary.ahk
#Include ADB.ahk
#Include Logging.ahk
#Include FontListHelper.ahk
#Include ChooseColors.ahk
#Include DropDownColor.ahk
version = Arturos PTCGP Bot
#SingleInstance, force
CoordMode, Mouse, Screen
SetTitleMatchMode, 3
OnError("ErrorHandler")
;OnError("ErrorHandler") ; Add this line here
githubUser := "mixman208"
,repoName := "PTCGPB"
,localVersion := "v6.4.21"
,scriptFolder := A_ScriptDir
,zipPath := A_Temp . "\update.zip"
,extractPath := A_Temp . "\update"
,intro := "Eevee and New GUI!"
if not A_IsAdmin
{
; Relaunch script with admin rights
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
; ========== Load Settings ==========
settingsLoaded := LoadSettingsFromIni()
if (!settingsLoaded) {
CreateDefaultSettingsFile()
LoadSettingsFromIni()
}
; ========== language Selection ==========
if (!IsLanguageSet) {
; Build language select
Gui, Add, Text,, Select Language
BotLanguagelist := "English|中文|日本語|Deutsch"
defaultChooseLang := 1
if (BotLanguage != "") {
Loop, Parse, BotLanguagelist, |
if (A_LoopField = BotLanguage) {
defaultChooseLang := A_Index
break
}
}
Gui, Add, DropDownList, vBotLanguage w200 choose%defaultChooseLang%, %BotLanguagelist%
Gui, Add, Button, Default gNextStep, Next
Gui, Show,, Language Selection
Return
}
NextStep:
Gui, Submit, NoHide
IniWrite, %BotLanguage%, Settings.ini, UserSettings, Botlanguage
IniRead, BotLanguage, Settings.ini, UserSettings, Botlanguage
IsLanguageSet := 1
langMap := { "English": 1, "中文": 2, "日本語": 3, "Deutsch": 4 }
defaultBotLanguage := langMap.HasKey(BotLanguage) ? langMap[BotLanguage] : 1
Gui, Destroy
; Define Language Dictionary
global LicenseDictionary, ProxyDictionary, currentDictionary, SetUpDictionary, HelpDictionary
LicenseDictionary := CreateLicenseNoteLanguage(defaultBotLanguage)
,ProxyDictionary := CreateProxyLanguage(defaultBotLanguage)
,currentDictionary := CreateGUITextByLanguage(defaultBotLanguage, localVersion)
,SetUpDictionary := CreateSetUpByLanguage(defaultBotLanguage)
,HelpDictionary := CreateHelpByLanguage(defaultBotLanguage)
; ========== License/Proxy Notice ==========
RegRead, proxyEnabled, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings, ProxyEnable
; Check for debugMode and display license notification if not in debug mode
global saveSignalFile := A_ScriptDir "\Scripts\Include\save.signal"
if (!debugMode && !shownLicense && !FileExist(saveSignalFile)) {
MsgBox, 64, % LicenseDictionary.Title, % LicenseDictionary.Content
shownLicense := 1
if (proxyEnabled)
MsgBox, 64,, % ProxyDictionary.Notice
}
; ========== Handle save.signal ==========
if FileExist(saveSignalFile) {
KillADBProcesses()
FileDelete, %saveSignalFile%
} else {
KillADBProcesses()
CheckForUpdate()
}
; ========== Backup JSON Files ==========
scriptName := StrReplace(A_ScriptName, ".ahk")
winTitle := scriptName
showStatus := true
; Backup total.json
totalFile := A_ScriptDir . "\json\total.json"
backupFile := A_ScriptDir . "\json\total-backup.json"
if FileExist(totalFile) {
FileCopy, %totalFile%, %backupFile%, 1
if (ErrorLevel)
MsgBox, 0x40000,, Failed to create %backupFile%. Ensure permissions and paths are correct.
FileDelete, %totalFile%
}
; Backup Packs.json
packsFile := A_ScriptDir . "\json\Packs.json"
backupFile := A_ScriptDir . "\json\Packs-backup.json"
if FileExist(packsFile) {
FileCopy, %packsFile%, %backupFile%, 1
if (ErrorLevel)
MsgBox, 0x40000,, Failed to create %backupFile%. Ensure permissions and paths are correct.
}
InitializeJsonFile() ; Create or open the JSON file
; ========== GUI Setup ==========
global MainGuiName
global checkedPath, uncheckedPath
checkedPath := A_ScriptDir . "\GUI\Gui_checked.png"
uncheckedPath := A_ScriptDir . "\GUI\Gui_unchecked.png"
Gui,+HWNDSGUI
if (CurrentTheme = "Dark") {
Gui, Color, e9f1f7, 7C8590
} else {
Gui, Color, e9f1f7, FFD1CD
}
Loop, 8 {
Gui, Add, Picture, % "x" (A_Index-1)*360 " y0 w360 h640 BackgroundTrans", %BackgroundImage%
Gui, Add, Picture, % "x" (A_Index-1)*360 + 20 " y90 w320 h480 BackgroundTrans", %PageImage%
}
OD_Colors.SetItemHeight("s10", currentfont)
; ========== Page 1 ==========
xPos := 45
SetHeaderFont()
Gui, Add, Text, x%xPos% y110 backgroundtrans, % currentDictionary.btn_reroll
SetNormalFont()
;; FriendID Section
Gui, Add, Text, x%xPos% y150 vFriendIDLabel backgroundtrans, % currentDictionary.FriendIDLabel
if(FriendID = "ERROR" || FriendID = "") {
Gui, Add, Edit, % "vFriendID w270 x" . xPos . " y175 h20 -E0x200 Center backgroundtrans" . (CurrentTheme = "Dark"? " cFDFDFD ": " cBC0000"),
} else {
Gui, Add, Edit, % "vFriendID w270 x" . xPos . " y175 h20 -E0x200 Center backgroundtrans" . (CurrentTheme = "Dark"? " cFDFDFD ": " cBC0000"), %FriendID%
}
Gui, Add, Text, x%xPos% y200 w275 h1 +0x10 ; Creates a horizontal line
;; Instance Settings Section
Gui, Add, Text, x%xPos% y205 backgroundtrans vTxt_Instances, % currentDictionary.Txt_Instances
Gui, Add, Edit, % "vInstances w40 x" . xPos+185 . " y205 h20 -E0x200 Center backgroundtrans" . (CurrentTheme = "Dark"? " cFDFDFD ": " cBC0000"), %Instances%
Gui, Add, Text, x%xPos% y230 backgroundtrans vTxt_InstanceStartDelay, % currentDictionary.Txt_InstanceStartDelay
Gui, Add, Edit, % "vinstanceStartDelay w40 x" . xPos+185 . " y230 h20 -E0x200 Center backgroundtrans" . (CurrentTheme = "Dark"? " cFDFDFD ": " cBC0000"), %instanceStartDelay%
Gui, Add, Text, x%xPos% y255 backgroundtrans vTxt_Columns, % currentDictionary.Txt_Columns
Gui, Add, Edit, % "vColumns w40 x" . xPos+185 . " y255 h20 -E0x200 Center backgroundtrans" . (CurrentTheme = "Dark"? " cFDFDFD ": " cBC0000"), %Columns%
global Txt_runMain
CheckOptions := Object()
,CheckOptions["x"] := xPos,CheckOptions["y"] := 282,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "runMain"
,CheckOptions["gName"] := "runMainSettings"
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := runMain
,CheckOptions["vTextName"] := "Txt_runMain"
,CheckOptions["text"] := currentDictionary.Txt_runMain
,CheckOptions["textX"] := xPos+35,CheckOptions["textY"] := 280
AddCheckBox(CheckOptions)
Gui, Add, Edit, % "vMains w40 x" . xPos+185 . " y280 h20 -E0x200 Center backgroundtrans" . (runMain ? "" : " Hidden") . (CurrentTheme = "Dark"? " cFDFDFD ": " cBC0000"), %Mains%
global Txt_autoUseGPTest
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 306,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "autoUseGPTest"
,CheckOptions["gName"] := "autoUseGPTestSettings"
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := autoUseGPTest
,CheckOptions["vTextName"] := "Txt_autoUseGPTest"
,CheckOptions["text"] := currentDictionary.Txt_autoUseGPTest
,CheckOptions["textX"] := xPos+35,CheckOptions["textY"] := 305
AddCheckBox(CheckOptions)
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vTestTime w40 x" . xPos+185 . " y305 h20 -E0x200 Center backgroundtrans" . (autoUseGPTest ? "" : " Hidden"), %TestTime%
Gui, Add, Text, x%xPos% y330 backgroundtrans vTxt_AccountName, % currentDictionary.Txt_AccountName
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vAccountName w85 x" . xPos+185 . " y330 h20 -E0x200 Center backgroundtrans", %AccountName%
Gui, Add, Text, x%xPos% y355 w275 h1 +0x10 ; Creates a horizontal line
;; Time Settings Section
Gui, Add, Text, x%xPos% y360 backgroundtrans vTxt_Delay, % currentDictionary.Txt_Delay
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vDelay w40 x" . xPos+185 . " y360 h20 -E0x200 Center backgroundtrans", %Delay%
Gui, Add, Text, x%xPos% y385 backgroundtrans vTxt_WaitTime, % currentDictionary.Txt_WaitTime
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vwaitTime w40 x" . xPos+185 . " y385 h20 -E0x200 Center backgroundtrans", %waitTime%
Gui, Add, Text, x%xPos% y410 backgroundtrans vTxt_SwipeSpeed, % currentDictionary.Txt_SwipeSpeed
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vswipeSpeed w40 x" . xPos+185 . " y410 h20 -E0x200 Center backgroundtrans", %swipeSpeed%
global Txt_slowMotion
CheckOptions := {}
CheckOptions["x"] := xPos ,CheckOptions["y"] := 436,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "slowMotion"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := slowMotion
,CheckOptions["vTextName"] := "Txt_slowMotion"
,CheckOptions["text"] := currentDictionary.Txt_slowMotion
,CheckOptions["textX"] := xPos+35,CheckOptions["textY"] := 435
AddCheckBox(CheckOptions)
; ========== Page 2 ==========
xPos := 405
SetHeaderFont()
Gui, Add, Text, x%xPos% y110 backgroundtrans, % currentDictionary.btn_system
;; System Settings Section
SetNormalFont()
SysGet, MonitorCount, MonitorCount
MonitorOptions := ""
Loop, %MonitorCount% {
SysGet, MonitorName, MonitorName, %A_Index%
SysGet, Monitor, Monitor, %A_Index%
MonitorOptions .= (A_Index > 1 ? "|" : "") "" A_Index ": (" MonitorRight - MonitorLeft "x" MonitorBottom - MonitorTop ")"
}
SelectedMonitorIndex := RegExReplace(SelectedMonitorIndex, ":.*$")
Gui, Add, Text, x%xPos% y150 backgroundtrans vTxt_Monitor, % currentDictionary.Txt_Monitor
Gui, Add, DropDownList, % "x" . xPos+145 . " y146 w140 vSelectedMonitorIndex hwndMoitor +0x0210 Choose" . SelectedMonitorIndex . " -E0x200 Center BackgroundTrans", %MonitorOptions%
Gui, Add, Text, x%xPos% y200 backgroundtrans vTxt_Scale, % currentDictionary.Txt_Scale
if (defaultLanguage = "Scale125") {
defaultLang := 1
scaleParam := 277
} else if (defaultLanguage = "Scale100") {
defaultLang := 2
scaleParam := 287
}
Gui, Add, DropDownList, % "x" . xPos+145 . " y197 w80 vdefaultLanguage hwndScale gdefaultLangSetting +0x0210 choose" . defaultLang . " -E0x200 Center backgroundtrans", Scale125
Gui, Add, Text, x%xPos% y225 backgroundtrans vTxt_RowGap, % currentDictionary.Txt_RowGap
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vRowGap w80 x" . xPos+145 . " y223 h20 -E0x200 Center backgroundtrans", %RowGap%
Gui, Add, Text, x%xPos% y175 backgroundtrans vTxt_FolderPath, % currentDictionary.Txt_FolderPath
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vfolderPath w140 x" . xPos+145 . " y173 h20 -E0x200 Center backgroundtrans", %folderPath%
Gui, Add, Text, x%xPos% y250 backgroundtrans vTxt_OcrLanguage, % currentDictionary.Txt_OcrLanguage
; ========== Language Pack list ==========
ocrLanguageList := "en|zh|es|de|fr|ja|ru|pt|ko|it|tr|pl|nl|sv|ar|uk|id|vi|th|he|cs|no|da|fi|hu|el|zh-TW"
if (ocrLanguage != "")
{
index := 0
Loop, Parse, ocrLanguageList, |
{
index++
if (A_LoopField = ocrLanguage)
{
defaultOcrLang := index
break
}
}
}
Gui, Add, DropDownList, % "x" . xPos+145 . " y247 w80 vocrLanguage hwndOCR +0x0210 choose" . defaultOcrLang . " -E0x200 Center backgroundtrans", %ocrLanguageList%
Gui, Add, Text, x%xPos% y275 backgroundtrans vTxt_ClientLanguage, % currentDictionary.Txt_ClientLanguage
; ========== Client Language Pack list ==========
clientLanguageList := "en|es|fr|de|it|pt|jp|ko|cn"
if (clientLanguage != "")
{
index := 0
Loop, Parse, clientLanguageList, |
{
index++
if (A_LoopField = clientLanguage)
{
defaultClientLang := index
break
}
}
}
Gui, Add, DropDownList, % "x" . xPos+145 . " y273 w80 vclientLanguage hwndClient +0x0210 choose" . defaultClientLang . " -E0x200 Center backgroundtrans", %clientLanguageList%
Gui, Add, Text, x%xPos% y300 backgroundtrans vTxt_InstanceLaunchDelay, % currentDictionary.Txt_InstanceLaunchDelay
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vinstanceLaunchDelay w80 x" . xPos+145 . " y300 h20 -E0x200 Center backgroundtrans", %instanceLaunchDelay%
global Txt_autoLaunchMonitor
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 326,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "autoLaunchMonitor"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := autoLaunchMonitor
,CheckOptions["vTextName"] := "Txt_autoLaunchMonitor"
,CheckOptions["text"] := currentDictionary.Txt_autoLaunchMonitor
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 325
AddCheckBox(CheckOptions)
Gui, Add, Text, x%xPos% y350 w275 h1 +0x10 ; Creates a horizontal line
SetSectionFont()
Gui, Add, Text, x%xPos% y355 backgroundtrans vExtraSettingsHeading, % currentDictionary.ExtraSettingsHeading
SetNormalFont()
; ========= Extra Settings Section =========
global Txt_applyRoleFilters, Txt_debugMode, Txt_useTesseract, Txt_statusMessage
; First add Role-Based Filters
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 381,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "applyRoleFilters"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := applyRoleFilters
,CheckOptions["vTextName"] := "Txt_applyRoleFilters"
,CheckOptions["text"] := currentDictionary.Txt_applyRoleFilters
,CheckOptions["textX"] := xPos+35,CheckOptions["textY"] := 380
AddCheckBox(CheckOptions)
; Then add Debug Mode
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 406,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "debugMode"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := debugMode
,CheckOptions["vTextName"] := "Txt_debugMode"
,CheckOptions["text"] := currentDictionary.Txt_debugMode
,CheckOptions["textX"] := xPos+35,CheckOptions["textY"] := 405
AddCheckBox(CheckOptions)
; Then add the Use Tesseract checkbox
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 431,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "useTesseract"
,CheckOptions["gName"] := "useTesseractSettings"
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := useTesseract
,CheckOptions["vTextName"] := "Txt_useTesseract"
,CheckOptions["text"] := currentDictionary.Txt_tesseractOption
,CheckOptions["textX"] := xPos+35,CheckOptions["textY"] := 430
AddCheckBox(CheckOptions)
; Then add status messages
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 456,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "statusMessage"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := statusMessage
,CheckOptions["vTextName"] := "Txt_statusMessage"
,CheckOptions["text"] := currentDictionary.Txt_statusMessage
,CheckOptions["textX"] := xPos+35,CheckOptions["textY"] := 455
AddCheckBox(CheckOptions)
; Keep Tesseract Path at the end
Gui, Add, Text, % "x" . xPos . " y480 backgroundtrans vTxt_TesseractPath" . (useTesseract ? "" : " Hidden"), % currentDictionary.Txt_TesseractPath
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vtesseractPath w280 x" . xPos . " y505 h20 -E0x200 backgroundtrans" . (useTesseract ? "" : " Hidden"), %tesseractPath%
; ========== Page 3 ==========
; ========== Delete Method ==========
xPos := 765
SetHeaderFont()
Gui, Add, Text, x%xPos% y110 backgroundtrans, % currentDictionary.btn_pack
; Create Sort By label and dropdown
SetNormalFont()
Gui, Add, Text, % "x" . xPos . " y150 backgroundtrans vTxt_DeleteMethod", % currentDictionary.Txt_DeleteMethod
defaultDelete := 1 ; Default to first option (13 Pack)
if (deleteMethod = "13 Pack")
defaultDelete := 1
else if (deleteMethod = "Inject")
defaultDelete := 2
else if (deleteMethod = "Inject Missions")
defaultDelete := 3
else if (deleteMethod = "Inject for Reroll")
defaultDelete := 4
Gui, Add, DropDownList, % "x" . xPos+65 . " y148 w120 vdeleteMethod gdeleteSettings hwndMethod +0x0210 choose" . defaultDelete . " -E0x200 backgroundtrans", 13 Pack|Inject|Inject Missions|Inject for Reroll
; Apply the correct selection
GuiControl, Choose, deleteMethod, %defaultDelete%
global Txt_packMethod, Txt_nukeAccount, Txt_spendHourGlass, Txt_openExtraPack
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 182,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "packMethod"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := deleteMethodEnabled
,CheckOptions["vTextName"] := "Txt_packMethod"
,CheckOptions["text"] := currentDictionary.Txt_packMethod
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 181
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 182,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "nukeAccount"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := nukeAccount
,CheckOptions["vTextName"] := "Txt_nukeAccount"
,CheckOptions["text"] := currentDictionary.Txt_nukeAccount
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 181
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 212,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "spendHourGlass"
,CheckOptions["gName"] := "spendHourGlassSettings"
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := spendHourGlass
,CheckOptions["vTextName"] := "Txt_spendHourGlass"
,CheckOptions["text"] := currentDictionary.Txt_spendHourGlass
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 211
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 212,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "openExtraPack"
,CheckOptions["gName"] := "openExtraPackSettings"
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := openExtraPack
,CheckOptions["vTextName"] := "Txt_openExtraPack"
,CheckOptions["text"] := currentDictionary.Txt_openExtraPack
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 211
AddCheckBox(CheckOptions)
; Determine which option to pre-select
sortOption := 1 ; Default (ModifiedAsc)
if (injectSortMethod = "ModifiedDesc")
sortOption := 2
else if (injectSortMethod = "PacksAsc")
sortOption := 3
else if (injectSortMethod = "PacksDesc")
sortOption := 4
Gui, Add, Text, x%xPos% y242 vSortByText BackgroundTrans, % currentDictionary.SortByText
Gui, Add, DropDownList, % "x" . xPos+110 . " y240 w120 vSortByDropdown gSortByDropdownHandler hwndSortby +0x0210 Choose" . sortOption . " BackgroundTrans", Oldest First|Newest First|Fewest Packs First|Most Packs First
if (deleteMethod != "Inject for Reroll") {
GuiControl, Hide, packMethod
GuiControl, Hide, Txt_packMethod
GuiControl, Hide, openExtraPack
GuiControl, Hide, Txt_openExtraPack
}
if (deleteMethod != "13 Pack") {
GuiControl, Hide, nukeAccount
GuiControl, Hide, Txt_nukeAccount
} else {
GuiControl, Hide, spendHourGlass
GuiControl, Hide, Txt_spendHourGlass
GuiControl, Hide, SortByText
GuiControl, Hide, SortByDropdown
}
; Add divider for God Pack Settings section
Gui, Add, Text, x%xPos% y271 w275 h1 +0x10 BackgroundTrans ; Creates a horizontal line
; === Card Detection Subsection ===
SetNormalFont()
global Txt_FullArtCheck, Txt_TrainerCheck, Txt_RainbowCheck, Txt_PseudoGodPack, Txt_CheckShinyPackOnly,
global Txt_CrownCheck, Txt_ShinyCheck, Txt_ImmersiveCheck, Txt_invalidCheck,
; 2-Column Layout for Card Detection Subsection
CheckOptions := {}
CheckOptions["x"] :=xPos,CheckOptions["y"] := 281,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "FullArtCheck"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := CardDetectionCheck
,CheckOptions["vTextName"] := "Txt_FullArtCheck"
,CheckOptions["text"] := currentDictionary.Txt_FullArtCheck
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 280
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 306,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "TrainerCheck"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := TrainerCheck
,CheckOptions["vTextName"] := "Txt_TrainerCheck"
,CheckOptions["text"] := currentDictionary.Txt_TrainerCheck
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 305
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 331,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "RainbowCheck"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := RainbowCheck
,CheckOptions["vTextName"] := "Txt_RainbowCheck"
,CheckOptions["text"] := currentDictionary.Txt_RainbowCheck
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 330
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 356,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "PseudoGodPack"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := PseudoGodPack
,CheckOptions["vTextName"] := "Txt_PseudoGodPack"
,CheckOptions["text"] := currentDictionary.Txt_PseudoGodPack
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 355
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 381,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "CheckShinyPackOnly"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := CheckShinyPackOnly
,CheckOptions["vTextName"] := "Txt_CheckShinyPackOnly"
,CheckOptions["text"] := currentDictionary.Txt_CheckShinyPackOnly
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 380
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 281,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "CrownCheck"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := CrownCheck
,CheckOptions["vTextName"] := "Txt_CrownCheck"
,CheckOptions["text"] := currentDictionary.Txt_CrownCheck
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 280
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 306,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "ShinyCheck"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := ShinyCheck
,CheckOptions["vTextName"] := "Txt_ShinyCheck"
,CheckOptions["text"] := currentDictionary.Txt_ShinyCheck
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 305
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 331,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "ImmersiveCheck"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := ImmersiveCheck
,CheckOptions["vTextName"] := "Txt_ImmersiveCheck"
,CheckOptions["text"] := currentDictionary.Txt_ImmersiveCheck
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 330
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 406,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "InvalidCheck"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := InvalidCheck
,CheckOptions["vTextName"] := "Txt_InvalidCheck"
,CheckOptions["text"] := currentDictionary.Txt_InvalidCheck
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 405
AddCheckBox(CheckOptions)
; ========= Page 4 ==========
; ========== Pack Selection ==========
xPos := 1125
SetHeaderFont()
Gui, Add, Text, x%xPos% y110 backgroundtrans, % currentDictionary.btn_pack
global Txt_Eevee,Txt_Buzzwole, Txt_Solgaleo, Txt_Lunala, Txt_Shining, Txt_Arceus, Txt_Palkia, Txt_Dialga
global Txt_Mewtwo, Txt_Charizard, Txt_Pikachu, Txt_Mew
SetNormalFont()
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 151,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Eevee"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Eevee
,CheckOptions["vTextName"] := "Txt_Eevee"
,CheckOptions["text"] := currentDictionary.Txt_Eevee
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 150
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 151,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Buzzwole"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Buzzwole
,CheckOptions["vTextName"] := "Txt_Buzzwole"
,CheckOptions["text"] := currentDictionary.Txt_Buzzwole
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 150
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 176,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Solgaleo"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Solgaleo
,CheckOptions["vTextName"] := "Txt_Solgaleo"
,CheckOptions["text"] := currentDictionary.Txt_Solgaleo
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 175
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 176,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Lunala"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Lunala
,CheckOptions["vTextName"] := "Txt_Lunala"
,CheckOptions["text"] := currentDictionary.Txt_Lunala
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 175
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 201,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Shining"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Shining
,CheckOptions["vTextName"] := "Txt_Shining"
,CheckOptions["text"] := currentDictionary.Txt_Shining
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 200
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 201,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Arceus"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Arceus
,CheckOptions["vTextName"] := "Txt_Arceus"
,CheckOptions["text"] := currentDictionary.Txt_Arceus
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 200
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 226,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Palkia"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Palkia
,CheckOptions["vTextName"] := "Txt_Palkia"
,CheckOptions["text"] := currentDictionary.Txt_Palkia
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 225
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 226,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Dialga"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Dialga
,CheckOptions["vTextName"] := "Txt_Dialga"
,CheckOptions["text"] := currentDictionary.Txt_Dialga
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 225
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 251,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Pikachu"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Pikachu
,CheckOptions["vTextName"] := "Txt_Pikachu"
,CheckOptions["text"] := currentDictionary.Txt_Pikachu
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 250
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 251,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Charizard"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Charizard
,CheckOptions["vTextName"] := "Txt_Charizard"
,CheckOptions["text"] := currentDictionary.Txt_Charizard
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 250
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 276,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Mewtwo"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Mewtwo
,CheckOptions["vTextName"] := "Txt_Mewtwo"
,CheckOptions["text"] := currentDictionary.Txt_Mewtwo
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 275
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos+155,CheckOptions["y"] := 276,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "Mew"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := Mew
,CheckOptions["vTextName"] := "Txt_Mew"
,CheckOptions["text"] := currentDictionary.Txt_Mew
,CheckOptions["textX"] := xPos+190
,CheckOptions["textY"] := 275
AddCheckBox(CheckOptions)
; ========== Page 5 ==========
; ========== Min Stars ==========
xPos := 1485
SetHeaderFont()
Gui, Add, Text, x%xPos% y110 backgroundtrans, % currentDictionary.btn_pack
SetNormalFont()
Gui, Add, Text, x%xPos% y150 backgroundtrans vTxt_MinStars, % currentDictionary.Txt_MinStars
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vminStars w40 x" . xPos+120 . " y149 h20 -E0x200 Center backgroundtrans", %minStars%
Gui, Add, Text, x%xPos% y175 backgroundtrans vTxt_ShinyMinStars, % currentDictionary.Txt_ShinyMinStars
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vminStarsShiny w40 x" . xPos+120 . " y174 h20 -E0x200 Center backgroundtrans", %minStarsShiny%
global Txt_minStarsEnabled
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 200, CheckOptions["w"] := 28, CheckOptions["h"] := 13
,CheckOptions["vName"] := "minStarsEnabled"
,CheckOptions["gName"] := "minStarsEnabledSettings"
,CheckOptions["checkedImagePath"] := checkedPath, CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := minStarsEnabled
,CheckOptions["vTextName"] := "Txt_minStarsEnabled"
,CheckOptions["text"] := currentDictionary.Txt_minStarsEnabled
,CheckOptions["textX"] := xPos+35, CheckOptions["textY"] := 199
AddCheckBox(CheckOptions)
Gui, Add, Text, % "x" . xPos . " y225 vTxt_minStarsA3b BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Eevee
defaultStars := MinStarCheck("minStarsA3b")
Gui, Add, DropDownList, % "x" . xPos+90 . " y225 w40 vminStarsA3b hwndMinA3b +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos+155 . " y225 vTxt_minStarsA3a BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Buzzwole
defaultStars := MinStarCheck("minStarsA3a")
Gui, Add, DropDownList, % "x" . xPos+245 . " y225 w40 vminStarsA3a hwndMinA3a +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos . " y250 vTxt_minStarsA3Solgaleo BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Solgaleo
defaultStars := MinStarCheck("minStarsA3Solgaleo")
Gui, Add, DropDownList, % "x" . xPos+90 . " y250 w40 vminStarsA3Solgaleo hwndMinA3S +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos+155 . " y250 vTxt_minStarsA3Lunala BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Lunala
defaultStars := MinStarCheck("minStarsA3Lunala")
Gui, Add, DropDownList, % "x" . xPos+245 . " y250 w40 vminStarsA3Lunala hwndMinA3L +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos . " y275 vTxt_minStarsA2b BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Shining
defaultStars := MinStarCheck("minStarsA2b")
Gui, Add, DropDownList, % "x" . xPos+90 . " y275 w40 vminStarsA2b hwndMinA2b +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos+155 . " y275 vTxt_minStarsA2a BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Arceus
defaultStars := MinStarCheck("minStarsA2a")
Gui, Add, DropDownList, % "x" . xPos+245 . " y275 w40 vminStarsA2a hwndMinA2a +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos . " y300 vTxt_minStarsA2Dialga BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Dialga
defaultStars := MinStarCheck("minStarsA2Dialga")
Gui, Add, DropDownList, % "x" . xPos+90 . " y300 w40 vminStarsA2Dialga hwndMinA2D +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos+155 . " y300 vTxt_minStarsA2Palkia BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Palkia
defaultStars := MinStarCheck("minStarsA2Palkia")
Gui, Add, DropDownList, % "x" . xPos+245 . " y300 w40 vminStarsA2Palkia hwndMinA2P +0x0210 choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos . " y325 vTxt_minStarsA1Mewtwo BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Mewtwo
defaultStars := MinStarCheck("minStarsA1Mewtwo")
Gui, Add, DropDownList, % "x" . xPos+90 . " y325 w40 vminStarsA1Mewtwo +0x0210 hwndMinA1MT choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos+155 . " y325 vTxt_minStarsA1Charizard BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Charizard
defaultStars := MinStarCheck("minStarsA1Charizard")
Gui, Add, DropDownList, % "x" . xPos+245 . " y325 w40 vminStarsA1Charizard +0x0210 hwndMinA1C choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos . " y350 vTxt_minStarsA1Pikachu BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Pikachu
defaultStars := MinStarCheck("minStarsA1Pikachu")
Gui, Add, DropDownList, % "x" . xPos+90 . " y350 w40 vminStarsA1Pikachu +0x0210 hwndMinA1P choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
Gui, Add, Text, % "x" . xPos+155 . " y350 vTxt_minStarsA1a BackgroundTrans" . (minStarsEnabled ? "" : " Hidden"), % currentDictionary.Txt_Mew
defaultStars := MinStarCheck("minStarsA1a")
Gui, Add, DropDownList, % "x" . xPos+245 . " y350 w40 vminStarsA1a +0x0210 hwndMinA1M choose" . defaultStars . " -E0x200 Center backgroundtrans" . (minStarsEnabled ? "" : " Hidden"), 0|1|2|3|4|5
; ========== Page 6 ==========
;; Save For Trade Section
xPos := 1845
SetHeaderFont()
Gui, Add, Text, x%xPos% y110 backgroundtrans, % currentDictionary.btn_save
SetNormalFont()
global Txt_s4tEnabled, Txt_s4tSilent, Txt_s4t3Dmnd, Txt_s4t4Dmnd, Txt_s4t1Star, s4tGholdengoArrow
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 151,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4tEnabled"
,CheckOptions["gName"] := "s4tSettings"
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4tEnabled
,CheckOptions["vTextName"] := "Txt_s4tEnabled"
,CheckOptions["text"] := currentDictionary.Txt_s4tEnabled
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 150
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 181,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4tSilent"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4tSilent
,CheckOptions["vTextName"] := "Txt_s4tSilent"
,CheckOptions["text"] := currentDictionary.Txt_s4tSilent
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 180
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 206,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4t3Dmnd"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4t3Dmnd
,CheckOptions["vTextName"] := "Txt_s4t3Dmnd"
,CheckOptions["text"] := "3 ◆◆◆"
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 205
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 231,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4t4Dmnd"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4t4Dmnd
,CheckOptions["vTextName"] := "Txt_s4t4Dmnd"
,CheckOptions["text"] := "4 ◆◆◆◆"
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 230
AddCheckBox(CheckOptions)
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 256,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4t1Star"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4t1Star
,CheckOptions["vTextName"] := "Txt_s4t1Star"
,CheckOptions["text"] := "1 ★"
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 255
AddCheckBox(CheckOptions)
Gui, Add, Text, % "x" . xPos . " y280 w275 h1 vS4T_Divider1 +0x10 BackgroundTrans" . (!s4tEnabled ? " Hidden" : "") ; Creates a horizontal line
CheckOptions := {}
CheckOptions["x"] := xPos+140,CheckOptions["y"] := 181,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4tGholdengo"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4tGholdengo
,CheckOptions["vTextName"] := "s4tGholdengoArrow"
,CheckOptions["text"] := "➤"
,CheckOptions["textX"] := xPos+175
,CheckOptions["textY"] := 180
if (!s4tEnabled || !Shining)
CheckOptions["extraOptions"] := " Hidden"
AddCheckBox(CheckOptions)
Gui, Add, Picture, % (!s4tEnabled ? "Hidden " : "") . "vs4tGholdengoEmblem w25 h25 x" . xPos+195 . " y175 backgroundtrans", % A_ScriptDir . "\GUI\Images\GholdengoEmblem.png"
global Txt_s4tWP
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 286,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4tWP"
,CheckOptions["gName"] := "s4tWPSettings"
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4tWP
,CheckOptions["vTextName"] := "Txt_s4tWP"
,CheckOptions["text"] := currentDictionary.Txt_s4tWP
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 285
AddCheckBox(CheckOptions)
Gui, Add, Text, % "vs4tWPMinCardsLabel x" . xPos . " y310 BackgroundTrans" . (!s4tEnabled || !s4tWP ? " Hidden " : ""), % currentDictionary.Txt_s4tWPMinCards
Gui, Add, DropDownList, % "vs4tWPMinCards x" . xPos+120 . " y307 w40 hwnds4tMin +0x0210 choose" . (s4tWPMinCards=2?2:1) . " -E0x200 Center backgroundtrans" . (!s4tEnabled || !s4tWP ? " Hidden" : ""), 1|2
Gui, Add, Text, % "x" . xPos . " y335 w275 h1 vS4T_Divider2 +0x10 BackgroundTrans" . (!s4tEnabled ? " Hidden" : "") ; Creates a horizontal line
; === S4T Discord Settings (now part of Save For Trade) ===
SetSectionFont()
Gui, Add, Text, % "x" . xPos . " y340 backgroundtrans vS4TDiscordSettingsSubHeading" . (!s4tEnabled? " Hidden" : ""), % currentDictionary.S4TDiscordSettingsSubHeading
SetNormalFont()
if(StrLen(s4tDiscordUserId) < 3)
s4tDiscordUserId =
if(StrLen(s4tDiscordWebhookURL) < 3)
s4tDiscordWebhookURL =
Gui, Add, Text, % "x" . xPos . " y365 backgroundtrans vTxt_S4T_DiscordID" . (!s4tEnabled ? " Hidden" : ""), Discord ID:
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vs4tDiscordUserId w220 x" . xPos . " y390 h20 -E0x200 Center backgroundtrans" . (!s4tEnabled ? " Hidden" : ""), %s4tDiscordUserId%
Gui, Add, Text, % "x" . xPos . " y415 backgroundtrans vTxt_S4T_DiscordWebhook" . (!s4tEnabled ? " Hidden" : ""), Webhook URL:
Gui, Add, Edit, % (CurrentTheme = "Dark"? "cFDFDFD ": "cBC0000 ") . "vs4tDiscordWebhookURL w220 x" . xPos . " y440 h20 -E0x200 Center backgroundtrans" . (!s4tEnabled ? " Hidden" : ""), %s4tDiscordWebhookURL%
global Txt_s4tSendAccountXml
CheckOptions := {}
CheckOptions["x"] := xPos,CheckOptions["y"] := 466,CheckOptions["w"] := 28,CheckOptions["h"] := 13
,CheckOptions["vName"] := "s4tSendAccountXml"
,CheckOptions["gName"] := ""
,CheckOptions["checkedImagePath"] := checkedPath
,CheckOptions["uncheckedImagePath"] := uncheckedPath
,CheckOptions["isChecked"] := s4tSendAccountXml
,CheckOptions["vTextName"] := "Txt_s4tSendAccountXml"
,CheckOptions["text"] := currentDictionary.Txt_s4tSendAccountXml
,CheckOptions["textX"] := xPos+35
,CheckOptions["textY"] := 465
AddCheckBox(CheckOptions)
if (s4tEnabled) {
ShowControls(s4tMainControls)
; Gholdengo show/hide
if (Shining) {
ShowControls("s4tGholdengo,s4tGholdengoEmblem,s4tGholdengoArrow")
} else {
HideControls("s4tGholdengo,s4tGholdengoEmblem,s4tGholdengoArrow")
}
; s4tWP show/hide
if (s4tWP) {
ShowControls("s4tWPMinCardsLabel,s4tWPMinCards")
} else {
HideControls("s4tWPMinCardsLabel,s4tWPMinCards")
}
}
if (!s4tEnabled) {
GuiControl, Hide, s4tSilent
GuiControl, Hide, Txt_s4tSilent