- Pokémon Essentials Version
- v20.1 ➖
So, first, define your item in Item.txt (PBS)
Here's an example of how it could look:
#-------------------------------
[VIALOFGLITTER]
Name = Vial of Glitter
NamePlural = Vials of Glitter
Pocket = 1
FieldUse = OnPokemon
Price = 15000
Flags = Fling_30
Description = If this item is used, the pokemon is turned shiny.
Then scroll till you find Item_Effects
and paste this at the bottom:
and boom, that's it! just remember to adjust the messages if you don't like them / want something more fitting!
Here's an example of how it could look:
#-------------------------------
[VIALOFGLITTER]
Name = Vial of Glitter
NamePlural = Vials of Glitter
Pocket = 1
FieldUse = OnPokemon
Price = 15000
Flags = Fling_30
Description = If this item is used, the pokemon is turned shiny.
Then scroll till you find Item_Effects
and paste this at the bottom:
Ruby:
ItemHandlers::UseOnPokemon.add(:VIALOFGLITTER, proc { |item, qty, pkmn, scene|
if pkmn.shiny? == false
pbSEPlay('Item Used', 100, 100)
pbMessage(_INTL("The sparkled glitter changed the color of your pokemon!"))
pkmn.shiny = true
elsif pkmn.shiny? == true
pbMessage(_INTL("The sparkled glitter won't have any effect."))
next false
end
})
and boom, that's it! just remember to adjust the messages if you don't like them / want something more fitting!
- Credits
- Apples
Asforcia
BIGFriv