• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Combining Scripts Help!

HackChu

I need a haircut...
674
Posts
17
Years
This will help those who need help on how to make commands work along with others.I've notice that Scripting Tutorials out there go over the basics,but some people don't know how to combine the methods used together.

1.Rival Type Battles

Okay I'm sure there are those out there that have trouble on knowing how to make a trainer battle where they walk up to you, battle, and than walk away.This will help you,I'll try the best I can.


Trainer battle 0x0
This means that an original type of battle will occur.An example is,a trainer you would meet on a route,or cave,etc.

Trainer battle 0x1
This type of battle is a Gym battle,which is always used to execute a battle when you want the trainer to walk to you before and walk away from you after a battle.

Trainer battle 0x4
This type of battle is an double battle.

Now I'll give an example of each!
Trainer Battle 0x0
Always start a script with #dynamic 0x(offset)
Spoiler:


Now at the trainer battle line 0x0 represents a regualer battle which I explained above.The 0x001 represents the Person ID from PET or Advance Trainer battle editors.The 0x0 is is the reserved byte,which is often used.The @before explains what the trainer would say if they saw you and walked up to you.And @after explains what they say during battle when they lose.Finally @beaten which is always used after the battle is what the trainer says if you talked to him.

Now Trainer battle 0x1 used with applymovements.(Look at diegoisawesome's tut for an explanation on regular 0x1 battles,as well as applymovement commands)
Spoiler:


Okay, checkflag is always used to check and see if the battle was used yet,therefore it's always used.The checkflag here 0x200 would go in the person id in Amap,like this 0200, doing that would make the OW not visable until the showsprite command comes into play,than the hidesprite will make it disapear again.Now I explained that applymovements are explainable in diego's tut.Now the command @later is always used here,after the battle this is the pointer it continues from.Here on @later you can put anything,just make sure before you use the release command you add the setflag used,which in this case 0x200.Doing that will set the script,meaning that it wont trigger again.

I will try to add more when I get the chance.I hope you all can understand this.
 
Last edited by a moderator:

spenceroone3

<he eats lots of burgers.
215
Posts
16
Years
I learnt something from this tutorial but I think you need to change the thread title to something more specific. Good luck!
 

.Seth

.explorer.
1,644
Posts
15
Years
You do know about "settrainerflag" and "checktrainerflag" and "cleartrainerflag" don't you?
And to sum up what the tutorial means:

You CAN use more than one type of script command (like applymovement and msgbox, for example) in the same script.

Although, you kind of got off from combining things, to trainerbattles only. O_o

I did learn something about trainer scripts though. I wondered what double battle type's number was.
 
Last edited:

HackChu

I need a haircut...
674
Posts
17
Years
Lol thanks,there is an double type battle command up there I just didn't explain it.But when I find the time I'll edit it and add more things to it and such...
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
Nice tutorial. Hopefully it will help all those people who've just started scripting and don't know how to combine commands into a single script. (b'.')b
 
Back
Top