$bot = 0
HotKeySet("F11","start") ; F11 to start bot
HotKeySet("F12","stop") ; F12 to pause bot
while $bot = 1
call("detect")
WEnd
func start()
if $bot = 0 Then
$bot =1
EndIf
EndFunc
func stop()
if $bot = 1 Then
$bot =0
EndIf
EndFunc
func detect() ; detect monsters
while $bot = 1
if PixelGetColor(95,53)=0x282861 Then ; if your hp is below 50%
call("rest")
Else
send("{F9}") ; insert buffs here
send("{F10}")
send("{!f}")
if PixelGetColor(657,128)=0xFF718D Then ; if monster is selected
call("attack") ; begins battle sequence
EndIf
EndIf
WEnd
EndFunc
func attack() ; in battle with good hp
while $bot = 1
if PixelGetColor(682,128)=0x80525C Then ; monster hp is 0
sleep(15000)
call("pickup")
EndIf
if PixelGetColor(95,53)=0x282861 Then ; if your hp is below 50%
call("attack2")
EndIf
WEnd
EndFunc
func pickup()
while $bot = 1
send("{F3}") ; F3 for pickup items
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
call("detect") ; goes back to detecting monsters
WEnd
EndFunc
func rest() ; rests till hp fully recovered or attacked by monsters
while $bot = 1
send("{F4}") ; F4 for sit down
sleep(100)
send("{!f}") ; tries to detect if you are getting attacked by monsters
if PixelGetColor(657,128)=0xFF718D Then ; if monster is selected
call("attack")
EndIf
if PixelGetColor(117,53)=0xEABAC6 Then ; if your hp is fully recovered
sleep(10000)
send("{F5}") ; F5 for stand up
call("detect")
EndIf
WEnd
EndFunc
func attack2() ; in battle while having low hp
while $bot = 1
send("{F1}") ; all emergancy skills or potions here
rest(100)
send("{F2}")
rest(100)
if PixelGetColor(682,128)=0x80525C Then ; monster hp is 0
sleep(15000)
call("pickup")
EndIf
WEnd
EndFunc
HotKeySet("F11","start") ; F11 to start bot
HotKeySet("F12","stop") ; F12 to pause bot
while $bot = 1
call("detect")
WEnd
func start()
if $bot = 0 Then
$bot =1
EndIf
EndFunc
func stop()
if $bot = 1 Then
$bot =0
EndIf
EndFunc
func detect() ; detect monsters
while $bot = 1
if PixelGetColor(95,53)=0x282861 Then ; if your hp is below 50%
call("rest")
Else
send("{F9}") ; insert buffs here
send("{F10}")
send("{!f}")
if PixelGetColor(657,128)=0xFF718D Then ; if monster is selected
call("attack") ; begins battle sequence
EndIf
EndIf
WEnd
EndFunc
func attack() ; in battle with good hp
while $bot = 1
if PixelGetColor(682,128)=0x80525C Then ; monster hp is 0
sleep(15000)
call("pickup")
EndIf
if PixelGetColor(95,53)=0x282861 Then ; if your hp is below 50%
call("attack2")
EndIf
WEnd
EndFunc
func pickup()
while $bot = 1
send("{F3}") ; F3 for pickup items
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
send("{F3}")
sleep(100)
call("detect") ; goes back to detecting monsters
WEnd
EndFunc
func rest() ; rests till hp fully recovered or attacked by monsters
while $bot = 1
send("{F4}") ; F4 for sit down
sleep(100)
send("{!f}") ; tries to detect if you are getting attacked by monsters
if PixelGetColor(657,128)=0xFF718D Then ; if monster is selected
call("attack")
EndIf
if PixelGetColor(117,53)=0xEABAC6 Then ; if your hp is fully recovered
sleep(10000)
send("{F5}") ; F5 for stand up
call("detect")
EndIf
WEnd
EndFunc
func attack2() ; in battle while having low hp
while $bot = 1
send("{F1}") ; all emergancy skills or potions here
rest(100)
send("{F2}")
rest(100)
if PixelGetColor(682,128)=0x80525C Then ; monster hp is 0
sleep(15000)
call("pickup")
EndIf
WEnd
EndFunc






