To hide a sprite, you need to assign a flag to it and then in a script you need to put:
Code:
setflag 0x#
hidesprite personevent#
For a script to work only when you get a pokedex, you can use the flag for the pokedex as a check. I imagine you're hacking FR so it'd be:
Code:
checkflag 0x829
if 0x1 goto @continue
release
end
It'll check to see if you have the pokedex menu activated and if so, it'll continue with script otherwise it'll never happen.
For talking to someone to give you the national dex with the previous elements it'd be something like:
Code:
#org @event
faceplayer
checkflag 0x829
if 0x1 goto @continue
msgbox @go 0x6
release
end
#org @go
= GO GET YOUR POKEDEX
#org @oh
= Oh .. you got your Pokedex. Well then here:
#org @continue
msgbox @oh 0x6
special 0x16F
fanfare 0x13E
msgbox @yougot
waitfanfare
setflag 0x250
msgbox @watch 0x6
hidesprite 0x0
release
end
#org @yougot
= I received the National Dex! Ermergerd!
#org @watch
= Watch me disappear for my final act!