• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Resource icon

v21.1 Item Convertor 1.0

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
Also compatible with
  1. v21.1
A simple item convertor and an alternative crafting script
currently implemented are EV reducing berries to vitamins and simple treasure upgrades (needs at least 3)
comes with a example for how to add others

just put the script into a new page above main and call it using convertberry or converttreasure or anything else you wanna add

Script:

def convertberry
vitamin||= nil
@conversion_hash = {
:POMEGBERRY => :HPUP,
:KELPSYBERRY => :PROTEIN,
:QUALOTBERRY => :IRON,
:HONDEWBERRY => :CALCIUM,
:GREPABERRY => :ZINC,
:TAMATOBERRY => :CARBOS
}
pbMessage(_INTL("I can trade berries for vitamins"))
berry = pbChooseItemFromList(_I("Choose an berry"), 1, :POMEGBERRY, :KELPSYBERRY, :QUALOTBERRY, :HONDEWBERRY, :GREPABERRY, :TAMATOBERRY)
if pbGet(1) == :NONE
else
vitamin = @conversion_hash[berry]
ret = pbConfirmMessage(_INTL("Do you want to change your #{berry.name} into a #{vitamin.name}?"))
if ret
$bag.remove(berry)
pbMessage(_INTL("Okay. I'll turn your #{berry.name} into a #{vitamin.name} for you."))
pbReceiveItem(vitamin)
else
return nil
end

end
pbMessage(_INTL("Come back with a berry"))
end

def converttreasure
bettertreasure||= nil
@conversion_hash = {
:NUGGET => :BIGNUGGET,
:PEARL => :BIGPEARL,
:BIGPEARL => :PEARLSTRING,
:TINYMUSHROOM => :BIGMUSHROOM,
:BIGMUSHROOM => :BALMMUSHROOM,
:STARDUST => :STARPIECE,
:STARPIECE => :COMETSHARD
#:TINYBAMBOOSHOOT => :BIGBAMBOOSHOOT
}
pbMessage(_INTL("I can trade treasures for better treasures you need at least 3"))
treasure = pbChooseItemFromList(_I("Choose an item"), 1, :NUGGET, :PEARL, :BIGPEARL, :TINYMUSHROOM, :BIGMUSHROOM, :STARDUST, :STARPIECE) #,:TINYBAMBOOSHOOT)
if pbGet(1) == :NONE||
if $bag.quantity(treasure) < 2
pbMessage(_INTL("You need more"))
else
bettertreasure = @conversion_hash[treasure]
ret = pbConfirmMessage(_INTL("Do you want to change you #{treasure.name} into a #{bettertreasure.name}."))
if ret
$bag.remove(treasure,3)
pbMessage(_INTL("Okay. I'll turn your #{treasure.name} into a #{bettertreasure.name} for you."))
pbReceiveItem(bettertreasure)
else
return nil
end
end
pbMessage(_INTL("Come back with treasure"))
end
end

#Custom convertors
#Fell free to add anything under here
#here is a expample
#def healingitems
#berry||= nil
#@conversion_hash = {
# :PECHABERRY => :ANTIDOTE}
#pbMessage(_INTL("I can trade berries for healing items"))
#berry = pbChooseItemFromList(_I("Choose an berry"), 1, :PECHABERRY)
# if pbGet(1) == :NONE
#else
#healing = @conversion_hash[berry]
# ret = pbConfirmMessage(_INTL("Do you want to change your #{berry.name} into a #{healing.name}?"))
# if ret
# $bag.remove(berry)
# pbMessage(_INTL("Okay. I'll turn your #{berry.name} into a #{vitamin.name} for you."))
# pbReceiveItem(healing)
#else
#return nil
#end
#end
#pbMessage(_INTL("Come back with a berry"))
#end

if defined?(PluginManager) && !PluginManager.installed?("Item Convertor")
PluginManager.register({
:name => "Item Convertor",
:version => "1.0",
:credits => "Derek"
})
end
Credits
Derek
Author
Maurili
Views
1,056
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Maurili

Back
Top