• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

thethethethe's Scripting Tutorial

I can tell this tutorial has a lot of information that's going to help me with hacking, even though I don't quite understand it all -_-;;. Good job, man.


Hey, could I get some help with my applymovement script? I want Mr. Oak here to say something, then take 2 fast steps to the right, then 1 fast steps up and 3 slides up and stop; then, the player will take 1 step down on the spot, Oak will again speak, and once he's done the player will follow Oak down 14 normal steps, then 5 steps to the right and finally 1 step up into a warp. When I try to compile the script I get this error;

"Run-time error '13'

Type mismatch"

Looking at the log behind the message the compiling seems to stop right after the first $move line.

Here's the script;

Spoiler:


And while I'm at it, I wanna ask; can you insert a unlimited amount of movements into a single line?
 
okay im a noob and i want to start with hacking but,, how the f,*ck do you open this etc. i only get some log and something called *bugbite* explain me how im gonna use this?
 
okay im a noob and i want to start with hacking but,, how the f,*ck do you open this etc. i only get some log and something called *bugbite* explain me how im gonna use this?

I had the same problem too until I got used to it, but here's how to get it to work:
-open up Notepad and type up your code, then save it as a .rbc file.
-now, right click on XXXXXXX.rbc and choose "compile script"
-then it will compile and BufRite will open
-Hit the Assign icon and open up your rom
-hit the search button, click on a hex value, and now hit Reserve
-Now you should be set
 
hey is there a problem with this script???
#org $34
lock
faceplayer
message $i'll give yah this
$i'll give yah this 1 =i'll give yah this
givepokemon 142 100 -1
special 0x9E
release
end
how do i insert it??

Even I know this

#org $34
lock
faceplayer
message $i'll give yah this
$i'll give yah this 1 =i'll give yah this
boxset 6
givepokemon 142 100 1
special 0x9E
release
end
how do i insert it??

You insert it by using pokescript so go to Irish witch's tutorial.
 
Excellent tutorial. I've got a problem. When did my trainerbattle script for a gym leader all that happens in the game is that I get my badge and TM but its the wrong badge and I never battle. Can someone help.
 
would help if you'd show us your script ^^

but it should be like this:

Code:
#org $begin
lock
faceplayer
message $raven
$raven 1 = Oh, a challenger? You\nare the first one after\lweeks.\pMy name is VINCENT RAVEN, but\ncall me VINCE. I am a trainer\lof BIRD POKEMON. They are\lfascinating, aren't they?\pWhen I was a small child I\nsaved a little MURKROW, we were\ltogether since this day. You can't\lbeat us!
boxset 6
trainerbattle 1 0x[B]19E[/B] $before $after $later
end

#org $before
$before 1 = Let's start!

#org $after
$after 1 = MURKROW, noooooo!

#org $later
message $beaten
$beaten 1 = You defeated even MURKROW.\nI can't believe it...\lYou are stronger than I thought.\lI'll give you the Badge of\lfreedom.
boxset 6
fanfare 0x13E
message $badge
$badge 1 = You received: \c\h01\h05Badge Of Freedom.
boxset 6
waitfanfare
message $tm
$tm 1 = I want to give you this\ntoo, it's my favourite\lattack.
boxset 6
fanfare 0x13E
message $tm1
$tm1 1 = You received: \c\h01\h04TM 40!
boxset 6
waitfanfare
message $ace
$ace 1 = This TM can teach one of your\npokemon the attack \c\h01\h04AERIAL\lACE\c\h01\h02. Think carefully before using it.
boxset 6
giveitem 0x148 1
setflag 0x820
release
end

you'll have to change the text and the number which i made bold.
it has to be the trainer id from PET.
 
I'm having a lot of problems. I've tried multiple tutorials and scripts from the tutorials always have issues with me. For instance the GivePokemon script in here, I even tried copying it and It NEVER gives the pokemon. It always sends me to $2 and ends it.

The lavacookie for ultra ball script in Irish Witch's tutorial also has a problem, it never recognizes that I have a cookie.

A lot of giveitem scripts either ALWAYS give the item or NEVER give the item.

I'm wondering if it has something to do with the version I'm using or something, I'm using pokescript v1.2. If I need an earlier or later version, could someone tell me and/or direct me somewhere that I can obtain it? As I can't find anything besides v1.2.
 
Can someone help me I want to make a trainer script like the rivals in fire red. I want to make the Pokemon you fight different depending on what Pokemon you pick as your stater, but I don't know how I would do it?
 
Can someone help me I want to make a trainer script like the rivals in fire red. I want to make the Pokemon you fight different depending on what Pokemon you pick as your stater, but I don't know how I would do it?
you'll have to check for the pokemon in your party, and depending which you have you need to point do a different part of the script.
for example, you check for Larvitar. If the player has larvitar, the script goes normal on to..lets say trainerbattle 1 0x001.
but if not..goto $notvitar
and there u check for, lets say mew. If player has mew, the script goes on to trainerbattle 0x002.
if not, goto $last. And there u put another trainerbattle 0x003.
And each of this trainers are named like the rival, have the same picture but different pokemon ^^
 
I know that was what I was thinking but what if someone cheats and catches all starters or evolves their original one, what would I do then?
 
Make a script where we're in the beginning of the game, like when we come out of Oak's lab. There you check the pokemon. I don't know what the script is but I know how it looks like

Code:
check a pokemon (let's say Charmander)
if 1 goto $charmander
check a pokemon (let's say Squirtle)
if 1 goto $squirtle
setflag 0x200
release
end

#org $charmander
setflag 0x201
release
end

#org $squirtle
set flag 0x202
release
end

(check a pokemon isn't the right command. It was just an example

Setflag 200 is for Bulbasaur
Setflag 201 is for Charmander
setflag 202 is for Squirtle

Now you can check which pokemon he had got first. I don't know if this is the easiest way, but I think it'll work...
 
I got a problem with the give pokemon script I got the pokemon but the flag didnt work and when it asked if the pokemon wants a nickname it just froze the game what is the problem?
 
is their a script that will ask you your ID number in your Trainer Card?

and a script that only work in one gender?
 
Last edited:
Thank you very much thex4, this tutorial has helped me a lot :). I haven't read it all though.

I have a problem with the applymovements script. This is to stop the hero from continuing and making him/her move back. The script doesn't even start when I test it; here it is:

Code:
#org $start
applymovement 0x04 $stop
applymovement 0xFF $what
pausemove 0x0
message $1
boxset 6
applymovement 0xFF $move
pausemove 0x0
release
end
 
#org $stop
#raw 0x62 0xFE
 
#org $what
#raw 0x02 0x63 0xFE
 
#org $move
#raw 0x10 0xFE
 
#org $1
$1 1 =Stop! You can't pass.

Please help and thanks again thex4.
 
eck!
Ok, I tried making a script, it worked all fine and glitches the pokemon sprite a teency bit right before the screen does it's little animation
[Then you fight the pokemon]
and all but the pokemon does not disappear after the battle
And to think of it, nor do I hear the roar >,<'
I was wondering if you could help?

Here it be! :)

#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
Setflag 0x200
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!
 
Last edited:
Hello people who know the earthquake command for Fire-red? Because i don't know what that command code is i hope that someon can tell it me
Thanks in advance ^^
~Mitchel1
 
Code:
special 0x136
#raw 0x2F 0x4B 0x01
setvar 0x8004 0x3
setvar 0x8005 0x3
setvar 0x8006 0x3A
setvar 0x8007 0x2
special 0x136
pause 0x3A

I'm not sure about what each var means, but I think the one with 0x3A sets the duration. the higher the number, the longer the quake.
the #raw activates the cave sound, if it should be outside u should delete this line ^^
 
eck!
Ok, I tried making a script, it worked all fine and glitches the pokemon sprite a teency bit right before the screen does it's little animation
[Then you fight the pokemon]
and all but the pokemon does not disappear after the battle
And to think of it, nor do I hear the roar >,<'
I was wondering if you could help?

Here it be! :)

#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
Setflag 0x200
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!

Can someone please tell me how to make the pokemon disappear?
It has been bugging me for a long time.
Well... A good long while.
And is making the poke disappear in a legendary script any different from the norm?
 
Back
Top