The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Tutorials
Reload this Page thethethethe's Scripting Tutorial

Notices
For all updates, view the main page.

Binary Hack Tutorials Various tools and resources to help you develop your legacy hacks can be found here.

Ad Content
Reply
 
Thread Tools
  #151   Link to this post, but load the entire thread.  
Old May 13th, 2008 (12:37 AM).
Master_Track's Avatar
Master_Track Master_Track is offline
ROM Reaverz Scripter
 
Join Date: Mar 2008
Location: Austria
Age: 30
Gender:
Nature: Brave
Posts: 916
Quote:
Originally Posted by TheGoldenKing View Post
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 ^^
__________________

*Busy with school*

Reply With Quote
  #152   Link to this post, but load the entire thread.  
Old May 13th, 2008 (3:59 PM).
TheGoldenKing's Avatar
TheGoldenKing TheGoldenKing is offline
 
Join Date: Sep 2007
Gender:
Posts: 3
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?
Reply With Quote
  #153   Link to this post, but load the entire thread.  
Old May 14th, 2008 (7:59 AM).
BBs0n BBs0n is offline
 
Join Date: Jul 2007
Gender:
Nature: Adamant
Posts: 16
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...
Reply With Quote
  #154   Link to this post, but load the entire thread.  
Old May 18th, 2008 (10:52 AM).
MCRAIDER19's Avatar
MCRAIDER19 MCRAIDER19 is offline
DUH LEGENDARY SANDBIRD!
 
Join Date: May 2008
Location: Wales, UK
Gender: Male
Nature: Adamant
Posts: 9
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?
Reply With Quote
  #155   Link to this post, but load the entire thread.  
Old May 18th, 2008 (7:45 PM). Edited May 19th, 2008 by X-Buster.
X-Buster X-Buster is offline
 
Join Date: Feb 2008
Posts: 713
is their a script that will ask you your ID number in your Trainer Card?

and a script that only work in one gender?
__________________
Reply With Quote
  #156   Link to this post, but load the entire thread.  
Old May 20th, 2008 (12:53 PM).
1KewlDude 1KewlDude is offline
Really busy... STRESS!!
 
Join Date: Dec 2007
Location: London
Age: 30
Nature: Docile
Posts: 124
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.
__________________
Spoiler:

This was made by me.

Hacks I support:
Spoiler:



Reply With Quote
  #157   Link to this post, but load the entire thread.  
Old May 20th, 2008 (4:25 PM). Edited May 20th, 2008 by Jawash.
Jawash's Avatar
Jawash Jawash is offline
<Beat EVERY SINGLE DragonQuest
 
Join Date: May 2008
Age: 31
Gender:
Nature: Gentle
Posts: 37
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!
Reply With Quote
  #158   Link to this post, but load the entire thread.  
Old May 21st, 2008 (6:26 AM).
mitchel1's Avatar
mitchel1 mitchel1 is offline
Rom-hacker/scripter
 
Join Date: Jan 2007
Location: Carbon box, near you!
Gender: Male
Nature: Naive
Posts: 237
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
__________________

Reply With Quote
  #159   Link to this post, but load the entire thread.  
Old May 21st, 2008 (6:37 AM).
Master_Track's Avatar
Master_Track Master_Track is offline
ROM Reaverz Scripter
 
Join Date: Mar 2008
Location: Austria
Age: 30
Gender:
Nature: Brave
Posts: 916
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 ^^
__________________

*Busy with school*

Reply With Quote
  #160   Link to this post, but load the entire thread.  
Old May 21st, 2008 (11:05 AM).
Jawash's Avatar
Jawash Jawash is offline
<Beat EVERY SINGLE DragonQuest
 
Join Date: May 2008
Age: 31
Gender:
Nature: Gentle
Posts: 37
Quote:
Originally Posted by Jawash View Post
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?
Reply With Quote
  #161   Link to this post, but load the entire thread.  
Old May 21st, 2008 (11:44 AM).
Master_Track's Avatar
Master_Track Master_Track is offline
ROM Reaverz Scripter
 
Join Date: Mar 2008
Location: Austria
Age: 30
Gender:
Nature: Brave
Posts: 916
Code:
#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
#raw 0x53 0x00 0x00 (<--reversed person number)
Setflag 0x200 (<---write the setflag number as ID for the sprite: 0200)
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!
it should work if u do what I wrote ;)
__________________

*Busy with school*

Reply With Quote
  #162   Link to this post, but load the entire thread.  
Old May 21st, 2008 (12:01 PM).
Jawash's Avatar
Jawash Jawash is offline
<Beat EVERY SINGLE DragonQuest
 
Join Date: May 2008
Age: 31
Gender:
Nature: Gentle
Posts: 37
Quote:
Originally Posted by Master_Track View Post
Code:
#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
#raw 0x53 0x00 0x00 (<--reversed person number)
Setflag 0x200 (<---write the setflag number as ID for the sprite: 0200)
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!
it should work if u do what I wrote ;)
The pokemon is still there.
there is no bye-bye pokemon.
eck.
7,7... i just need practice on this one script and i'll be just about finihed learnerating :D
Reply With Quote
  #163   Link to this post, but load the entire thread.  
Old May 21st, 2008 (12:31 PM).
Master_Track's Avatar
Master_Track Master_Track is offline
ROM Reaverz Scripter
 
Join Date: Mar 2008
Location: Austria
Age: 30
Gender:
Nature: Brave
Posts: 916
did u replace 0x00 0x00 with the person number? and was it reversed?
person number 6:
#raw 0x53 0x06 0x00
setflag 0x200

and u have to give the sprite the ID 0200.

number 6 was just an example, just replace it with another number ^^
if the number is higher than 9:
0x0A = 10
0x0B = 11
...
...
0x0F = 15
0x10 = 16
0x19 = 25
0x1A = 26

etc ^^
__________________

*Busy with school*

Reply With Quote
  #164   Link to this post, but load the entire thread.  
Old May 21st, 2008 (12:45 PM). Edited May 21st, 2008 by Jawash.
Jawash's Avatar
Jawash Jawash is offline
<Beat EVERY SINGLE DragonQuest
 
Join Date: May 2008
Age: 31
Gender:
Nature: Gentle
Posts: 37
Quote:
Originally Posted by Master_Track View Post
did u replace 0x00 0x00 with the person number? and was it reversed?
person number 6:
#raw 0x53 0x06 0x00
setflag 0x200

and u have to give the sprite the ID 0200.

number 6 was just an example, just replace it with another number ^^
if the number is higher than 9:
0x0A = 10
0x0B = 11
...
...
0x0F = 15
0x10 = 16
0x19 = 25
0x1A = 26

etc ^^
bleap bloop blop blape....
pineapple chicken fork...
i am sorry can you show me specifically what you mean?
i will use it as a base script and give you credit.
?
Reply With Quote
  #165   Link to this post, but load the entire thread.  
Old May 22nd, 2008 (12:35 AM).
Master_Track's Avatar
Master_Track Master_Track is offline
ROM Reaverz Scripter
 
Join Date: Mar 2008
Location: Austria
Age: 30
Gender:
Nature: Brave
Posts: 916
I'll try to explain it a bit:
Code:
#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
#raw 0x53 0x00 0x00 (<--reversed person number)
Setflag 0x200 (<---write the setflag number as ID for the sprite: 0200)
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!
there is the #raw 0x53 command. the 2 bytes after it have to be the reversed
trainernummer. U have to reverse it like this:

person number 2:
0002
[00][02] --> [02][00] ---> 0x02 0x00

numbers higher than 10 have to be in hex. I showed above how to do that.
for example numer 10.
10 = 000A

[00][0A]---> [0A][00]---> 0x0A 0x00

if u do it right it should work.
Check if u use the person number, NOT the event number. (person number is the one above the picture number).
then u use a setflag here, 0200.
so the person which should vanish needs the ID 0200.

finished script for person number 5 :
Code:
#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
#raw 0x53 0x05 0x00
Setflag 0x200
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!
u can just replace the number 5 with the right number if its lower than 10. if it's
10 or higher do what i showed above ;)
__________________

*Busy with school*

Reply With Quote
  #166   Link to this post, but load the entire thread.  
Old May 22nd, 2008 (10:41 AM).
Jawash's Avatar
Jawash Jawash is offline
<Beat EVERY SINGLE DragonQuest
 
Join Date: May 2008
Age: 31
Gender:
Nature: Gentle
Posts: 37
Quote:
Originally Posted by Master_Track View Post
I'll try to explain it a bit:
Code:
#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
#raw 0x53 0x00 0x00 (<--reversed person number)
Setflag 0x200 (<---write the setflag number as ID for the sprite: 0200)
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!
there is the #raw 0x53 command. the 2 bytes after it have to be the reversed
trainernummer. U have to reverse it like this:

person number 2:
0002
[00][02] --> [02][00] ---> 0x02 0x00

numbers higher than 10 have to be in hex. I showed above how to do that.
for example numer 10.
10 = 000A

[00][0A]---> [0A][00]---> 0x0A 0x00

if u do it right it should work.
Check if u use the person number, NOT the event number. (person number is the one above the picture number).
then u use a setflag here, 0200.
so the person which should vanish needs the ID 0200.

finished script for person number 5 :
Code:
#org $start
Lock
Faceplayer
Message $roar
Boxset 6
Wildbattle 5 2 1
#raw 0x53 0x05 0x00
Setflag 0x200
Fadesreen 0
Release
End

#org $roar
$roar 3 = Charmeleon: Char... Charmeleon!
u can just replace the number 5 with the right number if its lower than 10. if it's
10 or higher do what i showed above ;)
now that's what i be screamin' thank you.
great!
Reply With Quote
  #167   Link to this post, but load the entire thread.  
Old May 25th, 2008 (1:40 PM).
Pokepal2007's Avatar
Pokepal2007 Pokepal2007 is offline
angels awakening
 
Join Date: Jun 2007
Location: Fire City
Nature: Calm
Posts: 458
#org $begin
checkflag 0x807
if b_true goto $team
release
end

#org $team
checkflag 0x201
if b_true goto $done
applymovement 0x05 $move
pausemove 0
message $1
boxset 6
applymovement 0x05 $move1
pausemove 0
applymovement 0xFF $move2
pausemove 0
message $2
boxset 6
setflag 0x201
release
end

#org $done
release
end

#org $move
#raw 0x0B 0x0B 0x0B 0xFE

#org $1
$1 1 =Hey there kid could you help me?\nWell two bad guys walked into\pThe Sacred Field.\pCould you come with me?\p\v\h01:Yes ok.

#org $move1
#raw 0x0A 0x0A 0x09 0x09 0x09 0x09 0x09 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x08 0x08 0x0B 0x0B 0x0B 0x0B 0xFE

#org $move2
#raw 0x0A 0x0A 0x0A 0x09 0x09 0x09 0x09 0x09 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x08 0x08 0x0B 0x0B 0x0B 0xFE

#org $2
$2 1 =This is it just head through.

WHAT IS GOING WRONG?
__________________


Click here to feed me a Star Fruit!


Click here to feed me a Rare Candy!

[center]
Name: Hevaa Guardian
Mascot of Pokémon Heaven Legends
Reply With Quote
  #168   Link to this post, but load the entire thread.  
Old May 26th, 2008 (5:38 AM).
Master_Track's Avatar
Master_Track Master_Track is offline
ROM Reaverz Scripter
 
Join Date: Mar 2008
Location: Austria
Age: 30
Gender:
Nature: Brave
Posts: 916
Quote:
Originally Posted by pokepal2007 View Post
#org $begin
checkflag 0x807
if b_true goto $team
release
end

#org $team
checkflag 0x201
if b_true goto $done
applymovement 0x05 $move
pausemove 0
message $1
boxset 6
applymovement 0x05 $move1
pausemove 0
applymovement 0xFF $move2
pausemove 0
message $2
boxset 6
setflag 0x201
release
end

#org $done
release
end

#org $move
$move 1 ; #binary 0x0B 0x0B 0x0B 0xFE

#org $1
$1 1 = Hey there kid could you help me?\nWell two bad guys walked into\pThe Sacred Field.\pCould you come with me?\p\v\h01:Yes ok.

#org $move1
$move1 1 ; #binary 0x0A 0x0A 0x09 0x09 0x09 0x09 0x09 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x08 0x08 0x0B 0x0B 0x0B 0x0B 0xFE

#org $move2
$move2 1 ; #binary 0x0A 0x0A 0x0A 0x09 0x09 0x09 0x09 0x09 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x08 0x08 0x0B 0x0B 0x0B 0xFE

#org $2
$2 1 = This is it just head through.

WHAT IS GOING WRONG?

I replaced the #raws of the movement with #binary, because I think it works better ;)

And I also changed the setting of the messages.

message $1
$1 1 = Put a space after the equal sign,\nthen it should work.
boxset 6

xD
Reply With Quote
  #169   Link to this post, but load the entire thread.  
Old May 28th, 2008 (12:01 PM).
4tutoralcom's Avatar
4tutoralcom 4tutoralcom is offline
 
Join Date: May 2008
Gender:
Posts: 1
Is there any way to create a script that allows you to trade pokemon in the game? If there is tell post the script.
Reply With Quote
  #170   Link to this post, but load the entire thread.  
Old May 28th, 2008 (12:21 PM).
maximum911's Avatar
maximum911 maximum911 is offline
Beggining Scripter
 
Join Date: Feb 2008
Gender:
Posts: 104
when ever i have a script when you step on it something moves the games always hangs here is a simple example

Quote:
#org $start
applymovement 0x4 $move
pausemove 0x0
message $2
boxset 6
release
end

#org $move
#raw 0x13 0x13 0x13 0x13 0xFE

#org $2
$2 1 =Hi big bro!
__________________

Feed JibberJabber a Rare Candy!
Get your own at Pokeplushies!
Feed Greeno a Rare Candy!
Feed Horny a Rare Candy!
Feed Hungary a Rare Candy!
Feed Eclypsis a Rare Candy!
Need the perfect pokemon avatar for the forums you can find the pokemon avatar of you dreams at http://pokemon.marriland.com/avatars.php
Reply With Quote
  #171   Link to this post, but load the entire thread.  
Old May 29th, 2008 (3:18 PM). Edited May 30th, 2008 by phmman.
phmman phmman is offline
 
Join Date: May 2008
Location: Sunveiw Valley, Orgin
Gender:
Nature: Jolly
Posts: 31
Hello everyone! I'm new to this fourm! Anyway I don't understand the ApplyMovement script. Do I place the outset in a script or a Person? I'm new to script so please explain as simple as you can please. Thanks in advance!

Edit: Someone already answer this for me so thanks anyway if you were going to help.
Reply With Quote
  #172   Link to this post, but load the entire thread.  
Old May 30th, 2008 (1:29 PM).
Gundam-Fighter's Avatar
Gundam-Fighter Gundam-Fighter is offline
Look at the ickle Rhydon!
 
Join Date: Apr 2008
Age: 29
Gender:
Nature: Quiet
Posts: 35
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:
Quote:
#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.
Reply With Quote
  #173   Link to this post, but load the entire thread.  
Old May 31st, 2008 (7:57 AM).
Pokepal2007's Avatar
Pokepal2007 Pokepal2007 is offline
angels awakening
 
Join Date: Jun 2007
Location: Fire City
Nature: Calm
Posts: 458
what would i do if i wanted to set the clock on ruby and sapphire?
__________________


Click here to feed me a Star Fruit!


Click here to feed me a Rare Candy!

[center]
Name: Hevaa Guardian
Mascot of Pokémon Heaven Legends
Reply With Quote
  #174   Link to this post, but load the entire thread.  
Old May 31st, 2008 (2:26 PM).
maximum911's Avatar
maximum911 maximum911 is offline
Beggining Scripter
 
Join Date: Feb 2008
Gender:
Posts: 104
help i set the vars on a script on the ground with the unknown 300 and var #5040
heres the script
Quote:
#org $start
applymovement 0x1 $move
pausemove 0x0
message $2
boxset 6
release
end

#org $move
#raw 0x13 0x13 0x13 0x13 0xFE

#org $2
$2 1 =Hi big bro!
no movement occurs when i step on it any help?
__________________

Feed JibberJabber a Rare Candy!
Get your own at Pokeplushies!
Feed Greeno a Rare Candy!
Feed Horny a Rare Candy!
Feed Hungary a Rare Candy!
Feed Eclypsis a Rare Candy!
Need the perfect pokemon avatar for the forums you can find the pokemon avatar of you dreams at http://pokemon.marriland.com/avatars.php
Reply With Quote
  #175   Link to this post, but load the entire thread.  
Old June 1st, 2008 (3:22 AM).
peteb's Avatar
peteb peteb is offline
 
Join Date: May 2008
Gender:
Posts: 22
This is the tutorial that showed me how to edit scripts. This is fantastic. Thanks!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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