Advertisement
Guest User

Quepland Auto Fight

a guest
Aug 11th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.61 KB | None | 0 0
  1. #pragma compile(inputboxres, true)
  2. #include <Constants.au3>
  3.  
  4. #cs ----------------------------------------------------------------------------
  5.  
  6.  AutoIt Version: 3.3.14.5
  7.  Author:         myName
  8.  
  9.  Script Function:
  10.     Template AutoIt script.
  11.  
  12. #ce ----------------------------------------------------------------------------
  13.  
  14.  
  15. ; Set the Escape hotkey to terminate the script.
  16. HotKeySet("{ESC}", "_Terminate")
  17.  
  18. Monsterfight()
  19.  
  20. Func Monsterfight()
  21.    Local $sMonster2fight
  22.    Local $sMonster_name
  23.  
  24.    $sMonster2fight = InputBox("Monster", "Which Monster you want to fight", "Skeleton")
  25.  
  26.    ;Click on Fight so search a new enemy
  27.    ;Move the Mouse over the Button "Find Battle"
  28.    ;MouseMove ( 300, 210,10 )
  29.  
  30.    While 1
  31.       MouseClick($MOUSE_CLICK_Primary,290,210,1,1 )             ;Click the Button at x=300 y=200 1 times and move it with speed 1
  32.  
  33.       Sleep(75)                                                 ; wait some time for the GUI to update
  34.  
  35.       MouseClick($Mouse_Click_Primary,290 , 312, 3, 1)              ;Tripple-click on the monsters name to select complete label
  36.  
  37.       Send("^c")                                                    ;Copy the monster name to clipboard
  38.       $sMonster_name = ClipGet()                                    ;Copy clipboard to variable
  39.  
  40.       If $sMonster_name == $sMonster2fight Then                     ;If Monster is the desired one then
  41.          MouseClick($MOUSE_CLICK_Primary,290,410,1,1 )              ;Fight him
  42.          Sleep(900)
  43.       ElseIf StringInStr($sMonster_name, $sMonster2fight, 1)>0 Then
  44.          MouseClick($MOUSE_CLICK_Primary,290,410,1,1 )              ;Fight him
  45.          Sleep(900)
  46.       EndIf
  47.    WEnd                                                             ;Loop
  48. EndFunc                                                             ;==>Monsterfight
  49.  
  50.  
  51. Func _Terminate()
  52.     Exit
  53. EndFunc                                                             ;==>_Terminate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement