• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script✓] Warp after choosing starter Pokémon

Warp after choosing starter Pok?mon

I'm trying to make a script where the player gets warped to warp number 1 of Lavender Town upon choosing Charmander, Pikachu or Squirtle (these are the 3 starter Pok?mon on one of my hacks), but I can't do it.

Can anyone help me?
 
Last edited:
I'm trying to make a script where the player gets warped to warp number 1 of Lavender Town upon choosing Charmander, Pikachu or Squirtle (these are the 3 starter Pok?mon on one of my hacks), but I can't do it.

Can anyone help me?

Post your original script and anything about that script when you try it in-game that you notice.
 
Teh Blazer said:
Post your original script and anything about that script when you try it in-game that you notice.
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.
 
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.
 
I got the warping and the ball disappear to work, but the player gets warped to this instead:
[PokeCommunity.com] Warp after choosing starter Pokémon


The edited script:
Code:
'---------------
#org 0x880000
lock
faceplayer
checkflag 0x999
if 0x1 goto 0x888006C
showpokepic 0x4 0xA 0x3
msgbox 0x8880077 MSG_YESNO '"So you want the fire Pok?mon,\nCha..."
compare LASTRESULT 0x1
if 0x1 goto 0x8880027
hidepokepic
release
end

'---------------
#org 0x880027
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
hidepokepic
hidesprite LASTTALKED
setflag 0x828
setflag 0x291
fanfare 0x13E
msgbox 0x88800A3 MSG_KEEPOPEN '"[black_fr]You received Charmander!"
waitfanfare
closeonkeypress
setflag 0x999
msgbox 0x88800C1 MSG_YESNO '"[black_fr]Would you like to give a..."
compare LASTRESULT 0x1
if 0x1 call 0x8880065
warp 0x3 0x4 0xFF 0x6 0x7
release
end

'---------------
#org 0x880065
call 0x81A74EB
return

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return

'---------
' Strings
'---------
#org 0x880077
= So you want the fire Pok?mon,\nCharmander?

#org 0x8800A3
= [black_fr]You received Charmander!

#org 0x8800C1
= [black_fr]Would you like to give a\nnickname to Charmander?
And if I compile the script, "warp 0x3 0x4 0xFF 0x6 0x7" changes into "warp 0x3 0x4 0xEB 0x1A74 0x308"!
 
Your script is overwriting itself. You just need to refactor it, and then recompile: XSE has a built-in function for this, which you can access using Ctrl + D and checking Apply refactoring.
I refactored and compiled the script but it's still warping to the wrong location.
I refactored to $900000.
 
Code:
#dynamic 0x900000

'---------------
#org @start
lock
faceplayer
checkflag 0x999
if 0x1 goto @snippet1
showpokepic 0x4 0xA 0x3
msgbox @string1 MSG_YESNO '"So you want the fire Pokémon,\nCha..."
compare LASTRESULT 0x1
if 0x1 goto @snippet2
hidepokepic
release
end

'---------------
#org @snippet1
end

'---------------
#org @snippet2
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
hidepokepic
hidesprite LASTTALKED
setflag 0x828
setflag 0x291
fanfare 0x13E
msgbox @string2 MSG_KEEPOPEN '"[black_fr]You received Charmander!"
waitfanfare
closeonkeypress
setflag 0x999
msgbox @string3 MSG_YESNO '"[black_fr]Would you like to give a..."
compare LASTRESULT 0x1
if 0x1 call @snippet3
warp 0x3 0x4 0xEB 0x1A74 0x308
release
end

'---------------
#org @snippet3
call @snippet4
return

'---------------
#org @snippet4
fadescreen 0x1
special 0x9E
waitstate
return


'---------
' Strings
'---------
#org @string1
= So you want the fire Pokémon,\nCharmander?

#org @string2
= [black_fr]You received Charmander!

#org @string3
= [black_fr]Would you like to give a\nnickname to Charmander?
 
Code:
#dynamic 0x900000

'---------------
#org @start
lock
faceplayer
checkflag 0x999
if 0x1 goto @snippet1
showpokepic 0x4 0xA 0x3
msgbox @string1 MSG_YESNO '"So you want the fire Pokémon,\nCha..."
compare LASTRESULT 0x1
if 0x1 goto @snippet2
hidepokepic
release
end

'---------------
#org @snippet1
end

'---------------
#org @snippet2
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
hidepokepic
hidesprite LASTTALKED
setflag 0x828
setflag 0x291
fanfare 0x13E
msgbox @string2 MSG_KEEPOPEN '"[black_fr]You received Charmander!"
waitfanfare
closeonkeypress
setflag 0x999
msgbox @string3 MSG_YESNO '"[black_fr]Would you like to give a..."
compare LASTRESULT 0x1
if 0x1 call @snippet3
warp 0x3 0x4 0xEB 0x1A74 0x308
release
end

'---------------
#org @snippet3
call @snippet4
return

'---------------
#org @snippet4
fadescreen 0x1
special 0x9E
waitstate
return


'---------
' Strings
'---------
#org @string1
= So you want the fire Pokémon,\nCharmander?

#org @string2
= [black_fr]You received Charmander!

#org @string3
= [black_fr]Would you like to give a\nnickname to Charmander?

Your warp command is all kinds of wrong. Here's your's:

Code:
warp 0x3 0x4 [COLOR=red]0xEB 0x1A74 0x308[/COLOR]
Here's mine:

Code:
warp 0x3 0x4 [COLOR=red]0x1 0x6 0x5[/COLOR]
I don't know where the hell you were warping to on that map or how big it is, but this command should take you to warp 1 regardless. You might need to change the two coordinates to match up with your warp 1 (which shouldn't be 0x1A74 and 0x308).

Also, you have setflag 0x999 in you script still. You need to be using a flag from the range 200 - 2FF. Flag 999 will not work under any circumstance because it's outside of the usable range of flags and will accessed data that shouldn't be accessed in scripts. Change it immediately.
 
Back
Top