Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma compile(inputboxres, true)
- #include <Constants.au3>
- #cs ----------------------------------------------------------------------------
- AutoIt Version: 3.3.14.5
- Author: myName
- Script Function:
- Template AutoIt script.
- #ce ----------------------------------------------------------------------------
- ; Set the Escape hotkey to terminate the script.
- HotKeySet("{ESC}", "_Terminate")
- Monsterfight()
- Func Monsterfight()
- Local $sMonster2fight
- Local $sMonster_name
- $sMonster2fight = InputBox("Monster", "Which Monster you want to fight", "Skeleton")
- ;Click on Fight so search a new enemy
- ;Move the Mouse over the Button "Find Battle"
- ;MouseMove ( 300, 210,10 )
- While 1
- MouseClick($MOUSE_CLICK_Primary,290,210,1,1 ) ;Click the Button at x=300 y=200 1 times and move it with speed 1
- Sleep(75) ; wait some time for the GUI to update
- MouseClick($Mouse_Click_Primary,290 , 312, 3, 1) ;Tripple-click on the monsters name to select complete label
- Send("^c") ;Copy the monster name to clipboard
- $sMonster_name = ClipGet() ;Copy clipboard to variable
- If $sMonster_name == $sMonster2fight Then ;If Monster is the desired one then
- MouseClick($MOUSE_CLICK_Primary,290,410,1,1 ) ;Fight him
- Sleep(900)
- ElseIf StringInStr($sMonster_name, $sMonster2fight, 1)>0 Then
- MouseClick($MOUSE_CLICK_Primary,290,410,1,1 ) ;Fight him
- Sleep(900)
- EndIf
- WEnd ;Loop
- EndFunc ;==>Monsterfight
- Func _Terminate()
- Exit
- EndFunc ;==>_Terminate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement