• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
35
Posts
8
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.
 

Backburner26

Pokemon Lavender Spirit Creator
35
Posts
8
Years
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.
 

Backburner26

Pokemon Lavender Spirit Creator
35
Posts
8
Years
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