• 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.

Teh Blaziken's Scripting School

Status
Not open for further replies.

TB Pro

Old-timer
2,708
Posts
19
Years
Intro:
Welcome, My name Is Teh Blaziken And I am here to teach you the bascis of scripting with Pokescript! This will be a tutorial of it's own breed, As the name suggests it is a Scripting School. I will give out homework assignments after each lesson. You can post them here, or PM them to me. If you mess up I will point out what is wrong for the first script of each homework assignment, And then I will leave it up to you to figure out what is wrong with the second one(if there is a second error). Then I will make tests over 2 or more subjects. There is two ways to script right? well I'm gonna' teach you how to do it the way I learned, Which uses seperate paragraphs, You'll understand what I mean later.

Table Of Contents:
  • 1. Simple Talking Script
  • 2. Compiling Your Script
  • 3. Changing Text Color
  • 4. Flags And Their Uses
  • 5. Yes/No Scripts
  • 6. Applymovement Scripts
  • 7. Giveitem Scripts
  • 8. Givepokemon Scripts
  • 9. Wildbattle Scripts(Coming Soon)
  • 10. Trainerbattle Scripts[Sub-Topic: Changing Trainerbattle Text Color](Coming Soon)
  • 11. Warping Scripts(Coming Soon)
  • 12. Useful Info(Coming Soon)
  • 13. Special Thanks




Basic Talking Script:
First up is just a regular old talking script. Nothing special, But what all scripts are based off of.
First thing is to begin the script, to make it show up.

Use this:

Code:
#ORG $begin

Start off ALL of your scripts with that. You may notice that I capatolized the ORG command. I do that so If I ever need to find the beginning of my scripts.
The $begin command is an offset. You can put whatever you want after the $ I always put begin after because that offset begins the script.

Now for the next part, lookie here:

Code:
lock
faceplayer

What does this mean? Well you should be able to guess what it means, but if not I'll explain it for you.
The lock command locks the player(DUH!)
The faceplayer command does what else, But makes the NPC face the player(DUH! again!)
Easy so far huh?

Well lets see what's next:

Code:
message $talk
boxset 6

More new stuff huh? Don't worry I'll explain it for ya'!
Well first off the message $talk just says that there is a message there, and the $ is another offset. This one is where the message will be directed. You can put anything after the $ as long as it matches up at the bottom(don't worry you'll get what I'm talking about later).
Next, the boxset 6 tells what boxset to use. A boxset is what the message is displayed in on the game. This one is just a regular boxset. We will get to other ones later, but for now we're just gonna' use this one!

Now, For the last part of this paragraph:

Code:
release
end

Well of course, some more new stuff!
Ok, release obviously releases the both the lock, And the faceplayer commands.
The end command does, what else, but end the script! So once it has gone through all of the other commands, It somes here and ends.

Now for the beginning of the new paragraph:

Code:
#ORG $talk

Well lookie here we see the #ORG command again! Well this one is used to begin the text.
And you see the $talk command right? Well remember the offset I showed you up there ^^? Well I said Make sure it matches up with the one at the bottom, Well this is the offset I was talking about.

Ok next part:

Code:
$talk 1 = Hey, I am talking! Can you see\nthat I am talking right\phere?!

Well see the $talk again? Well after you direct the offset to a particular part of the script, You must let it commence. The 1 = part simply starts the text.
And well the text of course is what the NPC will say.
Well lookie here, See the \n and \p commands? Well the \n command makes the text go to another line, And the \p command makes the text go to a new textbox(it makes you press A for the text to continue). Of course you must alternate them out, Like never use two \n or two \p commands in a row.

Now to put it all together:

Code:
#ORG $begin
lock
faceplayer
message $talk
boxset 6
release
end

#ORG $talk
$talk 1 = Hey, I am talking! Can you see\nthat I am talking right\phere?!

~That concludes the First Part of my tutorial!

Homework Assignment:
I want you to make me a talking script that says: Hey, buddy how ya' doin!
And one that says: PLAYER, What's up?
P.S. to display the PLAYER's name put this into your script: \v\h01.


Compiling Your Script:
Ok you have finished your script, now what? Assuming yo have downloaded Pokescript and PKMADV you need to complie your script by doing this.
Ok make your script then goto File--->Save As--->[your script name].rbc(yes you type .rbc after the name of your script)--->Change Save Type As from Text Files to All Files--->Script Folder--->Right Click Your script-->Compile Script--->You'll see (LOG) Instant then BufRite--->Click On the little book--->Choose your ROM--->Click on the flashlight--->Click on the first set of numbers--->Click Assign--->File--->Burn--->look up untill you see the name of your beginning offset and see what numbers are after it then right them down.
Now Open up A-Map--->Then click on(or make) a script or person(Person for regular talking script or and anything else for scripts) and look untill you see offset (if it's new you'll see $000000) and replace it with the numbers you wrote down earlier(leave the $ sign).

~And that concludes that part of the tutorial.

Changing The Text Color:
Now This will teach you how to change the color the text appears in the game.

Now first off use this code to change the color:

Code:
\c\h01\hxx

Just change the xx to one of these to change the color(thanks to Itman1234 for the list).

Spoiler:

Now here is where the code goes in the script(this one is using Dark Green):

Code:
#ORG $colortalk
$colortalk 1 =\c\h01\h06Hey, what's up?

Remember to NEVER put a space between the color code and the text. Well that's it! Easy huh?

Now to put it all together:

Code:
#ORG $begin
lock
faceplayer
message $colortalk
boxset 6
release
end

#ORG $colortalk
$colortalk 1 =\v\h01\h06Hey, My text color is\nDark Green!

~That concludes this part of my tutorial!

Homework Assignment:
I want you to make me a script that says: Hello, How are you PLAYER? in a Dark Green text color.
I also want you to make me a script that says: Yo' Wazzup Bra'? in a cyan text color.


Flags And Their Uses:
Ok so you may have heard of these things called Flags. What are they you ask? Well A plag is pretty much just a reminder to the game that there is a script there. Only certain types of scripts have flags. I.E. Applymovement, Giveitem ect.
There are three commands for flags. Checkflag, setflag And clearflag. Checkflag checks a flag. So it pretty much just tells the game that a certain script is there. It also just checks to make sure the flag has not been used before(If it has then the script will not be carried out). setflag Sets the checked flag(unless it gives you something, But We'll get to that later). It makes sure an event dosent happen over and over again. So for exapmle, Say we made a Giveitem script, Well we don't want the person to keep giving away Potions, So we use the checkflag and setflag commands to insure that it dosen't. clearflag Opens the flag back up for use once it has been set.
Never use the same flag for two seperate scripts, Unless you want one script to not be able to be carried out once you complete another script. I.E. If you wanted to put two legendaries in a game, But only let the player get one you would give the two scripts the same flag, So if one of them is set, the other one will be unable to happen.
Now you can't just put checkflag into a script.

You have to put it like this:

Code:
checkflag 0xXXX

Fill the XXX in with a number. Start with 200. Same thing for setflag and clearflag.

~That concludes that part of my tutorial!


Yes/No Scripts:
You want to make a script that asks you Yes or No? Well I will teach you how to do it!

Ok So make the beginning of your script(you know the #ORG, the offset, lock, and faceplayer?).

Then put this:

Code:
message $yesno
boxset 5

Yes a new boxset. This one is boxset 5 the boxset that asks a question. And of course the $yesno is just another offset.

Now put this:

Code:
compare LASTRESULT 1

Well this just decides what choice you made be it yes or no.

Ok next is:

Code:
if B_true goto $yes

Or:

Code:
if B_false goto $no

The first one is just saying that if you choose yes it will be dirested to the specified offset. The second does the same except that if you choose no it goes to the specified offset.

Now This is next:

Code:
message $yes
boxset 6

Or:

Code:
message $no
boxset 6

These do the same as the ones above except these tell the script where to go if you choose the command opposite as the one you stated above.
Then the rest is just like a regular talking script until you get to the second paragraph.

Use this:

Code:
#ORG $yes
message $cool
boxset 6
release
end

All that is is a connection. The if B_true goto $yes just comes here to be re-directed.

All together it will look like this:

Code:
#ORG $begin
lock 
faceplayer
message $yesno
boxset 5
compare LASTRESULT 1
if B_true goto $yes
message $no
boxset 6
release
end

#ORG $yes
message $cool
boxset 6
release
end

#ORG $yesno
$yesno 1 = Is scripting easy?

#ORG $no
$no 1 = That sucks!

#ORG $cool
$cool 1 = Well that is cool!

Not too hard huh?

~That colcludes this part of my tutorial!

Homework Assignment:
I want you to make me a script that asks: Do you like ponies? If you awnser yes it says: I hate you If it you awnser no it says: I hate you!
And one that asks: Do U leik Mudkipz? If you awnser yes it says: I liek Mudkipz 2! If you awnser no it says: I liek Mudkipz!


Test:

Ok this is your first test! I would like you to make me a script. Ok here goes: I want a Yes/No Script that asks: Was this easy so far? And if you awnser yes I want it to say: No It was not! In Light Orange. And If you awnser no I want it to say: Lol! lol! lol! lol! lol! lol! In Dark Green.


Applymovement Scripts:
Ever wanted to make an NPC move? Well I will teach you how! First things first, Start your script, But this time no lock or faceplayer commands.
Well what is different?

Well lookie here:

Code:
checkflag 0xXX

Huh what do ya' know? Your first script with a flag. Just fiill in the XX with a number. Well I already explaned them so lets move on.

Here:

Code:
if B_true goto $done

Looks familiar huh? Well you have seen it before, In the Yes/No script. Here is what it does is: After the script has brrn completed if you step on the tile again it just goes to $done.

Now look here:

Code:
applymovement 0xXX $move

Well as you can probably tell, This is the part of the script that applies the movement to the NPC. just replace the XX with the people number of the NPC you want to move(the people number is located above the sprite number).

Next:

Code:
pausemove 0

Well when I started doing applymovement scripts these confused me. what this means is the script waits until all movements have been completed to continue the rest of the script. Pause 0xXX is also a command. Just put the number of steps you want the script to wait to comtinue where the XX is.
The rest of the script is the same untill the bottom of the first paragraph.

Code:
setflag 0xXX
Yeah I already covered these so lets move on.
The rest is the same until the second paragraph.

Here:

Code:
#ORG $done
release
end
All this does is when you step on the tile after the script is completed it goes here and just releases and ends like a regular tile with no script on it.

Now to fill out the movements:

Code:
#ORG $walk
$walk 1 ; #binary XXXXXXXXXXX  0xFE
Loads of new stuff. ok see how we used the ; instead of the =? Well that is how it is with Applymovement scripts. And see the #binary command? ALYWAYS put that in front of your movements! Ok next, See all those X's? Well fill those in with movement commands. Remember ALWAYS put 0xFE on the end of your movements! It is the ending movement command. Also there is a limit on how many movement commands that can be placed in a single Applymovement offset. I always set my max at 10 excluding 0xFE. If you neep an NPC to move more than ten steps at a time, Just add aother applymovement under the same pausemove 0.
Here is a list of Fire Red Movements:
Spoiler:
Ruby Movements:
Spoiler:


Just put whatever movements you need in your script and then end it with 0xFE.
The rest os the same as normal.

Now to put it all together:

Code:
#ORG $begin
checkflag 0x200
if B_true goto $done
applymovement 0x01 $dudewalk
pausemove 0
message $dudetalk
boxset 6
setflag 0x200
release
end

#ORG $done
release
end

#ORG $dudewalk
$dudewalk 1 ; #binary 0x13 0x13 0x13 0x13 0x4A 0xFE

#ORG $dudetalk
$dudetalk 1 = Hey, I'm a dude!\nDid you know that?\pOh then You're stupid!

Well that script makes the NPC walk right at normal speed four steps, And then face the player, Then say his stuff.

You can also write the movements is #RAWs. I'll show you what I mean:

Code:
#ORG $dudewalk
#RAW 0x13
#RAW 0x13
#RAW 0x13
#RAW 0x13
#RAW 0x4A
#RAW 0xFE

~That concludes this part of my tutorial!

Homework Assignment:
Ok I want you to make an NPC with the People number of 2 to walk right 2 steps at normal speed, Then run up 5 steps, Then walk left 7 steps super slow, And then face the player, And say: Hi I'm Koo! Who Are You?
For the second script I want the player to run up 6 steps, Then run left 1 step, Then run up 1 step, Then run left 1 step, And say: Oh I better hurry to Donkey Kong's Bannana Party!
P.S. The number to applymovement to the player is 0xFF.


Giveitem Scripts:
Ever wanted an NPC to give the player an item of some sort? Well I'll teach you how to do it!

First off just start off the script.

Now We need to check a flag, remember to NEVER use the same flag twice(except for certain scripts, not these though)!!!

Next, We put this:

Code:
if B_true goto $done

Looks like what we used in the Yes/No, and Applymovement Scripts huh? Well that is because It is the same thing.

Now for the next part:

Code:
message $takethis
boxset 6

This is the message that will be displayed before the player is given an item.

Next is the Giveitem command:

Code:
giveitem XX XX

Ok well of course giveitem gives the item! Now see the first XX? Well replace those with the Item numbers(I will post a list). Now see the second XX? Well fill those in with how many items you want the NPC to give the player.

Here is a list of Items:
Spoiler:

Now you must set the flag, release the NPC/player, and end the script.

Now to Put it all together:

Code:
#ORG $begin
lock
faceplayer
checkflag 0x201
if B_true goto $done
message $takethis
boxset 6
giveitem 0xD 1
setflag 0x201
release
end

#ORG $done
$done 1 = Nope no more bro!

#ORG $takethis
$takethis 1 = Take this Potion.

~That Concludes This Part Of My Tutorial!

Homework Assignment:
I want you to make a person Say: Hi, hi, hi, hi, hi, take this! And give you 3 Potions and 2 paralyze heals.
I want you to make a person say:...............................Take, go! And give 2 Master Balls, 3 Escape Ropes, and 1 Premire Ball.


Test:

Okay this is your second test, I want you to make me a script that asks: Are you a Mean Person? In Red font, And If you awnser yes then she says: Then Get away from me!!!! In red Font color, and runs right 3 spaces. If you say No then she says: Good, I will give you something for being a nice person. In Red font color, and moves up 2 spaces, left 2 spaces, pauses, moves down 2 spaces, right 2 spaces and gives a Master Ball and 2 Rare Candies. If you talk to her after the script is colpleted, then she says: Yuppers! In Dark-Green font color.

Givepokemon Scripts:
Hey! Have you ever wanted to make an NPC give the layer a Pokemon? Well with this part of my tuturial I will explain Giveitem scripts! Ok start off your script. N

Ok start off your script.

Now we need to check a flag(again NEVER set the same flag twice, except for certain scripts)!!!

Now for this part:

Code:
if B_true goto $done

Looks the same as on a couple of past scripts, right? Well that's because it is the same.

Now put this:

Code:
message $takepoke
boxset 6

This will be the message that will be displayed before the pokemon is given.

Now for the difinative part:

Code:
givepokemon XX XX XX

This does, what else, but gives the player a pokemon. Okay see the first XX? Well that is the space you put the Pokemon that you wish to recieve's number. The second XX is what level you want the Pokmeon to be when it is recieved. The third, and final XX is what item you want the Pokemon to be holding.

Here is a list of Pokemon:
Spoiler:

Now you must end it.....Okay, like this:

Code:
setflag
release
end

Now to see what it looks like all together!

Code:
#ORG $begin
lock
faceplayer
checkflag 0x202
if B_true goto $done
message $here
boxset 6
givepokemon 1 99 0xD
setflag 0x202
release
end

#ORG $done
message $nomore
boxset 6
release
end

#ORG $here
$here 1 = Here I want you to have\nthis BULBASAUR because\pit is too strong for me.

#ORG $nomore
$nomore 1 = How is that BULBASAUR\ndoing? IS it too strong\pfor you?

~That Colcludes This Part Of My Tutorial!

Homework Assignment:
I want you to make me a script that gives you a Charmander at level 6.
I want you to make me a script that gives you a Chimecho at level 19 holding a Lum Berry.

Special Thanks:
  • Itman1234 = For teaching me how to script, For the color codes, And for being such a big help and a good friend!
  • Wingzro17 = Help with Yes/No Scripts.
  • Irish Witch = Creating Pokescript.
  • Thethethethe = Being an inspiration to hack, for awnsering my questions, and for the list of Pokemon.
  • Destindjagold = Being an inspiration to hack.
  • Anybody Else I forgot.
 
Last edited:

Boz

Smeargle Pwns You. :]
17
Posts
17
Years
Heh i like this x]

I did the first homework! ;D this is from memory ;]

Code:
#org $first
lock
faceplayer
message $howareyou
boxset 6
release
end

#org $howareyou
$howareyou = Hey man, whatsup?


And the second one ;D

Code:
#org $second
lock
faceplayer
message $heyplayer
boxset 6
release
end

#org $heyplayer
$heyplayer = \v\h01 whats up?
 

+Sneasel™

It's a meeee, itman!
1,032
Posts
16
Years
Heh i like this x]

I did the first homework! ;D this is from memory ;]

Code:
#org $first
lock
faceplayer
message $howareyou
boxset 6
release
end

#org $howareyou
$howareyou = Hey man, whatsup?


And the second one ;D

Code:
#org $second
lock
faceplayer
message $heyplayer
boxset 6
release
end

#org $heyplayer
$heyplayer = \v\h01 whats up?

One thing yhou forgot:

Instead of:
$heyplayer = \v\h01 whats up?

It should look like this:
$heyplayer 1 = \v\h01 whats up?

That 1 should always go there for every bottom offset.

Oooh, nice guide :)
 

Twinx

s o m e t h i n g M O R E
1,802
Posts
17
Years
This is cool.. Thanks for taking the time buddy!
My assignments + the test are in the spoiler. Hope I didn't screw up :D

Spoiler:
 
Last edited:

TB Pro

Old-timer
2,708
Posts
19
Years
Heh i like this x]

I did the first homework! ;D this is from memory ;]

Code:
#org $first
lock
faceplayer
message $howareyou
boxset 6
release
end

#org $howareyou
$howareyou = Hey man, whatsup?


And the second one ;D

Code:
#org $second
lock
faceplayer
message $heyplayer
boxset 6
release
end

#org $heyplayer
$heyplayer = \v\h01 whats up?
Yeh look what Itman says below.


One thing yhou forgot:

Instead of:
$heyplayer = \v\h01 whats up?

It should look like this:
$heyplayer 1 = \v\h01 whats up?

That 1 should always go there for every bottom offset.

Oooh, nice guide :)
Yeh thsnks for helping him out for me!

And, I am glad you like it!



Oo snap. It should ALWAYS be 1?
Yeh Always make it like this:

Code:
#ORG $message
$message 1 = Blah blah blah!


This is cool.. Thanks for taking the time buddy!
My assignments + the test are in the spoiler. Hope I didn't screw up :D

Spoiler:

Thanks for the complement!
Your scripts look fine!
I could spot no errors!
Good Job man!

Everybody look out for the next part of my tutorial, Movement Scripts soon!
 
83
Posts
17
Years
...-clings to thread- Thank you ;___;
I keep delaying learning how to script, but this thread is talking out of it XD
Awesome thread, and seriously, thanks for making it n__n;
 

TB Pro

Old-timer
2,708
Posts
19
Years
...-clings to thread- Thank you ;___;
I keep delaying learning how to script, but this thread is talking out of it XD
Awesome thread, and seriously, thanks for making it n__n;

No prob!
This guide was to help all those who need extreme help with scripting.
Look out for my Movement Script comping by the end of today!
 

hibryd

Beginner (But learning!)
21
Posts
16
Years
This guide is going to save my life.

Seeing as how I spend so little time on PC, what with my CHOIR LIFE!

lol, I love singing. But it gets really annoying that I can't spend more time on this.
 

Raimu Bito

Raimu Bito -- Facing erasure
37
Posts
16
Years
  • Seen Oct 28, 2008
1st homework. :D
Code:
#ORG $begin
lock
faceplayer
message $wazzap
boxset 6
release
end

#ORG $wazzap
$talk 1 = \v\h01, whats up?

and

Code:
#ORG $begin
lock
faceplayer
message $howyadoin
boxset 6
release
end

#ORG $howyadoin
$talk 1 = Hey, buddy how ya' doin!
do i get a cookie? ^.^
 

+Sneasel™

It's a meeee, itman!
1,032
Posts
16
Years
1st homework. :D
Code:
#ORG $begin
lock
faceplayer
message $wazzap
boxset 6
release
end

#ORG $wazzap
$talk 1 = \v\h01, whats up?

and

Code:
#ORG $begin
lock
faceplayer
message $howyadoin
boxset 6
release
end

#ORG $howyadoin
$talk 1 = Hey, buddy how ya' doin!
do i get a cookie? ^.^
You are correct!
*gives out a cookie*
 
9
Posts
16
Years
  • Seen Mar 14, 2009
....do you know how to make a trainer script and accually make it work and how to enter it into the game?
 

+Sneasel™

It's a meeee, itman!
1,032
Posts
16
Years
....do you know how to make a trainer script and accually make it work and how to enter it into the game?
he knows, but his guide isn't up to that yet, its 'coming soon'
wow, this is suxx0rz. "no offence"
(remember what you posted in my thread,"teh blaziken"?)
holding grudges will get you no where!
Don't be like that, be nice to him, he made this to help you get better at hacking.
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Apr 2, 2024
wow this is great blaziken i can't wait until trainer battles
i hope you put how to my gym leader battles in that section
good luck!
 

TB Pro

Old-timer
2,708
Posts
19
Years
This guide is going to save my life.

Seeing as how I spend so little time on PC, what with my CHOIR LIFE!

lol, I love singing. But it gets really annoying that I can't spend more time on this.
Why thank you!

1st homework. :D
Code:
#ORG $begin
lock
faceplayer
message $wazzap
boxset 6
release
end

#ORG $wazzap
$talk 1 = \v\h01, whats up?

and

Code:
#ORG $begin
lock
faceplayer
message $howyadoin
boxset 6
release
end

#ORG $howyadoin
$talk 1 = Hey, buddy how ya' doin!
do i get a cookie? ^.^
lol yuppers!
Free cookie to ya'!


You are correct!
*gives out a cookie*
Thanks for giving out that cookie for me! Lol!

....do you know how to make a trainer script and accually make it work and how to enter it into the game?
Yuppers! Like it says (Coming Soon)

he knows, but his guide isn't up to that yet, its 'coming soon'
Yeh thanks Itman!

wow, this is suxx0rz. "no offence"
(remember what you posted in my thread,"teh blaziken"?)
Wow dude....just....wow! Come on dude, Just take the hits rollin' and get over it! I said what I said because it needed to be said. If you would like to post something like this do it through PM, Don't clutter-up my thread with spam. Please kindly remove this.


itman1234 said:
holding grudges will get you no where!
Don't be like that, be nice to him, he made this to help you get better at hacking.
Yes exactly!

wow this is great blaziken i can't wait until trainer battles
i hope you put how to my gym leader battles in that section
good luck!
Well thank you buddy!
Well Gym Leader Bayttles are the same as trainerbattles!

If you couldn't tell already Itman will be dealing with your Q's and such while I'm gone.
 

Luck

¯\_(ツ)_/¯
6,779
Posts
16
Years
  • Seen May 20, 2023
Nice teh blaziken.
if you can't type/speak English well then i understand but if you do speak/type English well you should check your tutorial.
There are a lot of spelling errors for example:accually.Only 1 c and there needs to be a "T" between c and u.
Makes you seem unprofessional.
 
Status
Not open for further replies.
Back
Top