• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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