@main:
gotoifbagfull(@bury)
setvarcurrentstat(%hp,3)
gotoifnum1belownum2(@eat,%hp,35)
gotoiffighting(@reattackc)
gotoifnpcnear(@attack,43)
wait(200)
goto(@main)

@reattackc:
setvarfatigue(%f)
gotoifnum1abovenum2(@sleep,%f,99)
setvarmyx(%x)
setvarmyy(%y)
walknowait(%x,%y)
wait(300)
attacknearestnpcincombat(43)
wait(300)
gotoiffighting(@reattack)
goto(@main)

@attack:
setvarfatigue(%f)
gotoifnum1abovenum2(@sleep,%f,99)
fightmode(2)
attacknearestnpc(43,false)
wait(200)
goto(@main)

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

@eat:
setvarmyx(%x)
setvarmyy(%y)
walknowait(%x,%y)
wait(100)
gotoiffighting(@eat)
@eat2:
eatanything()
wait(2000)
goto(@main)
