@main:
setvarinvcountbyid(%certs,534)
gotoifnum1equalnum2(@kill,%certs,0)
setvaritemcount(%count)
gotoifnum1equalnum2(@uncert,%count,5)
gotoifcountininventorygreater(@checkfire,0,372)
setvarinvcountbyid(%cooked,373)
gotoifnum1belownum2(@eatrest,%cooked,5)
setvarinvcountbyid(%burnt,374)
gotoifnum1abovenum2(@dropburnt,%burnt,0)
gotoifnum1equalnum2(@cert25,%cooked,25)
gotoifnum1betweennum2andnum3(@cert5,%cooked,5,9)
gotoifnum1betweennum2andnum3(@cert10,%cooked,10,14)
gotoifnum1betweennum2andnum3(@cert15,%cooked,15,19)
gotoifnum1betweennum2andnum3(@cert20,%cooked,20,24)

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

@cut:
setvarsnearestobject(%x,%y,70)
gotoifcountininventorygreater(@cut2,0,372)
goto(@main)
@cut2:
gotoifcountininventorygreater(@droplogs,0,14)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleep,%f,95)
objcmd2(%x,%y)
wait(1000)
gotoifitemwithindistname(@fire,logs,2)
goto(@cut2)

@fire:
setvarsnearestitem(%x,%y,14)
useitemwithgrounditembyid(%x,%y,14,166)
wait(1000)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleep,%f,95)
gotoifcountininventorygreater(@droplogs,0,14)
gotoifobjectwithindist(@cook,97,3)
goto(@fire)

@cook:
setvarsnearestobject(%x,%y,97)
useitemwithobject(%x,%y,372)
wait(300)
setvarfatigue(%f)
gotoifnum1abovenum2(@sleep,%f,95)
goto(@main)

@uncert:
repeatnextcommanduntilquestmenu(4000)
talktonearestnpc(227)
answer(0)
waitforquestmenu(5000)
answer(3)
waitforquestmenu(5000)
answer(4)
wait(3000)
debugrs(25 raw lobs uncerted :P)
goto(@main)

@cert5:
repeatnextcommanduntilquestmenu(4000)
talktonearestnpc(227)
answer(1)
waitforquestmenu(5000)
answer(0)
waitforquestmenu(5000)
answer(0)
wait(4000)
debugrs(only 5 lobs certed :'()
goto(@main)

@cert10:
repeatnextcommanduntilquestmenu(4000)
talktonearestnpc(227)
answer(1)
waitforquestmenu(5000)
answer(0)
waitforquestmenu(5000)
answer(1)
wait(4000)
debugrs(only 10 lobs certed :|)
goto(@main)

@cert15:
repeatnextcommanduntilquestmenu(4000)
talktonearestnpc(227)
answer(1)
waitforquestmenu(5000)
answer(0)
waitforquestmenu(5000)
answer(2)
wait(4000)
debugrs(15 certed mehhh)
goto(@main)

@cert20:
repeatnextcommanduntilquestmenu(4000)
talktonearestnpc(227)
answer(1)
waitforquestmenu(5000)
answer(0)
waitforquestmenu(5000)
answer(3)
wait(4000)
debugrs(20 could be worse :P)
goto(@main)

@cert25:
repeatnextcommanduntilquestmenu(4000)
talktonearestnpc(227)
answer(1)
waitforquestmenu(5000)
answer(0)
waitforquestmenu(5000)
answer(4)
wait(4000)
debugrs(25 lobsters certed =))
goto(@main)

@eatrest:
useitembyid(373)
wait(600)
goto(@main)

@dropburnt:
dropbyid(374)
wait(1500)
goto(@main)

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

@droplogs:
dropbyid(14)
wait(1500)
gotoifitemwithindistname(@fire,logs,1)
goto(@main)

@kill:
logout()
stop()
