• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[Custom Feature Question] Exchanging specific Pokémon for an Item or Money

  • 13
    Posts
    4
    Years
    • Seen May 16, 2021
    Hello everyone,

    I am quite new to Pokémon Essentials, so I a not sure whether this question is too obvious.

    So for my game I want to have a quest like system, where a NPC ask you to catch a specific Pokémon (like with a certain ability, shiny, level and so on). The player should gift this Pokémon to the NPC and in exchange they will get money and/or rare items.

    How do I do that? I tried to play a bit with the NPC traders, but it does not work well.

    Any ideas?
    Thanks for any help :)
     
    Hi you can use this, give a charizarditex if you have a charizard,

    Code:
    def pbIntercambiosporcosas
       pbChoosePokemon(1,2)
       cancel = pbGet(1)
       pok1 = $Trainer.pokemonParty[pbGet(1)]
    if (pok1.species==6)
    Kernel.pbReceiveItem(PBItems::CHARIZARDITEX,1)    
    else
      Kernel.pbMessage(_INTL("Necesitas un charizard"))
    end
      end
     
    I tried to do it like the video, but it always gives me this error message:

    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: RuntimeError

    Message: Script error within event 12 (coords 15,9), map 48 (Test):

    Exception: NoMethodError

    Message: (eval):1:in `pbExecuteScript'undefined method `pbChooseTradeablePokemon' for #<Interpreter:0xc955db0>

    ***Full script:

    pbChooseTradeablePokemon(1,2,
    proc {|pkmn|
    pkmn.isFemale? &&
    isConst?(pkmn.species,PBSpecies,
    :DRAGONAIR)
    })


    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `eval'

    Interpreter:243: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:163:in `update'

    Scene_Map:161:in `loop'



    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:163:in `update'

    Scene_Map:161:in `loop'

    Scene_Map:170:in `update'

    Scene_Map:234:in `main'



    I do not want to initiate a trade, but rather have the NPC check whether I have a specific Pokémon, then erase that Pokémon from Team and receive an item.
     
    Hi you can use this, give a charizarditex if you have a charizard,

    Code:
    def pbIntercambiosporcosas
       pbChoosePokemon(1,2)
       cancel = pbGet(1)
       pok1 = $Trainer.pokemonParty[pbGet(1)]
    if (pok1.species==6)
    Kernel.pbReceiveItem(PBItems::CHARIZARDITEX,1)    
    else
      Kernel.pbMessage(_INTL("Necesitas un charizard"))
    end
      end

    So how to I integrate it in an NPC event? Sorry, if it is a stupid question...
     
    Back
    Top