setvar(%lastserver,32)
setvar(%idlecount,0)
@main:
setvarcurrentstat(%hp,3)
gotoifnum1belownum2(@eat,%hp,55)
gotoifcoordsin(@checknpc,415,3469,420,3464)
walknowait(417,3466)
wait(200)
goto(@main)

@checknpc:
gotoifnpcnear(@shoot,45)
//addvar(%idlecount,1) //uncomment for serverhopping
//debugrs(%idlecount)
//gotoifnum1abovenum2(@hop,%idlecount,30)
wait(100)
goto(@main)

@shoot:
fightmode(3)
magenearestnpc(45,19)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleep,%f,99)
setvar(%idlecount,0)
wait(500)
goto(@main)

@sleep:
wait(2000)
useitembyid(1263)
wait(2000)
waitforwakeup(28000)
gotoifsleeping(@sleep)
goto(@main)

@hop:
gotoifnum1equalnum2(@32,%lastserver,34)
gotoifnum1equalnum2(@34,%lastserver,32)
goto(@main)

@32:
setvar(%idlecount,0)
setvar(%lastserver,32)
//switchserver cant be a variable
switchserver(32)
goto(@main)

@34:
setvar(%idlecount,0)
setvar(%lastserver,34)
switchserver(34)
goto(@main)

@eat:
setvarinvcountbyid(%cooked,373)
gotoifnum1abovenum2(@eat2,%cooked,0)
stopandlogout()
@eat2:
setvarmyx(%x)
setvarmyy(%y)
walknowait(%x,%y)
wait(100)
gotoiffighting(@eat2)
@eat2:
useitembyid(373)
wait(2000)
goto(@main)