• 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.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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!
  • 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.

[Other] Nickname Pokemon Script Problem

  • 29
    Posts
    10
    Years
    • Seen Jul 11, 2014
    Here is the code:

    Code:
    '---------------
    #org 0x9C3F2D
    lockall
    applymovement MOVE_PLAYER 0x89C43D6
    waitmovement 0xFF
    applymovement 0x1 0x89C43D9
    applymovement 0x2 0x89C43DD
    sound 0x15
    waitmovement 0x2
    msgbox 0x89C402F MSG_NORMAL '"Prof. Berkin: Oh, [player]! I'm so..."
    applymovement MOVE_PLAYER 0x89C43E1
    waitmovement 0xFF
    msgbox 0x89C4088 MSG_NORMAL '"Prof. Berkin: I bet you're\nboth w..."
    fadescreen 0x1
    special 0x9F
    waitstate
    applymovement 0x1 0x89C43E5
    applymovement 0x2 0x89C43E8
    waitmovement 0x2
    msgbox 0x89C419D MSG_NORMAL '"Prof. Berkin: Now it's your\nturn ..."
    msgbox 0x89C41C8 MSG_NORMAL '"In addition, I'd like to give you\..."
    msgbox 0x89C4219 MSG_NORMAL '"Maria: Thank you so\nmuch Professo..."
    applymovement 0x1 0x89C43EB
    msgbox 0x89C423F MSG_NORMAL '"Prof. Berkin: Here's your\nPokedex..."
    fanfare 0x1E
    msgbox 0x89C4267 MSG_NORMAL '"[player] received the Pokedex!"
    waitfanfare
    msgbox 0x89C4282 MSG_NORMAL '"Prof. Berkin: Now if you'll excuse..."
    applymovement 0x2 0x89C43EE
    applymovement 0x1 0x89C43F2
    waitmovement 0x1
    hidesprite 0x1
    applymovement 0x2 0x89C43FC
    waitmovement 0x2
    applymovement MOVE_PLAYER 0x89C4400
    waitmovement 0xFF
    msgbox 0x89C42F0 MSG_NORMAL '"Maria: Professor Berkin is so\ngen..."
    applymovement 0x2 0x89C4403
    waitmovement 0x2
    hidesprite 0x2
    setflag 0x1203
    setflag 0x1204
    setflag 0x860
    setflag 0x861
    special 0x1F3
    setvar 0x6004 0x1
    msgbox 0x89C4395 MSG_YESNO '"Would you like to give a nickname\..."
    compare LASTRESULT 0x1
    if 0x1 goto 0x89C401C
    releaseall
    end
    
    '---------------
    #org 0x9C401C
    setvar 0x8004 0x0
    fadescreen 0x1
    special 0xA1
    waitstate
    releaseall
    end

    The nickname script runs fine, my problem is that no matter if you choose yes or no at MSG_YESNO, it forces you into the nickname screen. For some reason, after the script is compiled, 0x9C401C is just copied into the original script between "if 0x1 goto 0x89C401C" and "releaseall".

    Any help?
     
    Sorry guys, forum activity is slow and I managed to work it out on my own. If anyone else has this same problem, redirect the script to another string, include the msgbox 0x5, compare, if, and setflags or vars in the second string. Then call the actual special for renaming the Pokemon from yet another string. Looks like this, leaving off at hidesprite 0x2 from original post:

    Code:
    hidesprite 0x2
    goto 0x89C4F43
    
    '---------------
    #org 0x9C4F43
    msgbox 0x89C5047 MSG_YESNO '"Would you like to give a nickname\..."
    compare LASTRESULT 0x1
    if 0x1 call 0x89C503A
    setflag 0x1203
    setflag 0x1204
    setflag 0x860
    setflag 0x861
    special 0x1F3
    setvar 0x6004 0x1
    releaseall
    end
    
    '---------------
    #org 0x9C503A
    setvar 0x8004 0x0
    fadescreen 0x1
    special 0xA1
    waitstate
    return
     
    Back
    Top