@fish:
setvarfatigue(%f)
gotoifnum1abovenum2(@sleepfish,%f,99)
objcmd1(311,686)
wait(350)
gotoifbagfull(@checkfire)
goto(@fish)

@checkfire:
gotoifobjectwithindist(@cook,97,3)
goto(@cut)

@cut:
setvarsnearestobject(%x,%y,1)
gotoifcountininventorygreater(@cut2,0,349)
gotoifcountininventorygreater(@cut2,0,351)
goto(@fish)
@cut2:
gotoifcountininventorygreater(@droplogs,0,14)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleepcut,%f,95)
objcmd1(%x,%y)
wait(1000)
gotoifitemwithindistname(@fire,logs,2)
goto(@cut2)

@fire:
setvarsnearestitem(%x,%y,14)
useitemwithgrounditem(%x,%y,14,4)
wait(1000)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleepfire,%f,95)
gotoifcountininventorygreater(@droplogs,0,14)
gotoifobjectwithindist(@cook1,97,3)
goto(@fire)

@cook1:
gotoifcountininventorygreater(@cookan,0,351)
gotoifcountininventorygreater(@cooksh,0,349)
goto(@eat)

@cookan:
setvarsnearestobject(%x,%y,97)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleepcook,%f,98)
useitemwithobject(%x,%y,351)
wait(300)
gotoifobjectwithindist(@cook1,97,3)
goto(@cut)

@cooksh:
setvarsnearestobject(%x,%y,97)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleepcook,%f,98)
useitemwithobject(%x,%y,349)
wait(300)
gotoifobjectwithindist(@cook1,97,3)
goto(@cut)

@eat:
useitembyid(350)
wait(100)
useitembyid(352)
wait(150)
gotoifcountininventorygreater(@eat,0,350)
gotoifcountininventorygreater(@eat,0,352)
goto(@drop)

@drop:
dropbyname(Burnt fish)
wait(300)
gotoifcountininventorygreater(@drop,0,353)
goto(@fish)

@sleepfish:
wait(2000)
useitembyid(1263)
wait(2000)
waitforwakeup(28000)
gotoifsleeping(@sleepfish)
goto(@fish)

@sleepfire:
wait(2000)
useitembyid(1263)
wait(2000)
waitforwakeup(28000)
gotoifsleeping(@sleepfire)
goto(@fire)

@sleepcut:
wait(2000)
useitembyid(1263)
wait(2000)
waitforwakeup(28000)
gotoifsleeping(@sleepcut)
goto(@cut)

@sleepcook:
wait(2000)
useitembyid(1263)
wait(2000)
waitforwakeup(28000)
gotoifsleeping(@sleepcook)
goto(@cook1)
