-
Notifications
You must be signed in to change notification settings - Fork 2
/
ExcubetoGrinderDefault
93 lines (88 loc) · 2.25 KB
/
ExcubetoGrinderDefault
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
#SingleInstance, Force
#NoEnv
global OnOff:=0
global UniqueWin := "ahk_exe pso2.exe"
global loopTime := 200
global loadDelay := 2000
global loadInput := 2
MsgBox , 64, Ex-Cube AHK Script by Cup & Verve, RUN AS ADMINISTRATOR!`n`nProceed to the "EX-Cube Exchange Shop".`nBefore Starting this script, Open Storage, hover over your Inventory, and highlight the Materials tab. `n `nPress Q to Start / Stop Script `nESC to Exit Script `n `nSending to Default Storage. `n`nThe home of this script is https://github.com/mokocup/PSO2Scripts`n`nBy Cup#4575 & Verve#6947`n`nUse at your own risk!
if ErrorLevel
ExitApp
SetTimer, ChangeButtonNames, 50
MsgBox , 4, Default Timing is 2s., Use default timing?
IfMsgBox, YES
InputBox, loadInput , Shop Loading Delay, Time to wait for Ex-Cube Shop to appear (in seconds): , , 200, 160, , , Locale, , 2
if ErrorLevel
ExitApp
else
loadDelay := loadInput*1000
MsgBox, 64, You got it, Delay set to %loadInput%s.
if ErrorLevel
ExitApp
else
return
ChangeButtonNames:
IfWinNotExist, Default Timing is 2s.
return ; Keep waiting.
SetTimer, ChangeButtonNames, Off
WinActivate
ControlSetText, Button1, &Custom...
ControlSetText, Button2, &Default
return
checkSend(key){
IfWinExist, %UniqueWin%
{
ControlSend, ,{ %key% },%UniqueWin%
}else
{
MsgBox,Pso2 Instance Not Found!
ExitApp
}
}
ExcubeToGrinder:
checkSend("Enter")
Sleep, %loadDelay%
checkSend("Left")
Sleep,200
checkSend("Enter")
Sleep,200
checkSend("Enter")
Sleep,300
checkSend("Enter")
Sleep,500
checkSend("Esc")
Sleep,200
checkSend("Down")
Sleep,200
checkSend("Enter")
Sleep,200
checkSend("Enter")
Sleep,200
checkSend("Enter")
Sleep,200
checkSend("Enter")
Sleep,200
checkSend("Enter")
Sleep,200
checkSend("Enter")
Sleep,200
checkSend("Right")
Sleep,50
checkSend("Enter")
Sleep,50
checkSend("Enter")
Sleep,200
checkSend("Esc")
Sleep,200
checkSend("Esc")
Sleep,200
checkSend("Esc")
Sleep,200
checkSend("Up")
Sleep,200
return
q::
OnOff:=!OnOff
SetTimer,ExcubeToGrinder,% OnOff == 1 ? %loopTime% : "Off"
return
Esc::ExitApp