The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tutorials Looking for a guide to help you out? Then you're in the right place! We've got everything you need, ranging from Mapping to Music!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.


Reply
 
Thread Tools
  #1    
Old February 2nd, 2008, 01:36 PM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
________________________
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:
Spoiler:
#define ITEM_MASTERBALL 0x1
#define ITEM_ULTRABALL 0x2
#define ITEM_GREATBALL 0x3
#define ITEM_POKEBALL 0x4
#define ITEM_SAFARIBALL 0x5
#define ITEM_NETBALL 0x6
#define ITEM_DIVEBALL 0x7
#define ITEM_NESTBALL 0x8
#define ITEM_REPEATBALL 0x9

#define ITEM_TIMERBALL 0xA
#define ITEM_LUXURYBALL 0xB
#define ITEM_PREMIERBALL 0xC
#define ITEM_POTION 0xD
#define ITEM_ANTIDOTE 0xE
#define ITEM_BURNHEAL 0xF
#define ITEM_ICEHEAL 0x10
#define ITEM_AWAKENING 0x11
#define ITEM_PARLYZHEAL 0x12

#define ITEM_FULLRESTORE 0x13
#define ITEM_MAXPOTION 0x14
#define ITEM_HYPERPOTION 0x15
#define ITEM_SUPERPOTION 0x16
#define ITEM_FULLHEAL 0x17
#define ITEM_REVIVE 0x18
#define ITEM_MAXREVIVE 0x19
#define ITEM_FRESHWATER 0x1A
#define ITEM_SODAPOP 0x1B

#define ITEM_LEMONADE 0x1C
#define ITEM_MOOMOOMILK 0x1D
#define ITEM_ENERGYPOWDER 0x1E
#define ITEM_ENERGYROOT 0x1F
#define ITEM_HEALPOWDER 0x20
#define ITEM_REVIVALHERB 0x21
#define ITEM_ETHER 0x22
#define ITEM_MAXETHER 0x23
#define ITEM_ELIXIR 0x24

#define ITEM_MAXELIXIR 0x25
#define ITEM_LAVACOOKIE 0x26
#define ITEM_BLUEFLUTE 0x27
#define ITEM_YELLOWFLUTE 0x28
#define ITEM_REDFLUTE 0x29
#define ITEM_BLACKFLUTE 0x2A
#define ITEM_WHITEFLUTE 0x2B
#define ITEM_BERRYJUICE 0x2C
#define ITEM_SACREDASH 0x2D

#define ITEM_SHOALSALT 0x2E
#define ITEM_SHOALSHELL 0x2F
#define ITEM_REDSHARD 0x30
#define ITEM_BLUESHARD 0x31
#define ITEM_YELLOWSHARD 0x32
#define ITEM_GREENSHARD 0x33
#define ITEM_HENTAIMAG 0x34
#define ITEM_NAMETAG 0x35
#define ITEM_HPUP 0x3F

#define ITEM_PROTEIN 0x40
#define ITEM_IRON 0x41
#define ITEM_CARBOS 0x42
#define ITEM_CALCIUM 0x43
#define ITEM_RARECANDY 0x44
#define ITEM_PPUP 0x45
#define ITEM_ZINC 0x46
#define ITEM_PPMAX 0x47
#define ITEM_GUARDSPEC. 0x49

#define ITEM_DIREHIT 0x4A
#define ITEM_XATTACK 0x4B
#define ITEM_XDEFEND 0x4C
#define ITEM_XSPEED 0x4D
#define ITEM_XACCURACY 0x4E
#define ITEM_XSPECIAL 0x4F
#define ITEM_POKEDOLL 0x50
#define ITEM_FLUFFYTAIL 0x51
#define ITEM_SUPERREPEL 0x53

#define ITEM_MAXREPEL 0x54
#define ITEM_ESCAPEROPE 0x55
#define ITEM_REPEL 0x56
#define ITEM_SUNSTONE 0x5D
#define ITEM_MOONSTONE 0x5E
#define ITEM_FIRESTONE 0x5F
#define ITEM_THUNDERSTONE 0x60
#define ITEM_WATERSTONE 0x61
#define ITEM_LEAFSTONE 0x62

#define ITEM_TINYMUSHROOM 0x67
#define ITEM_BIGMUSHROOM 0x68
#define ITEM_PEARL 0x6A
#define ITEM_BIGPEARL 0x6B
#define ITEM_STARDUST 0x6C
#define ITEM_STARPIECE 0x6D
#define ITEM_NUGGET 0x6E
#define ITEM_HEARTSCALE 0x6F
#define ITEM_ORANGEMAIL 0x79

#define ITEM_HARBORMAIL 0x7A
#define ITEM_GLITTERMAIL 0x7B
#define ITEM_MECHMAIL 0x7C
#define ITEM_WOODMAIL 0x7D
#define ITEM_WAVEMAIL 0x7E
#define ITEM_BEADMAIL 0x7F
#define ITEM_SHADOWMAIL 0x80
#define ITEM_TROPICMAIL 0x81
#define ITEM_DREAMMAIL 0x82

#define ITEM_FABMAIL 0x83
#define ITEM_RETROMAIL 0x84
#define ITEM_CHERRY 0x85
#define ITEM_CHESTNUT 0x86
#define ITEM_PEACH 0x87
#define ITEM_RAWSTBERRY 0x88
#define ITEM_ASPEARBERRY 0x89
#define ITEM_LEPPABERRY 0x8A
#define ITEM_ORANGE 0x8B

#define ITEM_PERSIMMON 0x8C
#define ITEM_LUMBERRY 0x8D
#define ITEM_CITRUS 0x8E
#define ITEM_FIGYBERRY 0x8F
#define ITEM_KIWI 0x90
#define ITEM_MANGO 0x91
#define ITEM_AGUAVBERRY 0x92
#define ITEM_PAPAYA 0x93
#define ITEM_RAZZBERRY 0x94

#define ITEM_BLUKBERRY 0x95
#define ITEM_BANANA 0x96
#define ITEM_WEPEARBERRY 0x97
#define ITEM_PINEAPPLE 0x98
#define ITEM_POMEGRANITE 0x99
#define ITEM_KELPSYBERRY 0x9A
#define ITEM_QUALOTBERRY 0x9B
#define ITEM_HONEYDEW 0x9C
#define ITEM_GRAPE 0x9D

#define ITEM_TOMATO 0x9E
#define ITEM_CORNNBERRY 0x9F
#define ITEM_MAGOSTBERRY 0xA0
#define ITEM_RABUTABERRY 0xA1
#define ITEM_LEMON 0xA2
#define ITEM_SPELONBERRY 0xA3
#define ITEM_PAMTREBERRY 0xA4
#define ITEM_WATERMELON 0xA5
#define ITEM_DURINBERRY 0xA6

#define ITEM_BELUEBERRY 0xA7
#define ITEM_LICHEE 0xA8
#define ITEM_GANLONBERRY 0xA9
#define ITEM_SALACBERRY 0xAA
#define ITEM_PETAYABERRY 0xAB
#define ITEM_APRICOT 0xAC
#define ITEM_LANSATBERRY 0xAD
#define ITEM_STARFBERRY 0xAE
#define ITEM_ENIGMABERRY 0xAF

#define ITEM_BRIGHTPOWDER 0xB3
#define ITEM_WHITEHERB 0xB4
#define ITEM_MACHOBRACE 0xB5
#define ITEM_EXP.SHARE 0xB6
#define ITEM_QUICKCLAW 0xB7
#define ITEM_SOOTHEBELL 0xB8
#define ITEM_MENTALHERB 0xB9
#define ITEM_CHOICEBAND 0xBA
#define ITEM_KINGSROCK 0xBB

#define ITEM_SILVERPOWDER 0xBC
#define ITEM_AMULETCOIN 0xBD
#define ITEM_CLEANSETAG 0xBE
#define ITEM_SOULDEW 0xBF
#define ITEM_DEEPSEATOOTH 0xC0
#define ITEM_DEEPSEASCALE 0xC1
#define ITEM_SMOKEBALL 0xC2
#define ITEM_EVERSTONE 0xC3
#define ITEM_FOCUSBAND 0xC4

#define ITEM_LUCKYEGG 0xC5
#define ITEM_SCOPELENS 0xC6
#define ITEM_METALCOAT 0xC7
#define ITEM_LEFTOVERS 0xC8
#define ITEM_DRAGONSCALE 0xC9
#define ITEM_LIGHTBALL 0xCA
#define ITEM_SOFTSAND 0xCB
#define ITEM_HARDSTONE 0xCC
#define ITEM_MIRACLESEED 0xCD

#define ITEM_BLACKGLASSES 0xCE
#define ITEM_BLACKBELT 0xCF
#define ITEM_MAGNET 0xD0
#define ITEM_MYSTICWATER 0xD1
#define ITEM_SHARPBEAK 0xD2
#define ITEM_POISONBARB 0xD3
#define ITEM_NEVERMELTICE 0xD4
#define ITEM_SPELLTAG 0xD5
#define ITEM_TWISTEDSPOON 0xD6

#define ITEM_CHARCOAL 0xD7
#define ITEM_DRAGONFANG 0xD8
#define ITEM_SILKSCARF 0xD9
#define ITEM_UPGRADE 0xDA
#define ITEM_SHELLBELL 0xDB
#define ITEM_SEAINCENSE 0xDC
#define ITEM_LAXINCENSE 0xDD
#define ITEM_LUCKYPUNCH 0xDE
#define ITEM_METALPOWDER 0xDF

#define ITEM_THICKCLUB 0xE0
#define ITEM_STICK 0xE1
#define ITEM_REDSCARF 0xFE
#define ITEM_BLUESCARF 0xFF
#define ITEM_PINKSCARF 0x100
#define ITEM_GREENSCARF 0x101
#define ITEM_YELLOWSCARF 0x102
#define ITEM_SKATEBOARD1 0x103
#define ITEM_COINCASE 0x104

#define ITEM_ITEMFINDER 0x105
#define ITEM_OLDROD 0x106
#define ITEM_GOODROD 0x107
#define ITEM_SUPERROD 0x108
#define ITEM_S.S.TICKET 0x109
#define ITEM_CONTESTPASS 0x10A
#define ITEM_SQUIRTBOTTLE 0x10C
#define ITEM_AMULET 0x10D
#define ITEM_SOOTSACK 0x10E

#define ITEM_BASEMENTKEY 0x10F
#define ITEM_SKATEBOARD2 0x110
#define ITEM_POROKCASE 0x111
#define ITEM_LETTER 0x112
#define ITEM_EONTICKET 0x113
#define ITEM_REDORB 0x114
#define ITEM_BLUEORB 0x115
#define ITEM_SCANNER 0x116
#define ITEM_GOGOGGLES 0x117

#define ITEM_METEORITE 0x118
#define ITEM_RM1KEY 0x119
#define ITEM_RM2KEY 0x11A
#define ITEM_RM4KEY 0x11B
#define ITEM_RM6KEY 0x11C
#define ITEM_STORAGEKEY 0x11D
#define ITEM_ROOTFOSSIL 0x11E
#define ITEM_CLAWFOSSIL 0x11F
#define ITEM_DEVONSCOPE 0x120

#define ITEM_TM01 0x121
#define ITEM_TM02 0x122
#define ITEM_TM03 0x123
#define ITEM_TM04 0x124
#define ITEM_TM05 0x125
#define ITEM_TM06 0x126
#define ITEM_TM07 0x127
#define ITEM_TM08 0x128
#define ITEM_TM09 0x129

#define ITEM_TM10 0x12A
#define ITEM_TM11 0x12B
#define ITEM_TM12 0x12C
#define ITEM_TM13 0x12D
#define ITEM_TM14 0x12E
#define ITEM_TM15 0x12F
#define ITEM_TM16 0x130
#define ITEM_TM17 0x131
#define ITEM_TM18 0x132

#define ITEM_TM19 0x133
#define ITEM_TM20 0x134
#define ITEM_TM21 0x135
#define ITEM_TM22 0x136
#define ITEM_TM23 0x137
#define ITEM_TM24 0x138
#define ITEM_TM25 0x139
#define ITEM_TM26 0x13A
#define ITEM_TM27 0x13B

#define ITEM_TM28 0x13C
#define ITEM_TM29 0x13D
#define ITEM_TM30 0x13E
#define ITEM_TM31 0x13F
#define ITEM_TM32 0x140
#define ITEM_TM33 0x141
#define ITEM_TM34 0x142
#define ITEM_TM35 0x143
#define ITEM_TM36 0x144

#define ITEM_TM37 0x145
#define ITEM_TM38 0x146
#define ITEM_TM39 0x147
#define ITEM_TM40 0x148
#define ITEM_TM41 0x149
#define ITEM_TM42 0x14A
#define ITEM_TM43 0x14B
#define ITEM_TM44 0x14C
#define ITEM_TM45 0x14D

#define ITEM_TM46 0x14E
#define ITEM_TM47 0x14F
#define ITEM_TM48 0x150
#define ITEM_TM49 0x151
#define ITEM_TM50 0x152
#define ITEM_HM01 0x153
#define ITEM_HM02 0x154
#define ITEM_HM03 0x155
#define ITEM_HM04 0x156

#define ITEM_HM05 0x157
#define ITEM_HM06 0x158
#define ITEM_HM07 0x159
#define ITEM_HM08 0x15A

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.
Spoiler:
' Specials
0x4A ' Face player
0x4B ' Face against player
0x60 ' Disappear (removes the sprite, but the person can still be interacted with)
0x62 ' "!" pops up
0x63 ' "?" pops up
0x64 ' "X" pops up (vs-seeker cant fight)
0x65 ' "!!" pops up (vs-seeker can fight)
0x66 ' "" pops up

' walking
0x01 ' step Up0
0x02 ' step Left0
0x03 ' step Right0
0x04 ' step Down0
0x08 ' step down1
0x09 ' step up1
0x0A ' step left1
0x0B ' step right1
0x0C ' step down2
0x0D ' step up2
0x0E ' step left2
0x0F ' step right2
0x10 ' step down3
0x11 ' step up3
0x12 ' step left3
0x13 ' step right3
0x1D ' step down4
0x1E ' step up4
0x1F ' step left4
0x20 ' step right4

' jump in place looking where it says
0x52 ' jump0 down
0x53 ' jump0 up
0x54 ' jump0 left
0x55 ' jump0 right

' jump in place looking in the order it says
0x56 ' jump0 down/up
0x57 ' jump0 up/down
0x58 ' jump0 left/right
0x59 ' jump0 right/left

' Jump Direction
0x4E ' jump1 down
0x4F ' jump1 up
0x50 ' jump1 left
0x51 ' jump1 right

0x14 ' jump2 down
0x15 ' jump2 up
0x16 ' jump2 left
0x17 ' jump2 right

0x46 ' jumpLookingLeft1 down
0x47 ' jumpLookingDown1 up (jump backwards)
0x48 ' jumpLookingUp1 left
0x49 ' jumpLookingLeft right (jump backwards)

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.
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum

Last edited by Shinx; April 15th, 2010 at 08:22 AM.
Reply With Quote
  #2    
Old February 6th, 2008, 02:51 PM
TB Pro's Avatar
TB Pro
Old-timer
 
Join Date: Nov 2004
Location: Midwestern USA
Age: 19
Gender: Male
Nice!
This is very helpful man!
Especially the Movement commands!

I'll be sure to refer to this if I ever need any help with these kinds of scripts!

I hope you make a guide for more advanced scripts later!
BOL!
__________________
--I'm a creepin'..
Reply With Quote
  #3    
Old February 6th, 2008, 04:07 PM
Piplup-Trainer's Avatar
Piplup-Trainer
This is my custom user title.
 
Join Date: Nov 2007
Location: Europe. Many people haven`t heard about the country in which I live.
Age: 21
Gender: Male
Nature: Relaxed
Thank you to give this tutorial.
Irish Witch's tutorial is old, too long and it hasn't been updated for a long time ago.
Your tutorial is short and easy to understand.
I hope that many hackers who hack Ruby/Sapphire will use this tutorial.
__________________
I LEFT PC!
http://www.pokecommunity.com/member....message2790824


Short summary :

2007 : ROM Hacking - asking some questions regarding Pokemon Ruby/Sapphire
2008 : Trading - mostly to complePokemon keDex in Pokemon Diamond until 2009
2009 : Battling - battles without ev'd Pokemon until 2009, competitive battles until 2010
2010 : Chatting - talking to pc friends, but more often on ut more often on MSN), having a good time
2011 : Less activity - it dropped more because of Windows Live Messenger and Facebook

Last edited by Piplup-Trainer; February 6th, 2008 at 04:12 PM.
Reply With Quote
  #4    
Old February 6th, 2008, 04:51 PM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
Quote:
Originally Posted by Teh Blaziken View Post
Nice!
This is very helpful man!
Especially the Movement commands!

I'll be sure to refer to this if I ever need any help with these kinds of scripts!

I hope you make a guide for more advanced scripts later!
BOL!
I may add to this on some other types of scripts, but not for a while, if i even get to it at all.

Quote:
Originally Posted by Piplup-Trainer View Post
Thank you to give this tutorial.
Irish Witch's tutorial is old, too long and it hasn't been updated for a long time ago.
Your tutorial is short and easy to understand.
I hope that many hackers who hack Ruby/Sapphire will use this tutorial.
Thanks for the comment!
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum
Reply With Quote
  #5    
Old February 6th, 2008, 11:37 PM
thethethethe
Gym Leader
 
Join Date: Jun 2007
Location: Melbourne, Australia
Gender: Male
It's looking all right. Not too much there, but I'm sure your still going to add a lot more to it.
I was going to write a long scripting tutorial, but I feel there's no need anymore. There's so many here at PC, it would be like 'flogging a dead horse'.
Also, you might want to add that the movements in your post are for Fire Red Only.
__________________
Gone.
Reply With Quote
  #6    
Old February 7th, 2008, 12:57 AM
/Circa's Avatar
/Circa
a face in the clouds.
 
Join Date: Nov 2007
Location: Melbourne, Victoria
Gender: Male
Nature: Quiet
Oh, since this tutorial has come up, mine wont be needed, i'll close it down
I'm adding this to the resource list, since it's so simple and easy to understand.
__________________
dragging himself, forw
ard again, the pain has
still not diminished. E
ventually though, he e
merges inside a v
ery large room w

here everything about

the house

suddenly

changes.
Reply With Quote
  #7    
Old February 7th, 2008, 06:11 PM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
Quote:
Originally Posted by thethethethe View Post
It's looking all right. Not too much there, but I'm sure your still going to add a lot more to it.
I was going to write a long scripting tutorial, but I feel there's no need anymore. There's so many here at PC, it would be like 'flogging a dead horse'.
Also, you might want to add that the movements in your post are for Fire Red Only.
good idea, and thanks for the comment!
Quote:
Originally Posted by Crashink View Post
Oh, since this tutorial has come up, mine wont be needed, i'll close it down ;)
I'm adding this to the resource list, since it's so simple and easy to understand.
Thanks, thats really nice!
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum
Reply With Quote
  #8    
Old February 7th, 2008, 08:56 PM
dragon70119
Beginning Trainer
 
Join Date: Sep 2007
Your tutorial is so good! It is easy to understand, not like other.
Please update it reuglarly. Thank you.
Reply With Quote
  #9    
Old February 9th, 2008, 06:19 AM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
I updated it, now it says how to put messages in color.
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum
Reply With Quote
  #10    
Old February 9th, 2008, 08:29 AM
dragon70119
Beginning Trainer
 
Join Date: Sep 2007
Good job, I have tried and now I understand the movement scripts. It's so cool. Could you update the trainer battle and wild pokemon battle scripts please? I like your lessons! :)
Reply With Quote
  #11    
Old February 9th, 2008, 01:48 PM
kebbles's Avatar
kebbles
Rom Hacker.
 
Join Date: Jul 2007
Location: Victoria, Australia!
Gender: Male
Nature: Brave
Itman, what can I say...
You pretty much saved me from quitting hacking all together.
You taught me how to script, your tut is awesome and easy to understand and its all up to date.
Dosnt get much better then this.
I cant wait for the Trainer scripts, I can already do wild battles, but Im sure everyone else cant wait for them!
Best of luck, Kebbles!
__________________
Pokémon Galaxy Elements
Alpha 0.5 Out Now!


When the world is in its final moments..
Where will you be?
Reply With Quote
  #12    
Old February 10th, 2008, 06:27 AM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
Update: Added how to make trainerbattles.
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum
Reply With Quote
  #13    
Old February 10th, 2008, 10:46 AM
Jack of Bl♠des's Avatar
Jack of Bl♠des
Former goderator
 
Join Date: Jan 2008
Location: Temin-ni-Gru
Age: 21
Gender:
Send a message via AIM to Jack of Bl♠des
Sweet, trainer battles are exactly what I need to work on next. Well, that and Yes/No+Give pokemon scripts. Could somebody help me out with this script I'm doing.

I'm trying to make it so that if you say yes to this question, you'll receive Skarmory (which is renamed Rebellion in my hack). Currently I've gotten the givepokemon command to work, but not the message display part. After I say yes, I want him to say something, then give me Rebellion. But all I do is receive the Pokemon. The same goes for me if I say no (though I don't get the Pokemon).

Spoiler:

fixed it



EDIT: Now I've managed to get a response from the person, but I get the same response whether I pick yes or no.

Spoiler:

#org $script
lock
faceplayer
message $script2
$script2 1 = iy H3rd j00 lyk mudkippz.\nYou lyke mudkippz?
boxset 5
compare LASTRESULT 1
If B_False goto $script3
message $Bam
$Bam 1 = Too bad. I'll give you this instead.
Boxset 6
givepokemon 227 15 1
message $Rebellion
release
end

#org $Rebellion
$Rebellion 1 = You received Rebellion!

#org $script3
message $Kwam2
$Kwam2 1 = Aww, you make me cry...
boxset 6
release
end


EDIT: fixed it. It's amazing what you can do if you look back at something after learning.
__________________
Hey guys, I'm still alive. Not really sure if I want to continue Twisted Path though.

Last edited by Jack of Bl♠des; February 20th, 2008 at 08:18 PM.
Reply With Quote
  #14    
Old February 10th, 2008, 11:16 AM
mistersmeargle's Avatar
mistersmeargle
is a scatman.
 
Join Date: Feb 2008
Your tuts are awesome man, yesterday I couldn't do a simple message, now, thanks to you, the EON TICKET is in my hack. I need to know how to do legendary battles and um, how do i put it...
Y'know the way you can't get to the Battle Tower unless you beat the Elite Four and you can't leave Lilycove until Maxie (or is it Max?) goes off in the submarine? I need to know how to do that.
Reply With Quote
  #15    
Old February 11th, 2008, 11:33 PM
iPredator's Avatar
iPredator
"Every Self Will Taste Death"
 
Join Date: Jul 2007
Location: London, UK
Age: 23
Gender: Male
Nature: Modest
Send a message via Windows Live Messenger to iPredator
Thank You man your the best, now i have Poketscript is that the same as pokescript?
__________________
My HeartGold Team
iPredator's PokePet

Blaze the level 64 Typhlosion!
To Get

Reply With Quote
  #16    
Old February 12th, 2008, 03:43 AM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
Quote:
Originally Posted by knight View Post
Thank You man your the best, now i have Poketscript is that the same as pokescript?
yep, they are the same exact thing, poke is short for poket.
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum
Reply With Quote
  #17    
Old February 12th, 2008, 04:04 AM
Shadowz's Avatar
Shadowz
Among the Shadowz...
 
Join Date: Oct 2007
Location: England
Age: 19
Gender:
Nature: Relaxed
Send a message via Windows Live Messenger to Shadowz Send a message via Yahoo to Shadowz
Thank you so much for this thread, it has helped me with scripting a lot.
__________________
This signature has been disabled.
Your signature is too tall by 10px.
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #18    
Old February 12th, 2008, 10:50 AM
mistersmeargle's Avatar
mistersmeargle
is a scatman.
 
Join Date: Feb 2008
How do you do scripts that prevent you from leaving the start town without a Pokémon?
Reply With Quote
  #19    
Old February 12th, 2008, 10:57 AM
Νιτραμ
Trainer
 
Join Date: Nov 2007
Ask in the proper thread. Anyway. I am not sure if this thread should be called EXTREME when those are things that many people knew. My opinion. The thing can be useful, of course. but it shouldn't have such name. And with the project HackMew has prepared, Pokéscript and it's scripting language will be outdated. I think it would be better to use ScriptED language, as it will make a comeback and will be even better!
__________________
If you remeber me, feel free to send me a PM ;-)
Reply With Quote
  #20    
Old February 12th, 2008, 12:22 PM
thethethethe
Gym Leader
 
Join Date: Jun 2007
Location: Melbourne, Australia
Gender: Male
Quote:
Originally Posted by Martin² View Post
Ask in the proper thread. Anyway. I am not sure if this thread should be called EXTREME when those are things that many people knew. My opinion. The thing can be useful, of course. but it shouldn't have such name. And with the project HackMew has prepared, Pokéscript and it's scripting language will be outdated. I think it would be better to use ScriptED language, as it will make a comeback and will be even better!
The name is a little misleading, but until XSE is actually released, people are just going to expect this to be a pokescript Tutorial.
Why will pokescript's language be outdated? I'd say Diamond cutter is outdated, but would you say ScriptED is? Probably not.... People who have learnt to script in one "Langauage", aren't going to change over and alter their scripting styles. I know I'm going to keep using Pokescript But I'll be, hopefully, taking commands out of XSE and adding them into my Pokescript. I can script in ScripED, but I find pokescript, to be a simpler "language" of scripting.
__________________
Gone.
Reply With Quote
  #21    
Old February 12th, 2008, 12:26 PM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
Quote:
Originally Posted by Martin² View Post
Ask in the proper thread. Anyway. I am not sure if this thread should be called EXTREME when those are things that many people knew. My opinion. The thing can be useful, of course. but it shouldn't have such name. And with the project HackMew has prepared, Pokéscript and it's scripting language will be outdated. I think it would be better to use ScriptED language, as it will make a comeback and will be even better!
It was supposed to be extreme n00b scripting tutorial, but i guess i didn't put that, or something...sorry if this bothered you...

As for that, its not like we are just going to change, like thethethethe said. I for one, am not going to change to scriptED even if pokescript will be outdated, i will probably still use it...
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum
Reply With Quote
  #22    
Old February 19th, 2008, 07:33 PM
Tyrantrum's Avatar
Tyrantrum
おなら
 
Join Date: Oct 2007
Location: New Jersey
Age: 20
Gender: Male
Nature: Lonely
Send a message via Skype™ to Tyrantrum
For trainer color scripts, would you add something like this to it:
/c/h013?

Do you also put the unknown and var numbers in the person or script on A-Map
__________________




(x) Tumblr
(y) Gallery
Previously Eeveon

Last edited by Tyrantrum; February 19th, 2008 at 07:48 PM.
Reply With Quote
  #23    
Old May 14th, 2008, 07:55 PM
Zaptinex's Avatar
Zaptinex
Beginning Trainer
 
Join Date: May 2008
Location: USA
Gender:
Nice and simple, thanks for the great tutorial!
Reply With Quote
  #24    
Old June 17th, 2009, 06:32 AM
Khan6195's Avatar
Khan6195
Michael Jackson Died. Parté!
 
Join Date: May 2009
Location: Canada
Age: 18
Gender: Male
Nature: Adamant
Hey, nice tut and all, but my XSE Doesn't know what "pausemove" is in the movement scripts. If you know how to fix, just PM me, thanks.
__________________
Khan6195's PokePet

The Level 96 Entei!


Hacks I support:
Spoiler:


Can you read this? Only 55% of people can!
Spoiler:
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg.
The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch
at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a
wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the
rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit
a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter
by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot
slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre
I feogrt who ollanirigy had tihs but wohveer did. TAHNKS
Reply With Quote
  #25    
Old June 17th, 2009, 06:56 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by Khan6195 View Post
Hey, nice tut and all, but my XSE Doesn't know what "pausemove" is in the movement scripts. If you know how to fix, just PM me, thanks.
If you didn't notice this is not an XSE tutorial.
__________________
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 01:06 AM.


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.