- Pokémon Essentials Version
- v19.1 ➖
A simple script that adds fake Wonder Trade functionality into your game.
However, unlike most Wonder Trade scripts (which randomly generate Pokémon that are traded to the player), this script selects a Pokémon from a pre-made list, created by you. The script also has six rarities, allowing for some Pokémon to be less commonly traded than others.
(For reference, this is how Pokémon Clover does Wonder Trade. I don't know if there are any other games that do it like this, so if there are, tell me and I'll add another example.)
Paste this in a new script section above Main:
The six "CHANCE" values at the top of the code allow you to adjust the chance to get a Pokémon of each rarity. By default, there is a:
As said in the script itself, it is important that all of these values add to 100 for the script to work properly.
Q: How can I customize a Pokémon further, like making it shiny?
A: Edit the "poke" variable. For more information, go to the Pokémon Essentials Wiki.
Q: Is this script compatible with Gen 8 Project Pokémon / Fakemon?
A: It should be.
Q: Is this compatible with v18?
A: Yes.
Q: Two trains, Train A and Train B, simultaneously depart Station A and Station B. Station A and Station B are 252.5 miles apart from each other. Train A is moving at 124.7mph towards Station B, and Train B is moving at 253.5mph towards station A. If both trains departed at 10:00AM and it is now 10:08, how much longer until both trains pass each other?
A: 32.058 minutes.
Q: Help! The script isn't working!
A: First of all, that's not a question. Second of all, you need to be a little more specific with the issue. Send a crash log.
That's about it. I hope this script is useful.
However, unlike most Wonder Trade scripts (which randomly generate Pokémon that are traded to the player), this script selects a Pokémon from a pre-made list, created by you. The script also has six rarities, allowing for some Pokémon to be less commonly traded than others.
(For reference, this is how Pokémon Clover does Wonder Trade. I don't know if there are any other games that do it like this, so if there are, tell me and I'll add another example.)
THE CODE
Paste this in a new script section above Main:
Wonder Trade Script:
#===============================================================================
# Wonder Trade Script by Sploopo
#===============================================================================
# This script creates a Wonder Trade-like system, where the player sends away
# one of their Pokémon and recieves a random one in return.
# Rather than randomly generating Pokémon, this script allows you to create
# Pokémon beforehand which will be traded to the user.
# All Pokémon are also part of a certain rarity, meaning some Pokémon will be
# more commonly recieved than others.
#===============================================================================
# You can use this script by calling pbWonderTrade in place of a normal trade.
# For information on how to create a normal trade, check the wiki.
#===============================================================================
# For this script to work, put it above main.
# Please give credit to Sploopo when using this.
#===============================================================================
COMMON_CHANCE = 45 # The chance for a random "Common" Pokémon to be selected.
UNCOMMON_CHANCE = 25 # Same as above, but with "Uncommon".
RARE_CHANCE = 15 # You get the idea.
SUPERRARE_CHANCE = 10
EPIC_CHANCE = 4
SUPEREPIC_CHANCE = 1
# Ensure that all of these "chance" values add up to 100, or things might break.
def pbWonderTrade
tradedMon = rand(100) + 1 # Do not edit this line!
if(tradedMon <= COMMON_CHANCE) # Common selected
choose = rand(3) + 1 # Change the "3" on this line to however many Pokémon you
# want in this rarity level.
case choose
when 1 # A simple Pokémon to be traded to the player.
poke = pbGenPkmn(:BULBASAUR, 10) # A Lv. 10 Bulbasaur...
nick = "Example" # ... with the nickname "Example"...
ot = "R. Nixon" # ... with the original trainer "R. Nixon"...
otGender = 0 # ... whose gender is male.
# Because there are 3 Pokémon in this rarity, if the Common rarity is
# chosen by the script, this has a 1/3 chance of being traded to the player.
when 2 # Another simple Pokémon.
poke = pbGenPkmn(:CHARMANDER, 10)
nick = "Example"
ot = "Example"
otGender = 1 # This original trainer is female.
when 3 # Another one.
poke = pbGenPkmn(:SQUIRTLE, 10)
nick = "\"The Rock\" Jh"
ot = "Dwayne"
otGender = 0
end
# Check the wiki for information on how to modify a Pokémon further.
elsif(tradedMon <= UNCOMMON_CHANCE + COMMON_CHANCE) # Uncommon selected
# All rarities need at least 1 Pokémon in them, or else the script will break.
# I've put in some dummy ones.
poke = pbGenPkmn(:SQUIRTLE, 10)
nick = "\"The Rock\" Jh"
ot = "Dwayne"
otGender = 0
elsif(tradedMon <= RARE_CHANCE + UNCOMMON_CHANCE + COMMON_CHANCE) # Rare selected
poke = pbGenPkmn(:SQUIRTLE, 10)
nick = "\"The Rock\" Jh"
ot = "Dwayne"
otGender = 0
elsif(tradedMon <= SUPERRARE_CHANCE + RARE_CHANCE + UNCOMMON_CHANCE + COMMON_CHANCE) # Super Rare selected
poke = pbGenPkmn(:SQUIRTLE, 10)
nick = "\"The Rock\" Jh"
ot = "Dwayne"
otGender = 0
elsif(tradedMon <= EPIC_CHANCE + SUPERRARE_CHANCE + RARE_CHANCE + UNCOMMON_CHANCE + COMMON_CHANCE) # Epic selected
poke = pbGenPkmn(:SQUIRTLE, 10)
nick = "\"The Rock\" Jh"
ot = "Dwayne"
otGender = 0
else # Super Epic selected
poke = pbGenPkmn(:RESHIRAM, 69)
nick = "Reshiram"
ot = "JustinRPG"
otGender = 0
end
pbStartTrade(pbGet(1), poke, nick, ot, otGender) # The trade.
end
#===============================================================================
The six "CHANCE" values at the top of the code allow you to adjust the chance to get a Pokémon of each rarity. By default, there is a:
- 45% chance to get a Common Pokémon
- 25% chance to get an Uncommon Pokémon
- 15% chance to get a Rare Pokémon
- 10% chance to get a Super Rare Pokémon
- 4% chance to get an Epic Pokémon
- 1% chance to get a Super Epic Pokémon
As said in the script itself, it is important that all of these values add to 100 for the script to work properly.
QTMBFA
(Questions That Might Be Frequently Asked)
(Questions That Might Be Frequently Asked)
Q: How can I customize a Pokémon further, like making it shiny?
A: Edit the "poke" variable. For more information, go to the Pokémon Essentials Wiki.
Q: Is this script compatible with Gen 8 Project Pokémon / Fakemon?
A: It should be.
Q: Is this compatible with v18?
A: Yes.
Q: Two trains, Train A and Train B, simultaneously depart Station A and Station B. Station A and Station B are 252.5 miles apart from each other. Train A is moving at 124.7mph towards Station B, and Train B is moving at 253.5mph towards station A. If both trains departed at 10:00AM and it is now 10:08, how much longer until both trains pass each other?
A: 32.058 minutes.
Q: Help! The script isn't working!
A: First of all, that's not a question. Second of all, you need to be a little more specific with the issue. Send a crash log.
That's about it. I hope this script is useful.
- Credits
- Sploopo: created the entire script