• 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.
Pokémon holding Mail

Pokémon holding Mail 2017-02-20

Pokémon Essentials Version
v16.2 ➖
What's this?
One of the cutests, yet often unused/overlooked features (perhaps for a good reason, as online trading isn't a common thing in Pokémon Essentials games) is Mail. Yes. Mails are coded into the game, and there's plenty of backgrounds on your /Pictures/ folder for each item. With this small resource, we'll learn how to create a Pokémon holding a Mail from another trainer. You can use this in a Pokémon trade, or perhaps in a gift Pokémon.

Show me the goods!
o41xBju.png


Installation
Since there are many lines, and you might want to alter the gift/trade Pokémon further, we are going to create a new script/method. Create a new script section above "Main" (I usually just have a "multi-purpose" called "Misc. Scripts").

I'm going to assume you know how to edit a Pokémon. If you need an example, check the Pokémon Fan Club example map.

We are going to create a new Pokémon and instead of edits its moves, level, etc, we're just going to focus on the item and how to create the mail parameters which are:
- Writer's name (usually another trainer)
- Up to three Pokémon displayed (usually the trainer's)
- A message. Read here for text formatting information.

For the purpose of this tutorial, we are creating a Level 30 Bulbasaur holding a Bubble Mail, with a set message from trainer Mr. Gela, and displaying three Pokémon.

Code:
Expand Collapse Copy
def giveMailMon
	msg="Wahee! This is my text.\nPretty cool, huh?"
	p=PokeBattle_Pokemon.new(:BULBASAUR,30,$Trainer)
	p.setItem(:BUBBLEMAIL)
	# If you have shiny menu icons, make the other Pokémon shiny after these three lines:
	poke=PokeBattle_Pokemon.new(:BULBASAUR,30,$Trainer)
	pokeb=PokeBattle_Pokemon.new(:IVYSAUR,30,$Trainer)
	pokec=PokeBattle_Pokemon.new(:VENUSAUR,30,$Trainer)
	poke1=poke2=poke3=nil
	poke1=[poke.species,poke.gender,poke.isShiny?,(poke.form rescue 0),(poke.isShadow? rescue false)]
	poke2=[pokeb.species,pokeb.gender,pokeb.isShiny?,(pokeb.form rescue 0),(pokeb.isShadow? rescue false)]
	poke3=[pokec.species,pokec.gender,pokec.isShiny?,(pokec.form rescue 0),(pokec.isShadow? rescue false)]
	p.mail=PokemonMail.new(p.item,msg,"Mr. Gela",poke1,poke2,poke3)
	Kernel.pbAddPokemon(p)
end

To call this new method, just write "giveMailMon" in a script call inside an event.
Credits
h7zpBm0.png

Please credit if used to:

Mr. Gela

Please do not redistribute this anywhere resource anywhere else. If you wish to share this, link to this site.

xa1A2iB.png

Por favor da créditos si lo utilizas a:
Mr. Gela

Por favor no redistribuyas este recurso en ningún otro lugar. Si quieres compartir esto, utiliza un enlace a este sitio.
Author
Mr. Gela
Views
2,043
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Mr. Gela

Back
Top