Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Warn
- #NoEnv
- #SingleInstance, On
- CoordMode, Pixel, Screen
- CoordMode, Mouse, Screen
- CoordMode, ToolTip, Screen
- SetWorkingDir %A_ScriptDir%/Buttons
- Gui, New,, Select level
- Gui, Add, Text,, WindowName:
- Gui, Add, Edit, vWindowName,
- Gui, Add, Text,, Mode1:
- Gui, Add, DropDownList, vMode1 gMode1, |SinglePlayer|Coop
- Gui, Add, Text,, Mode2:
- Gui, Add, DropDownList, vMode2 gMode2, |
- Gui, Add, Text,, Mode3:
- Gui, Add, DropDownList, vMode3 gMode3, |
- Gui, Add, Text,, Mode4:
- Gui, Add, DropDownList, vMode4, |
- Gui, Add, Button, default, Run
- Gui, Show,, Simple Input Example
- Return
- Mode1:
- Gui, Submit, NoHide
- If (Mode1 = "SinglePlayer"){
- GuiControl,, Mode2, |SinglePlayer_Story|SinglePlayer_Event|SinglePlayer_Training
- }
- If (Mode1 = "Coop"){
- GuiControl,, Mode2, |Coop_Story|Coop_Event|Coop_Training
- }
- Return
- Mode2:
- Gui, Submit, NoHide
- If (Mode2 = "SinglePlayer_Story"){
- GuiControl,, Mode3, |
- }
- If (Mode2 = "SinglePlayer_Event"){
- GuiControl,, Mode3, |
- }
- If (Mode2 = "SinglePlayer_Training"){
- GuiControl,, Mode3, |LevelUp_Course|Strike_Course|Tech_Course|Support_Course
- }
- If (Mode2 = "Coop_Story"){
- GuiControl,, Mode3, |Chapter_18|Chapter_17|Chapter_16|Chapter_15|Chapter_14
- }
- If (Mode2 = "Coop_Event"){
- GuiControl,, Mode3, |
- }
- If (Mode2 = "Coop_Training"){
- GuiControl,, Mode3, |EX_Brock|EX_Rosa|EX_Erika|EX_Skyla
- }
- Return
- Mode3:
- Gui, Submit, NoHide
- If (Mode3 = "LevelUp_Course"){
- GuiControl,, Mode4, |LevelUp_Very_Hard|LevelUp_Hard|LevelUp_Normal
- }
- If (Mode3 = "Strike_Course"){
- GuiControl,, Mode4, |Strike_Very_Hard|Strike_Hard|Strike_Normal
- }
- If (Mode3 = "Tech_Course"){
- GuiControl,, Mode4, |Tech_Very_Hard|Tech_Hard|Tech_Normal
- }
- If (Mode3 = "Support_Course"){
- GuiControl,, Mode4, |Support_Very_Hard|Support_Hard|Support_Normal
- }
- If (Mode3 = "Chapter_18"){
- GuiControl,, Mode4, |Chapter_18_Very_Hard|Chapter_18_Hard|Chapter_18_Normal
- }
- If (Mode3 = "Chapter_17"){
- GuiControl,, Mode4, |Chapter_17_Very_Hard|Chapter_17_Hard|Chapter_17_Normal
- }
- If (Mode3 = "Chapter_16"){
- GuiControl,, Mode4, |Chapter_16_Very_Hard|Chapter_16_Hard|Chapter_16_Normal
- }
- If (Mode3 = "Chapter_15"){
- GuiControl,, Mode4, |Chapter_15_Very_Hard|Chapter_15_Hard|Chapter_15_Normal
- }
- If (Mode3 = "Chapter_14"){
- GuiControl,, Mode4, |Chapter_14_Very_Hard|Chapter_14_Hard|Chapter_14_Normal
- }
- If (Mode3 = "EX_Brock"){
- GuiControl,, Mode4, |EX_Brock_Very_Hard|EX_Brock_Hard
- }
- If (Mode3 = "EX_Rosa"){
- GuiControl,, Mode4, |EX_Rosa_Very_Hard|EX_Rosa_Hard
- }
- If (Mode3 = "EX_Erika"){
- GuiControl,, Mode4, |EX_Erika_Very_Hard|EX_Erika_Hard
- }
- If (Mode3 = "EX_Skyla"){
- GuiControl,, Mode4, |EX_Skyla_Very_Hard|EX_Skyla_Hard
- }
- Return
- GuiClose:
- ButtonRun:
- Gui, Submit
- MsgBox You have chosen "%Mode4%". Once in the PokeCenter hit OK to begin.
- Goto ParseButton
- ParseButton:
- ImageButton = SpecialLogin.png|Explore.png|ConnectionError.png|%Mode4%.png|QuickConnect.png|Go.png|Yes.png|Skip.png|FightDone.png|LevelUp.png|OK.png|OKCoop.png ;Button list
- ImageMenu = SpecialLogin.png|NextUpSpecial.png|WeeklyLogin.png|NextUpWeekly.png|CloseNews.png|Explore.png|%Mode1%.png|%Mode2%.png|%Mode3%.png|%Mode4%.png ;Menu button list
- Loop, Parse, ImageButton, |,
- {
- WinGetPos, XOff, YOff, Width, Height, %WindowName%
- XMax := XOff + Width
- YMax := YOff + Height
- Tooltip, Searching for %a_loopfield%, XOff, YOff, 1
- ImageSearch, ImageX1, ImageY1, XOff, YOff, XMax, YMax, *40 %a_loopfield%
- Random, ImageX, ImageX1, ImageX1+25
- Random, ImageY, ImageY1, ImageY1+25
- if ErrorLevel = 2
- {
- MsgBox Error searching for %a_loopfield%.
- }
- else if Errorlevel = 1
- {
- if a_loopfield = OKcoop.png
- {
- Goto ParseButton
- }
- else
- {
- Continue
- }
- }
- else
- {
- Tooltip, %a_loopfield% pressed., XOff, YOff+23, 2
- if a_loopfield = SpecialLogin.png
- {
- ClickRandom(ImageX,ImageY,1)
- TimedSleep(.75)
- Goto ParseMenu
- }
- else if a_loopfield = Explore.png
- {
- ClickRandom(ImageX,ImageY,1)
- TimedSleep(.75)
- Goto ParseMenu
- }
- else if a_loopfield = ConnectionError.png
- {
- TimedSleep(5)
- ClickRandom(ImageX,ImageY,1)
- TimedSleep(.75)
- Continue
- }
- else if a_loopfield = OKCoop.png
- {
- ClickRandom(ImageX,ImageY,1)
- TimedSleep(.75)
- Goto ParseButton
- }
- else
- {
- ClickRandom(ImageX,ImageY,1)
- TimedSleep(.75)
- Continue
- }
- }
- }
- ParseMenu:
- Loop, Parse, ImageMenu, |,
- {
- WinGetPos, XOff, YOff, Width, Height, %WindowName%
- XMax := XOff + Width
- YMax := YOff + Height
- Tooltip, Searching for %a_loopfield%, XOff, YOff, 1
- ImageSearch, ImageX1, ImageY1, XOff, YOff, XMax, YMax, *40 %a_loopfield%
- Random, ImageX, ImageX1, ImageX1+25
- Random, ImageY, ImageY1, ImageY1+25
- if ErrorLevel = 2
- {
- MsgBox Error searching for %a_loopfield%.
- }
- else if Errorlevel = 1
- {
- if a_loopfield = %Mode4%.png
- {
- Goto ParseMenu
- }
- else
- {
- Continue
- }
- }
- else
- {
- Tooltip, %a_loopfield% pressed., XOff, YOff+23, 2
- if a_loopfield = %Mode4%.png
- {
- ClickRandom(ImageX,ImageY,1)
- TimedSleep(.75)
- Goto ParseButton
- }
- else
- {
- ClickRandom(ImageX,ImageY,1)
- TimedSleep(.75)
- Continue
- }
- }
- }
- ^NumPad9::ExitApp
- NumPad8::Reload
- Numpad9::Pause
- Randomize(Rmin,Rmax) {
- Random, OutputR, %Rmin%, %Rmax%
- Return OutputR
- }
- TimedSleep(S) {
- SleepMultiple := Randomize(800, 1000)
- Sleep, SleepMultiple * S
- return
- }
- ClickRandom(ImageX, ImageY, ClickCount) {
- MouseGetPos MouseX, MouseY
- Loop %ClickCount%{
- BlockInput, On
- MouseClick, Left, %ImageX%, %ImageY%, 1, 0, D
- TimedSleep(.1)
- MouseClick, Left, %ImageX%, %ImageY%, 1, 0, U
- }
- MouseMove %MouseX%, %MouseY%, 0
- BlockInput, Off
- }
Advertisement
Add Comment
Please, Sign In to add comment