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
  #201   Link to this post, but load the entire thread.  
Old June 21st, 2008 (3:22 AM).
maoh4567's Avatar
maoh4567 maoh4567 is offline
that's what she said...
 
Join Date: May 2008
Location: Novaliches, Quezon City, Philippines
Age: 29
Nature: Modest
Posts: 44
Quote:
Originally Posted by thethethethe View Post
There would be some setvars and copyvars in most 'green' scripts.
You still haven't said what you don't understand about them.
let me say it this way...

what is the purpose of variables in a rom???
or can you give some examples of the different ways on how to use it...
Reply With Quote
  #202   Link to this post, but load the entire thread.  
Old June 21st, 2008 (3:44 AM).
adiktus's Avatar
adiktus adiktus is offline
 
Join Date: May 2008
Nature: Hardy
Posts: 248
Quote:
Originally Posted by maoh4567 View Post
let me say it this way...

what is the purpose of variables in a rom???
or can you give some examples of the different ways on how to use it...
In some cases, variables could be used to get your position. (st. anne, script tile for rival battle) If you stepped on the left, a variable is set to 0, and when its compared to 0, the rival moves to the left... If on the middle, the variable is 1, so the rival moves to the middle and so on...

In other cases, like the one when you choose your starting pokemon, a variable is set so that your rival will know what pokemon he will use..

There are a lot of other uses.. can't name them all XD
__________________
*´¨) Love life! Get paid!! Get laid!!!!
¸.´¸.*´¨) ¸.*¨) I'm the DiStOrTeD one
(¸.´ (¸.` * ..:¨¨**¤°¨¨°...............
Reply With Quote
  #203   Link to this post, but load the entire thread.  
Old June 21st, 2008 (1:06 PM).
twi1ight's Avatar
twi1ight twi1ight is offline
Pokemon Paradox Creator
 
Join Date: May 2008
Location: on the earth
Gender:
Nature: Relaxed
Posts: 34
for some reason I get a message that says

"run-time error '13'
type mismatch"
can anyone help?
__________________
My Hack

Reply With Quote
  #204   Link to this post, but load the entire thread.  
Old June 21st, 2008 (1:23 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
grammar mistake maybe?
it would be helpful if you could post your script, otherwise we can't tell you what's wrong ^^
__________________

*Busy with school*

Reply With Quote
  #205   Link to this post, but load the entire thread.  
Old June 21st, 2008 (1:40 PM).
twi1ight's Avatar
twi1ight twi1ight is offline
Pokemon Paradox Creator
 
Join Date: May 2008
Location: on the earth
Gender:
Nature: Relaxed
Posts: 34
ok here it is. its really big so sorry

#org $getmew
countpokemon
compare LASTRESULT 0x1
if b_>= goto $done
#raw 0x55 0x03 0x00
clearflag 0x247
applymovement 0x03 $movealder
pausemove 0
applymovement 0x03 $jumpalder
applymovement 0xFF $jumpme
pausemove 0
applymovement 0x03 $givealder
pausemove 0
message $sorry
boxset 6
givepokemon 251 5 0
fanfare 0x13E
message $gotcelebi
boxset 4
waitfanfare
setflag 0x828
#raw 0x68
message $nickname
boxset 5
compare LASTRESULT 0x1
if b_true gosub $celebiname
message $got2go
boxset 6
applymovement 0xFF $outofway
pausemove 0
applymovement 0x03 $todoor
pausemove 0
#raw 0xAC 0x05 0x00 0x03 0x00
#raw 0xAE
applymovement 0x03 $goin
pausemove 0
#raw 0xAD 0x05 0x00 0x03 0x00
#raw 0xAE
#raw 0x53 0x03 0x00
setflag 0x247
#raw 0x55 0x05 0x00
clearflag 0x200
message $getprof
boxset 6
applymovement 0x05 $tome
pausemove 0
trainerbattle 1 0x146 $go $after $continue
end
#org $done
release
end
#org $movealder
#raw 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1F 0x1F 0xFE
#org $jumpalder
#raw 0x17 0xFE
#org $jumpme
#raw 0x16 0x03 0xFE
#org $givealder
#raw 0x1F 0x1F 0x1F 0x1F 0xFE
#org $sorry
$sorry 1 =Prof. Alder:Oh! \pI'm sorry for running into \nyou I'm just in a hurry \lhere just take this.
#org $gotcelebi
$gotmew 1 =You got a pokèmon!
#org $nickname
$nickname 1 =Would you like to nickname \nyour pokèmon?
#org $celebiname
call 0x1A74EB
return
#org $got2go
$got2go 1 =Now I need to go! \nsee me at my lab later.
#org $outofway
#raw 0x11 0x00 0xFE
#org $todoor
#raw 0x1F 0x1F 0x1F 0x1F 0x1F 0x1E 0xFE
#org $goin
#raw 0x11 0xFE
#org $getprof
$getprof 1 =(What is going on!?!) \p???:Come back here!
#org $tome
#raw 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1F 0x1F 0x1F 0x1F 0x1F 0x01 0xFE
#org $go
$go 1 =Oh no a witness, \nlooks like I'll have to \ltake care of you.
#org $after
$after 1 =The boss isn't going to \nlike this.
#org $continue
message $beatrival
boxset 6
applymovement 0x05 $rivalleave1
pausemove 0
#raw 0x53 0x05 0x00
setflag 0x200
#raw 0xAC 0x05 0x00 0x03 0x00
#raw 0xAE
#raw 0x55
clearflag 0x247
applymovement 0x03 $alderout
pausemove 0
#raw 0xAD 0x05 0x00 0x03 0x00
#raw 0xAE
applymovement 0x03 $alderwarp
pausemove 0
message $warp2lab
boxset 6
fadescreen 0x1
setflag 0x20A
warp 0x4 0x3 0x0
fadescreen 0x0
release
end
#org $beatrival
$beatrival 1 =I'll be back and beat you!
#org $rivalleave1
#raw 0x20 0x20 0x20 0x20 0x20 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
#org $alderout
#raw 0x10 0xFE
#org $alderwarp
#raw 0x13 0x13 0x13 0x13 0x13 0x01 0xFE
#org $warp2lab
$warp2lab 1 =Well it seems you beat \nhim. \pSorry I put you in that \nsituation ,but I knew \lyou could handle it. \lFor helping me I have \la present for you \lback at the lab \lcom'on.

in some of the lines although it looks like I used enter but I didn't
__________________
My Hack

Reply With Quote
  #206   Link to this post, but load the entire thread.  
Old June 21st, 2008 (5:13 PM).
adiktus's Avatar
adiktus adiktus is offline
 
Join Date: May 2008
Nature: Hardy
Posts: 248
Quote:
Originally Posted by twi1ight View Post
#org $tome
#raw 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1F 0x1F 0x1F 0x1F 0x1F 0x01 0xFE
#org $rivalleave1
#raw 0x20 0x20 0x20 0x20 0x20 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
Try writing each in two lines:

Code:
#org $tome
#raw 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 
#raw 0x1F 0x1F 0x1F 0x1F 0x1F 0x01 0xFE
 
#org $rivalleave1
#raw 0x20 0x20 0x20 0x20 0x20 
#raw 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
__________________
*´¨) Love life! Get paid!! Get laid!!!!
¸.´¸.*´¨) ¸.*¨) I'm the DiStOrTeD one
(¸.´ (¸.` * ..:¨¨**¤°¨¨°...............
Reply With Quote
  #207   Link to this post, but load the entire thread.  
Old June 21st, 2008 (10:47 PM).
maoh4567's Avatar
maoh4567 maoh4567 is offline
that's what she said...
 
Join Date: May 2008
Location: Novaliches, Quezon City, Philippines
Age: 29
Nature: Modest
Posts: 44
Quote:
Originally Posted by adiktus View Post
In some cases, variables could be used to get your position. (st. anne, script tile for rival battle) If you stepped on the left, a variable is set to 0, and when its compared to 0, the rival moves to the left... If on the middle, the variable is 1, so the rival moves to the middle and so on...

In other cases, like the one when you choose your starting pokemon, a variable is set so that your rival will know what pokemon he will use..

There are a lot of other uses.. can't name them all XD
thnx alot...
now i understand what is their uses....
Reply With Quote
  #208   Link to this post, but load the entire thread.  
Old June 22nd, 2008 (12:03 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
twi1ight:
your script seems okay, but listen to adiktus and write it in two lines ;)
Also, sometimes #binary works better, it's written like this:
#org $move
$move 1 ; #binary 0x13 0x13 0x13 0x13 0xFE

the movement codes are just the same ;)
( I said it SOMETIMES works better, normally it doesn't really matter if u use #raw or #binary).

Btw nice to see somebody using the doorcommands :D

And one suggestion: I'm not sure if #raw 0x55 will work allright if clearflag is written afterwards, write it before (then it will work for sure, I always do it like this).
clearflag 0x200
#raw 0x55 0x01 0x00

That's all, I think.
And to get a better structure in your script to overview everything:
Maka a free line after each script, like
#org $begin
lock
faceplayer
message $a
$a 1 = Yes or no?
boxset 5
compare 0x800D 0x1
if 1 goto $yes
message $no
$no 1 = You chose no.
release
end

#org $yes
..........................................don't want to write more, just wanted to show ^^
__________________

*Busy with school*

Reply With Quote
  #209   Link to this post, but load the entire thread.  
Old June 29th, 2008 (1:51 PM).
master morty's Avatar
master morty master morty is offline
Master Spriter
 
Join Date: May 2008
Location: The world I created yesterday
Gender:
Nature: Mild
Posts: 93
Quote:
Originally Posted by Master_Track View Post
I can't see anything wrong in this script.
Which Advance Map are you using?
I am using 1.90, and there the fields "unknown" and "variable number" looks like this:
Unknown: 0003
Var.Number:4051

And it works!
Hope that's the problem.

Is it,

unknown 0003
var number 4050
in all games or just fr/lg because my script (which convieniently had the unknown and var number problem) works fine in fr/lg
below is th script I used

'-----------------------
#org 0x800345
msgbox 0x8800362 '"Koo: hey he's over there\n[player]:..."
callstd 0x6
applymovement MOVE_PLAYER 0x880039B
pause 0x40
warp 0x0 0x2 0x1 0xE 0x11
releaseall
end

'-----------
' Movements
'-----------
#org 0x80039B
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

'---------
' Strings
'---------
#org 0x800362
= Koo: hey he's over there\n[player]: oh boy better bail.
__________________
Reply With Quote
  #210   Link to this post, but load the entire thread.  
Old June 30th, 2008 (2:32 AM).
コリンク's Avatar
コリンク コリンク is offline
Pokémon HyperSpeed Creator
 
Join Date: Apr 2008
Location: Galactic Headquaters, Veilstone City
Age: 26
Gender:
Nature: Lonely
Posts: 96
Uhmm.. I hate to bother.. but how can I make the Pokemon speak with you before the cry and battle?
__________________
My FanGame - = Pokemon HyperSpeed =

Team Magma -

Team Aqua -
Team Rocket -

Team Galactic -


Yeah, all of these user bars were made by me. If you want one, simply PM me and I'll make it.
Reply With Quote
  #211   Link to this post, but load the entire thread.  
Old June 30th, 2008 (6:31 AM).
cooley's Avatar
cooley cooley is offline
///Keepin' it simple
 
Join Date: Feb 2007
Location: United States
Age: 28
Gender: Male
Nature: Impish
Posts: 1,148
Quote:
Originally Posted by コリンク View Post
Uhmm.. I hate to bother.. but how can I make the Pokemon speak with you before the cry and battle?
That has nothing to do with the topic. Stay on topic next time, as you can see, this is a scripting thread. Not a ask any Rom hacking questions thread. For that, you should click on ROM hacking, then scroll down to "Simple questions".

Anyways, in order to do that, you have to insert the music over the cry. And please, just because I answered you, that doesn't mean I know how to do it. So Don't PM ME.
__________________

Reply With Quote
  #212   Link to this post, but load the entire thread.  
Old June 30th, 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
I'd say what he meant is just using a message before writing cry O.o
so
message $1
$1 1 = Pikachu: Pika-pika!
boxset 6
cry 0xA1 etc....

Though cooley is right, this is a tutorial, question into the simple question thread of if it's a more complicated script problem into the scrap box- script help thread.
__________________

*Busy with school*

Reply With Quote
  #213   Link to this post, but load the entire thread.  
Old June 30th, 2008 (2:16 PM). Edited July 8th, 2008 by Blazichu.
コリンク's Avatar
コリンク コリンク is offline
Pokémon HyperSpeed Creator
 
Join Date: Apr 2008
Location: Galactic Headquaters, Veilstone City
Age: 26
Gender:
Nature: Lonely
Posts: 96
Quote:
Originally Posted by cooley View Post
That has nothing to do with the topic. Stay on topic next time, as you can see, this is a scripting thread. Not a ask any Rom hacking questions thread. For that, you should click on ROM hacking, then scroll down to "Simple questions".


I thought it did.. I was asking how to do in in the same script.

Quote:
Originally Posted by cooley View Post
And please, just because I answered you, that doesn't mean I know how to do it. So Don't PM ME.
I wasn't going to.

Quote:
Originally Posted by Master_Track View Post
I'd say what he meant is just using a message before writing cry O.o
Yes, that's what I meant, thank you.


Quote:
Originally Posted by Master_Track View Post
Though cooley is right, this is a tutorial, question into the simple question thread of if it's a more complicated script problem into the scrap box- script help thread.
Okay, I will next time, like I said, "Sorry to bother."
__________________
My FanGame - = Pokemon HyperSpeed =

Team Magma -

Team Aqua -
Team Rocket -

Team Galactic -


Yeah, all of these user bars were made by me. If you want one, simply PM me and I'll make it.
Reply With Quote
  #214   Link to this post, but load the entire thread.  
Old July 8th, 2008 (3:48 PM).
twi1ight's Avatar
twi1ight twi1ight is offline
Pokemon Paradox Creator
 
Join Date: May 2008
Location: on the earth
Gender:
Nature: Relaxed
Posts: 34
thnx guys srry im not thanking you earlier but ive been busy more trouble :(
but I have a question how do you use pokescript for a-map if its in the wrong place im srry but wat r the settings and do you use bufrite or pokescript? thanx.
Reply With Quote
  #215   Link to this post, but load the entire thread.  
Old July 8th, 2008 (10:01 PM).
12345's Avatar
12345 12345 is offline
Sky
 
Join Date: Aug 2007
Gender: Male
Nature: Calm
Posts: 157
Do you know abot "buffer" (bufferpokemon, bufferitem...)?
Can I explain me?
Reply With Quote
  #216   Link to this post, but load the entire thread.  
Old July 8th, 2008 (10:26 PM).
thethethethe thethethethe is offline
 
Join Date: Jun 2007
Location: Melbourne, Australia
Gender: Male
Posts: 1,104
Quote:
Originally Posted by twi1ight View Post
thnx guys srry im not thanking you earlier but ive been busy more trouble :(
but I have a question how do you use pokescript for a-map if its in the wrong place im srry but wat r the settings and do you use bufrite or pokescript? thanx.
What? I don't understand what you're asking.

Quote:
Originally Posted by 12345 View Post
Do you know abot "buffer" (bufferpokemon, bufferitem...)?
Can I explain me?
I have those in the tutorial. Except those are XSE commands. I never game a command name to them in the tutorial. These commands begin at the top of the third post.
Like I explained it with "display Pokemon Name". In XSE terms this command is bufferpokemon.
Also "Display Item Name", in XSE terms is buffer item.
__________________
Gone.
Reply With Quote
  #217   Link to this post, but load the entire thread.  
Old July 8th, 2008 (10:30 PM).
hi sir tomato my password is syvniti's Avatar
hi sir tomato my password is syvniti hi sir tomato my password is syvniti is offline
gggggggggggggggggg
 
Join Date: Jan 2007
Location: My user name _ asciii_ +&h1!" lulz
Posts: 581
Quote:
Originally Posted by thethethethe View Post
What? I don't understand what you're asking.

I think he mean the funcition with "See script" or something in a-map. and then a-map, tells the script editors decompiler to open the script.
__________________
THE CAKE IS A LIE!!!!!!!!!!!!!!!!!!!!!!!
Reply With Quote
  #218   Link to this post, but load the entire thread.  
Old July 9th, 2008 (5:47 AM). Edited July 11th, 2008 by twi1ight.
twi1ight's Avatar
twi1ight twi1ight is offline
Pokemon Paradox Creator
 
Join Date: May 2008
Location: on the earth
Gender:
Nature: Relaxed
Posts: 34
yes i mean the open script option
Reply With Quote
  #219   Link to this post, but load the entire thread.  
Old July 12th, 2008 (7:17 AM).
heatransoul's Avatar
heatransoul heatransoul is offline
 
Join Date: Jun 2008
Posts: 67
I am trying to get a give Eevee script, but the options are $60 and $55. Here is the script:

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 70 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 =The Ranger Union has found\nThis Eevee.\pCan you take care of it for me?

#org $2
$2 1 =That's okay. I'm sure someone\nelse will take it.

#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 =Take Care of Eevee.

#org $6
$6 1 =I hope you're taking good care of\nEevee.
What am I doing wrong??
Reply With Quote
  #220   Link to this post, but load the entire thread.  
Old July 12th, 2008 (8:34 AM).
hi sir tomato my password is syvniti's Avatar
hi sir tomato my password is syvniti hi sir tomato my password is syvniti is offline
gggggggggggggggggg
 
Join Date: Jan 2007
Location: My user name _ asciii_ +&h1!" lulz
Posts: 581
Now I'm gonna answer before you Jason... How does that fell? HAHA!
Quote:
Originally Posted by twi1ight View Post
yes i mean the open script option
Then use HM's XSE. It contain a Decompiller... Chose the file of it, and that's all...

Quote:
Originally Posted by heatransoul View Post
I am trying to get a give Eevee script, but the options are $60 and $55. Here is the script:

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 70 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 =The Ranger Union has found\nThis Eevee.\pCan you take care of it for me?

#org $2
$2 1 =That's okay. I'm sure someone\nelse will take it.

#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 =Take Care of Eevee.

#org $6
$6 1 =I hope you're taking good care of\nEevee.
What am I doing wrong??
You'll need to write the numbers in hex I would say... Try put 85
(If 133 is eevee) (70 to hex is about 45... But you'll better calcolate that to be sure...)
__________________
THE CAKE IS A LIE!!!!!!!!!!!!!!!!!!!!!!!
Reply With Quote
  #221   Link to this post, but load the entire thread.  
Old July 12th, 2008 (5:00 PM).
heatransoul's Avatar
heatransoul heatransoul is offline
 
Join Date: Jun 2008
Posts: 67
Son Sebbe, I did what you told me to, but now he isn't talking at all. So did I do some hex'ing wrong?
Reply With Quote
  #222   Link to this post, but load the entire thread.  
Old July 13th, 2008 (6:01 AM).
markiss92's Avatar
markiss92 markiss92 is offline
 
Join Date: Jul 2007
Gender:
Nature: Adamant
Posts: 21
THANK YOU SO MUCH! I cannot express how useful this is to people learning how to script. You're awesomesauce. :D
__________________
Pokemon D/P FC: 1676 4781 6074
Reply With Quote
  #223   Link to this post, but load the entire thread.  
Old July 13th, 2008 (1:48 PM).
poddish's Avatar
poddish poddish is offline
Spirit Of Radio
 
Join Date: May 2008
Location: Earth
Posts: 233
How do you get it to work on advancemap?
__________________
I believe children are the future.
As such, we can do whatever we want, and in the future, when it's time to clean up our mess, they will have to do it for us.
Reply With Quote
  #224   Link to this post, but load the entire thread.  
Old July 13th, 2008 (2:00 PM).
cooley's Avatar
cooley cooley is offline
///Keepin' it simple
 
Join Date: Feb 2007
Location: United States
Age: 28
Gender: Male
Nature: Impish
Posts: 1,148
Quote:
Originally Posted by poddish View Post
How do you get it to work on advancemap?
You can't. Which is one of the reasons why you shouldn't use pokescript. What's the point of associating it with Advance map anyways?

It's not like it can decompile the script anyways...use XSE. It has a movement planner coming!
__________________

Reply With Quote
  #225   Link to this post, but load the entire thread.  
Old July 13th, 2008 (2:07 PM).
hi sir tomato my password is syvniti's Avatar
hi sir tomato my password is syvniti hi sir tomato my password is syvniti is offline
gggggggggggggggggg
 
Join Date: Jan 2007
Location: My user name _ asciii_ +&h1!" lulz
Posts: 581
Quote:
Originally Posted by cooley View Post
You can't. Which is one of the reasons why you shouldn't use pokescript. What's the point of associating it with Advance map anyways?

It's not like it can decompile the script anyways...use XSE. It has a movement planner coming!
Dude, would you stop your advertising for XSE?
I seen you did it in you own tutorial, (of XSE) but now to start advertise in a pokescript guide is to far, I understand your point, but I think the thing you are doing is advertising...

In the end I can tell you that I use XSE, but really... You are way over the top in my eyes...
__________________
THE CAKE IS A LIE!!!!!!!!!!!!!!!!!!!!!!!
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.