Advertisement
Guest User

Untitled

a guest
Jul 4th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.19 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <WindowsConstants.au3>
  5. #include <StaticConstants.au3>
  6. #include <ComboConstants.au3>
  7. #include <WinHttp.au3>
  8. #include <IE.au3>
  9. #include <GUIConstantsEx.au3>
  10. #include <GuiEdit.au3>
  11. #include <WinAPIFiles.au3>
  12. #include <ImageSearch2015.au3>
  13.  
  14. Opt('SendKeyDelay', Random (16,80)); default 5. higher number = slower
  15. Global $nameInfo = IniRead('Userinfo.ini', 'Name', 'Name', 'No username on file')
  16. Global $passInfo = IniRead('Userinfo.ini', 'Pass', 'Pass', 'No password on file')
  17. Global $slpMed = Random (2000, 2500)
  18. Global $slpLow = Random (100, 350)
  19.  
  20. ;Not in use ATM, will be used in future builds.
  21. Global $en = '....' ;Need to find out how to login through world #
  22. Global $mainUrl = 'https://' & $en & '.******'
  23. Global $testUrl = 'https://*********'
  24.  
  25. Main_GUI()
  26.  
  27. Func Main_GUI ()
  28. AutoItSetOption ("MouseCoordMode", 0)
  29. $EzTw = GUICreate("Ez Tw", 885, 513, -1, -1)
  30. GUISetBkColor(0xA0A0A0)
  31. $Username = GUICtrlCreateInput($nameInfo, 8, 32, 105, 21)
  32. GUICtrlSetBkColor(-1, 0xFFFFFF)
  33. $Password = GUICtrlCreateInput($passInfo, 120, 32, 105, 21)
  34. GUICtrlSetBkColor(-1, 0xFFFFFF)
  35. $LogBtn = GUICtrlCreateButton("Login", 24, 56, 75, 17)
  36. GUICtrlSetBkColor(-1, 0xFFFFFF)
  37. $UserT = GUICtrlCreateLabel("User name", 40, 8, 55, 17)
  38. $PassT = GUICtrlCreateLabel("Password", 144, 8, 50, 17)
  39. $SaveBtn = GUICtrlCreateButton("Save Info", 136, 56, 75, 17)
  40. GUICtrlSetBkColor(-1, 0xFFFFFF)
  41. $Group1 = GUICtrlCreateGroup("Group1", -16, -40, 257, 129)
  42. GUICtrlCreateGroup("", -99, -99, 1, 1)
  43. $Group2 = GUICtrlCreateGroup("Group2", 240, -16, 265, 105)
  44. $btnAxeLc = GUICtrlCreateButton("Axe/LC", 248, 32, 75, 17)
  45. $btnLcHc = GUICtrlCreateButton("Lc/Hc", 248, 8, 75, 17)
  46. $btnSpHc = GUICtrlCreateButton("Sp/Hc", 248, 56, 75, 17)
  47. $btnSwAc = GUICtrlCreateButton("Sw/Ac", 336, 8, 75, 17)
  48. $btnAxe = GUICtrlCreateButton("Axe Only", 336, 32, 75, 17)
  49. $btnSpear = GUICtrlCreateButton("Spear Only", 336, 56, 75, 17)
  50. $btnArcher = GUICtrlCreateButton("Archer Only", 424, 8, 75, 17)
  51. $btnSword = GUICtrlCreateButton("Sword Only", 424, 32, 75, 17)
  52. $btnMounted = GUICtrlCreateButton("MA Only", 424, 56, 75, 17)
  53. Global $ie = _IECreateEmbedded ()
  54. Global $inIW = GUICtrlCreateObj($ie, 10, 100, 865, 405)
  55. With $ie
  56. .navigate ("*******")
  57. EndWith
  58. GUISetState(@SW_SHOW)
  59.  
  60. While 1
  61. $nMsg = GUIGetMsg()
  62. Switch $nMsg
  63. Case $GUI_EVENT_CLOSE
  64. Exit
  65. Case $saveBtn
  66. $User = GUICtrlRead($Username)
  67. IniWrite("Userinfo.ini", "Name", "Name", $User)
  68. $Pass = GUICtrlRead ($Password)
  69. IniWrite("Userinfo.ini", "Pass", "Pass", $Pass)
  70. Case $logBtn
  71. $User = GUICtrlRead($Username)
  72. $Pass = GUICtrlRead ($Password)
  73. With $ie
  74. While ($ie.busy)
  75. WEnd
  76. Sleep ($slpLow)
  77. $txtUser = .document.getElementById('user')
  78. $txtUser.value = $User
  79. Sleep ($slpLow)
  80. $txtPass = .document.getElementById('password')
  81. $txtPass.value = $Pass
  82. Sleep ($slpLow)
  83. For $a In _IETagNameGetCollection($ie, "a")
  84. If StringInStr(_IEPropertyGet($a, "innerText"), "Login") Then
  85. $a.fireEvent("onmousedown")
  86. sleep ($slpLow)
  87. $a.fireEvent("onmouseup")
  88. _IEAction($a, "click")
  89. EndIf
  90. Next
  91. Sleep ($slpMed)
  92. EndWith
  93.  
  94. Case $btnAxeLc
  95. call ('AxeLcGUI')
  96.  
  97.  
  98.  
  99. Case $btnLcHc
  100.  
  101. Case $btnSpHc
  102.  
  103. Case $btnSwAc
  104.  
  105. Case $btnArcher
  106.  
  107. Case $btnAxe
  108.  
  109. Case $btnSpear
  110.  
  111. Case $btnSword
  112.  
  113. Case $btnMounted
  114.  
  115. EndSwitch
  116. WEnd
  117. EndFunc
  118.  
  119. Func AxeLcGUI ()
  120. $axeInfo = IniRead('Userinfo.ini', 'AxeLC', 'Axe', 'Not on file')
  121. $lcInfo = IniRead('Userinfo.ini', 'AxeLC', 'LC', 'Not on file')
  122. $LcForm = GUICreate("Axe / Lc", 315, 134, -1, -1)
  123. $AxNum = GUICtrlCreateInput($axeInfo, 32, 40, 73, 21)
  124. $AxNumT = GUICtrlCreateLabel("How Many Ax/run?", 24, 16, 96, 17)
  125. $LcNum = GUICtrlCreateInput($lcInfo, 176, 40, 73, 21)
  126. $LcNumT = GUICtrlCreateLabel("How many LC/run?", 168, 16, 96, 17)
  127. $LootAssist = GUICtrlCreateButton("Loot Assist", 32, 88, 75, 25)
  128. $btnSave = GUICtrlCreateButton("Save Info", 176, 88, 75, 25)
  129. GUISetState(@SW_SHOW)
  130. While 1
  131. $nMsg = GUIGetMsg()
  132. Switch $nMsg
  133. Case $GUI_EVENT_CLOSE
  134. GUIDelete(AxeLcGUI)
  135. ExitLoop
  136.  
  137. Case $btnSave
  138. Global $axeReal = GUICtrlRead($AxNum)
  139. IniWrite("Userinfo.ini", "AxeLC", "Axe", $axeReal)
  140. Global $lcReal = GUICtrlRead ($LcNum)
  141. IniWrite("Userinfo.ini", "AxeLC", "LC", $lcReal)
  142.  
  143. Case $LootAssist
  144. $axeReal = GUICtrlRead($AxNum)
  145. $lcReal = GUICtrlRead($LcNum)
  146. Call ("AxeLcFarm")
  147.  
  148.  
  149.  
  150.  
  151. EndSwitch
  152. WEnd
  153. EndFunc
  154.  
  155. Func AxeLCFarm ()
  156. With $ie
  157.  
  158. Local $oInputs = _IETagNameGetCollection($ie, "input")
  159. For $oInput In $oInputs
  160. If $oInput.name == "axe" Then
  161. $oInput.value = $axeReal
  162. EndIf
  163. Next
  164. Local $oInputs = _IETagNameGetCollection($ie, "input")
  165. For $oInput In $oInputs
  166. If $oInput.name == "light" Then
  167. $oInput.value = $lcReal
  168. EndIf
  169. Next
  170. EndWith
  171.  
  172. EndFunc
  173.  
  174. Func LootAssist ()
  175. With $ie
  176. Local $oInputs = _IETagNameGetCollection($ie, "a")
  177. For $oInput In $oInputs
  178. If $oInput.title == "Loot Assistant" Then
  179. $oInput.fireEvent("onmousedown")
  180. sleep ($slpLow)
  181. $oInput.fireEvent("onmouseup")
  182. _IEAction($oInput, "click")
  183. EndIf
  184. Next
  185. EndWith
  186. EndFunc
  187.  
  188. Func Farm ()
  189. WinActivate ('001')
  190. send ('A')
  191. Sleep (100)
  192. send ('A')
  193. Sleep (100)
  194. send ('A')
  195. Sleep (100)
  196. send ('A')
  197. Sleep (100)
  198. send ('A')
  199. Sleep (100)
  200. send ('A')
  201. Sleep (100)
  202. send ('A')
  203. Sleep (100)
  204. send ('A')
  205. Sleep (100)
  206. send ('A')
  207. EndFunc
  208.  
  209. Func Terminate()
  210. Exit 0
  211. EndFunc
  212.  
  213. If $aArray[0] = $GUI_EVENT_CLOSE And $aArray[1] = $EzTw Then
  214. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement