________________________
Hey, this is an extreme noob tutorial for scripting, ment for beginners.
This guide will cover:
1. Making a simple talking script
2. Burning the script to the ROM
3. Making a giveitem/givepokemon script
4. Making movement scripts
5. Color Messages
6. Trainer Battles
Well, here we go :)
________________________________
1. Making a simple talking script
First, open up notepad.
Type this onto notepad:
___________
#ORG $begin
lock
faceplayer
message $talk
boxset 6
release
end
#org $talk
$talk 1 = Hey, what's up?
______________
Ok, here is what all that means:
#ORG $begin is how you should start all your scripts with. You can also use #org, it doesn't matter, i just do it uppercase.
lock makes it so when your talking to the person, he can't move.
Example: If in Advance map, you set the guy for moving up and down, he won't move while your talking to him.
faceplayer makes it so when you talk to the person, he turns and faces you.
message $talk needs some explaining.
Whenever you want someone to talk, put message $
Then, after the $, put whatever you want. That $ is called an offset. In this case, i put $talk, to make it easy.
boxset 6 is something that should always be put after a message.
It makes it so the script is in a text box in the game. There are other boxsets, but for now, boxset 6 is what you should use.
release makes it so when the script is done, it unlocks the person you are talking to, so he can move.
end should always be put at the end of a script, and so should release^^
Otherwise, the script won't end, and that's not good!
Then, we come to the bottom, where it says:
#org $talk
$talk 1 = Hey, what's up?
This is what that means.
As you can see, it stars with #org, as all beginnings should.
But instead of $begin, there is $talk.
Look up, and it says message $talk.
That means, it goes to that part, where it will do what the bottom part says, since the two $ match up.
So then it goes $talk 1 = Hey, what's up?
Well, after that, always put the $ again, then put a space, then put a 1. Then another space, the equal sign, and another space. After that last space, put your message.
In this case, it's "Hey, what's up?"
But, what if the message was this?
#org $test
$test 1 = Hey, what's up? I'm good, thank you! Do you like animals? I do!
Well, if you don't realize, this goes in a text box. Open up your ROM in VBA and talk to someone, and you can see the box. That won't fit in the box, so what you do is this:
You use \n and \p. Here's an example:
#org $test
$test 1 = Hey, what's up? I'm good, \nthank you! Do you like \panimals? I do!
Notice how there is no space between the \n or \p and the next word, that is important. Always start with \n and then alternate.
And that, is a very simple talking script!
________________________
2. Burning the script to the ROM
Most people don't know how to do this, so here is how.
First, you need the programs Pokescript 1.00 and PokemonAdvanced 1.00
To get those, ask someone on PC to upload the programs to you, or search on a file sharing site like
www.4shared.com
So, here is what to do:
Save your notepad with the script on it as this:
talk.rbc
all files
Make sure it is under all files, and it has to be .rbc!
Now, if you have the correct programs installed, go to open, all files. Right click on your script (test.rbc) and select "compile script" (it should be there if saved correctly)
Something will pop up and show words really fast, it will go away in a few quick seconds and another thing will pop up.
Look at the new thing that popped up and click the blue book.
Then, browse for your ROM and select it.
After that, yet another thing will pop up. Click the grey flashlight.
5 rows of numbers will show in the blank space.
Double click the first row.
On the bottom, it should appear.
Most likely, if you haven't ever inserted a script, it will show this:
&H800000 (not sure how many 0's, sorry if i'm wrong)
Highlight and copy only the numbers, not the &H.
Then, click assign.
Now, that window will dissapear, and the one with the blue book should be there.
Go to file - burn.
Then, after it's done burning it, close those windows and open Advance map. Make a new person in pallet town, and go to his "script offset"
It should say $000000 if its a new person.
Paste your numbers over those 0's.
Now, play it on your VBA.
It should work.
I know it seems like a lot of work (and it is) but as you get better, compiling it get's a lot faster, as you know how to do it.
_________________________
3. Making a giveitem/givepokemon script
_________________________
#ORG $begin
checkflag 0x200
lock
faceplayer
if B_true goto $done
message $giveitem
boxset 6
giveitem 0xD 1
setflag 0x200
release
end
#org $done
message $nomore
boxset 6
release
end
#org $nomore
$nomore 1 = Sorry, i'm all out!
#org $giveitem
$giveitem 1 = Here, take this potion!
________________________
Whoa, a lot of new stuff there!
Let's start with checkflag 0x200.
Look down and you will also se setflag 0x200.
Starting with checkflag, it means it's checking the event. Think of it like this:
Flag=Event
What flags basically do though is make it so an event can't repeat itself.
So you will only get 1 potion.
Set flag is at the end, so it will set the event, making it impossible to repeat.
0x200 is the event number. Every event should have a different number. That way, no event repeats themselves.
So, next giveitem/givepokemon script will have checkflag 0x201 and setflag 0x201
Start with 0x200 and work your way up.
Always check the flag after #ORG
and always set the flag before release + end.
if B_true goto $done.
Well, what does that mean?
This does not take effect until you have done the event once and have gotten the item.
This works just like message $ works.
It will go to the bottom and do what it says.
Well, it leads so this:
#org $done
message $nomore
boxset 6
release
end
That means, it will make the person who gave you the item say something different next time you talk to him.
So, that goes to this:
#org $nomore
$nomore 1 = Sorry, i'm all out!
So, next time you talk to him, he will say that, instead of giving you another item.
Last but not least, we have:
giveitem 0xD 1
This means after the person is done talking, he will give you an item. 0xD is the item code. Every item has a code. Here is the list:
0xD happens to be a potion.
1 means it only gives you 1 potion
Now, for the givepokemon script :)
Everyone's favorite!
Well, i'll tell you the truth, it is the same exact thing as the giveitem script, but instead of giveitem, you put:
givepokemon 1 100 0
That means it will give you a Bulbasaur level 100 holding no item.
The first number is the pokemon's national dex number.
The second is the level.
The third is the item. (0 means no item)
So, if i wanted it to hold a potion, it would look like this:
givepokemon 1 100 0xD
But, you can make it so someone gives you both!
Here is a script, where a person will give you 2 potions, and Misdreavus level 65 holding a TM 50:
_________________________
#ORG $begin
checkflag 0x201
lock
faceplayer
if B_true goto $done
message $givestuff
boxset 6
giveitem 0xD 2
givepokemon 200 65 0x152
setflag 0x201
release
end
#org $done
message $nomore
boxset 6
release
end
#org $nomore
$nomore 1 = What more do you want? Gold? \nWell too bad!
#org $givestuff
$givestuff 1 = Here, take these!
__________________________
As you can see, its not too hard to combine them.
(I changed the flags, as you can see, to 0x201, since the last one was 0x200)
And that is how to make those, they may require some practice, but they're quite useful.
_________________________
4. Making movement scripts
These are a must have in hacks, as they are the main things that happen in events.
Here is a very basic movement script.
First, i tell you where to do it.
Go to the room where your mom is (your players house)
Go to events view, then go to scripts number.
Select 1 and one will appear in the corner.
Drag it down like this:
So it is like that.
Now, there is one thing you need to do first:
Where the properties of the script are, it will show at the top:
Unown 00 00
Var numbers 00 00
The first two ^^ should look like this:
Unown 03 00
Var numbers 52 40
Ok, that makes it so the movement script doesn't freeze.
Finally, here's the script:
(i changed the flags again to 0x202)
__________________
#ORG $begin
checkflag 0x202
if B_true goto $done
applymovement 0x01 $momwalk
pausemove 0
message $momtalk
boxset 6
setflag 0x202
release
end
#org $done
release
end
#org $momwalk
$momwalk 1 ; 0x13 0xFE
#org $momtalk
$momtalk 1 = Hey \v\h01!
_______________________
3 new things.
1. if B_true goto $done.
Look at $done, and you will see all it says under it is:
release
end
This way, when you step on the script space again, the mom won't run over to you, it will just end, so its like a normal square.
2. applymovement 0x01 $momwalk
That shouldn't be too hard to understand, that means when you step on the script square, the mom will move. Applymovement is the command to make someone move on the map. 0x01 is the people number on advance map. The mom's people number is 1, so its 0x01. Make sure you use the people number, not the event number!!!
So, $momwalk.
That will go to the one at the bottom.
The one at the bottom says:
#org $momwalk
$momwalk 1 ; 0x13 0xFE
As usual, it says $momwalk 1, but, why is there a ; instead of an =?
You use ; for movements.
Then 0x13 means walk 1 to the right.
Here is a list of movements. Take note that the numbers after the commands are the speed, not the number.
Note: Movements are for Fire Red only! I will post Ruby movements later.
These are the basic movements:
Up3 = 0x11
Left3 = 0x12
Right3 = 0x13
Down3 = 0x10
The 3 is actually the normal speed.
After your done listing movements,
always put 0xFE at the end.
In this case, there is only one movement, 0x13. So after 0x13, you put 0xFE. 0xFE tells the script that the movements are over, and it can go to the message.
3. pausemove 0 is what you should always put after applymovement.
Just like boxset 6, always put it after it.
It makes it so the game waits for the person to move for the message to happen.
(note: in the message, it says \v\h01, that shows the name of your player)
But, there are problems with this script you should realize when you are doing it.
1. You don't face your mom when she talks to you.
2. She doesn't walk back to the table.
Well, let's start by making her walk back to the table, here is how you would do it:
________________
#ORG $begin
checkflag 0x202
if B_true goto $done
applymovement 0x01 $momwalk
pausemove 0
message $momtalk
boxset 6
applymovement 0x01 $momwalkback
pausemove 0
setflag 0x202
release
end
#org $done
release
end
#org $momwalk
$momwalk 1 ; 0x13 0xFE
#org $momtalk
$momtalk 1 = Hey \v\h01!
#org $momwalkback
$momwalkback 1 ; 0x12 0xFE
__________________
That was easy, all i did was add another applymovement. That makes the mom move again after she talks.
At the bottom, i put the movements that she should make. (1 left, back to the table)
Now, here is how to make your player face the mom when she walks to you.
__________________
#ORG $begin
checkflag 0x202
if B_true goto $done
applymovement 0x01 $momwalk
applymovement 0xFF $playerturn
pausemove 0
message $momtalk
boxset 6
applymovement 0x01 $momwalkback
pausemove 0
setflag 0x202
release
end
#org $done
release
end
#org $momwalk
$momwalk 1 ; 0x13 0xFE
#org $playerturn
$playerturn 1 ; 0x02 0xFE
#org $momtalk
$momtalk 1 = Hey \v\h01!
#org $momwalkback
$momwalkback 1 ; 0x12 0xFE
___________________
What i added is:
applymovement 0xFF $playerturn.
Notice how it is right next to the applymovement for the mom.
That means, they will both move at the same time.
So while she walks foward, you turn left.
(note: the movements with 0 after them are facing commands)
So, aslong as the applymovements share the same pausemove 0, they happen at the same time.
0xFF is the people number for your player, every movement works on yourself too!
$playerturn is the offset which is at the bottom part, you
should get that part by now.
Now, you can combine these scripts with giveitem/givepokemon.
So, it would look like this (i'm going to make the mom give you a potion)
__________________________
#ORG $begin
checkflag 0x202
if B_true goto $done
applymovement 0x01 $momwalk
applymovement 0xFF $playerturn
pausemove 0
message $momtalk
boxset 6
giveitem 0xD 1
applymovement 0x01 $momwalkback
pausemove 0
setflag 0x202
release
end
#org $done
release
end
#org $momwalk
$momwalk 1 ; 0x13 0xFE
#org $playerturn
$playerturn 1 ; 0x02 0xFE
#org $momtalk
$momtalk 1 = Hey \v\h01! Take this potion!
#org $momwalkback
$momwalkback 1 ; 0x12 0xFE
______________________
It's that easy!
______________________
5. Color Messages
Let's start with the normal talking script again:
_______________________
#org $begin
lock
faceplayer
message $1
boxset 6
release
end
#org $1
$1 1 = Hi!
________________________
Now, what if i want that "Hi!" to be a different color? I would do it like this:
(This will make the "Hi!" dark green)
$1 1 = \c\h01\h06Hi!
That is how, it looks like the player code (\v\h01) but its not. It looks a bit hard, but actaully, the numbers after the last 'h' (06) are all you have to change.
Here is the list of colors:
00 - white
02 - black
03 - gray
04 - red
05 - orange
06 - dark green
07 - cyan
08 - dark blue
09 - lighter blue
0b - bluish grey
Its not too hard to do!
Don't put spaces between the color code and your first word!
______________________
6. Trainer Battles
These scripts allow you to battle any trainer in the game that can be found in PET.
Here is an example script:
_____________________
#ORG $begin
trainerbattle 1 0x001 $1 $2
message $lost
boxset 6
release
end
#org $1
$1 1 = I'm going to beat you!
#org $2
$2 1 = No fair! You cheated!
#org $lost
$lost 1 = Go away you cheater!!!
_____________________
Well, that didn't look to hard, did it?
1. First, to get this working, go to advance map.
2. Check off the "trainer" box on the guy you want to have this script.
3. Change his view range to the number you want.
This way, he will have a '!' on his head and run over to you when he sees you.
Now, first, this script automatically does these things:
1. Make a '!' on their heads
2. Make them run over to you
3. Say something
4. Battle
5. Say something after you win
6. If you talk to them, they will say something else.
Let's start with the most important line: trainerbattle 1 0x001 $1 $2
trainerbattle is (or should) be very easy to understand. Its almost like the command 'applymovement'. After it is 1. Always put the 1 there, enough said.
0x001 - just like in applymovement, but instead of the people number in advance map, its the persons' number in PET. I chose 0x001 as an example of coarse...
$1 and $2. There are two offsets after trainerbattle. $1 and $2 can also be said as $beforebattle and $afterbattle.
So, when the person runs up to you, they will say $1. In this case, it is "I'm going to beat you!"
and after the battle it goes to $2, which says "No fair! You cheated!"
Now, let's say you wanted to put this in a normal script, like after you win, the you beat someone in a battle, you get a pokemon.
Here is how you would do that:
______________________
#ORG $begin
checkflag 0x200
lock
facplayer
if B_true goto $done
message $1
boxset 6
trainerbattle 1 0x001 $2 $3
message $4
boxset 6
givepokemon 200 10 0xD
setflag 0x200
release
end
#org $done
message $no
boxset 6
release
end
#org $no
$no 1 = Hey, how's my pokemon doing?
#org $1
$1 1 = Hey, my name is Bob. If \nyou beat me, I will give \pyou a prize!
#org $2
$2 1 = Here we go!
#org $3
$3 1 = Congratulations, you win the prize!
#org $4
$4 1 = Here you go!
______________________
Now, was that too hard to do? Just add it in to any regular script. That line is all you need to make it happen. Also, for the normal trainer battle, there is one more thing you need to know. You see how in the above one, after the battle it will say another message? Well, how would you do that in a regular trainer battle? Here is how:
______________________
#ORG $begin
trainerbattle 1 0x001 $1 $2 $3
message $lost
boxset 6
release
end
#org $1
$1 1 = I'm going to beat you!
#org $2
$2 1 = No fair! You cheated!
#org $lost
$lost 1 = Go away you cheater!!!
#org $3
message $more
boxset 6
release
end
#org $more
$more 1 = Wow, you are really good!
_________________________
All i did was add $3 to the trainerbattle line, and brought it down to the bottom.
Last but not least, the trainerbattle colors!!!
____________________
00 - transparent
01 - white
02 - red
03 - solid gray
04 - bluish
07 - light gray
09 - black
0a - reddish pink
0b - lighter gray
0c - pink
0d - brown
0e - lighter brown
13 - bluish solid gray
^^Yes, they are different than regular message ones^^
Well, that's it for now!
I hope this helped!
If you have any questions, PM me and i will answer them.