(just use a different var for each flag, then only use var vaules 0-1, then it's like a flag.)
#dynamic 0x000000
#org @start
lock
faceplayer
compare 0x5001 0x1
if 0x1 goto @1581set
compare 0x5000 0x1
if 0x1 goto @1580set
checkitem ITEM_MOOMOOMILK 2
compare LASTRESULT 0x1
if 0x1 goto @havethemilk
compare 0x5002 0x1
if 0x1 goto @1582set
msgbox @wygb MSG_NORMAL
setvar 0x5002 0x1
release
end
#org @1581set
msgbox @sell MSG_NORMAL
pokemart @pokemart
release
end
#org @1582set
msgbox @getbusy MSG_NORMAL
release
end
#org @havethemilk
removeitem ITEM_MOOMOOMILK 2
msgbox @gimmethemilk MSG_NORMAL
setvar 0x5001 0x1
release
end
#org @1580set
checkitem ITEM_GREPABERRY 1
compare LASTRESULT 0x1
if 0x1 goto @havetheberry
msgbox @youonly MSG_NORMAL
release
end
#org @havetheberry
removeitem ITEM_LEEMONBERRY 1
msgbox @gimmetheberry MSG_NORMAL
applymovement LASTTALKED @moveup
pause 0x100
applymovement LASTTALKED @movedown
msgbox @deserve MSG_NORMAL
giveitem ITEM_GOLDTEETH 1 MSG_OBTAIN
setvar 0x5000 0x1
release
end
#org @gimmethemilk
= RYAN: You got the MOOMOO MILK!\nGive it to me now.
#org @wygb
= RYAN: Hey, [player]!\nSo you're here eh?\pRYAN: If I can recall, you need a\nPIKA-CHEW, correct?\pRYAN: Ah, I'm sorry to disappoint\nyou, but I've ran out of the basic\lingredients for it.\pRYAN: I need [fr_blue]2 bottles of MOOMOO\nMILK and a LEEMON BERRY[black_fr].\pRYAN: Bring me those and I'll make\nyou a PIKA-CHEW free of charge.
#org @youonly
= RYAN: I only need a LEEMON BERRY\nnow.
#org @gimmethemilk
= RYAN: You got the LEEMON BERRY!\nGive it to me now.
#org @getbusy
= RYAN: Chop-chop, get busy!\pRemember, I need [fr_blue]2 bottles of\nMOOMOO MILK and a LEEMON BERRY[black_fr].
#org @deserve
= RYAN: Here you go, buddy!\nYou deserve it! Use it wisely.
#org @sell
= RYAN: Hello, dear friend! I have a\nspecial discount just for you!\pNow, what can I do for you?
#org @pokemart
#raw word ITEM_BERRYJUICE
#raw word ITEM_RARECANDY
#raw word 0x0
#org @moveup
#raw 0x11 0x13 0x11 0x60 0xFE
#org @movedown
#raw 0x10 0x12 0x10 0x61 0xFE