v17 How to make a stone for Shinys Pokémon?

This thread pertains to v17 of Pokémon Essentials.

messi3d

Trainer
Member
Joined
Nov 23, 2020
Posts
63
Age
18
I want to make an item that changes the Pokémon to Shiny, I tried to use an evolution method, but it is infinite. I want an item that can be used only once and a Pokemon and never take effect! Can someone help me?
💔💔💔💔💔💔💔💔
 

ThatWelshOne_

Eevee User
Member
Joined
Sep 29, 2020
Posts
86
Add this to PItem_ItemEffects (I put it under Rare Candy):
Ruby:
ItemHandlers::UseOnPokemon.add(:SPARKLYSTONE,proc{|item,pokemon,scene|
    if pokemon.isShiny? || (pokemon.isShadow? rescue false)
      scene.pbDisplay(_INTL("It won't have any effect."))
    next false
    else
      if scene.pbConfirm(_INTL("Would you like to make {1} shiny?",pokemon.name))
        pokemon.makeShiny
        scene.pbDisplay(_INTL("Your {1} is now shiny!",pokemon.name))
        scene.pbRefresh
       next true
     end
   end
})
Then, in your items.txt file in PBS folder, add something like this:
XXX,SPARKLYSTONE,Sparkly Stone,Sparkly Stones,1,2100,"A peculiar stone that can make Pokémon shiny.",1,0,0,
Change 'XXX' to the next ID in your items.txt file. Feel free to rename the item, but make sure the item name is consistent between what's in your items.txt file and what is defined in the script. I was going to go for Shiny Stone, but that already exists for another purpose.

Let me know if this works for you.
 

messi3d

Trainer
Member
Joined
Nov 23, 2020
Posts
63
Age
18
Adicione isso a PItem_ItemEffects (coloquei em Rare Candy):
[CODE = ruby] ItemHandlers :: UseOnPokemon.add (: SPARKLYSTONE, proc {| item, pokemon, cena |
se pokemon.isShiny? || (pokemon.isShadow? resgate falso)
scene.pbDisplay (_INTL ("Não terá nenhum efeito."))
próximo falso
outro
if scene.pbConfirm (_INTL ("Você gostaria de deixar {1} brilhante?", pokemon.name))
pokemon.makeShiny
scene.pbDisplay (_INTL ("Seu {1} agora está brilhante!", pokemon.name))
scene.pbRefresh
próxima verdade
fim
fim
})
[/CÓDIGO]
Em seguida, no arquivo items.txt na pasta PBS, adicione algo assim:
XXX, SPARKLYSTONE, Sparkly Stone, Sparkly Stones, 1,2100, "Uma pedra peculiar que pode tornar o Pokémon brilhante.", 1,0,0, [/ ICODE]
Mude 'XXX' para o próximo ID em seu arquivo items.txt. Sinta-se à vontade para renomear o item, mas certifique-se de que o nome do item seja consistente entre o que está em seu arquivo items.txt e o que está definido no script. Eu estava indo para Shiny Stone, mas isso já existe para outro propósito.

Deixe-me saber se isso funciona para você.
[/QUOTE]
 
Top