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

Choosing an item from only 1 pocket of the bag

  • 12
    Posts
    9
    Years
    I want to use the script Kernel.pbChooseItem(1), but limit the player to only being able to pick an item from 1 bag pocket. This would be the same as what happens when planting a berry, but with a different pocket of the bag. (I tried looking in the berry scripts but I couldn't figure it out)

    Any help would be greatly appreciated! :)
     
    Not sure what you are looking for. When you are prompted to plant a berry, you are not limited at all, you can switch to another bag if you wish to do so :o
    But if you are simply looking for the bag, you could use:

    scene=PokemonBag_Scene.new
    screen=PokemonBagScreen.new(scene,$PokemonBag)
    ret=screen.pbChooseItemScreen
     
    :o You're right, I thought it limited you to one pocket, but I suppose not! My bad. However, if you choose an item that's not a berry, it returns the message: "That's not a berry." How would I set that up?

    Basically, I just want to limit the player to selecting only one type of item from the bag.

    Thank you for your reply! I checked the scripts but can't figure it out :(
     
    Try this in your script, anywhere above main and set up an event with "pbItemTest":

    Spoiler:

    Change the bag type (bold and purple) to your liking according to this:
    Spoiler:


    And the item (green and bold) itself according to this:
    Spoiler:


    You may want to test around a bit by looking through https://pokemonessentials.wikia.com/wiki/Defining_an_item or "PItem_Items" in your script.

    Hope this helps a little :)
     
    Last edited:
    Back
    Top