The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.


Reply
 
Thread Tools
  #1    
Old June 19th, 2009, 02:38 PM
HackChu's Avatar
HackChu
I need a haircut...
Community Supporter Tier 1
 
Join Date: Jan 2007
Location: Bankrupt Amerika
Age: 21
Gender: Male
Nature: Modest
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:
#dynamic 0x800000

#org @start
trainerbattle 0x0 0x001 0x0 @before @after
msgbox @beaten 0x6
release
end

#org @before
= I won't lose to you.

#org @after
= What!

#org @beaten
= Leave me alone!


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:
#dynamic 0x800000

#org @start
checkflag 0x200
showsprite 0x(person event)
applymovement 0x(person event) @move
waitmovement 0x0
msgbox @hey 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later
end

#org @move
#raw 0x11
#raw 0x11
#raw 0xFE

#org @hey
= Hey wait up!

#org @before
= I want to battle!

#org @after
= Wow nice battle.

#org @later
msgbox @well 0x6
applymovement 0x(person event) @move2
waitmovement 0x0
hidesprite 0x(person event)
setflag 0x200
release
end

#org @well
= Well I have to go, bye.

#org @move2
#raw 0x10
#raw 0x10
#raw 0xFE


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.
__________________
Join us!

My 'learning how to combine battle scripts' thread:
http://www.pokecommunity.com/showthread.php?t=183001

SoulSilver FC:1162 1864 5409
Name: Ethan

Black FC: 2666 1354 4379
Name: Ashton

White 2 FC: 1120 8065 3049
Name: Nate

3DS Friend Code: 1349-4646-2412
Name: tysonrss

Last edited by Hashtag; April 15th, 2010 at 08:24 AM.
Reply With Quote
  #2    
Old June 22nd, 2009, 05:32 AM
spenceroone3's Avatar
spenceroone3
<he eats lots of burgers.
 
Join Date: Aug 2007
Location: In your closet
Gender:
Nature: Hasty
Send a message via Windows Live Messenger to spenceroone3
I learnt something from this tutorial but I think you need to change the thread title to something more specific. Good luck!
__________________
<wtf? A lugi-oh?
<What the hell did you do to my Arceus?
Reply With Quote
  #3    
Old June 22nd, 2009, 02:04 PM
HackChu's Avatar
HackChu
I need a haircut...
Community Supporter Tier 1
 
Join Date: Jan 2007
Location: Bankrupt Amerika
Age: 21
Gender: Male
Nature: Modest
Hey thanks alot for the first comment and reading my tut.Whats a good name?
__________________
Join us!

My 'learning how to combine battle scripts' thread:
http://www.pokecommunity.com/showthread.php?t=183001

SoulSilver FC:1162 1864 5409
Name: Ethan

Black FC: 2666 1354 4379
Name: Ashton

White 2 FC: 1120 8065 3049
Name: Nate

3DS Friend Code: 1349-4646-2412
Name: tysonrss
Reply With Quote
  #4    
Old June 22nd, 2009, 02:58 PM
.Seth's Avatar
.Seth
.explorer.
 
Join Date: Jun 2008
Location: A capacitor in a power supply board.
Gender: Male
Nature: Quiet
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 by .Seth; June 22nd, 2009 at 03:02 PM. Reason: typo
Reply With Quote
  #5    
Old June 22nd, 2009, 03:07 PM
HackChu's Avatar
HackChu
I need a haircut...
Community Supporter Tier 1
 
Join Date: Jan 2007
Location: Bankrupt Amerika
Age: 21
Gender: Male
Nature: Modest
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...
__________________
Join us!

My 'learning how to combine battle scripts' thread:
http://www.pokecommunity.com/showthread.php?t=183001

SoulSilver FC:1162 1864 5409
Name: Ethan

Black FC: 2666 1354 4379
Name: Ashton

White 2 FC: 1120 8065 3049
Name: Nate

3DS Friend Code: 1349-4646-2412
Name: tysonrss
Reply With Quote
  #6    
Old May 4th, 2010, 04:27 PM
_vince_04's Avatar
_vince_04
Beginning Trainer
 
Join Date: Oct 2009
Location: Iloilo, Philippines
Gender: Male
Nature: Gentle
why dont you use trainerbattle 0x03 instead of 0x01?
Reply With Quote
  #7    
Old May 4th, 2010, 09:10 PM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 19
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
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 02:05 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.