• 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!
  • Scottie, Todd, Serena, Kris - 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.

Showing the name of a previously selected item on a script

  • 94
    Posts
    11
    Years
    • Seen Jun 18, 2016
    I'm making a Berry mixer, which is a Key Item where you select 2 berries and it creates a new berry with new effects, etc.

    Mechanically everything is working, but i don't know how to make it so when you select a berry it says "PLAYERNAME is mixing BERRY1 and BERRY2...".

    I know how to show the player name, but not the berries name.

    This is my actual code (it's only working with one berry because i'm just testing it)

    Code:
    def useMezclador
      Kernel.pbChooseItem(31)
      Kernel.pbChooseItem(32)
      
      if $game_variables[31] == PBItems::ORANBERRY or PBItems::SITRUSBERRY && $game_variables[32] == PBItems::SITRUSBERRY or PBItems::ORANBERRY
        
        Kernel.pbMessage(_INTL("{1} mixed the Oran Berry and the Sitrus Berry, and...",$Trainer.name))
        $PokemonBag.pbDeleteItem(PBItems::ORANBERRY)
        $PokemonBag.pbDeleteItem(PBItems::SITRUSBERRY)
        Kernel.pbReceiveItem(PBItems::ZIRANJABERRY)
      else
        Kernel.pbMessage(_INTL("The items selected aren't compatible, so you can't mix them"))
        end
    end

    I think that the answer is pretty simple, but i can't manage to make it work.

    Edit: Nevermind, everything is working now. Here's the fixed line:

    Code:
    Kernel.pbMessage(_INTL("{1} mixed the {2} and the {3}, and...",$Trainer.name,PBItems.getName(pbGet(31)),PBItems.getName(pbGet(32))))
     
    Last edited:
    Back
    Top