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

Giving an Item to an NPC

38
Posts
10
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.
     
    1,224
    Posts
    10
    Years
  • 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
     
    38
    Posts
    10
    Years
    • Seen Sep 7, 2016
    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.
     
    38
    Posts
    10
    Years
    • Seen Sep 7, 2016
    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.
     
    1,224
    Posts
    10
    Years
  • 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