| Teh Blazer |
May 23rd, 2017 3:23 PM |
Quote:
Originally Posted by Luansilva12
(Post 9655718)
Code:
'---------------
#org 0x865000
lock
faceplayer
checkflag 0x999
if 0x1 goto 0x886506C
showpokepic 0x4 0xA 0x3
msgbox 0x8865077 MSG_YESNO '"So you want the fire Pokémon,\nCha..."
compare LASTRESULT 0x1
if 0x1 goto 0x8865027
hidepokepic
release
end
'---------------
#org 0x86506C
msgbox 0x88650F7 MSG_NORMAL '"Are you happy?"
release
end
'---------------
#org 0x865027
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
hidepokepic
fanfare 0x13E
msgbox 0x88650A3 MSG_KEEPOPEN '"[black_fr]You received Charmander!"
waitfanfare
closeonkeypress
setflag 0x999
msgbox 0x88650C1 MSG_YESNO '"[black_fr]Would you like to give a..."
compare LASTRESULT 0x1
if 0x1 call 0x8865065
msgbox 0x8865108 MSG_NORMAL '"Hope you like"
release
end
'---------------
#org 0x865065
call 0x81A74EB
return
'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return
'---------
' Strings
'---------
#org 0x865077
= So you want the fire Pokémon,\nCharmander?
#org 0x8650F7
= Are you happy?
#org 0x8650A3
= [black_fr]You received Charmander!
#org 0x8650C1
= [black_fr]Would you like to give a\nnickname to Charmander?
#org 0x865108
= Hope you like
And I also need to remove the "Are you happy?" and the "Hope you like" messages and the ball doesn't disappear when I pick the Pokémon.
|
That's a pretty good script so far, I'd just say that in Fire Red the only "safe" flags to use are between 200-2FF and anything like the 999 you used could already be used in the game for something else.
If you want the pokeball to disappear, you'll have to put in "hidesprite 0x[whatever the ID is of the pokeball]" and "setflag 0x[whatever flag you want to give the pokeball]" right before the fanfare 0x13E you play. If you're unsure why, look at the pokeballs in the vanilla Fire Red ROM and copy how gamefreak does it there.
Warping at the end is really easy, just put "warp 0x3 0x4 0x1 0x0 0x0" at the end of your script before the "release" and "end". It'll warp the player at the end of the script but without proper context it'll probably look a little weird. I'm not sure what you're planning but adding that will make the script act like normal and just teleport the player.
|