The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Tutorials (https://www.pokecommunity.com/forumdisplay.php?f=66)
-   -   thethethethe's Scripting Tutorial (https://www.pokecommunity.com/showthread.php?t=128887)

The Shadow Knight April 15th, 2008 9:03 AM

This is a truly awesome guide, it has helped me a lot.

There is one thing I didn't find to be mentioned that is quite cool to use: #raw 0x2F
0x2F is used for sound effects like the exclamation mark sound, it's used like this:
#raw 0x2F 0xnn 0xnn

(Where the last two stand for the flipped sound effect number)

Pokepal2007 April 17th, 2008 7:39 AM

can someone help me this script dosen't finish why?.

#org $begin
checkflag 0x201
if b_true goto $done
applymovement 0xFF $move1
pausemove 0
message $1
boxset 6
trainerbattle 0 0x001 $before $after $later
end

#org $done
release
end

#org $move1
#raw 0x10 0x10 0x10 0x10 0x12 0x12 0x10 0x10 0xFE

#org $1
$1 1 =Hey leave that pikachu alone!

#org $before
$before 1 = Battle me now and if you win i will\nGo away.

#org $after
$after 1 = Okay i will leave this pikachu alone.

#org $later
message $2
boxset 6
applymovement 0x01 $move1
pausemove 0
message $3
boxset 6
applymovement 0x00 $move2
pausemove 0
setflag 0x201
release
end

#org $2
$2 1 =I will return and you will lose.

#org $move1
#raw 0x13 0x60 0xFE

#org $3
$3 1 =Thank you for Saving me this staircase\nwill take us out.

#org $move2
#raw 0x13 0x60 0x13 0xFE

cooley April 17th, 2008 5:03 PM

Quote:

Originally Posted by pokepal2007 (Post 3506630)
can someone help me this script dosen't finish why?.

#org $begin
checkflag 0x201
if b_true goto $done
applymovement 0xFF $move1
pausemove 0
message $1
boxset 6
trainerbattle 0 0x001 $before $after $later
end

#org $done
release
end

#org $move1
#raw 0x10 0x10 0x10 0x10 0x12 0x12 0x10 0x10 0xFE

#org $1
$1 1 =Hey leave that pikachu alone!

#org $before
$before 1 = Battle me now and if you win i will\nGo away.

#org $after
$after 1 = Okay i will leave this pikachu alone.

#org $later
message $2
boxset 6
applymovement 0x01 $move1
pausemove 0
message $3
boxset 6
applymovement 0x00 $move2
pausemove 0
setflag 0x201
release
end

#org $2
$2 1 =I will return and you will lose.

#org $move1
#raw 0x13 0x60 0xFE

#org $3
$3 1 =Thank you for Saving me this staircase\nwill take us out.

#org $move2
#raw 0x13 0x60 0x13 0xFE

This is not a request thread, it's a Tutorial But I'll tell you what's wrong.

trainerbattle 0x0 is for battles that don't have $further or $later

trainerbattle 0x1 is for battles that have a script that continues after the battle eg. $later

himowa April 20th, 2008 9:42 AM

Code:

#org $start
checkflag 0x828
if b_true goto $done
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 133 5 0
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 $done
message $6
boxset 6
release
end

#org $1
$1 1 =AID: I'm sorry, PROF. PINE isn't\nhere right now.\p...Oh, so you need a POKeMON to travel with?\pHere, you can have\nthis POKeMON we study in the lab.\pTake the POKeMON?

#org $2
$2 1 =AID: Well if you change your mind let me know.

#org $3
$3 1 =\c\h01\h02You received an EEVEE!

#org $4
$4 1 =\c\h01\h02Would you like to rename EEVEE?

#org $5
$5 1 =We have been monitering\nEEVEE's evolution patterns.\lWe have plenty of them in the\nso this one is probably\lbetter off with you.

#org $6
$6 1 =How is EEVEE doing?


I'm having some problems with this script here. Everything seems to work, he says everything and you get the Eevee, but when you go to give it a nickname it has missingno's icon with ?'s for the name where is should have Eevee's icon and name.

But when you look through the start menu and everything you have a Eevee, only during renaming process.

Also after you rename you seem to have an identity crisis and switch places/sprites with the aid. (until you walk into a new map, then you go back to normal)

Tré April 20th, 2008 6:56 PM

hey how do you insert scripts using the tool....???

Hellsing April 21st, 2008 12:52 PM

Quote:

Originally Posted by Tre_Al (Post 3518120)
hey how do you insert scripts using the tool....???

just right click your rbc. file and press compile.
and guys, this is a script tutorial, please just post in the script help thread for all these scripting screwups.

Dan13x April 24th, 2008 7:44 PM

Quote:

Originally Posted by himowa (Post 3516210)
Code:

#org $start
lock
faceplayer

checkflag 0x828
if b_true goto $done
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 133 5 0
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 $done
message $6
boxset 6
release
end

#org $1
$1 1 =AID: I'm sorry, PROF. PINE isn't\nhere right now.\p...Oh, so you need a POKeMON to travel with?\pHere, you can have\nthis POKeMON we study in the lab.\pTake the POKeMON?

#org $2
$2 1 =AID: Well if you change your mind let me know.

#org $3
$3 1 =\c\h01\h02You received an EEVEE!

#org $4
$4 1 =\c\h01\h02Would you like to rename EEVEE?

#org $5
$5 1 =We have been monitering\nEEVEE's evolution patterns.\lWe have plenty of them in the\nso this one is probably\lbetter off with you.

#org $6
$6 1 =How is EEVEE doing?


I'm having some problems with this script here. Everything seems to work, he says everything and you get the Eevee, but when you go to give it a nickname it has missingno's icon with ?'s for the name where is should have Eevee's icon and name.

But when you look through the start menu and everything you have a Eevee, only during renaming process.

Also after you rename you seem to have an identity crisis and switch places/sprites with the aid. (until you walk into a new map, then you go back to normal)

The letters in bold are the ones that are new. I don't know what happened, make sure you have lock and faceplayer when you're speaking with a person.

BBs0n April 30th, 2008 5:29 AM

I've a script, but it doesn't work. I've tried to change some flags, but I don't think that's the problem because the script is in the beginning of the game (when you down the stairs into your livingroom)

Code:

#org $start
checkflag 0x202
if b_true goto $done
setflag 0x202
applymovement 0x01 $popup
pausemove 0
message $verslapen
boxset 6
applymovement 0x01 $moves
pausemove 0
message $oak
boxset 6
applymovement 0x01 $movesback
pausemove 0
release
end

#org $done
release
end

#org $verslapen
$verslapen 1 =YOU OVERSLEPT!

#org $oak
$oak 1 =I don't think Professor Brown has \nany Pok\h1Bmon left for you. \lHe might have a pok\h1Bdex for you...

#org $popup
#raw 0x62
#raw 0xFE

#org $moves
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0xFE

#org $movesback
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0x02
#raw 0xFE


Does anyone has an idea what's going wrong? If I walk onto it nothing happens. When I walk the second time over it the game freezes...

Piplup-Trainer April 30th, 2008 2:07 PM

Thanks to this tutorial I made a rocket script battle.

greenozano April 30th, 2008 2:31 PM

I made this script in which your mom is suppose to barge in your room and act excited it works all the way up to her disappearance then it frezzes try it out your self. What did I do wrong.

#org $start
checkflag 0x203
if 0x1 goto $end
applymovement 0xFF $move1
$move1 1 ; #binary 0x62 0xFE
pause 0x20
applymovement 0x1 $move2
$move2 1 ; #binary 0x61 0x1D 0x1D 0x1D 0x1F 0x1F 0x20 0x20 0x02 0xFE
pause 0x40
message $MESSAGE1
$MESSAGE1 1 = I can't beleive that you are finally\l14.\nI feel angery and happy at the same time\nanyway come on down\n the professor is here.
boxset 0x6
applymovement 0x1 $move3
$move3 1 ; #binary 0x1E 0x1E 0x1E 0xFE
pause 0x40
#raw 0x53 0x01 0x00
setflag 0x204
message $message 2
$message 2 1 =\v\h01:Man when did my mother get this\nenergetic.\nJason:Yeah, I am!\n\v\h01:??? did she heared me? I was just thinking.\n It wasn't even out loud\nMom: Hurry Up!!!\n\v\h01:Ok coming!
boxset 0x6
setflag 0x203
release
end


#org $end
release
end

Binary May 1st, 2008 8:17 AM

Quote:

#org $start
checkflag 0x203
if B_true goto $end
applymovement 0xFF $move1
pause 0x10
applymovement 0x1 $move2
pausemove
message $MESSAGE1
boxset 6
applymovement 0x1 $move3
pause 0x30
#raw 0x53 0x01 0x00
message $message 2
boxset 6
setflag 0x203
release
end

#org $end
release
end

#org $move1
$move1 1 ; #binary 0x62 0xFE

#org $move2
$move2 1 ; #binary 0x61 0x1D 0x1D 0x1D 0x1F 0x1F 0x20 0x20 0x02 0xFE

#org $MESSAGE1
$MESSAGE1 1 = I can't beleive that you are finally\l14.\nI feel angery and happy at the sametime\nanyway come on down\n the professor is here.

#org $move3
$move3 1 ; #binary 0x1E 0x1E 0x1E 0xFE

#org $message 2
$message 2 1 =\v\h01:Man when did my mother get this\nenergetic.\nJason:Yeah, I am!\n\v\h01:??? did she heared me? I was just thinking.\n It wasn't even out loud\nMom: Hurry Up!!!\n\v\h01:Ok coming!
I suggest you to put the offsets in the end.

BBs0n May 1st, 2008 8:43 AM

I've got this script:
Code:

#org $start
checkflag 0x202
if b_true goto $done
applymovement 0x01 $popup
pausemove 0
message $verslapen
boxset 6
applymovement 0x01 $moves
pausemove 0
message $oak
boxset 6
applymovement 0x01 $movesback
pausemove 0
setflag 0x202
release
end

#org $done
release
end

#org $verslapen
$verslapen 1 = YOU OVERSLEPT!

#org $oak
$oak 1 = I don't think Professor Brown has \nany Pok\h1Bmon left for you. \lHe might have a pok\h1Bdex for you...

#org $popup
$popup 1 ; #binary 0x62 0xFE

#org $moves
$moves 1 ; #binary 0x11 0x11 0x13 0xFE

#org $movesback
$movesback 1 ; #binary 0x12 0x10 0x10 0x02 0xFE


When I walk onto the script, the game freezes. If I give the offset to people no.1 It will do the script perfectly when I talk to her. Why is that so? Why does it work on a People and not on a Script???

greenozano May 1st, 2008 2:13 PM

Quote:

Originally Posted by C3LEBI-愛 (Post 3546629)


Quote:
#org $start
checkflag 0x203
if B_true goto $end
applymovement 0xFF $move1
pause 0x10
applymovement 0x1 $move2
pausemove
message $MESSAGE1
boxset 6
applymovement 0x1 $move3
pause 0x30
#raw 0x53 0x01 0x00
message $message 2
boxset 6
setflag 0x203
release
end

#org $end
release
end

#org $move1
$move1 1 ; #binary 0x62 0xFE

#org $move2
$move2 1 ; #binary 0x61 0x1D 0x1D 0x1D 0x1F 0x1F 0x20 0x20 0x02 0xFE

#org $MESSAGE1
$MESSAGE1 1 = I can't beleive that you are finally\l14.\nI feel angery and happy at the sametime\nanyway come on down\n the professor is here.

#org $move3
$move3 1 ; #binary 0x1E 0x1E 0x1E 0xFE

#org $message 2
$message 2 1 =\v\h01:Man when did my mother get this\nenergetic.\nJason:Yeah, I am!\n\v\h01:??? did she heared me? I was just thinking.\n It wasn't even out loud\nMom: Hurry Up!!!\n\v\h01:Ok coming!
I suggest you to put the offsets in the end.

Dude it still doesn't work right now it doesn't even start now.

Klex May 1st, 2008 2:20 PM

Man thethethethe i was just reading thru some of your tut and it is such nice work
man i didint think there was that much stuff for Scripting.

geno421 May 1st, 2008 3:45 PM

That was alot to take in but now I have a clear understanding on how PokeScript works. Thanks. :)

Kye McPie May 5th, 2008 9:10 AM

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:
#org $start
checkflag 0x828
if b_true goto $done
message $1
boxset 6
applymovement 0x03 $move
pausemove 0x0
applymovement 0xFF $move2
pause 0x30
message $2
boxset 6
playsound 0x13E
nop
applymovement 0x03 $move3
applymovement 0xFF $move3
pausemove 0
fadesound 0x12C
nop
release
end

#org $done
release
end

#org $move
#raw 0x20 0x20 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x32 0x32 0x32 0xFE

#org $move2
#raw 0x00 0xFE

#org $move3
#raw 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x11 0xFE

#org $1
$1 1 = \c\h01\h04message!

#org $2
$2 1 =message!


And while I'm at it, I wanna ask; can you insert a unlimited amount of movements into a single line?

dragontamer May 5th, 2008 11:29 AM

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?

cloudffvii2696 May 6th, 2008 2:26 PM

Quote:

Originally Posted by dragontamer (Post 3559274)
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

Tré May 8th, 2008 7:08 PM

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??

greenozano May 9th, 2008 4:18 AM

Quote:

Quote:

Originally Posted by Tre_Al (Post 3568004)
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

Quote:

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

Perfect_Palkia_10 May 11th, 2008 12:20 AM

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.

Master_Track May 11th, 2008 4:39 AM

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 0x19E $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.

PhaizeD May 11th, 2008 7:02 AM

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.

TheGoldenKing May 12th, 2008 3:44 PM

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?

dragonarche May 12th, 2008 11:57 PM

click here
Spoiler:

i got no reason to post


All times are GMT -8. The time now is 9:06 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 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 - 2016 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.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.