- 132
- Posts
- 10
- Years
- New Brunswick
- Seen May 6, 2023
I'm looking for a way to turn an item on/off, much like how you can turn the ExpShare on/off. This is so the player can "equip" the item from his bag, whereupon a switch would run from there until the item is no longer equipped.
For reference, here's the script that (somehow) defines the effect of the ExpShare in PItem_ItemEffects:
Thanks
For reference, here's the script that (somehow) defines the effect of the ExpShare in PItem_ItemEffects:
Code:
ItemHandlers::UseFromBag.add(:EXPALL,proc{|item|
$PokemonBag.pbChangeItem(:EXPALL,:EXPALLOFF)
Kernel.pbMessage(_INTL("The Exp Share was turned off."))
next 1 # Continue
})
ItemHandlers::UseFromBag.add(:EXPALLOFF,proc{|item|
$PokemonBag.pbChangeItem(:EXPALLOFF,:EXPALL)
Kernel.pbMessage(_INTL("The Exp Share was turned on."))
next 1 # Continue
})
Thanks