Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ImageSearch.au3>
- #include <lib.au3>
- ; --- Stamina Check ---
- Dim $x
- Dim $y
- $read_stam = IniRead("user.ini", "colors","stam_color", "1")
- If $read_stam = 1 Then
- WinWaitActive("Darkfall Online")
- Sleep(3000)
- $mystam = _ImageSearch("images\stambar.bmp", 1, $x, $y, 35)
- Sleep(250)
- if $mystam = 0 then
- ToolTip("failed")
- Else
- tooltip("success")
- EndIf
- $stam_color = PixelGetColor($x-45, $y)
- IniWrite("user.ini", "colors", "stam_color", $stam_color)
- EndIf
- ; --- Harvesting ---
- HotKeySet ("{ESC}", "_Exit")
- $num = 1
- $switch = InputBox( "Tools", "How many tools do you have? (starting on slot #1 to slot #5)", 1 )
- Sleep(100)
- ;$shutoff = MsgBox ( 4, "Shutdown", "After the script is over, would you like your computer to shutdown?" )
- Sleep(100)
- WinWaitActive("Darkfall Online")
- Sleep(1000)
- While 1
- Harvest()
- WEnd
- Func Harvest()
- $read_stam = IniRead("user.ini", "colors","stam_color", "1")
- Do
- $stam_color = PixelGetColor($x-45, $y)
- WinWaitActive("Darkfall Online")
- MouseClick("left")
- Sleep(1500)
- Until $read_stam <> $stam_color
- _hStop()
- _imgRest()
- _SwitchSlot($switch)
- _face()
- $num += 1
- ;If $num > $switch * 4 And $shutoff = 6 Then Shutdown(1)
- EndFunc
- Func _hStop()
- WinWaitActive("Darkfall Online")
- Send("{c down}")
- sleep(1200)
- Send("{c up}")
- sleep(500)
- EndFunc
- Func _face()
- WinWaitActive("Darkfall Online")
- Send("{down down}")
- sleep(750)
- Send("{down up}")
- sleep(500)
- EndFunc
- Func _imgRest()
- Sleep(500)
- Send("r") ; sheathe
- Sleep(1200)
- Send("6") ; rest hotkey
- Sleep(2200)
- MouseClick("left")
- Do
- sleep(1000)
- $mystam = _ImageSearch("images\stambar.bmp", 1, $x, $y, 35)
- Sleep(250)
- Until $mystam = 1
- Send("{Space}")
- Sleep(2000)
- Send("r") ; unsheathe
- Sleep(1500)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement