Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;====================================================================================================
- ;====================================================================================================
- ;==========================Shiny Hunter Bot for Pokemon FireRed======================================
- ;===============================Written and tested by Kyle===========================================
- ;=====================Fixed the problem with saving at the wrong screen==============================
- ;====================================Version 3.0.3===================================================
- ;====================================================================================================
- ;====================================================================================================
- Global $UnPaused
- Global $Paused
- HotKeySet("{Home}", "TogglePause")
- HotKeySet("{End}", "Terminate")
- HotKeySet("{Pause}", "Paused")
- AutoItWinSetTitle("SHunter") ;Set title of bot
- Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client
- Opt("PixelCoordMode", 0) ;1=absolute, 0=relative, 2=client
- Opt("WinTitleMatchMode",2) ;1=absolute, 0=relative, 2=client
- Opt("SendKeyDownDelay", 50) ;Set down delay to 50 miliseconds
- $d = "{a DOWN} {s DOWN} {x DOWN} {z DOWN}"
- $u = "{a DOWN} {s UP} {x UP} {z UP}"
- $n = 0 ;Reset counter
- $count = 0 ;Male shiny counter
- $pos = WinGetPos("VisualBoyAdvance")
- If $pos[0] <> 0 and $pos[1] <> 0 Then
- WinMove("VisualBoyAdvance","",0,0)
- Sleep(100)
- EndIf
- While 1
- Sleep(100)
- ToolTip("Bot is Paused",0,0)
- WEnd
- Func Paused()
- $Paused = NOT $Paused
- While $Paused
- Sleep(100)
- ToolTip("Bot is Paused",0,0)
- WEnd
- EndFunc
- Func TogglePause()
- $UnPaused = NOT $UnPaused
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Bot started....",0,0)
- Sleep(100)
- While $UnPaused
- Select
- Case PixelGetColor(720,60) = 0xA0D058 ;Green Ruby/Sapphire Screen
- ToolTip("Something messed up and I got the Ruby/Sapphire Screen",0,0)
- Send($d)
- Sleep(10)
- Send($u)
- Sleep(1000)
- Send("{x}")
- Sleep(1000)
- Case PixelGetColor(670,175) = 0x182848 ;or 0xF89000 ;Blue/Orange screen at restart
- ToolTip("Blue/Orange Screen at restart",0,0)
- Send("{x}")
- Sleep(1000)
- Case PixelGetColor(650,325) = 0x885890 ;or 0x804078 ;Pokemon Fight Scene
- ToolTip("Pokemon Fight Sceen",0,0)
- Send("{x}")
- Sleep(1000)
- Case PixelGetColor(690,160) = 0x408860 ;Trees color
- ToolTip("Trees",0,0)
- Send("{x}")
- Sleep(1000)
- EndSelect
- $s = 0
- $p = 0
- $r = 0
- Do
- $start = PixelGetColor(650,230) ;Checking to see if it's the start screen
- If $start = 0x400000 Then
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Press Start Screen",0,0)
- Send("{x}")
- Sleep(750)
- Else
- $s = 1
- EndIf
- $s = 1
- Until $s = 1
- Do
- $profile = PixelGetColor(400,500) ;Coordinates of the Profile select screen
- If $profile = 0x505890 Then
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Select Profile Screen",0,0)
- Send("{x}")
- Sleep(250)
- Else
- $p = 1
- EndIf
- $p = 1
- Until $p = 1
- If $s+$p >= 2 Then
- Send("{z}") ;Exiting Journal
- Sleep(500)
- $b = PIxelGetColor(373,244) ;Color of the pokeball on the table
- If $b = 0x903828 Then
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Pokeball found! selecting Charmander.",0,0)
- Send("{x}") ;Select Pokemon
- Sleep(500)
- Send("{x}") ;Get past message
- Sleep(500)
- Send("{x}") ;Confirm
- Sleep(750)
- Send("{z}") ;Get past message
- Sleep(1000)
- Send("{z}") ;No
- Sleep(1500)
- Send("{z}") ;Gary's message
- Sleep(850)
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Checking Charmander....",0,0)
- Send("{s}") ;Open Menu
- Sleep(400)
- Send("{x}") ;Select "Pokemon"
- Sleep(400)
- Send("{x}") ;Select Charmander
- Sleep(400)
- Send("{x}") ;Summary
- Sleep(400)
- Elseif $b = 0x88C088 Then ;Color of the table with no ball
- Send("{z 10}")
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Checking Charmander....",0,0)
- Sleep(100)
- Send("{s}") ;Open Menu
- Sleep(500)
- Send("{x}") ;Select "Pokemon"
- Sleep(500)
- Send("{x}") ;Select Charmander
- Sleep(500)
- Send("{x}") ;Summary
- Sleep(500)
- EndIf
- EndIf
- $shiny = PixelGetColor(200,240) ;Regular charmander color
- $female = PixelGetColor(330, 130) ;Female color
- If $shiny = 0xD8A008 Then ;Shiny Charmander
- $count = $count + 1
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Shiny Charmander Found, checking sex",0,0)
- If $female = 0xF8B870 Then ;Female Gender Color
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Shiny Female Charmander Found!",0,0)
- Sleep(500)
- Send("{z}") ;Exiting Summary
- Sleep(750)
- Send("{z}") ;Exiting Pokemon Menu
- Sleep(750)
- Send("{z}") ;Exiting Pokemon
- Sleep(750)
- Send("{DOWN}") ;Moving to Save feature
- Sleep(250)
- Send("{DOWN}") ;Moving to Save feature
- Sleep(250)
- Send("{DOWN}") ;Moving to Save feature
- Sleep(250)
- Send("{x}") ;Selecting save
- Sleep(750)
- Send("{x}") ;Yes
- Sleep(750)
- Send("{x}") ;Yes
- Sleep(6500) ;Waiting while saving
- ;WinActivate("Notepad")
- ;WinWaitActive("Notepad")
- Send("{LShift DOWN}")
- Send("{F1}")
- Send("{LShift UP}")
- Sleep(1000)
- MsgBox(0,"Shiny Hunter Bot","Congrats Kyle you got yourself a Shiny Female Charmander after: " & $n & " resets and " & $count & " Male Shiny Charmanders.")
- ;Send("Congrats Kyle you got yourself a shiny Female Charmander!")
- ExitLoop
- Else
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Shiny Male Charmander :(",0,0)
- If $count = 1 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F2}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- ElseIf $count = 2 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F3}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- ElseIf $count = 3 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F4}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- ElseIf $count = 4 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F5}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- Elseif $count = 5 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F6}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- Elseif $count = 6 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F7}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- Elseif $count = 7 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F8}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- Elseif $count = 8 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F9}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- Elseif $count = 9 Then
- Send("{LShift DOWN}")
- Sleep(10)
- Send("{F10}")
- Sleep(10)
- Send("{LShift UP}")
- Sleep(250)
- EndIf
- Sleep(500)
- $n = $n + 1
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Restarting",0,0)
- Send($d)
- Sleep(10)
- Send($u)
- Sleep(100)
- $s = 0
- $p = 0
- Sleep(100)
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Skipping Intro",0,0)
- Sleep(250)
- Send("{x}")
- Sleep(750)
- EndIf
- ElseIf $shiny = 0xD84848 Then ;Not Shiny
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Not a shiny Charmander :(",0,0)
- Sleep(500)
- $n = $n + 1
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Restarting",0,0)
- Send($d)
- Sleep(10)
- Send($u)
- Sleep(100)
- $s = 0
- $p = 0
- Sleep(100)
- ToolTip("Resets: " & $n & " | Shiny Males: " & $count & " Skipping Intro",0,0)
- Sleep(250)
- Send("{x}")
- Sleep(750)
- EndIf
- WEnd
- EndFunc
- Func Terminate()
- Exit 0
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement