• 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!
  • Scottie, Todd, Serena, Kris - 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.

[Other] Nationaldex person event

  • 11
    Posts
    12
    Years
    • Fl
    • Seen Apr 14, 2017
    So I'll cut to the chase. I want to write a script that only appears when you get the Pokedex. I want it to automatically activate the Nationaldex. I want it to be a script that hides the person you have to talk to. Will someone be able to help me? Also sorry if this seems abit confusing.
     
    Last edited:
    So I'll cut to the chase. I want to write a script that only appears when you get the Pokedex. I want it to automatically activate the Nationaldex. I want it to be a script that hides the person you have to talk to. Will someone be able to help me? Also sorry if this seems abit confusing.

    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!
     
    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!

    I keep getting "Too less parameters on line 23. The correct number is 2" Do you know what that means?
     
    Can't tell which line is 23 but msgbox@yougot needs a number after it to tell the game what kind of message box it is, like you've done for the other msgboxes.

    Yeah sorry about that, it was just an example though. Anyways, when you click compile, it should say the line 23 thing then it should take you to the line and have it selected. It was probably the msgbox, did you fix it and try? Make sure to change the hidesprite number to the number of the OW in your map ... as well as what you are going to use like how I used 0x250. You should make a notepad .txt file and record what flags you use so you don't repeat by accident
     
    Back
    Top