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

NPC that wants to see a certain type of pokemon

  • 36
    Posts
    8
    Years
    • Seen Apr 4, 2018
    Hello

    I want an NPC to ask to see a steel type pokemon and give you a metal coat if you have one. Here's what I have: [PokeCommunity.com] NPC that wants to see a certain type of pokemon
    I'm getting an error when I choose yes.
     
    Two ideas:

    1) If you are using v16, you may want to change the ".egg" (by ".IsEgg" I believe)

    2) I'm not sure you can use "poke.type" to check the type

    Edit: also, instead of pbItemBall, you may want to use pbReceiveItem when the item is given (see the wiki for more info)
     
    pbChoosePokemon(1,2,
    proc {|poke|
    !poke.IsEgg? &&
    poke.hasType?(STEEL)
    })

    Changed it to that, still get the error message. :(
     
    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: RuntimeError

    Message: Script error within event 8, map 22 (Other House):

    Exception: NoMethodError

    Message: (eval):3:in `pbExecuteScript'undefined method `IsEgg?' for #<PokeBattle_Pokemon:0xbb54870>

    ***Full script:

    pbChoosePokemon(1,2,
    proc {|poke|
    !poke.IsEgg? &&
    poke.hasType?(STEEL)
    })


    Interpreter:243:in `pbExecuteScript'

    (eval):2:in `call'

    PScreen_Party:1148:in `pbChooseAblePokemon'

    PScreen_Party:1147:in `each'

    PScreen_Party:1147:in `pbChooseAblePokemon'

    PSystem_Utilities:2102:in `pbChoosePokemon'

    PSystem_Utilities:2098:in `pbFadeOutIn'

    PSystem_Utilities:2098:in `pbChoosePokemon'

    (eval):1:in `pbExecuteScript'

    Interpreter:1606:in `eval'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494: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'



    This exception was logged in

    C:\Users\trm32\Saved Games/Pokemon Essentials/errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    Well ".IsEgg" is not working. Try with ".egg" again, and if you get an error message saying "undefined method for "egg"", find the correct way to check for an Egg in 16.2 by searching the forum.
     
    pbChoosePokemon(1,2,
    proc {|poke|
    !poke.isEgg? &
    !(poke.isShadow? rescue false) &
    poke.hasType?(STEEL)
    })

    Gives me this error:
    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: RuntimeError

    Message: Script error within event 8, map 22 (Other House):

    Exception: NameError

    Message: (eval):5:in `pbExecuteScript'uninitialized constant Interpreter::STEEL

    ***Full script:

    pbChoosePokemon(1,2,
    proc {|poke|
    !poke.isEgg? &
    !(poke.isShadow? rescue false) &
    poke.hasType?(STEEL)
    })


    Interpreter:243:in `pbExecuteScript'

    (eval):2:in `call'

    PScreen_Party:1148:in `pbChooseAblePokemon'

    PScreen_Party:1147:in `each'

    PScreen_Party:1147:in `pbChooseAblePokemon'

    PSystem_Utilities:2102:in `pbChoosePokemon'

    PSystem_Utilities:2098:in `pbFadeOutIn'

    PSystem_Utilities:2098:in `pbChoosePokemon'

    (eval):1:in `pbExecuteScript'

    Interpreter:1606:in `eval'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494: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'



    This exception was logged in

    C:\Users\trm32\Saved Games/Pokemon Essentials/errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    Back
    Top