This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
payday_udella_gui.ahk
201 lines (186 loc) · 4.36 KB
/
payday_udella_gui.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
#Include libs/basic.ahk
#SingleInstance Force
SetWorkingDir(A_ScriptDir)
; REMOVED: SetBatchLines -1
myGui := Gui()
myGui.OnEvent("Close", Gui_Escape)
myGui.OnEvent("Escape", Gui_Escape)
myGui.Opt("-MinimizeBox -MaximizeBox")
myGui.SetFont("s9", "Segoe UI")
myGui.Add("Picture", "x0 y0 w160 h200", "images/gui_bg.png")
myGui.SetFont()
myGui.SetFont("cWhite")
myGui.Add("Text", "x45 y5 w73 h23 +BackgroundTrans", "Auto PayDay")
myGui.SetFont()
myGui.SetFont("s9", "Segoe UI")
myGui.SetFont()
myGui.SetFont("s20 Bold cWhite")
ogcTextBattleCount := myGui.Add("Text", "vBattleCount x6 y140 w68 h27 +BackgroundTrans +Center", "00")
myGui.SetFont()
myGui.SetFont("s9", "Segoe UI")
myGui.SetFont()
myGui.SetFont("s20 Bold cWhite")
ogcTextHealCount := myGui.Add("Text", "vHealCount x86 y140 w68 h30 +BackgroundTrans +Center", "00")
myGui.SetFont()
myGui.SetFont("s9", "Segoe UI")
myGui.SetFont()
myGui.SetFont("cWhite")
ogcTextLocation := myGui.Add("Text", "vLocation x36 y180 w85 h20 +BackgroundTrans +Center", "Ubella Bay")
myGui.SetFont()
myGui.SetFont("s9", "Segoe UI")
myGui.SetFont()
myGui.SetFont("s14 cWhite")
ogcTextStatus := myGui.Add("Text", "vStatus x8 y93 w140 h25 +BackgroundTrans +Center", "Press Q to start")
myGui.SetFont()
myGui.SetFont("s9", "Segoe UI")
myGui.SetFont()
myGui.SetFont("s14 Bold cWhite")
ogcTextTimerCount := myGui.Add("Text", "vTimerCount x8 y43 w140 h25 +BackgroundTrans +Center", "00 : 00")
myGui.SetFont()
myGui.Title := "INTI PokemmoBot"
myGui.Show("x911 y308 w158 h200")
Toggle := 0
BtlCnt := 0
HealCnt := 0
isBattle := 0
shinyBattle := 0
gui_status:="Initiating"
StartTime := A_TickCount
Return
Q::
{ ; V1toV2: Added bracket
carn_pokebot_init()
SetTimer(UPDATE,1000)
SetTimer(GUISTATUSUPDATE,500)
FISHING()
} ; Added bracket before function
FISHING()
{ ; V1toV2: Added bracket
Loop{
global gui_status
gui_status := "Fishing..."
sleep_rand(90,200)
send_fish()
; If (detect_cannot_fish()) {
; HEAL()
; }
if detect_battle() = 1
{
FIGHTINIT()
Continue
}
}
Return
} ; V1toV2: Added Bracket before label
FIGHTINIT()
{ ; V1toV2: Added bracket
global gui_status, fight_opt
if detect_battle() = 1
{
fight_opt := 0
gui_status := "Entering battle..."
Sleep(1200)
if detect_fight_but() = 1
{
FIGHT()
}
else
{
FIGHTINIT()
}
}
else
{
}
return
} ; V1toV2: Added Bracket before label
FIGHT()
{ ; V1toV2: Added bracket
global gui_status, fight_opt
gui_status := "Fighting"
if detect_run_default([]) = 1
{
fight_opt := 1
}
if detect_shiny() = 1
{
fight_opt := 2
}
if (fight_opt = 0)
{
send_yes()
Sleep(400)
send_yes()
Sleep(3000)
}
if (fight_opt = 1)
{
gui_status := "Running..."
send_run()
}
if (fight_opt = 2)
{
gui_status := "Catching"
send_catch()
}
Sleep(2000)
QUIT()
Return
} ; V1toV2: Added Bracket before label
QUIT()
{ ; V1toV2: Added bracket
if detect_battle() = 0
{
global gui_status, BtlCnt
gui_status := "Exiting battle..."
BtlCnt+=1
If (detect_pp() || detect_hp()) {
HEAL()
}
If (detect_but_yes()) {
send_no()
}
}
else
{
FIGHT()
}
Return
} ; V1toV2: Added bracket before function
HEAL()
{ ; V1toV2: Added bracket
global gui_status, HealCnt
gui_status := "Healing"
teleport_and_heal()
HealCnt+=1
; go to train
Sleep(2000)
walk_down(3)
walk_left(5)
walk_down(2)
randomvar := Random(6, 10)
walk_right(randomvar)
walk_down(1)
Return
} ; V1toV2: Added bracket before function
Gui_Escape(thisGui)
{ ; V1toV2: Added bracket
ExitApp()
return
}
UPDATE()
{ ; V1toV2: Added bracket
t := Floor((A_TickCount - StartTime) / 1000)
m := Floor(t / 60) > 10 ? Floor(t / 60) : SubStr("00" . Floor(t / 60), -2)
r := SubStr("00" . Mod(t,60), -2)
ogcTextTimerCount.Value := m " : " r
Return
} ; V1toV2: Added Bracket before label
GUISTATUSUPDATE()
{ ; V1toV2: Added bracket
WinActivate "ahk_class GLFW30"
ogcTextStatus.Value := gui_status
ogcTextBattleCount.Value := BtlCnt
ogcTextHealCount.Value := HealCnt
Return
} ; V1toV2: Added bracket in the end