- Pokémon Essentials Version
- v20.1 ➖
This script is incompatible with: Mr. Gela's Portrait Namebox windows. Use https://eeveeexpo.com/resources/1078/ instead.
Paste in a new script section above Main, or turn into a plugin.
Paste in a new script section above Main, or turn into a plugin.
Script:
class CustomGifts
def self.AAAAAAAAAA
if $game_switches[98] == false
#The pichu from Lerucean Town
pkmn = Pokemon.new(:PICHU, 30)
pkmn.item = :ZAPPLATE
pkmn.form = 2 # Spiky-eared
pkmn.makeFemale
pkmn.shiny = false
pkmn.learn_move(:VOLTTACKLE)
pkmn.learn_move(:HELPINGHAND)
pkmn.learn_move(:SWAGGER)
pkmn.learn_move(:PAINSPLIT)
pkmn.cannot_release = true
pkmn.cannot_trade = true
pkmn.calc_stats
pbAddPokemon(pkmn)
$game_switches[98] = true
else
pbMessage(_INTL("You have already redeemed this code."))
end
end
def self.BBBBBBBBBB
if $game_switches[99] == false
# 99 Master Balls
pbReceiveItem(:MASTERBALL,99)
$game_switches[99] == true
else
pbMessage(_INTL("You have already redeemed this code."))
end
end
end
class MysteryCodes
def self.enterCode
if pbConfirmMessage(_INTL("Would you like to enter a code?"))
code = pbMessageFreeText("Enter Code",_INTL(""),false,10)
if code == "AAAAAAAAAA"
CustomGifts.AAAAAAAAAA
elsif code == "BBBBBBBBBB"
CustomGifts.BBBBBBBBBB
end
else
pbMessage(_INTL("Please come again soon!"))
end
end
end
Create an event that looks like this:
You can modify it in any way as long as it has MysteryCodes.enterCode somewhere in the list of event command for that event.
Additionally you can put MysteryCodes.enterCode in another script, which could allow the player to access it from the menu or pokegear.
You can modify it in any way as long as it has MysteryCodes.enterCode somewhere in the list of event command for that event.
Additionally you can put MysteryCodes.enterCode in another script, which could allow the player to access it from the menu or pokegear.
As the default codes are only examples you will need to make your own. Here is how:
We will use the code CCCCCCCCCC as an example, you should do something different as CCCCCCCCCC is easy to guess. The code can be a minimum on one and a maximum of ten letters and numbers long, just remember that the longer the code is the harder it is to guess it.
after
add
Where XXX is the number of the switch you want.
In that your code here section put the scrip commands you want to trigger when the mystery code is redeemed.
Next after
and finally add
And boom! You have added a mystery code.
If you want to remove the default mystery codes this is how:
First make sure you have at least a placeholder mystery code (i will use CCCCCCCCCC for the example placeholder code.),
then remove
and
then change
to
and boom! You have removed the default mystery codes from the script.
sorry for the complex methods for adding and removing mystery codes, it is mostly because i cannot script.
We will use the code CCCCCCCCCC as an example, you should do something different as CCCCCCCCCC is easy to guess. The code can be a minimum on one and a maximum of ten letters and numbers long, just remember that the longer the code is the harder it is to guess it.
after
Ruby:
def self.BBBBBBBBBB
if $game_switches[99] == false
# 99 Master Balls
pbReceiveItem(:MASTERBALL,99)
$game_switches[99] == true
else
pbMessage(_INTL("You have already redeemed this code."))
end
end
Ruby:
def self.CCCCCCCCCC
if $game_switches[XXX] == false
*Your Code Here*
$game_switches[XXX] == true
else
pbMessage(_INTL("You have already redeemed this code."))
end
end
In that your code here section put the scrip commands you want to trigger when the mystery code is redeemed.
Next after
Ruby:
elsif code == "BBBBBBBBBB"
CustomGifts.BBBBBBBBBB
Ruby:
elsif code == "CCCCCCCCCC"
CustomGifts.CCCCCCCCCC
If you want to remove the default mystery codes this is how:
First make sure you have at least a placeholder mystery code (i will use CCCCCCCCCC for the example placeholder code.),
then remove
Ruby:
def self.AAAAAAAAAA
if $game_switches[98] == false
#The pichu from Lerucean Town
pkmn = Pokemon.new(:PICHU, 30)
pkmn.item = :ZAPPLATE
pkmn.form = 2 # Spiky-eared
pkmn.makeFemale
pkmn.shiny = false
pkmn.learn_move(:VOLTTACKLE)
pkmn.learn_move(:HELPINGHAND)
pkmn.learn_move(:SWAGGER)
pkmn.learn_move(:PAINSPLIT)
pkmn.cannot_release = true
pkmn.cannot_trade = true
pkmn.calc_stats
pbAddPokemon(pkmn)
$game_switches[98] = true
else
pbMessage(_INTL("You have already redeemed this code."))
end
end
def self.BBBBBBBBBB
if $game_switches[99] == false
# 99 Master Balls
pbReceiveItem(:MASTERBALL,99)
$game_switches[99] == true
else
pbMessage(_INTL("You have already redeemed this code."))
end
end
Ruby:
if code == "AAAAAAAAAA"
CustomGifts.AAAAAAAAAA
elsif code == "BBBBBBBBBB"
CustomGifts.BBBBBBBBBB
Ruby:
elsif code == "CCCCCCCCCC"
CustomGifts.CCCCCCCCCC
Ruby:
if code == "CCCCCCCCCC"
CustomGifts.CCCCCCCCCC
sorry for the complex methods for adding and removing mystery codes, it is mostly because i cannot script.
- Credits
- Credit if used:
@tilles111