PDA

View Full Version : Scripting Tutorial - PokeScript


/Circa
January 19th, 2008, 01:20 AM
PokeScript Tutorial

This tutorial was developed for Irish Witch's program called PokeScript, i'll add a install and PkmnAdv to the bottom and some needed files.

Lets begin!

Installing pokeScript

Before doing any scripts, you must have PokeScript and PkmnAdv installed into a folder, just to be safe, create a folder called PokeScript anywhere you can find it ;p. Now we'll go through the process of installation.

* Download PokeScript 1.00 or higher.
# Download PkmnAdv (Needed for PokeScript)
# Install PokeScript into a folder you created.
# Install PkmnAdv into the same folder.
# A log should come up stating the files from PkmnAdv being registered.
# Open Notepad and begin to script!

Basic Message

For normal purposes, lets think of a message, lets say.. A how are you message..

So what we want it to look like is:

Hey PLAYER!
Hows your journey going?

Now, before we do anything add #org and $begin to the top of your script. Without these commands the script wont run. Next, if it's a basic person we're talking too, we don't want the player or the person moving do we? So we need a lock and faceplayer command, to lock the player and make the other person face them, but I think it's self explanatory..

So what we have in our script is;

#org $begin
lock
faceplayer

But thats not everything to a script is it? It's not much more complex for a beginner script, but more scripts will start to look complex even though they are not.

Here is a quote from Earthvisitor:

"I myself am a basic scripter, you just have to learn to use all commands to your advantage"

I credit him for that, because I never would be here if it wasn't for him..

Next we need a message command, right? And message commands are followed by a pointer and a message.

So we need to add:

message $pointer
$pointer 1 =

$pointer can be anything, just make sure it ins't used twice. We'll use a $howareyou

But, when using these sought of messages make sure to add a boxset command after them, a basic boxset command is boxset 6, and for yes/no scripts we use boset 5.

But did you notice the enter in our message? It wasn't a straight line, to make a new line enter \n, and for a new paragraph, \p. So what our script now looks like is:

#org $begin
lock
faceplayer
message $howareyou
$howareyou 1 =Hey PLAYER!\nHow's your journey going?
boxset 6
release
end

Noticed the release and end? We need that after every main script paragraph. AKA the first paragraph.

Alot of you may know that in A-Text [PLAYER] changes too the players name, in Pokescript we use /v/h01. So replace PLAYER with \v\h01 and you've got your basic message!

[s-highlight]Note: \v\h06 is your Rivals name.

#org $begin
lock
faceplayer
message $howareyou
$howareyou 1 =Hey \v\h01!\nHows your journey going?
boxset 6
release
end

Now comes the easy part!
I've made it bold so everyone notices it.

Click save as
type in the name of the script, and at the end put .rbc
Now, click file type, and scroll down to All Files.

Go to your script location, right click and click "Compile".
Your script should open in Pokescript and then BufRite should open.
Some offsets should be listed, click the top offset and click Assign.
The window should change, click File -> Burn. Find the offset at $begin and write it down somewhere.
Open up A-Map, load the map you want the script inserted.
Click the person and there should be a box that say's: Script Offset, insert the offset there and save.

You've succesfully inserted a new script!

Yes/No Scripts

These scripts aren't very different from a basic message, they just require some extra commands, which can help you when your developing more complicated and longer scripts.

Alright, lets begin with this new section.

A yes no script requires the same things we used in a basic message, except this time we're adding different commands.
We need three messages instead of one, and we use a boxset 5 command. And after our main message we need a compare LASTRESULT command.
This will check what you selected in the message, a yes or a no.. But we're forgetting something very importat in the command. A number.. :o
In yes/no commands we use a compare LASTRESULT 1, this will check if we selected YES. But I need to explain what
A yes/no script would look like. This is an example without using scripting commands.

<Instert Message Here>

Then a box would pop up. So now it looks like this:

l YES l
l NO l
<Insert Message Here>

Alright, so lets add our commands.

Our script should look like this:

#org $begin
lock
faceplayer
message $blah
$blah 1 =<Insert Message Here>
boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 =<Insert Message Here>
boxset 6
release
end

#org $yes
=<Insert Message Here>

Alot of you may be wondering, why is there another
#org? Well, it's much easier to tell where your other part of the script if you have a new paragraph, though you can do it the other way. But i'll
leave you to find out how ;)

Lets take a script from ShinyGold as an example, behind the hero's house in New Bark there is a Pikachu with a basic Yes/No script.
It says: Pika... Chu?
Pika... Pikachu? And then you choose yes or no.

Though, never make it look like this:
If you pick no, the message will then continue onto yes.

#org $begin
lock
faceplayer
message $pikachu
$pikachu 1=Pika..Chu?\pPika.. Pikachu?
boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 =Pikachu :(
boxset 6
$yes 1 =Pikachu :S
boxset 6
release
end

Or you may write it the other way I showed you.
Theres another tutorial done. Lets get onto the next easiest one, flags!

Flags!

What is a flag? Well a flag is something we can use to make scripts only happen once, or not happen until another flag has happened, later in the tutorial we'll
be adding a longer script using flags. There are three commands for flags:
#1 - Checkflag: Checks if the flag has happened.
#2 - Setflag: Sets the flag for it to be checked, or removed.
#3 - Removeflag: Removes the flag so it can happen again.

So lets begin, in the script below, we'll make a person say something, and then after he has said it, if you talk to him again, he'll say: I'm not a CD Player.
Alright, so what we need after the lock and faceplayer is a checkflag, because if we want him to say something different, we need to first see if he has said it a first time.

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $cdplayer

Hey, thats not all, we need two messages and a setflag after the first, am I right?
Flags that can be used are 0x200 - 0x299, 0x500 - 0x599: Warning! Some of these flags are used in the game. So be careful! Also 0x1000 - 0x1099.
Ask some other scripters for more safe flags.

Here is a quote from thethethethe:

The more ingame flags you avoid using, the more flags will become useful to you

Alright, lets get onto it!
When adding setflags add them after a certain command that you don't want to happen again, so in this case, the first message.
We'll be using paragraphs in this script.

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $cdplayer
message $whatsup
$whatsup 1 =Hey \v\h01!\nHows your journey going?
boxset 6
setflag 0x200
release
end

#org $cdplayer
message $notcd
$notcd 1 =I'm not a CD Player!
boxset 6
release
end

There you go!
Another topic covered. Next will be a giveitem tutorial, which involves a little test.
Making a mailbox script, more will be explained later.

Giveitem Scripts

With a giveitem script, we only need a message before getting the item, because for some reason Items have their own message after.
Alright, the only command we need is a giveitem command and a setflag depending on what we're doing.

In a giveitem script, we need a giveitem command. They usually look like this:

giveitem 0x0 0x0 (giveitem <itemnumber> <howmany>)

Here is a list of items in the game:

FIRERED/LEAFGREEN

1 Master Ball
2 Ultra Ball
3 Great Ball
4 Poké Ball
5 Safari Ball
6 Net Ball
7 Dive Ball
8 Nest Ball
9 Repeat Ball
A Timer Ball
B Luxury Ball
C Premier Ball
D Potion
E Antidote
F Burn Heal
10 Ice Heal
11 Awakening
12 Parlyz Heal
13 Full Restore
14 Max Potion
15 Hyper Potion
16 Super Potion
17 Full Heal
18 Revive
19 Max Revive
1A Fresh Water
1B Soda Pop
1C Lemonade
1D Moomoo Milk
1E Energypowder
1F Energy Root
20 Heal Powder
21 Revival Herb
22 Ether
23 Max Ether
24 Elixir
25 Max Elixir
26 Lava Cookie
27 Blue Flute
28 Yellow Flute
29 Red Flute
2A Black Flute
2B White Flute
2C Berry Juice
2D Sacred Ash
2E Shoal Salt
2F Shoal Shell
30 Red Shard
31 Blue Shard
32 Yellow Shard
33 Green Shard
3F HP Up
40 Protein
41 Iron
42 Carbos
43 Calcium
44 Rare Candy
45 PP Up
46 Zinc
47 PP Max
49 Guard Spec.
4A Dire Hit
4B X Attack
4C X Defend
4D X Speed
4E X Accuracy
4F X Special
50 Poké Doll
51 Fluffy Tail
53 Super Repel
54 Max Repel
55 Escape Rope
56 Repel
5D Sun Stone
5E Moon Stone
5F Fire Stone
60 Thunderstone
61 Water Stone
62 Leaf Stone
67 Tinymushroom
68 Big Mushroom
6A Pearl
6B Big Pearl
6C Stardust
6D Star Piece
6E Nugget
6F Heart Scale
79 Orange Mail
7A Harbor Mail
7B Glitter Mail
7C Mech Mail
7D Wood Mail
7E Wave Mail
7F Bead Mail
80 Shadow Mail
81 Tropic Mail
82 Dream Mail
83 Fab Mail
84 Retro Mail
85 Cheri Berry
86 Chesto Berry
87 Pecha Berry
88 Rawst Berry
89 Aspear Berry
8A Leppa Berry
8B Oran Berry
8C Persim Berry
8D Lum Berry
8E Sitrus Berry
8F Figy Berry
90 Wiki Berry
91 Mago Berry
92 Aguav Berry
93 Iapapa Berry
94 Razz Berry
95 Bluk Berry
96 Nanab Berry
97 Wepear Berry
98 Pinap Berry
99 Pomeg Berry
9A Kelpsy Berry
9B Qualot Berry
9C Hondew Berry
9D Grepa Berry
9E Tamato Berry
9F Cornn Berry
A0 Magost Berry
A1 Rabuta Berry
A2 Nomel Berry
A3 Spelon Berry
A4 Pamtre Berry
A5 Watmel Berry
A6 Durin Berry
A7 Belue Berry
A8 Liechi Berry
A9 Ganlon Berry
AA Salac Berry
AB Petaya Berry
AC Apicot Berry
AD Lansat Berry
AE Starf Berry
AF Enigma Berry
B3 Brightpowder
B4 White Herb
B5 Macho Brace
B6 Exp. Share
B7 Quick Claw
B8 Soothe Bell
B9 Mental Herb
BA Choice Band
BB King's Rock
BC Silverpowder
BD Amulet Coin
BE Cleanse Tag
BF Soul Dew
C0 Deepseatooth
C1 Deepseascale
C2 Smoke Ball
C3 Everstone
C4 Focus Band
C5 Lucky Egg
C6 Scope Lens
C7 Metal Coat
C8 Leftovers
C9 Dragon Scale
CA Light Ball
CB Soft Sand
CC Hard Stone
CD Miracle Seed
CE Blackglasses
CF Black Belt
D0 Magnet
D1 Mystic Water
D2 Sharp Beak
D3 Poison Barb
D4 Nevermeltice
D5 Spell Tag
D6 Twistedspoon
D7 Charcoal
D8 Dragon Fang
D9 Silk Scarf
DA Up-grade
DB Shell Bell
DC Sea Incense
DD Lax Incense
DE Lucky Punch
DF Metal Powder
E0 Thick Club
E1 Stick
FE Red Scarf
FF Blue Scarf
100 Pink Scarf
101 Green Scarf
102 Yellow Scarf
103 Mach Bike
104 Coin Case
105 Itemfinder
106 Old Rod
107 Good Rod
108 Super Rod
109 S.S. Ticket
10A Contest Pass
10C Wailmer Pail
10D Devon Goods
10E Soot Sack
10F Basement Key
110 Acro Bike
111 PokéBlock Case
112 Letter
113 Eon Ticket
114 Red Orb
115 Blue Orb
116 Scanner
117 Go-goggles
118 Meteorite
119 Rm. 1 Key
11A Rm. 2 Key
11B Rm. 4 Key
11C Rm. 6 Key
11D Storage Key
11E Root Fossil
11F Claw Fossil
120 Devon Scope
121 TM01
122 TM02
123 TM03
124 TM04
125 TM05
126 TM06
127 TM07
128 TM08
129 TM09
12A TM10
12B TM11
12C TM12
12D TM13
12E TM14
12F TM15
130 TM16
131 TM17
132 TM18
133 TM19
134 TM20
135 TM21
136 TM22
137 TM23
138 TM24
139 TM25
13A TM26
13B TM27
13C TM28
13D TM29
13E TM30
13F TM31
140 TM32
141 TM33
142 TM34
143 TM35
144 TM36
145 TM37
146 TM38
147 TM39
148 TM40
149 TM41
14A TM42
14B TM43
14C TM44
14D TM45
14E TM46
14F TM47
150 TM48
151 TM49
152 TM50
153 HM01
154 HM02
155 HM03
156 HM04
157 HM05
158 HM06
159 HM07
15A HM08
15D Oak's Parcel
15E Poké Flute
15F Secret Key
160 Bike Voucher
161 Gold Teeth
162 Old Amber
163 Card Key
164 Lift Key
165 Helix Fossil
166 Dome Fossil
167 Silph Scope
168 Bicycle
169 Town Map
16A VS Seeker
16B Fame Checker
16C TM Case
16D Berry Pouch
16E Teachy TV
16F Tri-pass
170 Rainbow Pass
171 Tea
172 Mysticticket
173 Auroraticket
174 Powder Jar
175 Ruby
176 Sapphire

They are used in hexadecimal. Example:

giveitem 0x1 0x1
You will get a masterball once.

The Ruby/Saphire item list should be somewhere in the Document/Tutorials section.

Anyway, so, we need a setflag for Giveitem. So that will happen after the give item command, and then it goes to a new message next time you talk to the person.

Alright, here we need to add a giveitem script:

#org $begin
lock
faceplayer
message $getitem
$getitem 1 =I have two,\nSo you can have one.
<GIVEITEM COMMAND>

Then we need a setflag, but, before the message we need a checkflag so it skips the message and giveitem again.

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $alreadygot
message $getitem
$getitem 1 =I have two,\nSo you ca have one.
boxset 6
giveitem 0xD 0x1
setflag 0x200
release
end

In this case we're getting one Potion.
Next we need our second message! So we add another lock, faceplayer and message.

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $alreadygot
message $getitem
$getitem 1 =I have two,\nSo you can have one.
boxset 6
giveitem 0xD 0x1
setflag 0x200
release
end

#org $alreadygot
lock
faceplayer
message $onlyone
$onlyone 1 =I need this other one!\pDon't be greedy!
boxset 6
release
end

So there you go! Another tutorial covered.
But, theres one more thing! A TEST!

To truly prove that you have learned these commands, I want you to make a script.

When you talk to a person, they ask you if your like Oran Berries, if you say yes, you get one. If you say no, they tell you that you wont ever get one.
Meaning, if you say no, you cant get one for the rest of the game.

Good luck scripters!

Givepokemon Scripts!

Givepokemon scripts are almost the same to a giveitem script, it requires the same sought of command.
Givepokemon 0x0 0x0 0x0.

That stands for, Givepokemon <pokemon in hex> <level> <item>
Just for normal purposes, here is a list of Pokemon:

0100 = BULBASAUR
0200 = IVYSAUR
0300 = VENESAUR
0400 = CHARMANDER
0500 = CHARMELEON
0600 = CHARIZARD
0700 = SQUIRTLE
0800 = WARTORTLE
0900 = BLASTOISE
0A00 = CATERPIE
0B00 = METAPOD
0C00 = BUTTERFREE
0D00 = WEEDLE
0E00 = KAKUNA
0F00 = BEEDRILL
1000 = PIDGEY
1100 = PIDGEOTTO
1200 = PIDGEOT
1300 = RATTATA
1400 = RATICATE
1500 = SPEAROW
1600 = FEAROW
1700 = EKANS
1800 = ARBOK
1900 = PIKACHU
1A00 = RAICHU
1B00 = SANDSHREW
1C00 = SANDSLASH
1D00 = NIDORAN (FEMALE)
1E00 = NIDORINA
1F00 = NIDOQUEEN
2000 = NIDORAN (MALE)
2100 = NIDORINO
2200 = NIDOKING
2300 = CLEFAIRY
2400 = CLEFABLE
2500 = VULPIX
2600 = NINETALES
2700 = JIGGLYPUFF
2800 = WIGGLYTUFF
2900 = ZUBAT
2A00 = GOLBAT
2B00 = ODDISH
2C00 = GLOOM
2D00 = VILEPLUME
2E00 = PARAS
2F00 = PARASECT
3000 = VENONAT
3100 = VENOMOTH
3200 = DIGLETT
3300 = DUGTRIO
3400 = MEOWTH
3500 = PERSIAN
3600 = PSYDUCK
3700 = GOLDUCK
3800 = MANKEY
3900 = PRIMEAPE
3A00 = GROWLITHE
3B00 = ARCANINE
3C00 = POLIWAG
3D00 = POLIWHIRL
3E00 = POLIWRATH
3F00 = ABRA
4000 = KADABRA
4100 = ALAKAZAM
4200 = MACHOP
4300 = MACHOKE
4400 = MACHAMP
4500 = BELLSPROUT
4600 = WEEPINBELL
4700 = VICTREEBELL
4800 = TENTACOOL
4900 = TENTACRUEL
4A00 = GEODUDE
4B00 = GRAVELER
4C00 = GOLEM
4D00 = PONYTA
4E00 = RAPIDASH
4F00 = SLOWPOKE
5000 = SLOWBRO
5100 = MAGNEMITE
5200 = MAGNETON
5300 = FARFETCH'D
5400 = DODUO
5500 = DODRIO
5600 = SEEL
5700 = DEWGONG
5800 = GRIMER
5900 = MUK
5A00 = SHELLDER
5B00 = CLOYSTER
5C00 = GASTLY
5D00 = HAUNTER
5E00 = GENGAR
5F00 = ONIX
6000 = DROWZEE
6100 = HYPNO
6200 = KRABBY
6300 = KINGLER
6400 = VOLTORB
6500 = ELECTRODE
6600 = EXEGGCUTE
6700 = EXEGGUTOR
6800 = CUBONE
6900 = MAROWAK
6A00 = HITMONLEEE
6B00 = HITMONCHAN
6C00 = LICKITUNG
6D00 = KOFFING
6E00 = WEEZING
6F00 = RHYHORN
7000 = RHYDON
7100 = CHANSEY
7200 = TANGELA
7300 = KANGASKHAN
7400 = HORSEA
7500 = SEADRA
7600 = GOLDEEN
7700 = SEAKING
7800 = STARYU
7900 = STARMIE
7A00 = MR. MIME
7B00 = SCYTHER
7C00 = JYNX
7D00 = ELECTABUZZ
7E00 = MAGMAR
7F00 = PINSIR
8000 = TAUROS
8100 = MAGIKARP
8200 = GYARADOS
8300 = LAPRAS
8400 = DITTO
8500 = EEVEE
8600 = VAPOREON
8700 = JOLTEON
8800 = FLAREON
8900 = PORYGON
8A00 = OMANYTE
8B00 = OMASTAR
8C00 = KABUTO
8D00 = KABUTOPS
8E00 = AERODACTYL
8F00 = SNORLAX
9000 = ARTICUNO
9100 = ZAPDOS
9200 = MOLTRES
9300 = DRATINI
9400 = DRAGONAIR
9500 = DRAGONITE
9600 = MEWTWO
9700 = MEW
9800 = CHIKORITA
9900 = BAYLEEF
9A00 = MEGANIUM
9B00 = CYNDAQUIL
9C00 = QUILAVA
9D00 = TYPLOSION
9E00 = TOTODILE
9F00 = CROCONAW
A000 = FERALIGATR
A100 = SENTRET
A200 = FURRET
A300 = HOOTHOOT
A400 = NOCTOWL
A500 = LEDYBA
A600 = LEDIAN
A700 = SPINARAK
A800 = ARIADOS
A900 = CROBAT
AA00 = CHINCHOU
AB00 = LANTURN
AC00 = PICHU
AD00 = CLEFFA
AE00 = IGGLYBUFF
AF00 = TOGEPI
B000 = TOGETIC
B100 = NATU
B200 = XATU
B300 = MAREEP
B400 = FLAAFFY
B500 = AMPHAROS
B600 = BELLOSSOM
B700 = MARRILL
B800 = AZUMARILL
B900 = SUDOWOODO
BA00 = POLITOED
BB00 = HOPPIP
BC00 = SKI PLOOM
BD00 = JUMPLUFF
BE00 = AIPOM
BF00 = SUNKERN
C000 = SUNFLORA
C100 = YANMA
C200 = WOOPER
C300 = QUAGSIRE
C400 = ESPEON
C500 = UMBREON
C600 = MURKROW
C700 = SLOWKING
C800 = MISDREAVUS
C900 = UNOWN
CA00 = WOBBUFFET
CB00 = GIRAFARIG
CC00 = PINECO
CD00 = FORRETRESS
CE00 = DUNSPARCE
CF00 = GLIGAR
D000 = STEELIX
D100 = SNUBBULL
D200 = GRANBULL
D300 = QWILFISH
D400 = SCIZOR
D500 = SHUCKLE
D600 = HERACROSS
D700 = SNEASEL
D800 = TEDDIURSA
D900 = URSARING
DA00 = SLUGMA
DB00 = MAGCARGO
DC00 = SWINUB
DD00 = PILOSWINE
DE00 = CORSOLA
DF00 = REMORAID
E000 = OCTILLERY
E100 = DELIBIRD
E200 = MANTINE
E300 = SKARMORY
E400 = HOUNDOUR
E500 = DOUNDOOM
E600 = KINGDRA
E700 = PHANPY
E800 = DONPHAN
E900 = PORYGON2
EA00 = STANTLER
EB00 = SMEARGLE
EC00 = TYROGUE
ED00 = HITMONTOP
EE00 = SMOOCHUM
EF00 = ELEKID
F000 = MAGBY
F100 = MILTANK
F200 = BLISSEY
F300 = RAIKOU
F400 = ENTEI
F500 = SUICINE
F600 = LARVITAR
F700 = PUPITAR
F800 = TYRANITAR
F900 = LUGIA
FA00 = HO-OH
FB00 = CELEBI
1501 = TREECKO
1601 = GROVYLE
1701 = SCEPTILE
1801 = TORCHIC
1901 = COMBUSKEN
1A01 = BLAZIKEN
1B01 = MUDKIP
1C01 = MARSHTOMP
1D01 = SWAMPERT
1E01 = POOCHYENA
1F01 = MIGHTYENA
2001 = ZIGZAGOON
2101 = LINOONE
2201 = WURMPLE
2301 = SILCOON
2401 = BEAUTIFLY
2501 = CASCOON
2601 = DUSTOX
2701 = LOTAD
2801 = LOMBRE
2901 = LUDICOLO
2A01 = SEEDOT
2B01 = NUZLEAF
2C01 = SHIFTRY
2D01 = NINCADA
2E01 = NINJASK
2F01 = SHEDINJA
3001 = TAILLOW
3101 = SWELLOW
3201 = SHROOMISH
3301 = BRELOOM
3401 = SPINDA
3501 = WINGULL
3601 = PELIPPER
3701 = SURSKIT
3801 = MASQUERAIN
3901 = WAILMER
3A01 = WAILORD
3B01 = SKITTY
3C01 = DELCATTY
3D01 = KECLEON
3E01 = BALTOY
3F01 = CLAYDOL
4001 = NOSEPASS
4101 = TORKOAL
4201 = SABLEYE
4301 = BARBOACH
4401 = WHISCASH
4501 = LUVDISC
4601 = CORPHISH
4701 = CRAWDAUNT
4801 = FEEBAS
4901 = MILOTIC
4A01 = CARVANHA
4B01 = SHARPEDO
4C01 = TRAPINCH
4D01 = VIBRAVA
4E01 = FLYGON
4F01 = MAKUHITA
5001 = HARIYAMA
5101 = ELECTRIKE
5201 = MANECTRIC
5301 = NUMEL
5401 = CAMERUPT
5501 = SPHEAL
5601 = SEALEO
5701 = WALREIN
5801 = CACNEA
5901 = CACTURNE
5A01 = SNORUNT
5B01 = GLALIE
5C01 = LUNATONE
5D01 = SOLROCK
5E01 = AZURILL
5F01 = SPOINK
6001 = GRUMPIG
6101 = PLUSLE
6201 = MINUN
6301 = MAWILE
6401 = MEDITITE
6501 = MEDICHAM
6601 = SWABLU
6701 = ALTARIA
6801 = WYNAUT
6901 = DUSKULL
6A01 = DUSCLOPS
6B01 = ROSELIA
6C01 = SLAKOTH
6D01 = VIGOROTH
6E01 = SLAKING
6F01 = GULPIN
7001 = SWALOT
7101 = TROPIUS
7201 = WHISMUR
7301 = LOUDRED
7401 = EXPLOUD
7501 = CLAMPERL
7601 = HUNTAIL
7701 = GOREBYSS
7801 = ABSOL
7901 = SHUPPET
7A01 = BANNETE
7B01 = SEVIPER
7C01 = ZANGOOSE
7D01 = RELICANTH
7E01 = ARON
7F01 = LAIRON
8001 = AGGRON
8101 = CASTFORM
8201 = VOLBEAT
8301 = ILLUMISE
8401 = LILEEP
8501 = CRADILY
8601 = ANORITH
8701 = ARMALDO
8801 = RALTS
8901 = KIRLIA
8A01 = GARDEVOIR
8B01 = BAGON
8C01 = SHELGON
8D01 = SALAMENCE
8E01 = BELDUM
8F01 = METANG
9001 = METAGROSS
9101 = REGI ROCK
9201 = REGICE
9301 = REGI STEEL
9401 = KYOGRE
9501 = GROUDON
9601 = RAYQUAZA
9701 = LATIAS
9801 = LATIOS
9901 = JIRACHI
9A01 = DEOXYS
9B01 = CHIMECHO

Take away the last two numbers.
Thanks to thethethethe for the list

Alright.
We cant just get a Pokemon right?
We need the Pokemon menu enabled. In otherwords, if we get a Pokemon without a Pokemon Menu, nothing will happen.
A list of flags and specials can be found in the documents and tutorials section.

We'll do a normal givepokemon script, which requires a flag to make sure we don't get it one or twice.

A givepokemon command should go after a message, and then a message after that should follow to tell you received it.
Remember, checkflags always go before you want an event to occur.

So here we go:

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $alreadygotone
message $wantpoke
$wantpoke 1 =Hey,\nwould you like this Eevee?
boxset 5
compare LASTRESULT 1
if 1 goto $geteevee
message $toobad
$toobad 1 =Oh, thats too bad.
boxset 6
release
end

#org $geteevee
lock
message $getone
$getone 1 =Oh cool!\nI cant take care of it\panymore...
boxset 6
givepokemon 0x85 0x5 0x0
message $received
$received 1 =PLAYER received EEVEE!
boxset 6
setflag 0x200
release
end

#org $alreadygotone
lock
faceplayer
message $howsit
$howsit 1 =Hows my old EEVEE going?
boxset 6
release
end

Are you guys beginning to understand?
It's quite simple actually. So, thats another tutorial covered.
I'll make these tutorials more advanced when I finish most of them.
Next one to go, APPLYMOVEMENT! (Movement Scripts)

Movement Script

Movement scripts are pretty simple, they require only two commands, but there are parts to the movement commands.

We need an applymovement command, which is just applymovement 0x<PeopleNumber> $pointer
And then following that command we need a pausemove 0 or the commands wont run.

A person number is pretty simple, it's the people number in AM. But if you want the hero to move you put 0xFF.
So in our case, we'll be make someone come to the hero, three spaces left, and then take him three spaces back. Though remember, there movements are not always the same, they can vary.
So, lets get started.

You put an applymovement where you want the commands to happen, first we need a message to say:

Don't go out there!
There are wild Pokemon.

That requires one \n. ;P
The movements will run when that happens.

Here is a list of movements for FR.

' 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)

And here is a list for Ruby.

' Other Actions
0x54 ' Hide
0x55 ' Show
0x56 ' Alert
0x57 ' Question
0x58 ' Love
0x5A ' Pokeball
0x10 ' Delay0
0x11 ' Delay1
0x12 ' Delay2
0x13 ' Delay3
0x14 ' Delay4

' Step
0x00 ' Down0
0x01 ' Up0
0x02 ' Left0
0x03 ' Right0
0x04 ' Down1
0x05 ' Up1
0x06 ' Left1
0x07 ' Right1
0x08 ' Down2
0x09 ' Up2
0x0A ' Left2
0x0B ' Right2
0x17 ' Left3
0x18 ' Right3
0x15 ' Down3
0x16 ' Up3
0x2D ' Down4
0x2E ' Up4
0x2F ' Left4
0x30 ' Right4

' Running
0x35 ' RunDown
0x36 ' RunUp
0x37 ' RunLeft
0x38 ' RunRight
0x7E ' RunDown2
0x7F ' RunUp2
0x80 ' RunLeft2
0x81 ' RunRight2

' Hop & Jump
0x0C ' HopTileDown
0x0D ' HopTileUp
0x0E ' HopTileLeft
0x0F ' HopTileRight
0x3A ' HighHopDown
0x3B ' HighHopUp
0x3C ' HighHopLeft
0x3D ' HighHopRight
0x46 ' HopDown
0x47 ' HopUp
0x48 ' HopLeft
0x49 ' HopRight
0x4A ' HopDown180
0x4B ' HopUp180
0x4C ' HopLeft180
0x4D ' HopRight180
0x42 ' JumpDown
0x43 ' JumpUp
0x44 ' JumpLeft
0x45 ' JumpRight

' Straf (May have glitches)
0x19 ' StDown1
0x1A ' StUp1
0x1B ' StLeft1
0x1C ' StRight1
0x1D ' StDown2
0x1E ' StUp2
0x1F ' StLeft2
0x20 ' StRight2
0x21 ' StDown3
0x22 ' StUp3
0x23 ' StLeft3
0x24 ' StRight3
0x25 ' StDown4
0x26 ' StUp4
0x27 ' StLeft4
0x28 ' StRight4
0x6A ' StDown1i
0x6B ' StUp1i
0x6C ' StLeft1i
0x6D ' StRight1i
0x6E ' StDown5
0x6F ' StUp5
0x70 ' StLeft5
0x71 ' StRight5

'Special
0x31 ' SlideFaceDown
0x32 ' SlideFaceUp
0x33 ' SlideFaceLeft
0x34 ' SlideFaceRight
0x86 ' IceSlideDown
0x87 ' IceSlideUp
0x88 ' IceSlideLeft
0x89 ' IceSlideRight

' Glitchy
0x3E ' Up0A
0x3F ' Down0A
0x4E ' Down0B
0x63 ' Up0B
0x65 ' Right0A
0x66 ' RunStopLoopDown
0x67 ' RunStopLoopUp
0x68 ' RunStopLoopLeft
0x69 ' RunStopLoopRight
0x72 ' Down15
0x73 ' Up15
0x74 ' Left15
0x75 ' Right15
0x7A ' Down6
0x7B ' Up6
0x7C ' Left6
0x7D ' Right6
0x82 ' Down7
0x83 ' Up7
0x84 ' Left7
0x85 ' Right7

' EXIT
0xFE



Alright, we'll do the script in my prefered format, which is having a new paragraph, It's sometimes easier to use it like that, though other tutorials explain different ways.

First we need a #org $begin, lock and faceplayer. Then follows our message.

#org $begin
lock
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6

Now we want our movement commands to run here, so we add our applymovement command, which in our case is moving people number 1.

#org $begin
lock
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6
applymovement 0x1 $coming
pausemove 0

Now we need to add our movements, but I use a different paragraph for the movements, though it doesn't matter. PokeScript compiles it the same.

#org $begin
lock
faceplayer
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6
applymovement 0x1 $coming
pausemove 0

#org $coming
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE


We need 0xFE after all movement scripts, to tell PokeScript the movements don't need to run anymore.

Now we need another message and a follow me script.
For followme, you add two applymovements and then pausemove 0 at the end of them.

BUT!, Since person 0x1 is moving right three, the hero only can move right two times.

So here is our finished product.

#org $begin
lock
faceplayer
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6
applymovement 0x1 $coming
pausemove 0
message $comeback
$comeback 1 =Come with me!
boxset 6
applymovement 0x1 $followone
applymovement 0xFF $followtwo
pausemove 0
message $hereyago
$hereyago 1 =Don't go out..\nRemember!
boxset 6
release
end

#org $coming
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org $followone
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org $followtwo
#raw 0x0B
#raw 0x0B
#raw 0xFE


Hopefully you understand that. I only wanted to make this tutorial basic, so it might be a little simple.
But like I said, i'll make it more advanced when I finish the whole thing.

adamb241
January 23rd, 2008, 08:36 AM
Where do I download PokeScRIPT?

derv1205
January 23rd, 2008, 11:16 AM
Good tutorial, there are three tutorials for PokeScript, and, it's easy, and, adamb241 you can download
the PokeScript here: http://pkmncommunity.com/showthread.php?t=115902

Scorp Con
January 23rd, 2008, 02:15 PM
Awesome, but could you show me how to put script into the rom (with screenies)?

And don't ask why I need screens, I just have to see how you do it...

Binary
January 24th, 2008, 08:55 AM
Nice work, pretty basic though, Its abit easier(well I thougt) than the other tutorials,
can't wait for the longer scripts!

~C3LEBI

/Circa
January 24th, 2008, 02:48 PM
Thanks for the comments!
Sorry if you cant understand all of it, i'm foreign.

Anyways, added another tutorial.
I want to make it basic, but i'll make it more advanced when I finish it.

ShyRayq
January 24th, 2008, 03:29 PM
hey the movement script is wrong You Don't Put Lock and Faceplayer in a movement script

+Sneasel™
January 24th, 2008, 03:41 PM
Yeah, he's right ^^
That same script also has small errors in it, but i'm too lazy to point them all out, sorry.

/Circa
January 24th, 2008, 08:39 PM
I forgot about the faceplayer x]
Though, if you talk to someone and then you move, then you need lock and faceplayer, otherwise he would talk to you facing some other direction..

And actually, there are no errors, I compiled it and it worked just as I wrote it :S.

thethethethe
January 25th, 2008, 02:42 AM
But, when using these sought of messages make sure to add a boxset command after them, a basic boxset command is boxset 6, and for yes/no scripts we use boset 5. I think boxset 4 is for signposts, i'm not too sure.

Boxset 4 is just a box that doesn't close. Signposts are different.

/Circa
January 25th, 2008, 04:02 PM
Alright, thanks thethethethe.

Someone asked me today, how would they make one event cancel out two, it is actually fairly simple, such as in a starter script.

When you receive the Pokemon you add a setflag, the same for all three.
But for the one you get you add a raw 53 to remove it, so it cant be interacted with.

So in a starter script we would add a question, if you wanted the Pokemon, and then send it to a pointer if they want it. They would receive the Pokemon and the Pokeball would dissapear, (Using #raw 0x53)

Then we would add a setflag. The script would be exactly the same for all three starters, just a different Pokemon Number and Pokemon name in the textbox. So infact, it is fairly simple, i'll write an example.

This will be for Pokemon Yellow, you choose a Pikachu or an Eevee.

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $alreadygot
message $wantpikachu
$wantpikachu 1 =Would you like this Pikachu?
boxset 5
compare LASTRESULT 1
if 1 goto $getpika
message $toobad
$toobad 1 =Too bad,\nit would be a good choice.
boxset 6
release
end

#org $getpika
lock
givepokemon 0x19 0x5 0x0
message $received
$received 1 =\v\h01 Received a PIKACHU!
boxset 6
#raw 0x53
#raw 0x<PEOPLE NUMBER>
#raw 0x00
setflag 0x200
release
end

#org $alreadygot
lock
faceplayer
message $got
$got 1 =You already got a Pokemon!
boxset 6
release
end

When we add #raw 0x53 that person can no longer be interacted with.
Be aware though, I wrote that script in a hurry.

Now you can use that script as a base for the others.
Just change the Pokemon number and your done.

shane2243
January 27th, 2008, 08:51 AM
where can i download pkmnadv? ive googled it and i cant find it, also, i do this tutorial and i also did the irish witch one, and when i try to insert it into A-map and play it, my rom crashes, im using pokemon ruby and im using the code next to the $begin.


the code i insert into A-map is $D01000


i put that into the script offset box.


is says "message1. $begin (D01000)"

message1 being what i saved the file as.


what am i doing wrong?

cooley
January 27th, 2008, 09:03 AM
Ok, On your GiveItem scripts, You said "So We'll add another Lock and faceplayer"

You don't need another lock or faceplayer, because It is already in effect until You end the script. Get it?

That is just one of the things I noticed. Good tutorial, wish this was here before the "Pokescript Tutorials" thread was up. Good luck completing the tutorial.

Kyaru-san
January 30th, 2008, 09:14 AM
Finally I know how to script thanks to this one Im telling ya this one is musch easier than the other tut thanks

xghost
January 30th, 2008, 10:08 AM
Hello this is very good thread and all scripts work for me but i have some text problems.

Could somebody help

liuyanghejerry
January 31st, 2008, 12:43 AM
......I'm looking for this for a very long time,thanks thanks!!!!
Looks that it's too much to find ZELto teach me ,hehe

hayvan999
January 31st, 2008, 06:41 PM
ok i rlly need help with the yes and no boxes plz! ok i put the thing like its shown in tutorial:

#org $begin
lock
faceplayer
message $blah
$blah 1 = hello
boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 = no way
boxset 6
release
end
#org $yes
= yes way


and when i play the game only the no button works! can some1 tell me what im doing wrong with the yes button and can u show me how to fix it?

derv1205
January 31st, 2008, 07:50 PM
ok i rlly need help with the yes and no boxes plz! ok i put the thing like its shown in tutorial:

#org $begin
lock
faceplayer
message $blah
$blah 1 = hello
boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 = no way
boxset 6
release
end
#org $yes
= yes way


and when i play the game only the no button works! can some1 tell me what im doing wrong with the yes button and can u show me how to fix it?
Uhmm, put this:
#org $begin
lock
faceplayer
message $blah
$blah 1 = hello
boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 = no way
boxset 6
release
end

#org $yes
message $yeah
$yeah 1 = yes way
boxset 6
release
end

That should work, is because first, in the "YES" you didnt put the message, also
you forget about the boxset 6, well, you forget almos everything in the "YES" xD

hayvan999
January 31st, 2008, 08:46 PM
Uhmm, put this:


That should work, is because first, in the "YES" you didnt put the message, also
you forget about the boxset 6, well, you forget almos everything in the "YES" xD


thank you very muc!! it realy worked :D

cooley
February 2nd, 2008, 03:53 PM
An updated movements list can be found here (http://pokehacks.dabomstew.com/index.php?token=srmovements)

Before I forget, You have an Awesome tutorial!

PlasticPokeball
February 2nd, 2008, 03:56 PM
Hey thanks for the tutorial, but I'm having a few issues with the give Pokemon script.

I don't know. I copied your script with the Eevee and it worked. But when I changed its level to 20 it appeared as 32 in the game. I also tried with a Snorlax and it worked, but I made a script for it to be level 25 and it ended it up being level 37.

Is there a reason for this 12 level difference?

thethethethe
February 2nd, 2008, 04:53 PM
Hey thanks for the tutorial, but I'm having a few issues with the give Pokemon script.

I don't know. I copied your script with the Eevee and it worked. But when I changed its level to 20 it appeared as 32 in the game. I also tried with a Snorlax and it worked, but I made a script for it to be level 25 and it ended it up being level 37.

Is there a reason for this 12 level difference?

That because they're in hex.
givepokemon 0x85 0x20 0x0 - Is the same as - Givepokemon (Eevee) (Level 32) (No item)
but....
givepokemon 133 20 0 - is the same as - givepokemon (Eevee) (Level 20) (No item)


If the number has a "0x" in front of it, it's in hexadecimal(eg. 0x14). The great thing about Pokescript, you can just use a decimal Number(eg. 20)

/Circa
February 4th, 2008, 01:52 AM
Sorry I haven't updated lately, school has started, so i'm on computer around half an hour each day, where I can just check threads.
Though in my spare time I haven't worked on this, i've been looking through other in-game scripts to find some other specials or things I haven't learnt.
I've also been working with scriptEd.

So again, sorry, i'll try keep it updated when I can.
(It's just I got signed up by a manager in tennis, so thats more important now..)

Edit:

About the hex thing, I like doing my scripts with more raws and hex commands because it makes me feel a bit safer with rom corruption and so on, and because I know it will turn out right.
If anyone wants to find out the hex numbers or letters look at thethethethe's hex scripting tutorial, it should have a list.

Binary
February 4th, 2008, 08:03 AM
Ahhh finally you've added more advanced scripting,
The tutorial is great...more simple and easier than the other tutorials. Great work!

~C3LEBI

kyle2386
February 4th, 2008, 03:07 PM
hey i got a problem i click compile on my script then it says runtime error 5, in valid procedure call or arguement wat is this and how do i fix this? this is my script

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $alreadygotone
message $wantpoke
$wantpoke 1 =Hey,\nI Grats on graduating!\pHere is your \ngraduatin pokemon, \pWant it now?
boxset 5
compare LASTRESULT 1
if 1 goto $getseviper
message $toobad
$toobad 1 =Oh, well you will \nneed it.
boxset 6
release
end
#org $getseviper
lock
message $getone
$getone 1 =Ok go see \nyour home room teacher, \pshe chose this pokemon for you! \n Remember just to the left.
boxset 6
givepokemon 0x7B 0x5 0x0
message $received
$received 1 =PLAYER received Seviper!
boxset 6
setflag 0x200
release
end
#org $alreadygotone
lock
faceplayer
message $howsit
$howsit 1 =I Know your the one \p\v\h01 What the hell? \ndo you mean? \p Um Do not worry.
boxset 6
release
end

hayvan999
February 4th, 2008, 04:26 PM
ok i need some help with legenderie pokemon scripting. i am using advance map and im not using the code stuff in the notepad. u know how in pokemon emerlad groudon like comes up to you then you battle it? well i tried creating 1 new script in advance map then i matched the offset to the one in terra cave etc etc. so i just made it look exactly like in terra cave. but when i go to the spot where i stand and groudon comes up i freeze up and i cant move! can any1 help me

+Sneasel™
February 4th, 2008, 05:22 PM
change unown and varnumbers to this:

03 00
52 40

kyle2386
February 4th, 2008, 05:42 PM
wer u talking to me? itman? if so ty i will try it i dont get wat u mean tho wat varnumbers/ unown numbers

+Sneasel™
February 4th, 2008, 05:48 PM
wer u talking to me? itman? if so ty i will try it i dont get wat u mean tho wat varnumbers/ unown numbers

k, click the script square in advance map:

Look to the right at the properties.
Look for unown + var numbers.

They should be all 0's

Fill them in like this:

03 00
52 40

Leave the rest blank.

kyle2386
February 4th, 2008, 05:50 PM
um soz but my problem is wen i right click on my RBC file then compile script it comes up with an error or something

does any1 no the answer to my question? heres my questino againo,

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $alreadygotone
message $wantpoke
$wantpoke 1 =Hey,\nI Grats on graduating!\pHere is your \ngraduatin pokemon, \pWant it now?
boxset 5
compare LASTRESULT 1
if 1 goto $getseviper
message $toobad
$toobad 1 =Oh, well you will \nneed it.
boxset 6
release
end
#org $getseviper
lock
message $getone
$getone 1 =Ok go see \nyour home room teacher, \pshe chose this pokemon for you! \n Remember just to the left.
boxset 6
givepokemon 0x7B 0x5 0x0
message $received
$received 1 =PLAYER received Seviper!
boxset 6
setflag 0x200
release
end
#org $alreadygotone
lock
faceplayer
message $howsit
$howsit 1 =I Know your the one \p\v\h01 What the hell? \ndo you mean? \p Um Do not worry.
boxset 6
release
end


and here is the error log

Logging started5/02/2008 12:29:03 PM
#PROCESS: base\Includes.psh F:2 for Input
/----------------------------------------
|
\- Processed 0 Lines

#PROCESS: pkmadv\includes.psh F:2 for Input
/------------------------------------------
|1: fulllog False
|#PROCESS: pkmAdv/Commands.psh F:3 for Input
|/------------------------------------------
||Duplicate Entry: if
||Duplicate Entry: gosub
||Duplicate Entry: jump
||Duplicate Entry: callstd
||Duplicate Entry: textra
||Duplicate Entry: message $1
||Duplicate Entry: if $1 jump $2
||Duplicate Entry: if $1 gosub $2
||Duplicate Entry: tif $1
||Duplicate Entry: fif $1
||Duplicate Entry: compare var $1 val $2
||Duplicate Entry: compare var $1 int $2
||Duplicate Entry: compare var $1 pointer $2
||Duplicate Entry: compare pointer $1 var $2
||Duplicate Entry: compare pointer $1 byte $2
||Duplicate Entry: compare pointer $1 pointer $2
||
|\- Processed 0 Lines
|
|#PROCESS: pkmAdv/texttable.psh F:3 for Input
|/-------------------------------------------
||
|\- Processed 0 Lines
|
|#PROCESS: pkmAdv/items.psh F:3 for Input
|/---------------------------------------
||
|\- Processed 0 Lines
|
|#PROCESS: pkmAdv/stdpoke.psh F:3 for Input
|/-----------------------------------------
||
|\- Processed 0 Lines
|
|71: Autobank True
|74: fulllog True
|
\- Processed 820 Lines

so wats wrong? ty in advance

no answers? reallY ? why does no one know? plz im desperate

hayvan999
February 4th, 2008, 07:25 PM
ok i need some help with legenderie pokemon scripting. i am using advance map and im not using the code stuff in the notepad. u know how in pokemon emerlad groudon like comes up to you then you battle it? well i tried creating 1 new script in advance map then i matched the offset to the one in terra cave etc etc. so i just made it look exactly like in terra cave. but when i go to the spot where i stand and groudon comes up i freeze up and i cant move! can any1 help me



some1 answer my question plz

PlasticPokeball
February 5th, 2008, 08:37 PM
Again, thanks for the tutorials, but can I request something?

If possible can you come up with some kind of steal pokemon script?

For example, you're walking down a route and a trainer challenges you to a battle. In that battle you have the ability to catch all of that trainer's pokemon. Can you find a script that would accomplish this? Thanks in advance.

That is the most important but another request to add on to that, once again, if you want to, would be like a yes/no script in battle. When you catch a specific pokemon in the battle a yes/no box would appear asking you to send it somewhere. If yes, you lose the pokemon caught and gain an item, if no, you keep the pokemon. This is quite complicated I know, but it's a crucial feature in a hack I'm working on. It would be greatly appreciated.

Scorp Con
February 7th, 2008, 09:16 PM
I've just inserted the script, and this happeneds:
http://img214.imageshack.us/img214/1664/frzb0.png

EDIT.
Script:

#org $start
lock
faceplayer
message $hi
boxset 6
release
end

#org $hi
= Hi mate!

PlasticPokeball
February 8th, 2008, 12:38 PM
To Madridista,

Your script can be corrected in two ways. First the easy way:

#org $start
lock
faceplayer
message $hi
$hi 1 = Hi mate!
boxset 6
release
end

OR, the way you probably were looking for:

#org $start
lock
faceplayer
message $hi
boxset 6
release
end

#org $hi
$hi 1 = Hi mate!

tkallab
February 8th, 2008, 01:02 PM
Hey i did that oran berrt thing but it doesn't work!
Here's the script:

#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $iloveem
message $oran
$oran 1 =I love Oran berries!\nDo you?
setflag 0x200
boxset 5
compare LASTRESULT 1
if 1 goto $hereyago
message $idiot
$idiot 1 =Well...\nThat's because you're an idiot!
boxset 6
$iloveem 1 =I just love Oran berries!\nI will call you names if you don't like 'em!
boxset 6
$hereyago 1 =Then you are my buddie!\nHere's an Oran berry!
boxset 6
giveitem 0x8B 0x1
release
end

what did i do worng?

Scorp Con
February 8th, 2008, 06:17 PM
@PlasticPokeball
It still shows me that. I tryied easy and other way...

PlasticPokeball
February 8th, 2008, 07:59 PM
Madridista, are you using PokeScript? If you are, check the tutorials (any of them) and maybe try again? I may have made a mistake when typing it up here.

Unless someone can prove me wrong, you probably had a bad ROM to begin with.

Scorp Con
February 8th, 2008, 09:04 PM
Don't worry about it. I'll change text in hex editor...

Pokepal2007
February 9th, 2008, 09:49 AM
wow this scripting tut is really good

Jack of Bl♠des
February 13th, 2008, 01:40 PM
Yes, a place for Ruby movement scripts. I'm really grateful that you posted that, and I also find your tutorial easy to understand, even though I already know how to script.

DeadlySplash
February 14th, 2008, 02:46 AM
Thanks for the tutorial =D
Thanks to you, and some dude asking a question about Yes/No scripts, I FINALLY have a working Yes/No script xD

Now I have a question : In the giveitem script, how would I make it so that a sprite disappears after you get the item? For example, an item ball lying on the ground. Once you pick it up, it dissapears. How do I do this?

Khalil
February 16th, 2008, 07:21 PM
Can somebody help me with my script?

trainerbattle 0 1 $MadChall $MadDefeat $MadAfter
message $MadTalk

#org $MadChall
$MadChall 1 = Ashraf: You're going down Khalil!

#org $MadDefeat
$MadDefeat 1 = Ashraf: Next time, I'll win!

#org $MadAfter
$MadAfter 1 = Ashraf:Dude you already beat me\nwhy are you still here./nKhalil:So I can rub it\nin you face\pAshraf:......

yet nobody tries to help

Gramisaur
February 19th, 2008, 08:30 AM
I was having so much trouble getting the hang of scripting but this has really helped me out more so than the other tutorials on it so thanks!

Just one question. Can I somehow edit an already exsisting script and change the name of an item?
Say the 'Boulderbadge' in FR Brock gives you. Even if you change the trainer sprite and name etc you still get that at the end of the battle.

Volcan
February 19th, 2008, 09:34 PM
#org $begin
lock
faceplayer
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6
applymovement 0x1 $coming
pausemove 0
message $comeback
$comeback 1 =Come with me!
boxset 6
applymovement 0x1 $followone
applymovement 0xFF $followtwo
pausemove 0
message $hereyago
$hereyago 1 =Don't go out..\nRemember!
boxset 6
release
end

#org $coming
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org $followone
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org $followtwo
#raw 0x0B
#raw 0x0B
#raw 0xFE


I need help with the movements. I want professor Oak to come up from the bottom of the screen, like in FR/LG, and me follow him downward 7 steps, then left 6 steps, then up 1 step and through the door.

/Circa
February 20th, 2008, 12:41 AM
I'll only respond to a few questions, cause these should be asked in the script help thread.

Thanks for the tutorial =D
Thanks to you, and some dude asking a question about Yes/No scripts, I FINALLY have a working Yes/No script xD

Now I have a question : In the giveitem script, how would I make it so that a sprite disappears after you get the item? For example, an item ball lying on the ground. Once you pick it up, it dissapears. How do I do this?

To make a sprite dissapear, you need three #raws.

#raw 53
#raw <Peoples Number>
#raw 00

Can somebody help me with my script?



yet nobody tries to help

There are major flaws to the script, you don't even have a #org at the start of the script!

I would recommend revising.

I was having so much trouble getting the hang of scripting but this has really helped me out more so than the other tutorials on it so thanks!

Just one question. Can I somehow edit an already exsisting script and change the name of an item?
Say the 'Boulderbadge' in FR Brock gives you. Even if you change the trainer sprite and name etc you still get that at the end of the battle.

You would need a different script,
The badges are in flags, so you would need to wewrite the script and make it a specified flag to get a different badge.


#org $begin
lock
faceplayer
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6
applymovement 0x1 $coming
pausemove 0
message $comeback
$comeback 1 =Come with me!
boxset 6
applymovement 0x1 $followone
applymovement 0xFF $followtwo
pausemove 0
message $hereyago
$hereyago 1 =Don't go out..\nRemember!
boxset 6
release
end

#org $coming
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org $followone
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org $followtwo
#raw 0x0B
#raw 0x0B
#raw 0xFE


I need help with the movements. I want professor Oak to come up from the bottom of the screen, like in FR/LG, and me follow him downward 7 steps, then left 6 steps, then up 1 step and through the door.

You would need a checkflag at the beginning, and a setflag at the end if you wanted it to not happen over and over.

To make the script continue in another map, you would need to do a level script, So that would be a bit tricky if you haven't experimented on a spare rom before.

You might need to add some movements aswell.

KoolGamesX
February 21st, 2008, 09:45 AM
Hope this Helps!:)
Can't wait for more tutorials!

mage825
February 23rd, 2008, 02:04 AM
great tutorial helped me alot thanks

jamieboy30
February 24th, 2008, 03:44 AM
hi, nice tutorial, i have a problem though. Whenever i right click my code file (written in notepad and .rbc at the end) it doesn't come up with 'compile' in the sub menu, any help please?

TB Pro
February 24th, 2008, 12:57 PM
hi, nice tutorial, i have a problem though. Whenever i right click my code file (written in notepad and .rbc at the end) it doesn't come up with 'compile' in the sub menu, any help please?

Did you save it as "All Files" instead of "Text Files"??

Qwerty-117
February 28th, 2008, 12:42 AM
Where can i download Pokescript and PkmnAdv?
I couldnt find them anywhere with google, they all came to here.

mcdooby
February 28th, 2008, 08:10 AM
Hey everyone im new to the forums and very new to scripting and i was wondering if u could help when i do this:

Click save as
type in the name of the script, and at the end put .rbc
Now, click file type, and scroll down to All Files.

Go to your script location, right click and click "Compile".
Your script should open in Pokescript and then BufRite should open.
Some offsets should be listed, click the top offset and click Assign.
The window should change, click File -> Burn. Find the offset at $begin and write it down somewhere.
Open up A-Map, load the map you want the script inserted.
Click the person and there should be a box that say's: Script Offset, insert the offset there and save.

You've succesfully inserted a new script!I get up to click assign and i get a new window which is an open file window im not sure what to do next cause i haven't got an offset for the script and if i select a pkm rom i click assgin again uncheck reserve i get a 0 next to $begin if i don't uncheck reserve i get nothing so can anyone help please because i would really like to learn how to script and i know this is a really noob question so sorry and thanks in advance

iPredator
February 28th, 2008, 08:29 AM
Hey i just did that but when iload the rom up then go to talk to that person it doesnt allow me to talk to him.

Master_Track
March 29th, 2008, 10:35 AM
Hey everyone im new to the forums and very new to scripting and i was wondering if u could help when i do this:

I get up to click assign and i get a new window which is an open file window im not sure what to do next cause i haven't got an offset for the script and if i select a pkm rom i click assgin again uncheck reserve i get a 0 next to $begin if i don't uncheck reserve i get nothing so can anyone help please because i would really like to learn how to script and i know this is a really noob question so sorry and thanks in advance
You have to klick file-destination before you klick on the blue symbol, then this window will not open anymore.

@knight: If I don't know what script you used, I can't say what the problem is.
Try this:
#org $begin
lock
faceplayer
message $1
$1 1 = I am a man...
boxset 6
release
end


If your script is right but doesn't work, you made a mistake when compiling it into the rom.

qwerty10
April 3rd, 2008, 10:40 PM
Im trying to do the oran berry test. Works fine until after I receive the berry and try to talk to person again it freezes.

Here is my script.

#ORG $ShowScript
Lock
Faceplayer
Checkflag 0x200
if b_true go to $Alreadygot
message $Getitem
$Getitem 1 = Do you like oran berries?
Boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 = Thats too bad.
Setflag 0x200
boxset 6
release
end

#ORG $Yes
message $Hereyougo
$Hereyougo 1 = I only need 1.
boxset 6
Giveitem 0x8B 0x1
Setflag 0x200
Release
End

#ORG $Alreadygot
message $Onlyone
$Onlyone 1 = I need this other one!\pDon't be greedy!
Boxset6
Release
End

/Circa
April 3rd, 2008, 11:23 PM
Im trying to do the oran berry test. Works fine until after I receive the berry and try to talk to person again it freezes.

Here is my script.

#ORG $ShowScript
Lock
Faceplayer
Checkflag 0x200
if b_true go to $Alreadygot
message $Getitem
$Getitem 1 = Do you like oran berries?
Boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 = Thats too bad.
Setflag 0x200
boxset 6
release
end

#ORG $Yes
message $Hereyougo
$Hereyougo 1 = I only need 1.
boxset 6
Giveitem 0x8B 0x1
Setflag 0x200
Release
End

#ORG $Alreadygot
message $Onlyone
$Onlyone 1 = I need this other one!\pDon't be greedy!
Boxset6
Release
End

You shouldn't really come to this tutorial, as i've abandoned it.
Why do you write every command with a capital at the start? :S. It doesn't matter, it's just annoying to me.

Anyways, your only problem is that in the Alreadygot script, boxset doesn't have a space between the 6. Just a small mistake. It sometimes happens, so go over your scripts well :).

qwerty10
April 4th, 2008, 03:05 PM
1. I use capitals because I used Irish Witch's tutorial first.

2. Where do I go if I have a question about scripting.

3. It did not work putting the space between Boxset and 6. Although I think the problem is that when I'm going through the steps to put it in my rom, on the part where you click burn, it says put an offset for Berry.go and I dont know what to do so I just put anything. (The name of the file I saved for Notepad is Berry.)

BakingBluePotatoe
April 9th, 2008, 07:01 PM
okay, how do you make it so when you walk on a certain spot, and a person says something then walks onto the screen to the player? (Yeah, bassically like the oak script)

Toorchic
April 14th, 2008, 04:14 AM
Is there a script that gives you the pokemon if you win a battle?

Also, how do you define the trainers pokemon?

Thanks

Dr Gregory House
April 18th, 2008, 12:01 AM
hi,
i made a script using scriptED where a man gives you a totodile.
When i load the rom, i get a white screen.
What's wrong?
here's the script:

#org 0x811111
Lock
FacePlayer
MsgBox Hi \v\h01\! Take this\nTotodile!
BoxSet 0x6
GivePokemon 0x208 0x7 0x0
Release
End

#org 0x
= Thanks \v\h01\
Release
End

Nexes
April 24th, 2008, 10:48 AM
I cant compile this script:

'-----------------------
#org 0x800000
special 0x187
compare LASTRESULT 0x2
if 0x1 jump 0x800001
special 0x188
lock
faceplayer
checkflag 0x2E1
if 0x1 jump 0x800002
checkflag 0x2
if 0x1 jump 0x800003
#raw 0x7E
nop
msgbox 0x800004 '"I perfected the ulti..."
callstd 0x4
special2 LASTRESULT 0x1A3
compare LASTRESULT 0x0
if 0x1 jump 0x800005
copyvar 0x8009 0x8005
compare 0x800C 0x2
if 0x1 call 0x800006
compare 0x800C 0x1
if 0x1 call 0x800007
compare 0x800C 0x4
if 0x1 call 0x800008
compare 0x800C 0x3
if 0x1 call 0x800009
msgbox 0x80000A '"Oh! This is the one!..."
callstd 0x5
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
call 0x80000C
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
msgbox 0x80000D '"You will allow it?\p..."
callstd 0x4
#raw 0x68
fadescreen 0x1
goto 0x80000E
fadescreen 0x0
goto 0x80000F
end

'-----------------------
#org 0x800001
release
end

'-----------------------
#org 0x800002
msgbox 0x800010 '"After I passed on my..."
callstd 0x4
release
end

'-----------------------
#org 0x800003
msgbox 0x800011 '"I implore you to mak..."
callstd 0x4
release
end

'-----------------------
#org 0x800005
msgbox 0x800012 '"[.]No[.]\nI was just..."
callstd 0x4
release
end

'-----------------------
#org 0x800006
applymovement 0x1 0x800013
pause 0x0
return

'-----------------------
#org 0x800007
applymovement 0x1 0x800014
pause 0x0
return

'-----------------------
#org 0x800008
applymovement 0x1 0x800015
pause 0x0
return

'-----------------------
#org 0x800009
applymovement 0x1 0x800016
pause 0x0
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x800018
#raw 0xC7
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x800019
call 0x80001A
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
goto 0x80000F
end

'-----------------------
#org 0x80001B
copyvar 0x8005 0x8009
special2 LASTRESULT 0x1A4
compare LASTRESULT 0x1
if 0x1 jump 0x80001C
msgbox 0x80001D '"Gasp, gasp, gasp[.]\..."
callstd 0x4
setflag 0x2
release
end

'-----------------------
#org 0x80001E
special 0x18D
#raw 0x27
lock
faceplayer
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x80001C
msgbox 0x80001D '"Gasp, gasp, gasp[.]\..."
callstd 0x4
setflag 0x2E1
release
end


'---------
' Strings
'---------
#org 0x80001E
= I perfected the ultimate move of\nits type[.]\pBut will no one take it for\nfuture use?\p[.]Hm? Hmmm!\pY-you[.]\nTh-that \v\h02[.]
#org 0x80001F
= Oh! This is the one!\nThis is the POKéMON!\pThis \v\h02 is worthy of\nlearning my ultimate move!\pWill you allow it?\pWill you allow your \v\h02 to\nlearn my \v\h03?
#org 0x800020
= You will allow it?\pThen, let me confer my ultimate\n\v\h03 on your \v\h02.\pGgggrah-awooo!
#org 0x800021
= After I passed on my knowledge to\nyou, I felt so much relief.\pIn fact, I feel rejuvenated,\nas if I were younger again!
#org 0x800022
= I implore you to make the best\nuse of that move and gain power!
#org 0x800023
= [.]No[.]\nI was just mistaken.
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800025
= Gasp, gasp, gasp[.]\pI didn't think I could teach that\nmove while I still lived[.]
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800026
= Gasp, gasp, gasp[.]\pI have no regrets now.\nI've passed on everything I know.\pNow I can live out my life knowing\nmy work is done.

'-----------
' Movements
'-----------
#raw 52 'mov52
#raw FE 'Exit

#raw 53 'mov53
#raw FE 'Exit

#raw 54 'Hide
#raw FE 'Exit

#raw 55 'Show
#raw FE 'Exit

Whenever I try to compile it I always get this message:

Run-time error '457
This key is already associated with an element of this collection.

Can somone help me. This script is from Fire Red and its the move tutor that teaches your pokemon Blast Burn, Hydro Cannon, and Frenzy Plant. I want to put the script into Emerald.

jimsta
April 26th, 2008, 12:31 AM
Now, click file type, and scroll down to All Files.

Go to your script location, right click and click "Compile".
Your script should open in Pokescript and then BufRite should open.
Some offsets should be listed, click the top offset and click Assign.
Mine opened up an open... thing were i had to pick a file.what i pick?
The window should change Yes it then opened a reserve... thing?
,click File -> Burn. Find the offset at $begin and write it down somewhere. i cant find it anywere?
Open up A-Map, load the map you want the script inserted.
Click the person and there should be a box that say's: Script Offset, insert the offset there and save.

Chimchar 9
April 26th, 2008, 02:33 PM
where do u download pokemon advance

Perfect_Palkia_10
April 28th, 2008, 12:08 AM
Thanks for the great tutorial. Do you know how to put in that "Player recieved ...." music. If you do can you post it in. It would be much apreciated.

where do u download pokemon advance

It comes with PokeScript.

PhaizeD
May 9th, 2008, 02:49 PM
Well, I'm just now trying to learn how to do this and I can't seem to do what the tutorial says is the easiest part. . .

Go to your script location, right click and click "Compile".
Your script should open in Pokescript and then BufRite should open.
Some offsets should be listed, click the top offset and click Assign.
The window should change, click File -> Burn. Find the offset at $begin and write it down somewhere. (This part lost me. Apparently there's a step between clicking Assign and the File-> Burn thing because when I click assign, a file browse window pops up, and I have no clue what to do after that. After the file browse window is gone, there's a small window that says reserve at the bottom. Neither of these are mentioned here so I have no clue what to do. I also don't know what I'm supposed to select after choosing burn. If anyone could tell me, I'd be grateful.)
Open up A-Map, load the map you want the script inserted.
Click the person and there should be a box that say's: Script Offset, insert the offset there and save.

You've succesfully inserted a new script!

Perfect_Palkia_10
May 14th, 2008, 02:42 PM
Well, I'm just now trying to learn how to do this and I can't seem to do what the tutorial says is the easiest part. . .

Go to your script location, right click and click "Compile".
Your script should open in Pokescript and then BufRite should open.
Some offsets should be listed, click the top offset and click Assign.
The window should change, click File -> Burn. Find the offset at $begin and write it down somewhere. (This part lost me. Apparently there's a step between clicking Assign and the File-> Burn thing because when I click assign, a file browse window pops up, and I have no clue what to do after that. After the file browse window is gone, there's a small window that says reserve at the bottom. Neither of these are mentioned here so I have no clue what to do. I also don't know what I'm supposed to select after choosing burn. If anyone could tell me, I'd be grateful.)
Open up A-Map, load the map you want the script inserted.
Click the person and there should be a box that say's: Script Offset, insert the offset there and save.

You've succesfully inserted a new script!
There is a missing step. First click assign and a browser should appear. Go to your rom that you are hacking and click on it. Some offsets will appear, choose one, go to assign then File, Burn.

Platinum Lucario
May 18th, 2008, 03:52 AM
Umm... I've done everything, unfortunatly when I compile the script I get the
"File Not Found or user cancel" error, then when I insert the script into A-map,
then when I try the script the game crashes. Will anyone please help me?

Here's the pokescript log:

#PROCESS: script00.rbc F:2 for input
-----------------------------------

#OFFSET: 0, 0
Invalid Command : lock
Invalid Command : faceplayer
Invalid Command : message

#INLINE: 0, 1
9: Encoding text: Hey \v\h01!\nHows your journey going?
Invalid Command : boxset
Invalid Command : release
Invalid Command : end
|
\- Processed 0 Lines

#PROCESS: C:\Documents and Settings\Administrator\My Documents\Pokémon Green Diamond\PERSON_SCRIPT\script00.buf F:2 for write
----------------------------------------------------------------------------------------------------------------------------
COMMENT BUFFER DROP 10 [NO COMMENT]
DROPPING 0 Pointers
DROPPING 1 Offsetts
$begin at buffer 0 position 0
DROPPING 1 Offsetts
$howareyou at buffer 1 position 0
BUFFER 0 DROP: 56 [lock faceplayer message $howareyou boxset 6 release end ]
BUFFER 1 DROP: 510 [e vh1\Hw orjunygig
|
\- Processed 16 Buffers

|
\- Processed 0 Lines

|
\- Processed 0 Lines


Is there anything wrong with the script?
This is the script I tried:

#org $begin
lock
faceplayer
message $howareyou
$howareyou 1 = Hey \v\h01!\nHows your journey going?
boxset 6
release
end

Minun200
May 28th, 2008, 06:14 AM
Hello, I have a problem..
I use Pokescrip 1.2 and I managed to make a .rbc file. When I compile it, only Pokescript comes up and the other thing with the offset's doesn't appear..
Can someone help?

Gundam-Fighter
May 30th, 2008, 01:19 PM
Hi, I'm new here and I'm setting up an unnamed hack of fire-red and I've got a script that won't get onto the rom and I'm not sure if it's the script or the length of the script that stops it working can someone help?

Here's the script:#org $start
checkflag 0x829
if b_true goto $done
checkflag 0x828
if b_true goto $item
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 1x7E 0x5 0x0
fanfare 0x13E
message $3
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
boxset 6
release
end

#org $name
call 0x1A74EB
return

#org $item
message $7
boxset 5
compare LASTRESULT 0x1
if b_true goto $getitem
message $9
boxset 3
compare LASTRESULT 0x1
if b_true goto $alt

#org $getitem
message $8
boxset 6
giveitem 0x5E 0x1
setflag 0x829
release
end

#org $done
message $6
boxset 6
release
end

#org $alt
message $10
boxset 5
giveitem 0x5D 0x1
setflag 0x829
release
end

#org $1
$1 1 =Would you like an ARON?

#org $2
$2 1 =Oh.\nOk bye.

#org $3
$3 1 =/c/h01/h02You received an ARON!

#org $4
$4 1 =/c/h01/h02Would you like to rename ARON?

#org $5
$5 1 =Please don't hurt it.

#org $6
$6 1 =I hope you like Aron.

#org $7
$7 1 =Would you like a MOON STONE?\nIt'll evolve ARON to a\nSTEELDROM!\pSo do you want one?

#org $8
$8 1 =Well here you go\p\c\h01\h02You recieved a MOON STONE!

#org $9
$9 1 =Oh.\pWell would you like to\nhave a SUN STONE instead?

#org $10
$10 1 =Here you go!\p\c\h01\h02You received a SUN STONE!

PS: Steeldrom is a different version of a Rhyhorn. I'm respriting alot of pokemon as the hack's based in a different time period to the other games so there are different pokemon.