• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist 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.

[Scripting Question] Help with held items boosting stats

In the pokebattle_battle class, find pbEndOfRoundPhase. Then somewhere add this:
Code:
for i in 0...4
  if @battlers[i].item = PBItems::YOUR_ITEM_INT_NAME
    @battlers.{method for boosting speed} if @battlers.canBoostStat?(PBStats::SPEED)
  end
end
I forgot the method for boosting stats
 
In the pokebattle_battle class, find pbEndOfRoundPhase. Then somewhere add this:
Code:
for i in 0...4
  if @battlers[i].item = PBItems::YOUR_ITEM_INT_NAME
    @battlers.{method for boosting speed} if @battlers.canBoostStat?(PBStats::SPEED)
  end
end
I forgot the method for boosting stats

I recieved an unidentified method error on "canBoostStat?"...
 
I might have written that wrong...
find the method for that, it should be something along those lines.

Well either way, it didn't work. I have found a more efficient way that works for making custom held item effects by using the BattleHandlers_Items scripts for V18. Also, I just realised that the method you used is mainly for 17.2.
 
Back
Top