I posted this script a while ago, and it still doesn't work....
Code:
#Dynamic 0x800000
#org @start
lockall
setvar 0x5040 0x0
goto @script
return
#org @script
compare 0x5040 0x0
if b_true goto @left0
compare 0x5040 0x1
if b_true goto @left1
compare 0x5040 0x2
if b_true goto @left2
return
#org @left0
applymovement 0x9 @move0
waitmovement 0x0
goto @check
end
#org @left1
applymovement 0x9 @move1
waitmovement 0x0
goto @check
end
#org @left2
applymovement 0x9 @move2
waitmovement 0x0
goto @check
end
#org @check
checkflag 0x204
if b_true goto @gone
checkflag 0x829
if b_true goto @havedex
checkflag 0x829
if b_false goto @nodex
end
#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
goto @notwant
end
#org @upgrade
= Hello there. I just noticed that\nyou have a POKéDEX. I research\lPOKéMON from foreigns lands like\lKANTO and JOHTO. Would you like me\lto upgrade your POKéDEX so that it\lcan store those POKéMON's data?
#org @getdex
msgbox @receivedex
boxset 0x6
fanfare 0x13E
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
releaseall
end
#org @receivedex
= [player]'s POKéDEX got upgraded.
#org @notwant
msgbox @no
boxset 0x6
releaseall
end
#org @no
= Oh? You don't want to? Well that's\nok then. If you change your mind,\lcome see me again.
#org @nodex
msgbox @hello2
boxset 0x6
releaseall
end
#org @hello2
= Hi there. I'm researching POKéMON\nfrom foreign lands like KANTO and\lJOHTO. If you could bring me a\lPOKéDEX, I would upgrade it with\lthe information about POKéMON found\lonly there.
#org @gone
hidesprite 0x9
end
#org @move0
#raw 0x4E
#raw 0xFE
#org @move1
#raw 0x06
#raw 0xFE
#org @move2
#raw 0x06
#raw 0x06
#raw 0xFE
I suck at setvar, I hardly know how to use it correctly.
NOTE:The script works partially. The aide who needs to say the message says messages, but 1) The message is the wrong one, which means the checkflag for pokedex doesn't works correctly (and yes, I do have the pokedex) and 2) He won't face left to me.
Someone knows what's wrong with this?