• 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.

Rewarding Players with Items for getting so many pokemon in the pokedex

Backburner26

Pokemon Lavender Spirit Creator
  • 32
    Posts
    9
    Years
    Hey guys, I am trying to find out what code and checks to use so that when the player talks to the professor and you have 300 pokemon caught and registered, he gives you an Item.
     
    Thats the first place i went to for help.
    I never found what I wanted though.
    All i wanted to know was how to make it so that when the player spoke to the professor with 300 obtained pokemon in the pokedex, the player gets an Item.
     
    in a script conditional branch you put something like
    Code:
     $Trainer.pokedexOwned(dex) <= 300
    thanks dude!

    EDIT: Just tried the script and this error came up

    Code:
     ---------------------------
    Pokemon Lavender Spirit
    --------------------------
    Exception: RuntimeError
    Message: Script error within event 1, map 43 (Hazel's Lab):
    Exception: NameError
    Message: (eval):1:in `pbExecuteScript'undefined local variable or method `dex' for #<Interpreter:0x1084b978>
    
    ***Full script:
    $Trainer.pokedexOwned(dex) <= 300
    Interpreter:243:in `pbExecuteScript'
    Interpreter:794:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:794:in `command_111'
    Interpreter:320:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
    Scene_Map:101:in `loop'
    
    Interpreter:276:in `pbExecuteScript'
    Interpreter:794:in `command_111'
    Interpreter:320:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
    Scene_Map:101:in `loop'
    Scene_Map:114:in `update'
    Scene_Map:68:in `main'



    EDIT2:
    Nevermind guys, I just found a fix. I just copied over the Evaluate Pokedex script from the pokegear and i'll use that
     
    Last edited:
    Back
    Top