• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - 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] NPC Requests to See a Specific Pokemon Script?

  • 7
    Posts
    5
    Years
    Hey guys,

    I've been looking everywhere to try and figure out how I can implement a simple script into my Rom Hack that would play out like this, for example:

    NPC: "I think Onix is the coolest! If you show me one, I'll give you something special."

    *Player has Onix in party*

    NPC: "Oh, wow, an Onix, thanks! Here you go, as promised!"

    *NPC gives player Metal Coat or other item*

    I'm fairly certain that these types of scripts exist even in the base game (Fire Red), and I've tried looking at some of the scripts in Pokemon Gaia, but they're already compiled and it's hard for me to make sense of them. Can anyone explain how to implement this and give me an example to go with it? I would really appreciate it.
     
    In FR, the command 'special2 0xYYYY 0x147' will return the ID number of a Pokemon in your party to variable 0xYYYY. It takes the value of 0x8004, ranging between values 0x0 and 0x5 to determine which party member's ID number it should return. Knowing this, you can make a script with a simple loop which will gradually increment the value of 0x8004 until it has checked every party member's ID and branch out when the game finds an Onix. Here's a quick one that I whipped up for you with some comments to explain how it works:

    Spoiler:


    Hopefully that helps.
     
    Now i understand thats how it checks a pkmn in ur party...but how would it check if i caught it, and not in my party?

    For FR, please
     
    In FR, the command 'special2 0xYYYY 0x147' will return the ID number of a Pokemon in your party to variable 0xYYYY. It takes the value of 0x8004, ranging between values 0x0 and 0x5 to determine which party member's ID number it should return. Knowing this, you can make a script with a simple loop which will gradually increment the value of 0x8004 until it has checked every party member's ID and branch out when the game finds an Onix. Here's a quick one that I whipped up for you with some comments to explain how it works:

    Spoiler:


    Hopefully that helps.

    Sorry for the late reply, but holy shit, thank you! This was extremely helpful, I appreciate it so much!
     
    Back
    Top