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

[Discussion] I need help with items

13
Posts
4
Years
    • Seen Dec 3, 2022
    Can someone help me out i want a few items i need scripts for if anyone could help me please do. if you do make a script or found a script for an item similar please tell me or if you're trying to make a script of one of these items and i need to fix the explanation please tell me.

    Berry Ice Cream
    Cures a single pokemon of poison, and slightly boosts relationship between the pokemon and the trainer

    Chocolate Ice Cream
    Cures a single pokemon of burn, and slightly boosts relationship between the pokemon and the trainer

    Vanilla Ice Cream
    Cures a single pokemon of paralysis, and slightly boosts relationship between the pokemon and the trainer

    Status Candy
    slightly boosts all of a single pokemons stats.

    Rainbow Cotton Candy
    this boosts the relationship between the trainer and the pokemon

    Note: i still have a few items but i want to see if anyone tries to script this stuff before i add a few more.
     
    277
    Posts
    15
    Years
  • For the Ice Cream you can just copy Antidote, Burn Heal and Paralyze Heal and add the following.
    Code:
    pokemon.changeHappiness("groom")
    This will give your Pokemon a small friendship boost the same as if you were to take your Pokemon to the groomer.
    Here is an example of your Berry Ice Cream.

    Code:
    ItemHandlers::UseOnPokemon.add(:BERRYICECREAM,proc{|item,pokemon,scene|
       if pokemon.hp<=0 || pokemon.status!=PBStatuses::POISON
         scene.pbDisplay(_INTL("It won't have any effect."))
         next false
       else
         pokemon.healStatus
         pokemon.changeHappiness("groom")
         scene.pbRefresh
         scene.pbDisplay(_INTL("{1} was cured of its poisoning, and seems a bit friendlier.",pokemon.name))
         next true
       end
    })

    I would assume you could use something similar to make Rainbow Cotton Candy. If you would like to make your own friendship variable to control how much friendship you would like the Pokemon to grow by you can modify the tables in PokeBattle_Pokemon around line 796.

    For the Status Candy, it basically sounds like all the vitamins being consumed at once. Here it is with the basic amount of friendship a pokemon normally gains from consuming a vitamin, feel free to remove it.
    Code:
    ItemHandlers::UseOnPokemon.add(:STATUSCANDY,proc{|item,pokemon,scene|
       if pbRaiseEffortValues(pokemon,PBStats::HP)==0 && pbRaiseEffortValues(pokemon,PBStats::ATTACK)==0 && pbRaiseEffortValues(pokemon,PBStats::DEFENSE)==0 && pbRaiseEffortValues(pokemon,PBStats::SPATK)==0 && pbRaiseEffortValues(pokemon,PBStats::SPDEF)==0 && pbRaiseEffortValues(pokemon,PBStats::SPEED)==0
         scene.pbDisplay(_INTL("It won't have any effect."))
         next false
       else
         scene.pbRefresh
         scene.pbDisplay(_INTL("{1}'s stats increased.",pokemon.name))
         pokemon.changeHappiness("vitamin")
         next true
       end
    })

    Note I have not tested these.
     
    Last edited:
    Back
    Top