Advertisement
lazyy

Untitled

Jun 27th, 2018
8,685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 KB | None | 0 0
  1. #include <IE.au3>
  2. #include <ButtonConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <WindowsConstants.au3>
  5. #include <ComboConstants.au3>
  6. #include <Array.au3>
  7. #include <MsgBoxConstants.au3>
  8. #include <ButtonConstants.au3>
  9. #include <EditConstants.au3>
  10. #include <GUIConstantsEx.au3>
  11. #include <StaticConstants.au3>
  12. #include <WindowsConstants.au3>
  13. Opt("GUIOnEventMode", 1)
  14. #Region ### START Koda GUI section ### Form=
  15. $Form1 = GUICreate("Pokemon-vortex Bot by Rivaldo", 413, 245, 377, 159)
  16. GUISetIcon("favicon.ico")
  17. GUISetOnEvent($GUI_EVENT_CLOSE, "_Close")
  18. GUICtrlSetOnEvent(-1,"_Close")
  19. $Input1 = GUICtrlCreateInput("", 104, 40, 121, 21)
  20. $Input2 = GUICtrlCreateInput("", 104, 80, 121, 21)
  21. $Start = GUICtrlCreateButton("Start Catcher", 32, 120, 75, 25, $WS_GROUP)
  22. GUICtrlSetOnEvent(-1,"Start")
  23. $Startfight = GUICtrlCreateButton("Start Fighter", 120, 120, 75, 25, $WS_GROUP)
  24. GUICtrlSetOnEvent(-1,"Startfight")
  25. $Naam = GUICtrlCreateLabel("Naam", 64, 40, 32, 17)
  26. $Wachtwoord = GUICtrlCreateLabel("Wachtwoord", 32, 80, 65, 17)
  27. $Hiding = GUICtrlCreateCheckbox("Hide internet explorer?", 96, 168, 129, 17)
  28. GUICtrlSetOnEvent(-1,"Hiding")
  29. GUISetState(@SW_SHOW)
  30. #EndRegion ### END Koda GUI section ###
  31. ;------------------------------------------------------------------------------------------
  32. Global $oIE =_IECreate ("https://www.pokemon-vortex.com/login/")
  33. 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"]
  34.  
  35. While 1
  36. Sleep(1)
  37. WEnd
  38.  
  39.  
  40. func _sleep()
  41. sleep(5000)
  42. EndFunc
  43.  
  44. Func Start()
  45. GUICtrlSetState($Input1,$GUI_DISABLE)
  46. GUICtrlSetState($Input2,$GUI_DISABLE)
  47. GUICtrlSetState($Start,$GUI_DISABLE)
  48. GUICtrlSetState($Startfight,$GUI_DISABLE)
  49. Call("a")
  50. EndFunc
  51.  
  52. Func Startfight()
  53. GUICtrlSetState($Input1,$GUI_DISABLE)
  54. GUICtrlSetState($Input2,$GUI_DISABLE)
  55. GUICtrlSetState($Start,$GUI_DISABLE)
  56. GUICtrlSetState($Startfight,$GUI_DISABLE)
  57. Call("b")
  58. EndFunc
  59.  
  60. Func Hiding()
  61. if GUICtrlRead($Hiding) = $GUI_CHECKED Then
  62. $oIE.visible = False
  63. Else
  64. $oIE.visible = True
  65. EndIf
  66. EndFunc
  67.  
  68. func b ()
  69. trainlogin()
  70. AdlibRegister("findfightmove", 1)
  71. EndFunc
  72.  
  73.  
  74. Func a ()
  75. login()
  76. AdlibRegister("move")
  77. EndFunc
  78.  
  79. func train()
  80. _IELoadWait($oIE)
  81. clickobjbyclass($oIE, "button-maroon button-small")
  82. _IELoadWait($oIE)
  83. Sleep(400)
  84. clickobjbyclass($oIE, "button-maroon button-small")
  85. _IELoadWait($oIE)
  86. Sleep(400)
  87. Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
  88. _IEFormSubmit($oForm)
  89. _IELoadWait($oIE)
  90. Sleep(40)
  91. Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
  92. _IEFormSubmit($oForm)
  93. _IELoadWait($oIE)
  94. Sleep(40)
  95. Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
  96. _IEFormSubmit($oForm)
  97. _IELoadWait($oIE)
  98. Sleep(40)
  99. Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
  100. _IEFormSubmit($oForm)
  101. _IELoadWait($oIE)
  102. Sleep(40)
  103. Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
  104. _IEFormSubmit($oForm)
  105. _IELoadWait($oIE)
  106. Sleep(40)
  107. Local $oForm = _IEFormGetObjByName($oIE, "battleForm")
  108. _IEFormSubmit($oForm)
  109. _IELoadWait($oIE)
  110. trainlogin()
  111. EndFunc
  112.  
  113. func searchFight()
  114. Local $sText = _IEBodyReadText($oIE)
  115. if StringInStr($sText, "No wild Pokémon appeared") Then
  116. ElseIf StringInStr($sText, "searching") Then
  117. Sleep(500)
  118. searchPokemons()
  119. Else
  120. For $i = 0 to UBound($legendarray) -1
  121. Local $sText = _IEBodyReadText($oIE)
  122. ;If StringInStr($sText, "Wild " & $legendarray[$i]) Then
  123. If StringInStr($sText, "Wild ") Then
  124. train()
  125. EndIf
  126. Next
  127. EndIf
  128.  
  129. EndFunc
  130.  
  131. func searchPokemons()
  132. Local $sText = _IEBodyReadText($oIE)
  133. if StringInStr($sText, "No wild Pokémon appeared") Then
  134. ElseIf StringInStr($sText, "searching") Then
  135. Sleep(500)
  136. searchPokemons()
  137. Else
  138. For $i = 0 to UBound($legendarray) -1
  139. Local $sText = _IEBodyReadText($oIE)
  140. If StringInStr($sText, "Wild " & $legendarray[$i]) Then
  141. ; If StringInStr($sText, "Wild ") Then
  142. ; MsgBox(0,"","w00t")
  143. catch()
  144. EndIf
  145. Next
  146. EndIf
  147.  
  148. EndFunc
  149.  
  150. func findfightmove()
  151. searchFight()
  152. _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowleft.gif", "src")
  153. _IELoadWait($oIE)
  154. searchFight()
  155. _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowright.gif", "src")
  156. _IELoadWait($oIE)
  157. searchFight()
  158. EndFunc
  159.  
  160.  
  161. Func move()
  162. searchPokemons()
  163. _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowleft.gif", "src")
  164. _IELoadWait($oIE)
  165. searchPokemons()
  166. _IEImgClick($oIE, "https://static.pokemon-vortex.com/v4/images/maps/arrows/arrowright.gif", "src")
  167. _IELoadWait($oIE)
  168. searchPokemons()
  169. EndFunc
  170.  
  171. Func catch()
  172. _IELoadWait($oIE)
  173. clickobjbyclass($oIE, "button-maroon button-small")
  174. _IELoadWait($oIE)
  175. Sleep(400)
  176. clickobjbyclass($oIE, "button-maroon button-small")
  177. _IELoadWait($oIE)
  178. Sleep(400)
  179. $oBtn = _IEGetObjById($oIE, "item12")
  180. _IEAction($oBtn, "click")
  181. _IELoadWait($oIE)
  182. Sleep(400)
  183. $oBtn1 = _IEGetObjByName($oIE, "items")
  184. _IEAction($oBtn1, "click")
  185. _IELoadWait($oIE)
  186. Sleep(400)
  187. Local $oForm = _IEFormGetObjByName($oIE, "itemForm")
  188. _IEFormSubmit($oForm)
  189. _IELoadWait($oIE)
  190. login()
  191. EndFunc
  192.  
  193. Func clickobjbyclass(ByRef $oIE, $class)
  194. $tags = $oIE.document.GetElementsByTagName('input')
  195. For $tag In $tags
  196. $class = $tag.GetAttribute('class')
  197. If String($class) = $class Then
  198. Return _IEAction($tag, 'click')
  199. EndIf
  200. Next
  201. Return False
  202. EndFunc
  203.  
  204. Func _Close()
  205. GUIDelete()
  206. Exit
  207. EndFunc
  208.  
  209. Func login()
  210.  
  211. local $username = _IEGetObjByName ($oIE, "myusername")
  212. Local $password = _IEGetObjByName ($oIE, "mypassword")
  213. Local $Signin_button = _IEGetObjByName ($oIE,"submit")
  214.  
  215. _IEFormElementSetValue ($username, "stacyb2")
  216. _IEFormElementSetValue ($password, "rivaldo")
  217. _IEAction ($Signin_button, "click")
  218. _IELoadWait($oIE)
  219. _IENavigate($oIE, "https://theta.pokemon-vortex.com/map/1")
  220. _IELoadWait($oIE)
  221. Local $sText = _IEBodyReadText($oIE)
  222. if StringInStr($sText, "session") Then
  223. local $username = _IEGetObjByName ($oIE, "myusername")
  224. Local $password = _IEGetObjByName ($oIE, "mypassword")
  225. Local $Signin_button = _IEGetObjByName ($oIE,"submit")
  226. _IENavigate($oIE, "https://zeta.pokemon-vortex.com/map/1")
  227. _IELoadWait($oIE)
  228. EndIf
  229. EndFunc
  230.  
  231. Func trainlogin()
  232.  
  233. local $username = _IEGetObjByName ($oIE, "myusername")
  234. Local $password = _IEGetObjByName ($oIE, "mypassword")
  235. Local $Signin_button = _IEGetObjByName ($oIE,"submit")
  236.  
  237. _IEFormElementSetValue ($username, "stacyb2")
  238. _IEFormElementSetValue ($password, "rivaldo")
  239. _IEAction ($Signin_button, "click")
  240. _IELoadWait($oIE)
  241. _IENavigate($oIE, "https://theta.pokemon-vortex.com/map/1")
  242. _IELoadWait($oIE)
  243. Local $sText = _IEBodyReadText($oIE)
  244. if StringInStr($sText, "session") Then
  245. local $username = _IEGetObjByName ($oIE, "myusername")
  246. Local $password = _IEGetObjByName ($oIE, "mypassword")
  247. Local $Signin_button = _IEGetObjByName ($oIE,"submit")
  248. _IENavigate($oIE, "https://zeta.pokemon-vortex.com/map/1")
  249. _IELoadWait($oIE)
  250. EndIf
  251. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement