Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <IE.au3>
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #include <ComboConstants.au3>
- #include <Array.au3>
- #include <MsgBoxConstants.au3>
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- Opt("GUIOnEventMode", 1)
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("Pokemon-vortex Bot by Rivaldo", 413, 245, 377, 159)
- GUISetIcon("favicon.ico")
- GUISetOnEvent($GUI_EVENT_CLOSE, "_Close")
- GUICtrlSetOnEvent(-1,"_Close")
- $Input1 = GUICtrlCreateInput("", 104, 40, 121, 21)
- $Input2 = GUICtrlCreateInput("", 104, 80, 121, 21)
- $Start = GUICtrlCreateButton("Start Catcher", 32, 120, 75, 25, $WS_GROUP)
- GUICtrlSetOnEvent(-1,"Start")
- $Startfight = GUICtrlCreateButton("Start Fighter", 120, 120, 75, 25, $WS_GROUP)
- GUICtrlSetOnEvent(-1,"Startfight")
- $Naam = GUICtrlCreateLabel("Naam", 64, 40, 32, 17)
- $Wachtwoord = GUICtrlCreateLabel("Wachtwoord", 32, 80, 65, 17)
- $Hiding = GUICtrlCreateCheckbox("Hide internet explorer?", 96, 168, 129, 17)
- GUICtrlSetOnEvent(-1,"Hiding")
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- ;------------------------------------------------------------------------------------------
- Global $oIE =_IECreate ("https://www.pokemon-vortex.com/login/")
- Local $legendarray[48] = ["Shiny", "Arceus ","Articuno","Azelf","Celebi","Cobalion","Cresselia","Darkrai","Diancie","Deoxys ","Dialga","Entei","Giratina ","Groudon ","Heatran","Ho-Oh","Hoopa ","Jirachi","Keldeo ","Kyogre ","Kyurem ","Landorus ","Latias ","Latios ","Lugia","Meloetta","Mew","Mewtwo ","Moltres","Palkia","Raikou","Rayquaza ","Regice","Regigigas","Regirock","Registeel","Reshiram","Suicune","Terrakion","Thundurus ","Tornadus","Victini","Volcanion","Xerneas ","Yveltal","Zapdos","Zekrom","Zygarde"]
- While 1
- Sleep(1)
- WEnd
- func _sleep()
- sleep(5000)
- EndFunc
- Func Start()
- GUICtrlSetState($Input1,$GUI_DISABLE)
- GUICtrlSetState($Input2,$GUI_DISABLE)
- GUICtrlSetState($Start,$GUI_DISABLE)
- GUICtrlSetState($Startfight,$GUI_DISABLE)
- Call("a")
- EndFunc
- Func Startfight()
- GUICtrlSetState($Input1,$GUI_DISABLE)
- GUICtrlSetState($Input2,$GUI_DISABLE)
- GUICtrlSetState($Start,$GUI_DISABLE)
- GUICtrlSetState($Startfight,$GUI_DISABLE)
- Call("b")
- EndFunc
- Func Hiding()
- if GUICtrlRead($Hiding) = $GUI_CHECKED Then
- $oIE.visible = False
- Else
- $oIE.visible = True
- EndIf
- EndFunc
- func b ()
- trainlogin()
- AdlibRegister("findfightmove", 1)
- EndFunc
- Func a ()
- login()
- AdlibRegister("move")
- EndFunc
- func train()
- _IELoadWait($oIE)
- clickobjbyclass($oIE, "button-maroon button-small")
- _IELoadWait($oIE)
- Sleep(400)
- clickobjbyclass($oIE, "button-maroon button-small")
- _IELoadWait($oIE)
- Sleep(400)
- Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
- _IEFormSubmit($oForm)
- _IELoadWait($oIE)
- Sleep(40)
- Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
- _IEFormSubmit($oForm)
- _IELoadWait($oIE)
- Sleep(40)
- Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
- _IEFormSubmit($oForm)
- _IELoadWait($oIE)
- Sleep(40)
- Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
- _IEFormSubmit($oForm)
- _IELoadWait($oIE)
- Sleep(40)
- Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
- _IEFormSubmit($oForm)
- _IELoadWait($oIE)
- Sleep(40)
- Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
- _IEFormSubmit($oForm)
- _IELoadWait($oIE)
- trainlogin()
- EndFunc
- func searchFight()
- Local $sText = _IEBodyReadText($oIE)
- if StringInStr($sText, "No wild Pokémon appeared") Then
- ElseIf StringInStr($sText, "searching") Then
- Sleep(500)
- searchPokemons()
- Else
- For $i = 0 to UBound($legendarray) -1
- Local $sText = _IEBodyReadText($oIE)
- ;If StringInStr($sText, "Wild " & $legendarray[$i]) Then
- If StringInStr($sText, "Wild ") Then
- train()
- EndIf
- Next
- EndIf
- EndFunc
- func searchPokemons()
- Local $sText = _IEBodyReadText($oIE)
- if StringInStr($sText, "No wild Pokémon appeared") Then
- ElseIf StringInStr($sText, "searching") Then
- Sleep(500)
- searchPokemons()
- Else
- For $i = 0 to UBound($legendarray) -1
- Local $sText = _IEBodyReadText($oIE)
- If StringInStr($sText, "Wild " & $legendarray[$i]) Then
- ; If StringInStr($sText, "Wild ") Then
- ; MsgBox(0,"","w00t")
- catch()
- EndIf
- Next
- EndIf
- EndFunc
- func findfightmove()
- searchFight()
- _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowleft.gif", "src")
- _IELoadWait($oIE)
- searchFight()
- _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowright.gif", "src")
- _IELoadWait($oIE)
- searchFight()
- EndFunc
- Func move()
- searchPokemons()
- _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowleft.gif", "src")
- _IELoadWait($oIE)
- searchPokemons()
- _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowright.gif", "src")
- _IELoadWait($oIE)
- searchPokemons()
- EndFunc
- Func catch()
- _IELoadWait($oIE)
- clickobjbyclass($oIE, "button-maroon button-small")
- _IELoadWait($oIE)
- Sleep(400)
- clickobjbyclass($oIE, "button-maroon button-small")
- _IELoadWait($oIE)
- Sleep(400)
- $oBtn = _IEGetObjById($oIE, "item12")
- _IEAction($oBtn, "click")
- _IELoadWait($oIE)
- Sleep(400)
- $oBtn1 = _IEGetObjByName($oIE, "items")
- _IEAction($oBtn1, "click")
- _IELoadWait($oIE)
- Sleep(400)
- Local $oForm = _IEFormGetObjByName($oIE, "itemForm")
- _IEFormSubmit($oForm)
- _IELoadWait($oIE)
- login()
- EndFunc
- Func clickobjbyclass(ByRef $oIE, $class)
- $tags = $oIE.document.GetElementsByTagName('input')
- For $tag In $tags
- $class = $tag.GetAttribute('class')
- If String($class) = $class Then
- Return _IEAction($tag, 'click')
- EndIf
- Next
- Return False
- EndFunc
- Func _Close()
- GUIDelete()
- Exit
- EndFunc
- Func login()
- local $username = _IEGetObjByName ($oIE, "myusername")
- Local $password = _IEGetObjByName ($oIE, "mypassword")
- Local $Signin_button = _IEGetObjByName ($oIE,"submit")
- _IEFormElementSetValue ($username, "stacyb2")
- _IEFormElementSetValue ($password, "rivaldo")
- _IEAction ($Signin_button, "click")
- _IELoadWait($oIE)
- _IENavigate($oIE, "https://theta.pokemon-vortex.com/map/1")
- _IELoadWait($oIE)
- Local $sText = _IEBodyReadText($oIE)
- if StringInStr($sText, "session") Then
- local $username = _IEGetObjByName ($oIE, "myusername")
- Local $password = _IEGetObjByName ($oIE, "mypassword")
- Local $Signin_button = _IEGetObjByName ($oIE,"submit")
- _IENavigate($oIE, "https://zeta.pokemon-vortex.com/map/1")
- _IELoadWait($oIE)
- EndIf
- EndFunc
- Func trainlogin()
- local $username = _IEGetObjByName ($oIE, "myusername")
- Local $password = _IEGetObjByName ($oIE, "mypassword")
- Local $Signin_button = _IEGetObjByName ($oIE,"submit")
- _IEFormElementSetValue ($username, "stacyb2")
- _IEFormElementSetValue ($password, "rivaldo")
- _IEAction ($Signin_button, "click")
- _IELoadWait($oIE)
- _IENavigate($oIE, "https://theta.pokemon-vortex.com/map/1")
- _IELoadWait($oIE)
- Local $sText = _IEBodyReadText($oIE)
- if StringInStr($sText, "session") Then
- local $username = _IEGetObjByName ($oIE, "myusername")
- Local $password = _IEGetObjByName ($oIE, "mypassword")
- Local $Signin_button = _IEGetObjByName ($oIE,"submit")
- _IENavigate($oIE, "https://zeta.pokemon-vortex.com/map/1")
- _IELoadWait($oIE)
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement