• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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.

Giving an Item to an NPC

  • 36
    Posts
    11
    Years
    • Seen Sep 7, 2016
    Back again with another question.

    I was wondering how I give an item to an NPC. Like how someone like a prof. would be like "aye, deliver this package for me". How do I deliver it, like once I get to the desired NPC, How do I give it to them and complete the delivery?

    I tried playing around with it, but I don't think I'm getting it.
    any help is appreciated.
     
    Assuming you gave them a physical item, and not just flipped a switch, you can use
    Code:
    $PokemonBag.pbDeleteItem(:POTION)
    but substitute in your item's name.
    You can learn more about manipulating items on the wiki
     
    I'm getting this error:

    Spoiler:


    there is literally nothing but text above the script. I tried switching the item since the original item was a custom item and maybe it was defined wrong or something, but even with a regular item this came up. i double checked the spelling . i tried having more than one of the item as well.
     
    That did it. Thanks for the help again. I was really over-thinking it and thought it was gonna be more complex than that. Again, I appreciate it.
     
    That did it. Thanks for the help again. I was really over-thinking it and thought it was gonna be more complex than that. Again, I appreciate it.

    No prob. Always just run extendtext when you start working, and you won't have to worry about forgetting things like that.

    Also, if you must separate the code onto a different line, you can do it in ways that the interpreter can understand.

    Code:
    $PokemonBag.pbDeleteItem(
    :ARMORFOSSIL)
    can be read, so could
    Code:
    $PokemonBag.pbDeleteItem(:ARMORFOSSIL,
    1)

    But it's much easier to just use extendtext
     
    Back
    Top