PDA

View Full Version : [Tutorial] Advanced Scripting Tutorial


Christos
February 8th, 2007, 12:57 PM
Yeah, people ask how to learn to script and stuff so here's a tutorial.

Basic scripting commands:

message
#org 0x800000
message 0x800100
boxset 0x6
release
end

#org 0x800100
= Hi.

Put an offset after the message, then at the end of the script put the same offset and the text with the "=" like in the example.
Release closes the textbox.

Put "lock" and "faceplayer" after the "#org" command to make the event face the player.

#org 0x800000
lock
faceplayer
message 0x800100
boxset 0x6
release
end

#org 0x800100
= Hi.

boxset 0x5 Yes/No
boxset 0x6 close after button press

compare
An example with "compare" in a yes/no script.
#org 0x800000
message 0x800100
boxset 0x5
compare LASTRESULT 0x1 Compares if it's yes or no (0x1 = yes; 0x0 = no)
if 0x1 goto 0x800200 It's "if 0x1" so if you chose yes you go to that offset, if you chose "No" the script continues.
message 0x800300
boxset 0x6
release
end

#org 0x800200 In front of the script always put "#org" and an offset. Put that offset on the event you want to have it.
message 0x800400
boxset 0x6
release
end

#org 0x800100
Hello.

#org 0x800300
= You picked "NO".

#org 0x800400
= You picked "YES".

setflag
setflag 0x(flag)
#org 0x800000
checkflag 0x10A
compare LASTRESULT 0x1
if 0x1 goto 0x800100
setflag 0x10A
end

#org 0x800100
end

Flags are set so that events won't be repeated again. The script must first check a flag, if you don't have it the script goes on and the flag is set. When you talk to the event again then the script will go to the offset after the compare (in this script "800100") and do the commands there.
To clear a flag use "clearflag 0x(flag)"

applymovement
applymovement 0x(people's number) 0x(offset)

#org 0x800000
applymovement 0x3 0x800100 The steps the event will take will be the ones in the offset next to the event's index number.
pause 0x30 The "pause" commands is for how long to wait before the script goes on, 0x10 for one step
end

#org 0x800100 The steps the event will make are here. In this script, two steps down, one left.
#raw 0x8
#raw 0x8
#raw 0xA
#raw 0xFE After the steps always put "FE" at the end. If you don't, the event won't move.

You can find movement raws to use here (http://www.sendspace.com/file/7w4bbh).
To move the player use "applymovement 0xFF" or "APPLYMOVE_PLAYER"

Other scripting commands:

giveitem
giveitem 0x(item) 0x(quantity) Item in hex numbers and quantity in hexadecimal

#org 0x800000
giveitem 0x45 0x1
release Put release after "giveitem" or the textbox won't be removed after you get the item.
end

checkitem
checkitem 0x(item)
Use it like "checkflag".

#org 0x800000
checkitem 0x16
compare LASTRESULT 0x1
if 0x1 goto 0x800100
end

#org 0x800100
= You carry a SUPER POTION.

givepokemon
givepokemon 0x(pkmn) 0x(level) 0x(item)

#org 0x800000
givepokemon 0x78 0x5 0x3 In givepokemon scripts set flags should be used.
end

wildbattle
wildbattle 0x(pkmn) 0x(level) 0x(Battle style)
Legendary battle example:

#org 0x800000
cry PKMN_MEW This plays the pokemon's cry, it can be used in any script but it's mostly used in wildbattles ones.
wildbattle 0x97 0x46 0x3 There are 4 battle styles, put 0, 1, 2, 3
end

setweather
setweather 0x(weather)

0 = Normal
3 = Rain
4 = Snowflakes
5 = Thunderstorm
6 = Fog
7 = Ash
8 = Sandstorm
9 = Fog 2
A = Fog
B = Dark
C = Hot sun
D = Thunderstorm 2
E = Underwater

#org 0x800000
setweather 0xB
doweather Put "doweather" after the "setweather" command to make the weather change that moment.
end

checkgender
Like "checkflag", 0 if the player is male and 1 if it the player is female

#org 0x800000
checkgender
compare LASTRESULT 0x1
if 0x1 goto 0x800100 If the player's male (1) the script goes to offset "800100".
message 0x800200
boxset 0x6
release
end

#org 0x800100
message 0x800300
boxset 0x6
release
end

#org 0x800200
= Hello madam.

#org 0x800300
= Hello sir.

movesprite
movesprite 0x(event's index number) 0x(horizontal location) 0x(vertical location)

#org 0x800000
movesprite 0x4 0xA 0x16
end

special
special 0x(number)

#org 0x800000
special 0x0 "special 0x0" heals the pokemon in the player's party
end

trainerbattle
trainerbattle 0x(Kind) 0x(Trainer) 0x(ptrIntro) 0x(ptrDefeat)

0x(Kind) is 0x00 for normal battles, 0x04 for 2-on-2 and 0x05 for rematches.

#org 0x800000
trainerbattle 0x00 0x1A 0x800100 0x800200 If you put another offset here then after you beat the trainer the script will continue from the offset you put.
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

warp
warp 0x(Bank) 0x(Map) 0x(Warp's number)

#org 0x800000
warp 0x0 0xA 0x3
end

Martin Yiu
February 8th, 2007, 11:54 PM
Hi Christos, great to see you making this tutorial. Please can you re-upload the movements file, or at least tell me the movement to right? And can you please tell me how to make ! appear above the player?

BlackRainbow*
February 9th, 2007, 03:17 AM
Great finally there's a advance scropting tutorial
that's awesome Christos

ChaosKing
February 9th, 2007, 03:17 AM
how do ya get it into the game sause im usin script ed, if there are any better can u tell me plz

martijn
February 9th, 2007, 06:58 AM
Handy info, but could you explain how to change the path Oak takes when you attempt to leave Pallet and which script it is for FireRed?

Christos
February 9th, 2007, 08:27 AM
Hi Christos, great to see you making this tutorial. Please can you re-upload the movements file, or at least tell me the movement to right? And can you please tell me how to make ! appear above the player?

Okay, I'll reupload it. The "!" is in the movements file.
Download it and find it.

how do ya get it into the game sause im usin script ed, if there are any better can u tell me plz

Save your script with no spaces in the name in ScriptED's folder, put your ROM in there too with no spaces and open the script with ScriptED, click compile and done.

Handy info, but could you explain how to change the path Oak takes when you attempt to leave Pallet and which script it is for FireRed?

I don't think that script would load with ScriptED so you have to hex edit to edit Oak's movements.

Other scripting commands:

giveitem
giveitem 0x(item) 0x(quantity) Item in hex numbers and quantity in hexadecimal

#org 0x800000
giveitem 0x45 0x1
release Put release after "giveitem" or the textbox won't be removed after you get the item.
end

checkitem
checkitem 0x(item)
Use it like "checkflag".

#org 0x800000
checkitem 0x16
compare LASTRESULT 0x1
if 0x1 goto 0x800100
end

#org 0x800100
= You carry a SUPER POTION.

givepokemon
givepokemon 0x(pkmn) 0x(level) 0x(item)

#org 0x800000
givepokemon 0x78 0x5 0x3 In givepokemon scripts set flags should be used.
end

wildbattle
wildbattle 0x(pkmn) 0x(level) 0x(Battle style)
Legendary battle example:

#org 0x800000
cry PKMN_MEW This plays the pokemon's cry, it can be used in any script but it's mostly used in wildbattles ones.
wildbattle 0x97 0x46 0x3 There are 4 battle styles, put 0, 1, 2, 3
end

setweather
setweather 0x(weather)

0 = Normal
3 = Rain
4 = Snowflakes
5 = Thunderstorm
6 = Fog
7 = Ash
8 = Sandstorm
9 = Fog 2
A = Fog
B = Dark
C = Hot sun
D = Thunderstorm 2
E = Underwater

#org 0x800000
setweather 0xB
doweather Put "doweather" after the "setweather" command to make the weather change that moment.
end

checkgender
Like "checkflag", 0 if the player is male and 1 if it the player is female

#org 0x800000
checkgender
compare LASTRESULT 0x1
if 0x1 goto 0x800100 If the player's male (1) the script goes to offset "800100".
message 0x800200
boxset 0x6
release
end

#org 0x800100
message 0x800300
boxset 0x6
release
end

#org 0x800200
= Hello madam.

#org 0x800300
= Hello sir.

movesprite
movesprite 0x(event's index number) 0x(horizontal location) 0x(vertical location)

#org 0x800000
movesprite 0x4 0xA 0x16
end

special
special 0x(number)

#org 0x800000
special 0x0 "special 0x0" heals the pokemon in the player's party
end

trainerbattle
trainerbattle 0x(Kind) 0x(Trainer) 0x(ptrIntro) 0x(ptrDefeat)

0x(Kind) is 0x00 for normal battles, 0x04 for 2-on-2 and 0x05 for rematches.

#org 0x800000
trainerbattle 0x00 0x1A 0x800100 0x800200 If you put another offset here then after you beat the trainer the script will continue from the offset you put.
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

warp
warp 0x(Bank) 0x(Map) 0x(Warp's number)

#org 0x800000
warp 0x0 0xA 0x3
end

Green Charizard
February 9th, 2007, 08:43 AM
Really nice tutorial Christos, I know you've said over making this for a while, it should help ALOT of people.

ash2000
February 9th, 2007, 11:12 AM
Great tutorial Christos, i really just need the how to script.

D-Trogh
February 9th, 2007, 11:40 AM
Nice tutorial Christos ^^
I think I'm gonna start hacking again, because now (I think) I'm able to script..
Just 1 (2) question(s)..
The FF's in your ROM are free space right ? And the 00's too ? OK..
But.. can you tell me how I need to count the offsets for the scripts..
How do you know that 800100 is safe after the 800000 ?
Do you still need to count 100 more ?

Christos
February 9th, 2007, 12:10 PM
Nice tutorial Christos ^^
I think I'm gonna start hacking again, because now (I think) I'm able to script..
Just 1 (2) question(s)..
The FF's in your ROM are free space right ? And the 00's too ? OK..
But.. can you tell me how I need to count the offsets for the scripts..
How do you know that 800100 is safe after the 800000 ?
Do you still need to count 100 more ?

Find your empty offset and when you want an offset for an other command don't put the offset that's right after the one you used before. Try 100 more or something.

Matt Silver
February 9th, 2007, 05:06 PM
The tutorial is awesome (Super awesome) but I'm confused with inserting scripts. Any help here?

foofatron
February 9th, 2007, 05:10 PM
Me too.Do this on Diamond Cutter right?

martijn
February 9th, 2007, 11:14 PM
@Christos: I found it:
'-----------------------
#org 0x1655ED
jingle
setvar 0x4001 0x0
goto 0x8165605
end

'-----------------------
#org 0x165605
setvar 0x8004 0x0
setvar 0x8005 0x2
special 0x174
#raw 0xC7
nop
pause 0x1E
playsound 0x12E
nop
#raw 0x67
#raw 0x2C
#raw 0xD7
#raw 0x17
jumpstd 0x66
pause 0x55
#raw 0x68
applymovement APPLYMOVE_PLAYER 0x81A75ED
pause 0x0
#raw 0x2F
copybyte 0xFF4F00 0xDB
#raw 0x75
copyvarifnotzero 0x5108 0x0
pause 0x1E
#raw 0x55
return


'-----------
' Movements
'-----------
#raw 2D 'Down4
#raw FE 'Exit

I understand part of it but not fully :S

Prof. 9
February 9th, 2007, 11:23 PM
Three questions.
- When using movesprite, will the selected sprite IMMEDIATELY warp to the desired location?
- When using movesprite, will the selected sprite go back to its original position if you DIDN'T set a flag and reload the map?
- When using trainerbattle, what 0x(Kind) do I have to use to make the rival battle music play in the background, instead of the normal trainer battle music?

Arashi
February 9th, 2007, 11:37 PM
This is such a comprehensive tutorial. ^^ Kudos to you, Christos.

I have only one question that hasn't been answered yet: How can we change the battle music that plays when we fight wild Pokemon, trainers etc.? Does it change by changing the battle type? And if I want to use the battle themes of R/S in Fire Red, what do I have to do?

Christos
February 10th, 2007, 12:13 AM
@Christos: I found it:
'-----------------------
#org 0x1655ED
jingle
setvar 0x4001 0x0
goto 0x8165605
end

'-----------------------
#org 0x165605
setvar 0x8004 0x0
setvar 0x8005 0x2
special 0x174
#raw 0xC7
nop
pause 0x1E
playsound 0x12E
nop
#raw 0x67
#raw 0x2C
#raw 0xD7
#raw 0x17
jumpstd 0x66
pause 0x55
#raw 0x68
applymovement APPLYMOVE_PLAYER 0x81A75ED
pause 0x0
#raw 0x2F
copybyte 0xFF4F00 0xDB
#raw 0x75
copyvarifnotzero 0x5108 0x0
pause 0x1E
#raw 0x55
return


'-----------
' Movements
'-----------
#raw 2D 'Down4
#raw FE 'Exit

I understand part of it but not fully :S

I think you'll have to edit it with hex.

Three questions.
- When using movesprite, will the selected sprite IMMEDIATELY warp to the desired location?
- When using movesprite, will the selected sprite go back to its original position if you DIDN'T set a flag and reload the map?
- When using trainerbattle, what 0x(Kind) do I have to use to make the rival battle music play in the background, instead of the normal trainer battle music?

1. The sprite will warp in some place in the map and stay there.

2. It's not with "0x(Kind)", you can edit the music with PET.

This is such a comprehensive tutorial. ^^ Kudos to you, Christos.

I have only one question that hasn't been answered yet: How can we change the battle music that plays when we fight wild Pokemon, trainers etc.? Does it change by changing the battle type? And if I want to use the battle themes of R/S in Fire Red, what do I have to do?

You can do both with PET.

Prof. 9
February 10th, 2007, 12:45 AM
I think you'll have to edit it with hex.



1. The sprite will warp in some place in the map and stay there.

2. It's not with "0x(Kind)", you can edit the music with PET.



You can do both with PET.

Oh... to which number do I have to change it, then, cuz it seems like every trainer's got its own music...

And I thought that, for example, if you used the 0x(Kind) for Gym Leader battles, the Gym Leader battle music plays in the background during the battle...

Christos
February 10th, 2007, 01:10 AM
Oh... to which number do I have to change it, then, cuz it seems like every trainer's got its own music...

And I thought that, for example, if you used the 0x(Kind) for Gym Leader battles, the Gym Leader battle music plays in the background during the battle...

Look for the Rival's battle in PET to see the music number.

BlackRainbow*
February 12th, 2007, 10:47 AM
The applymovement script don't work for me :/
when i go to the script nothing happned
anyway im hacking EMERALD

p.s. sry for my bad enhlish

Christos
February 12th, 2007, 10:51 AM
The applymovement script don't work for me :/
when i go to the script nothing happned
anyway im hacking EMERALD

p.s. sry for my bad enhlish

Can you show me the script you inserted?

BlackRainbow*
February 12th, 2007, 10:54 AM
i inserted the script that you have in tutorial


#org 0x800000
applymovement 0x3 0x800100
pause 0x30
end

#org 0x800100
#raw 0x8
#raw 0x8
#raw 0xA
#raw 0xFE

Christos
February 12th, 2007, 12:27 PM
i inserted the script that you have in tutorial


#org 0x800000
applymovement 0x3 0x800100
pause 0x30
end

#org 0x800100
#raw 0x8
#raw 0x8
#raw 0xA
#raw 0xFE

The event with "People's number" 3 should move.

Andrew McKenzie
February 12th, 2007, 12:30 PM
I'm using a rom that's us-pokemon firered....
i'm wondering if someone can write me a script?...
i need it as an example...
I need a trainer.....rocket grunt preferably
i need him/he to battle me
in my new city
Battle city
the city's offset is $71CC08
the trainer can have just one pokémon
please do this so i can use it in an example
position X:20 Y:20 for the events position and PM it to me please...

Please explain how to add events as I am having trouble understanding the scripting tutorial....please reply ASAP...

Christos
February 12th, 2007, 12:36 PM
All you need is a trainerbattle command for this script. Put it in a script with the messages and edit the trainer's data with PET.

Andrew McKenzie
February 12th, 2007, 12:39 PM
but i don't understand how to do dis...even wit ur tut....please dumb it down for me or explain it differently...reply ASAP

Deokishisu
February 12th, 2007, 01:11 PM
but i don't understand how to do dis...even wit ur tut....please dumb it down for me or explain it differently...reply ASAPLook. You've posted your question 3 times in two different threads! If Christos doesn't have the time to answer your question to the full extent then he doesn't! Badgering him and spamming up the forums doesn't help at all. Your question has been asked before as well so search before asking.
Oh. As you can see, we're not Insant Messaging each other. Proper grammar makes everything alot easier to understand and gives us a sense that, even if you're not trying to be, you're respectful to this forum and it's members.

Christos, this tutorial is great. It's really helping with everything but my little flag problem. Thank you for posting it.

Misty's Kyogre
February 12th, 2007, 01:48 PM
Wow, nice tutorial Christos.

You're the first one who's actually been able to explain those commands to me.

Keep it up =D

w_rink_ly
February 12th, 2007, 02:40 PM
But I heard somewhere on this forum that the trainerbattle command for scripted didn't work properly...

Misty's Kyogre
February 12th, 2007, 03:10 PM
Okay, I'm still a newb at this, but is there a 'command' (I'm thinking computer programming XD) that makes a store clerk? What I mean is can I make a person who sells stuff without moving one of the ones already in the game.

Deokishisu
February 12th, 2007, 05:08 PM
But I heard somewhere on this forum that the trainerbattle command for scripted didn't work properly...You're right. In fact, it's in the archived Simple Questions thread. But I'm not gonna lead you on a wild goose chase and tell you to search. You put #raw 0x5C above the trainerbattle command. Like this:
#org 0x800000
#raw 0x5C
trainerbattle 0x00 0x1A 0x800100 0x800200 0x800300
end

#org 0x800100
= Let's battle
#org 0x800200
= I lost!
#org 0x800300
= We already battled!zel so graciously told me that. It has been tested (in firered) and works. Without the #raw command, the script converts to jibberish when complied. Hope this helps!

P.S. Christos, if people start asking why their trainerbattle script doesn't work, you can use my example.

BlackRainbow*
February 13th, 2007, 05:56 AM
Okay the script works fine for me now
but there's another problem
whene i go to the script people move well but when i go back to the script people move again
her i will posta video that will explain much better then me click here (http://www.bigupload.com/d=BCE0A32A)

Deokishisu
February 13th, 2007, 11:58 AM
Okay the script works fine for me now
but there's another problem
whene i go to the script people move well but when i go back to the script people move again
her i will posta video that will explain much better then me click here (http://www.bigupload.com/d=BCE0A32A)Setting and checking flags would work. It'll stop your event from repeating. I'm actually having problems with flags right now so I really can't go into detail.

zak
February 13th, 2007, 04:50 PM
love the tutorial christos thanks alot!

1 quik question,

#org 0x762000
message 0x762100
boxset 0x2
end
#org 0x762100
= DIIUUD!

is there anything rong with this script??
ive compiled it , saved it and stuf but in the game it doesent work i just get the little bleep noise and i cant add it with rubikon for somereason , any ideas???

D-Trogh
February 14th, 2007, 04:03 AM
love the tutorial christos thanks alot!

1 quik question,

#org 0x762000
message 0x762100
boxset 0x2
end
#org 0x762100
= DIIUUD!

is there anything rong with this script??
ive compiled it , saved it and stuf but in the game it doesent work i just get the little bleep noise and i cant add it with rubikon for somereason , any ideas???
I don't know what 'boxset 0x2' is.. try 'boxset 0x6'
And before your message, 'lock' the person and after your boxset 'release' it.
So:
#org 0x762000
lock
faceplayer 'Yeah, well.. when it's a person event.. Maybe you want it..
message 0x762100
boxset 0x2
release
end
'Maybe this space needs to be there..
#org 0x762100
= DIIUUD!
Don't blame me when this doesn't work.. I just start scripting XD

frank$or
February 14th, 2007, 05:58 AM
This script is fine.

#org 0x762000
message 0x762100
boxset 0x2
end
#org 0x762100

= DIIUUD!

You could ( not have to ) place faceplayer between #org and message, but it isn't always neccesary.

My question, I tried the trainerbattlescript ( with the #Raw 0x5C )
But i still am getting 'overflow error 6' or something ( diamondcutter )
Any idea?

Blaziken626
February 14th, 2007, 06:43 AM
This is much needed tutorial! The only problem is I can't get the script to work. Here's what I did: I copied that Hi! example basic talking script you made and pasted it in Notepad. Then I saved it in a RBC format. I opened it with ScriptEd and compiled to the ROM. I set the offset for the Littleroot Town fat guy's script. Then I saved it and opened the ROM. But when I talk to him, all that happens is the bleep sound it makes when you talk to someone. There's no text box or anything.

Christos
February 14th, 2007, 06:53 AM
Your ROM and RBC file must be in ScriptED/Diamond Cutter's folder with no spaces in the name.

Blaziken626
February 14th, 2007, 08:18 AM
Do you mean it has to be in the EliteMap folder? I copied ScriptEd and DiamondCutter and put them in the same folder as my ROM and script were.

EDIT: Yeah, I tried that and it worked, but the text was just a whole bunch of weird symbols that looked like a's.

w_rink_ly
February 14th, 2007, 10:28 AM
You're right. In fact, it's in the archived Simple Questions thread. But I'm not gonna lead you on a wild goose chase and tell you to search. You put #raw 0x5C above the trainerbattle command. Like this:
#org 0x800000
#raw 0x5C
trainerbattle 0x00 0x1A 0x800100 0x800200 0x800300
end

#org 0x800100
= Let's battle
#org 0x800200
= I lost!
#org 0x800300
= We already battled!zel so graciously told me that. It has been tested (in firered) and works. Without the #raw command, the script converts to jibberish when complied. Hope this helps!

P.S. Christos, if people start asking why their trainerbattle script doesn't work, you can use my example.

Thnx a lot! I've been wondering how to solve this prob for a while

frank$or
February 14th, 2007, 11:53 AM
My question, I tried the trainerbattlescript ( with the #Raw 0x5C )
But i am getting 'overflow error 6' or something ( diamondcutter )
Any idea?

zak
February 14th, 2007, 12:30 PM
im aslo getting the over flow promblem guys, all the folders and stuf are in the same directory and its all good , this is my script
#org 0x782800
#raw 0x5C
trainerbattle 0x00 0x1A 0x782900 0x783000 0x7831000
end

#org 0x782900
= Bring it on!

#org 0x783000
= I lost...

#org 0x7831000
= We already battled!

but for some reason it aint workin getin message sayin overflow any1?

D-Trogh
February 14th, 2007, 01:53 PM
Are you both using DiamondCutter ?
Maybe you need to try ScriptED.. or that new PokéScript tool ;)

Blaziken626
February 14th, 2007, 05:30 PM
YES!! I finally got the Hello World script to work! But now here's my new problem. I tried to do a give Pokemon script, and it didn't work. I thought something might be wrong with the script, so I'll show it.

#org 0x700000
message 0x700100
boxset 0x02
givepokemon 0x78 0x5 0x3
end
#org 0x700100
= Hello World!

Is there anything wrong with it? I sure hope so, because I can't think of a different possibility for it not working.

EDIT: I figured out the problem, and it was a careless mistake! I forgot to put the space between end and the words in the script! Now he does say Hello world, but he doesn't give me the Pokemon. What's wrong with it?

EDIT...Again: I figured out that I did get the Pokemon. It's just that it didn't say anything like, "(Player) received a Staryu!". By the way, how do you make that 'receive Pokemon' music happen when I get the Pokemon, and how can you make a script happen while you are receiving the Pokemon? And one last thing...the number of the Pokemon said 78, but Staryu's number isn't 78.

Tentachu
February 15th, 2007, 02:03 AM
And one last thing...the number of the Pokemon said 78, but Staryu's number isn't 78.

That's Staryu's hex number. Hex numbers are different. They go like this:

01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10

So the hex numbers of Pokémon would be a lot less than its real number.

Blaziken626
February 15th, 2007, 05:18 AM
Thanks, Tentachu.

Now I'm testing out Applymovement and I have this script:

#org 0x900000
applymovement 0xFF 0x900100
pause 0x10
end

#org 0x800100
#raw 0x5
#raw 0x7
#raw 0x4
#raw 0xFE
end

It's not working. Is something wrong with it?

Christos
February 15th, 2007, 06:08 AM
Thanks, Tentachu.

Now I'm testing out Applymovement and I have this script:

#org 0x900000
applymovement 0xFF 0x900100
pause 0x10
end

#org 0x800100
#raw 0x5
#raw 0x7
#raw 0x4
#raw 0xFE
end

It's not working. Is something wrong with it?


It's not right. You should put "900100" not "800100".

zak
February 15th, 2007, 09:16 AM
hi i worked out what was wrong with the geodude script, i made the name to long and had a space in it so i just renamed it and it worked, now a new problem lol, im making a boat script,
#org 0x834000
warp 0x36 0x1 0x0
end
thats the script but its not workin , when i talk to the person with the script it just gives me a black screen , anyone know why?

Christos
February 15th, 2007, 09:50 AM
hi i worked out what was wrong with the geodude script, i made the name to long and had a space in it so i just renamed it and it worked, now a new problem lol, im making a boat script,
#org 0x834000
warp 0x36 0x1 0x0
end
thats the script but its not workin , when i talk to the person with the script it just gives me a black screen , anyone know why?

Because maybe there's not a bank map like that in your ROM.
The numbers must be in hexadecimal.

zak
February 15th, 2007, 01:49 PM
there is a map bank like that in my rom , its a ruby rom , i inserted the bank myself, and um......... how do i find out the numbers in hexdecimal , sorry to ask so many questions i only know like 2 scripts :(

Blaziken626
February 15th, 2007, 04:19 PM
It's not right. You should put "900100" not "800100".

*Smacks forehead* Duh! I can't believe I didn't notice that! Anyway, thanks!

EDIT: Actually, there's another problem with the script I think. Because whenever I step in that spot when walking up, I walk up. When I step when walking down, I move to the right. And when I step when walking to the left, I walk down. But I'm supposed to walk up, then right, then down.

EDIT AGAIN: Nevermind, I realized you have to put the same script in each place you want the sprite to move. Buuuut, I doesn't work twice in a row. It works the first time, but not the time after that. But when I step in that spot again after that, it works.

EDIT AGAAIN: Just a quick question. Could someone please tell me where I can find the hex numbers for all the Pokemon? It would really help, but it's not really necessary.

Christos
February 16th, 2007, 04:03 AM
Here.
Thanks to Tetsuya-san for writing it down.
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

Blaziken626
February 16th, 2007, 04:45 AM
Cool! Thanks a bunch! But...I have another problem with a script. Here it is:

#org 0x900000
trainerbattle 0x00 0xD9 0x900100 0x900200
end

#org 0x900100
= Bring it on!

#org 0x900200
= I lost...

Whenever I use DiamondCutter for this script it says, "Run-time error '6': Overflow". And sorry if I've been asking too many questions. I'm new to this whole scripting thing.

Deokishisu
February 16th, 2007, 09:36 AM
im aslo getting the over flow promblem guys, all the folders and stuf are in the same directory and its all good , this is my script
#org 0x782800
#raw 0x5C
trainerbattle 0x00 0x1A 0x782900 0x783000 0x7831000
end

#org 0x782900
= Bring it on!

#org 0x783000
= I lost...

#org 0x7831000
= We already battled!

but for some reason it aint workin getin message sayin overflow any1?

You put too many numbers for script offsets. Try this one:
#org 0x782800
#raw 0x5C
trainerbattle 0x00 0x1A 0x829000 0x830000 0x831000
end

#org 0x829000
= Bring it on!

#org 0x830000
= I lost...

#org 0x831000
= We already battled!
Not tested but it should work.

Blaziken626
February 16th, 2007, 02:44 PM
Actually I don't think DiamondCutter is working at all with any trainerbattle scripts. I tried the richboy script that came with EliteMap, and that didn't even work. Oh, and I have another question. Is there a program that lets you search for scripts in the game by using offsets?

You put too many numbers for script offsets. Try this one:
#org 0x782800
#raw 0x5C
trainerbattle 0x00 0x1A 0x829000 0x830000 0x831000
end

#org 0x829000
= Bring it on!

#org 0x830000
= I lost...

#org 0x831000
= We already battled!
Not tested but it should work.

And also, I'm basically having the same problem as zak, and I tried that script you gave him and it didn't work.

zak
February 16th, 2007, 03:30 PM
Actually I don't think DiamondCutter is working at all with any trainerbattle scripts. I tried the richboy script that came with EliteMap, and that didn't even work. Oh, and I have another question. Is there a program that lets you search for scripts in the game by using offsets?



And also, I'm basically having the same problem as zak, and I tried that script you gave him and it didn't work.

Yea my trainer battles just giv me the olverflow message 6 wen i try to insert them with diamond cutter, .......

Blaziken626
February 16th, 2007, 04:15 PM
Can someone explain where to put flags into a message script? I can't figure out how to get it to work.

Irish Witch
February 16th, 2007, 10:32 PM
Not meaning to spam you guys but I've posted an alternative scripting program of my own design in the toolbox. Because it's a complete rewrite it shouldn't have the same bugs that scripted used to have and should be much easier to use.

Please, give it a shot using the script you're having difficulty with and give me feedback!

And you shouldn't need to put that raw statement before the trainerbattle command either.

Blazin
February 16th, 2007, 10:45 PM
Hey, this tutorial is amazing. I've done a few simple ones but I'm trying to make a script where you get a super rod. I've done it successfully but it keeps giving super rods if I talk to him again.

I read the setflags part and I was trying to make it work but where ever I put the flag codes it didn't work. Can anyone suggest or tell me where I should place the flag tags in this:

#org 0x800700
lock
faceplayer
message 0x800800
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x800900
message 0x801000
boxset 0x6
release
end

#org 0x800900
message 0x801100
boxset 0x6
giveitem 0x108 0x1
release
end

#org 0x800800
= I was hired by a scientist to catch\nsome water pokemon from here.\pWould you like to help?

#org 0x801000
= You sure? Well come back any time.

#org 0x801100
= Great. Here, take this fishing\nrod and start catching.

I'm just not sure where to place them so I can get the super rod and when I talk to the fisherman it doesn't give me another one.

Irish Witch
February 16th, 2007, 10:55 PM
Hey, this tutorial is amazing. I've done a few simple ones but I'm trying to make a script where you get a super rod. I've done it successfully but it keeps giving super rods if I talk to him again.

I read the setflags part and I was trying to make it work but where ever I put the flag codes it didn't work. Can anyone suggest or tell me where I should place the flag tags in this:

#org 0x800700
lock
faceplayer
checkflag 0x100 ' Your flag here
compare LASTRESULT 0x1
if 0x1 goto 0x802000
message 0x800800
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x800900
message 0x801000
boxset 0x6
release
end

#org 0x800900
message 0x801100
boxset 0x6
giveitem 0x108 0x1
setflag 0x100 ' Your flaghere
release
end

#org 0x802000
message 0x802100
boxset 0x1
end

#org 0x800800
= I was hired by a scientist to catch\nsome water pokemon from here.\pWould you like to help?

#org 0x801000
= You sure? Well come back any time.

#org 0x801100
= Great. Here, take this fishing\nrod and start catching.

#org 0x02100
= So, caught anything yet?


I'm just not sure where to place them so I can get the super rod and when I talk to the fisherman it doesn't give me another one.



Ha. I think I can feild this one (yaay I makey a post!)

The bits in bold are the bits I added

Blazin
February 16th, 2007, 11:52 PM
EDIT: I got everything to work doing what you suggested Irish Witch, and everything worked except when I talk to the person again no text comes up. It still makes the noise when I press A but no text comes up.

EDIT EDIT: haha. Okay thanks for your help Irish Witch, I changed the boxset you had from 0x1 to 0x6 and it works fine now. Thank you!! :)

Blaziken626
February 17th, 2007, 06:23 AM
Not meaning to spam you guys but I've posted an alternative scripting program of my own design in the toolbox. Because it's a complete rewrite it shouldn't have the same bugs that scripted used to have and should be much easier to use.

Please, give it a shot using the script you're having difficulty with and give me feedback!

And you shouldn't need to put that raw statement before the trainerbattle command either.

Not to go off-topic or anything, but I can't figure out how to use PokeScript. What am I supposed to type in on the line after this: http://members.westnet.com.au/comhloiche (I don't know why that became a link.)
I tried typing in the name of my ROM, but it just said: Invalid Command : PKMNRuby.gba

EDIT: I got everything to work doing what you suggested Irish Witch, and everything worked except when I talk to the person again no text comes up. It still makes the noise when I press A but no text comes up.

For the offset that has the message, "So, you caught anything yet?", you should put 802100 but I just saw 02100.

Irish Witch
February 17th, 2007, 06:36 AM
[QUOTE=Blaziken626;2386448]Not to go off-topic or anything, but I can't figure out how to use PokeScript. What am I supposed to type in on the line after this: <url> (I don't know why that became a link.)
I tried typing in the name of my ROM, but it just said: Invalid Command : PKMNRuby.gba

?? huh ??

Once you've downloaded both the main program and the pkmadv database from my site and installed them the program everything should run from file associations.. Did you read the about section?
In explorer you make youre script using notepad, then in explorer you right mouse click and click compile. A .buf file will be created. It will open in a program that behaves similar to diamond cutter but this is designed to actually insert you're script. if you want to change the offsetts used then use 'destination' from the file menu then click on the offsetts and assign them using the button that has a book on it. You can select multiple offsetts. When done select 'burn' from the file menu.

If you're offsetts from you're script are already the ones you want to use then just select 'burn' from the file menu and tell it the name of the rom.


It's all explained on the web site! And in much better detail then I intend to do here!

- EDIT -
oh, I just checked the post. I wasn't able to put the links on my post in the toolbox so I didn't know he hadn't posted a direct link to the pkmadv database in there. You must get that from the download section to work with rubikon. My program is designed to be usable with multiple scripting engines. It's just that I only have one right now!

There is a way to burn your script directly to rom without using Bufrite but I won't go into that here!

Blaziken626
February 17th, 2007, 06:55 AM
[QUOTE=Blaziken626;2386448]Not to go off-topic or anything, but I can't figure out how to use PokeScript. What am I supposed to type in on the line after this: <url> (I don't know why that became a link.)
I tried typing in the name of my ROM, but it just said: Invalid Command : PKMNRuby.gba

?? huh ??

Once you've downloaded both the main program and the pkmadv database from my site and installed them the program everything should run from file associations.. Did you read the about section?
In explorer you make youre script using notepad, then right mouse click and click compile. A .buf file will be created. It will open in a program that behaves similar to diamond cutter but this is designed to actually insert you're script. if you want to change the offsetts used then use 'destination' from the file menu then click on the offsetts and assign them using the button that has a book on it. You can select multiple offsetts. When done select 'burn' from the file menu.

If you're offsetts from you're script are already the ones you want to use then just select 'burn' from the file menu and tell it the name of the rom.


It's all explained on the web site! And in much better detail then I intend to do here!

- EDIT -
oh, I just checked the post. I wasn't able to put the links on my post in the toolbox so I didn't know he hadn't posted a direct link to the pkmadv database in there. You must get that from the download section to work with rubikon. My program is designed to be usable with multiple scripting engines. It's just that I only have one right now!

There is a way to burn your script directly to rom without using Bufrite but I won't go into that here!

The only part I didn't understand from that was the when you said to click Compile. There is no Compile command in NotePad or PokeScript.

Irish Witch
February 17th, 2007, 07:03 AM
let me rephrase that paragraph.

Once you've downloaded both the main program and the pkmadv database from my site and installed them the program everything should run from file associations.. Did you read the about section?
In explorer you make youre script using notepad, then in explorer you right mouse click and click compile. A .buf file will be created. It will open in a program that behaves similar to diamond cutter but this is designed to actually insert you're script. if you want to change the offsetts used then use 'destination' from the file menu then click on the offsetts and assign them using the button that has a book on it. You can select multiple offsetts. When done select 'burn' from the file menu.

The window that loads up when you run pokescript is the 'Instant Window'.
You can put commands in there but I added the file associations to make it easier...

*sigh*

If you wanted to compile a script from inside script ed you would type:
#encode "drive: \path that can use long file names\script file.rbc" ' or whatever

then if you wanted to stay inside pokescript you could assign/reassign offsetts using the function
#kapush offsettname 0xlocation

and write it using
#kapop "path to rom\rom file.gba"


but it's easier using the file associations.

- Edit -
Various modifications..

*signs again*

Why can't men read the instructions!

AND MAKE SURE YOU DOWNLOAD THE DATABASE!

*signs*

- Edit Again -
And before anybody asks why the instant window is so complicated...
I use the words BETA TEST.
The instant window displays a log of the compilers activities and acts as a way to pass commands directly to the compiler. The compiler can handle decoding both code and text. I late intend to create a picture editor then I will pull all those components into the one program with a proper text editor but for now the instant window provides access to the program and the file associations makes it so easy to use that scripted pales in comparison.

.. or so I thought!

Blaziken626
February 17th, 2007, 07:40 AM
Well so-o-orry for being a male!....I'm just kidding. Anyway, thanks. I figured it out. The only problem is I talk to the person who's supposed to battle me, and it just comes up with a bunch of weird symbols in the text box (hex symbols probably) that won't stop. Is is because I put the raw command in the trainerbattle? Because IrishWitch said that it doesn't need the raw command. I'll try getting rid of that and I'll see what I get.

And also, I have this script testing out flags:

#org 0xB00000
lock
faceplayer
checkflag 0x364
compare LASTRESULT 0x1
if 0x1 goto 0xB00200
message 0xB00100
boxset 0x6
release
end

#org 0xB00200
message 0xB00300
boxset 0x6
end

#org 0xB00100
= Hello.

#org 0xB00300
= Goodbye.

But he only says Hello each time. He never says Goodbye.

EDIT: I noticed that whenever I put setflag 0x364 in the script, he still doesn't say goodbye, but when I enter another map and come back to the map he was in, he isn't there anymore.

Irish Witch
February 17th, 2007, 08:36 AM
And also, I have this script testing out flags:

#org 0xB00000
lock
faceplayer
checkflag 0x364
compare LASTRESULT 0x1
if 0x1 goto 0xB00200
message 0xB00100
boxset 0x6
setflag 0x364
release
end

#org 0xB00200
message 0xB00300
boxset 0x6
end

#org 0xB00100
= Hello.

#org 0xB00300
= Goodbye.

But he only says Hello each time. He never says Goodbye.

EDIT: I noticed that whenever I put setflag 0x364 in the script, he still doesn't say goodbye, but when I enter another map and come back to the map he was in, he isn't there anymore.

Those question in reverse order:
Firstly in the above script I see you checking a flag but I don't see you setting a flag? Note the section I put in bold! You can't check it if you don't set it. Also, you may not want to use offsett 364.. I don't know all of them but a lot of the offsetts that high up are reserved for system events. I don't know if that one is so you can try it, i'm just making an observation.

I would also like to point out that if you give the person on the map a 'person no' or in other words a flag then when you set it in your script and perform a callstd 0x1 or whatever then the person will vanish from the map like you discribed!

Second, yes you don't need the #raw 5c when using my program....
... A little technobabble.
Trainerbattle is actually listed in scripted as a construct and the construct handlers were dogdy in scripted.
When scripted compiled the command trainerbattle it forgot to translate the word 'trainerbattle' into the byte 5C so a command that should have read in a hex editor as: (using your example)

5c 00 1A 00908208 00008308 00108308
read as
00 1A 00908208 00008308 00108308

thats why you needed to put #raw 5C at the beginning. You don't need that now though cause doing so in my program results in

5c 5c 00 1A009082 08000083 08001083 08

stopping those pointers going where they are meant to.
And causing the link to the trainer (byte two of the above string) to point to the wrong person!

- EDIT -

Everything I said above is true, but I actually just found a bug with that command in my program. Re download the command database in ten minutes or so. I'm uploading the fixed database now!

Blaziken626
February 17th, 2007, 09:20 AM
I used this script instead:

#org 0xB00000
lock
faceplayer
checkflag 0x10A
compare LASTRESULT 0x1
if 0x1 goto 0xB00200
message 0xB00100
boxset 0x6
setflag 0x10A
release
end

#org 0xB00200
message 0xB00300
boxset 0x6
end

#org 0xB00100
= Hello.

#org 0xB00300
= Goodbye.

And it still doesn't work! I absolutely HATE scripting!

Irish Witch
February 17th, 2007, 09:55 AM
Alright. Now this is why I needed beta testers. Let me play with this for a bit!

AH HA!. There be a glitch in my program after all!

(and here I thought I got things right.)
Check back here in 24 hrs and I'll have the glitch sorted. It's to do with the horrid LASTRESULT being defined as meaning 0x800D
... It's throwing out the script because that value turns into a negative number and my prrogram doesn't know how to read it!

Blaziken626
February 17th, 2007, 10:01 AM
In applymovement scripts, how do I make the player move along with another person? (Like when the PokeMart person takes you to the PokeMart.)

D-Trogh
February 17th, 2007, 10:47 AM
In applymovement scripts, how do I make the player move along with another person? (Like when the PokeMart person takes you to the PokeMart.)Well.. This is what I do when I want to see how certain scripts/functions(/things..) work: I CHECK them through ScriptEd..
In the spoiler you have a script, look through it. It's from Oldale Town, with the movements..
When you want to see other thing, go to those offsets and CHECK them ;)
'-----------------------
#org 0x14DE07
applymovement 0x2 0x814DE97
applymovement APPLYMOVE_PLAYER 0x814DEC1

#raw 0x0
#raw 0x0
goto 0x814DE4C
end

'-----------------------
#org 0x14DE4C
msgbox 0x816AF2F '"This is a POKéMON MA..."

call 0xD80001A
#raw 0x0

#raw 0x0

#raw 0x0

#raw 0x0
#raw 0x0
if 0x1 jump 0x14DE83
msgbox 0x816AFE1 '"A POTION can be used..."

call 0x35008429

end

'-----------------------
#org 0x580001A
#raw 0x0
'-----------------------
#org 0x14DE83
msgbox 0x81A0CC2 '"Too bad!\nThe BAG is..."

call 0x9026C35



#raw 0x0
if 0x1 jump 0x14DF26
msgbox 0x816B0CC '"I just discovered th..."

call 0x34F68

#raw 0x0
#raw 0x0

end

'-----------------------
#org 0x2D008429
#raw 0x0
'-----------------------
#org 0x1026C35
#raw 0x0
'-----------------------
#org 0x14DF26
msgbox 0x816B12A '"I finished sketching..."

call 0x4F69026C
call 0x1A083900

#raw 0x0
#raw 0x0
goto 0x814DF92
end

'-----------------------
#org 0x34F68

return

'-----------------------
#org 0x4769026C
#raw 0x0
'-----------------------
#org 0x12083900
#raw 0x0
'-----------------------
#org 0x14DF92

#raw 0x0
#raw 0x0
if 0x1 jump 0x14DFAA

#raw 0x0
if 0x1 jump 0x14DFB8
end

'-----------------------
#org 0x14DFAA
msgbox 0x816B196 '"MAY: \v\h01\v\h05!\n..."

call 0x14DFC605

end

'-----------------------
#org 0x14DFB8
msgbox 0x816B1BE '"BRENDAN: I'm heading..."

call 0x14DFC605

end

'-----------------------
#org 0xCDFC605
#raw 0x0

'---------
' Strings
'---------
#org 0x16AF2F
= This is a POKéMON MART.\nJust look for our blue roof.\pWe sell a variety of goods including\nPOKé BALLS for catching POKéMON.\pHere, I'd like you to have this as a\npromotional item.
#org 0x16AFE1
= A POTION can be used anytime, so it's\neven more useful than a POKéMON CENTER\lin certain situations.
#org 0x1A0CC2
= Too bad!\nThe BAG is full...
#org 0x16B0CC
= I just discovered the footprints of\na rare POKéMON!\pWait until I finish sketching\nthem, okay?
#org 0x16B12A
= I finished sketching the footprints of\na rare POKéMON.\pBut it turns out they were only my\nown footprints...
#org 0x16B196
= MAY: \v\h01\v\h05!\nOver here!\lLet's hurry home!
#org 0x16B1BE
= BRENDAN: I'm heading back to my dad's\nLAB now.\l\v\h01, you should hustle back, too.

'-----------
' Movements
'-----------
#raw A 'Left2
#raw 9 'Up2
#raw 9 'Up2
#raw B 'Right2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 25 'StDown4
#raw FE 'Exit

#raw 14 'Delay4
#raw 14 'Delay4
#raw 14 'Delay4
#raw 14 'Delay4
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw FE 'Exit

! In the original content of ScriptEd there were more spaces.. !

Edit:
Well..Some base-scripts from the game are so, so,.. well.. 'call this', 'call that'.. -BLAH-
But you can see you need to use an 'applymovement' both on the person and on the player.. ;)

Irish Witch
February 17th, 2007, 10:51 AM
UPDATE

MAJOR update to main program!
Glitch in #alias command that meant all constructs were not being performed correctly.
(also minor bug involving large values not reading correctly!)
FIXED!


0400hrs... I'm going to bed now!
Play with program.. Report back in toolbox thread!

Blaziken626
February 17th, 2007, 11:10 AM
Well.. This is what I do when I want to see how certain scripts/functions(/things..) work: I CHECK them through ScriptEd..
In the spoiler you have a script, look through it. It's from Oldale Town, with the movements..
When you want to see other thing, go to those offsets and CHECK them ;)
'-----------------------
#org 0x14DE07
applymovement 0x2 0x814DE97
applymovement APPLYMOVE_PLAYER 0x814DEC1

#raw 0x0
#raw 0x0
goto 0x814DE4C
end

'-----------------------
#org 0x14DE4C
msgbox 0x816AF2F '"This is a POKéMON MA..."

call 0xD80001A
#raw 0x0

#raw 0x0

#raw 0x0

#raw 0x0
#raw 0x0
if 0x1 jump 0x14DE83
msgbox 0x816AFE1 '"A POTION can be used..."

call 0x35008429

end

'-----------------------
#org 0x580001A
#raw 0x0
'-----------------------
#org 0x14DE83
msgbox 0x81A0CC2 '"Too bad!\nThe BAG is..."

call 0x9026C35



#raw 0x0
if 0x1 jump 0x14DF26
msgbox 0x816B0CC '"I just discovered th..."

call 0x34F68

#raw 0x0
#raw 0x0

end

'-----------------------
#org 0x2D008429
#raw 0x0
'-----------------------
#org 0x1026C35
#raw 0x0
'-----------------------
#org 0x14DF26
msgbox 0x816B12A '"I finished sketching..."

call 0x4F69026C
call 0x1A083900

#raw 0x0
#raw 0x0
goto 0x814DF92
end

'-----------------------
#org 0x34F68

return

'-----------------------
#org 0x4769026C
#raw 0x0
'-----------------------
#org 0x12083900
#raw 0x0
'-----------------------
#org 0x14DF92

#raw 0x0
#raw 0x0
if 0x1 jump 0x14DFAA

#raw 0x0
if 0x1 jump 0x14DFB8
end

'-----------------------
#org 0x14DFAA
msgbox 0x816B196 '"MAY: \v\h01\v\h05!\n..."

call 0x14DFC605

end

'-----------------------
#org 0x14DFB8
msgbox 0x816B1BE '"BRENDAN: I'm heading..."

call 0x14DFC605

end

'-----------------------
#org 0xCDFC605
#raw 0x0

'---------
' Strings
'---------
#org 0x16AF2F
= This is a POKéMON MART.\nJust look for our blue roof.\pWe sell a variety of goods including\nPOKé BALLS for catching POKéMON.\pHere, I'd like you to have this as a\npromotional item.
#org 0x16AFE1
= A POTION can be used anytime, so it's\neven more useful than a POKéMON CENTER\lin certain situations.
#org 0x1A0CC2
= Too bad!\nThe BAG is full...
#org 0x16B0CC
= I just discovered the footprints of\na rare POKéMON!\pWait until I finish sketching\nthem, okay?
#org 0x16B12A
= I finished sketching the footprints of\na rare POKéMON.\pBut it turns out they were only my\nown footprints...
#org 0x16B196
= MAY: \v\h01\v\h05!\nOver here!\lLet's hurry home!
#org 0x16B1BE
= BRENDAN: I'm heading back to my dad's\nLAB now.\l\v\h01, you should hustle back, too.

'-----------
' Movements
'-----------
#raw A 'Left2
#raw 9 'Up2
#raw 9 'Up2
#raw B 'Right2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 25 'StDown4
#raw FE 'Exit

#raw 14 'Delay4
#raw 14 'Delay4
#raw 14 'Delay4
#raw 14 'Delay4
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw 9 'Up2
#raw FE 'Exit

! In the original content of ScriptEd there were more spaces.. !

Edit:
Well..Some base-scripts from the game are so, so,.. well.. 'call this', 'call that'.. -BLAH-
But you can see you need to use an 'applymovement' both on the person and on the player.. ;)

I would've checked if I knew how to. I don't know how to find scripts by using their offsets. And I did use applymovement on both the player and person, but the person moved first, and then the player moved after the person was done moving. Here's the script:

#org 0xC00000
applymovement 0x1 0xC00100
pause 0x50
applymovement 0xFF 0xC00200
pause 0x10
message 0xC00300
boxset 0x6
release
applymovement 0x1 0xC00400
pause 0x160
applymovement 0xFF 0xC00500
pause 0x160
applymovement 0x1 0xC00600
pause 0x10
end

#org 0xC00100
#raw 0x9
#raw 0x9
#raw 0x9
#raw 0x9
#raw 0xFE

#org 0xC00200
#raw 0x1D
#raw 0xFE

#org 0xC00300
= Don't go out there! It's dangerous\nif you don't have any Pokemon.\pCome with me.

#org 0xC00400
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0xFE

#org 0xC00500
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0xFE

#org 0xC00600
#raw 0x1E
#raw 0xFE

Christos
February 17th, 2007, 11:30 AM
If you don't put a pause after the first "applymovement" command, both player and the other sprite will move together. The "pause" will be for both movements.

D-Trogh
February 17th, 2007, 11:31 AM
I would've checked if I knew how to. I don't know how to find scripts by using their offsets. And I did use applymovement on both the player and person, but the person moved first, and then the player moved after the person was done moving. Here's the script:

#org 0xC00000
applymovement 0x1 0xC00100
pause 0x50
applymovement 0xFF 0xC00200
pause 0x10
message 0xC00300
boxset 0x6
release
applymovement 0x1 0xC00400
pause 0x160
applymovement 0xFF 0xC00500
pause 0x160
applymovement 0x1 0xC00600
pause 0x10
end

#org 0xC00100
#raw 0x9
#raw 0x9
#raw 0x9
#raw 0x9
#raw 0xFE

#org 0xC00200
#raw 0x1D
#raw 0xFE

#org 0xC00300
= Don't go out there! It's dangerous\nif you don't have any Pokemon.\pCome with me.

#org 0xC00400
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0xFE

#org 0xC00500
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0xFE

#org 0xC00600
#raw 0x1E
#raw 0xFE


Looking for scripts is simple.. You know in ScriptEd the path above..
It's like: YourRom.gba:800000
Just change the '800000' to another offset and voilá.. You have it.


Again, I'll try to help you with my basic scripting skills:
Why don't you delete the 'pause' between the 'applymovement' of the player and person ? Just try it..
What with the other 'pause' you'll ask.
Well, it would be logical if you put a 'pause' after the 2 'applymovement's wich:
1. Is the sum of all the movements
2. Is only the number in function of the person who moves the most.
[When the player had only 1 movement, but the person has 3, use 'pause for3movement' (I don't know how to count the movements)]

Edit:
Christos was first..
Btw, could you try the 2 possibilities ? Than I know what to use too ^^

zak
February 17th, 2007, 12:00 PM
Looking for scripts is simple.. You know in ScriptEd the path above..
It's like: YourRom.gba:800000
Just change the '800000' to another offset and voilá.. You have it.


Again, I'll try to help you with my basic scripting skills:
Why don't you delete the 'pause' between the 'applymovement' of the player and person ? Just try it..
What with the other 'pause' you'll ask.
Well, it would be logical if you put a 'pause' after the 2 'applymovement's wich:
1. Is the sum of all the movements
2. Is only the number in function of the person who moves the most.
[When the player had only 1 movement, but the person has 3, use 'pause for3movement' (I don't know how to count the movements)]

Edit:
Christos was first..
Btw, could you try the 2 possibilities ? Than I know what to use too ^^


i didnt know you could open up scripts already in the game, thanks alot im gonna learn every script i can ! thanks so much!


Edit: hmmm when i open the rom it doesent say YourRom.gba:800000 in the path above.... infact it says nothing..........am i doing something rong?

Blaziken626
February 17th, 2007, 12:28 PM
Next to where it says File, you type (Your ROM).gba: (the offset you want to search for) and it should come up. And also....

FINALLY! The setflag works! I looked at another script that had a setflag and that guided me. Just in case anyone needs help with setflags, I'll post the script so you get a good idea of what to do.

#org 0xB00000
lock
faceplayer
checkflag 0x10A
if 0x1 jump 0xB00200
message 0xB00100
boxset 0x4
setflag 0x10A
release
end

#org 0xB00200
lock
faceplayer
message 0xB00300
boxset 0x6
release
end

#org 0xB00100
= Hello.

#org 0xB00300
= Goodbye.

D-Trogh
February 17th, 2007, 01:10 PM
Good to hear it works, but I think you can delete the 'lock' & 'faceplayer' at your #org 0xB00200

Blaziken626
February 17th, 2007, 01:40 PM
I guess it doesn't really matter if I do since it works anyway. Oh, and I have another question. When you use a givepokemon script, how can you make the "receive Pokemon" music play when you do that?

EDIT: Oh, great. Another problem with flags. There's probably a problem because I haven't done flags with giving Pokemon before. This is the script:

#org 0xD00000
lock
faceplayer
message 0xD00100
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0xD00200
message 0xD00300
boxset 0x6
release
end

#org 0xD00200
lock
faceplayer
checkflag 0x10A
if 0x1 jump 0xD00500
message 0xD00400
boxset 0x6
setflag 0x10A
givepokemon 0x1 0x5 0x0
release
end

#org 0xD00500
lock
faceplayer
message 0xD00600
boxset 0x6
release
end


#org 0xD00100
= I really like Bulbasaur. Do you?

#org 0xD00400
= You do? Great! Then you deserve to get\none!\p\v\h01 received the BULBASAUR!

#org 0xD00300
= You don't? Too bad.


#org 0xD00600
= How's that BULBASAUR coming along?

He does say "How's that Bulbasaur coming along?" after I receive it, but he also does after I answer No. How do I get it to happen only if he says Yes?

D-Trogh
February 17th, 2007, 02:44 PM
You should put the checkflag in the first part too..
When you got the Bulba, you won't say 'No, I don't like him..'
Ow.. but that's not the problem right ?
Do you mean the flag is set after you say 'No' too ? Hmm..
I don't really get your question.. And I don't see any errors..
-Meh-
Can you upload a video on YouTube or something ?
Or just tell me what happens when you:
- First talk to him.
- Chose 'No'
- Talk to him again
- Chose 'Yes'
- Talk to him again (You should make a new flag, when yes is checked, you don't get the question anymore..)

Blaziken626
February 17th, 2007, 03:13 PM
Okay, here's what happens.

1. I say Yes to him and get Bulbasaur.
2. I talk to him and he asks how it's doing.
3. I reset the ROM.
4. I say No to him.
5. I talk to him and he asks how it's doing even thought I don't even have it yet. So that would mean that I'd never get the chance to get it if I say No.

Do you understand now?

Overclocked
February 17th, 2007, 08:27 PM
Does anyone know the command to change a sprite? e.g. Turn a hidden person into an old man or change an old man into an old woman.

foofatron
February 17th, 2007, 08:33 PM
Just use advance map to change the pic by number.

Irish Witch
February 17th, 2007, 08:39 PM
FINALLY! The setflag works! I looked at another script that had a setflag and that guided me. Just in case anyone needs help with setflags, I'll post the script so you get a good idea of what to do.



only difference between that script and the alterations I cave you is no compare.. I though it needed the compare but maybe I was wrong...

Does my program compile the scripts properly now that I've fixed that bug... It was only caused by a mis-placed bracket you know!

Overclocked
February 17th, 2007, 08:49 PM
Just use advance map to change the pic by number.
I need it to change whilst playing the game.
You see I'm doing a flashback thing in my game and I need a thing (sprite No.152) to change into a MewTwo. I tried using movesprite but it doesn't work when the sprite is hidden away on the side of the map.

D-Trogh
February 18th, 2007, 02:40 AM
Okay, here's what happens.

1. I say Yes to him and get Bulbasaur.
2. I talk to him and he asks how it's doing.
3. I reset the ROM.
4. I say No to him.
5. I talk to him and he asks how it's doing even thought I don't even have it yet. So that would mean that I'd never get the chance to get it if I say No.

Do you understand now?Well, I asked you to do something else.. but -MEH-

Try this. I don't know if it works.. but if it does, I'm becoming a good scripter :P
#org 0xD00000
lock
faceplayer
message 0xD00100
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0xD00200
checkflag 0x10A
if 0x1 jump 0xD00500
message 0xD00300
boxset 0x6
release
end

#org 0xD00200
checkflag 0x10A
if 0x1 jump 0xD00500
message 0xD00400
boxset 0x6
setflag 0x10A
givepokemon 0x1 0x5 0x0
release
end

#org 0xD00500
message 0xD00600
boxset 0x6
release
end

'-------
'Strings
'-------

#org 0xD00100
= I really like BULBASAUR.\nDo you?

#org 0xD00400
= You do? Great! Then you deserve to get\none!\p\v\h01 received the BULBASAUR!

#org 0xD00300
= You don't? Too bad.

#org 0xD00600
= How's that BULBASAUR coming along?

frank$or
February 18th, 2007, 02:48 AM
Well, I asked you to do something else.. but -MEH-

Try this. I don't know if it works.. but if it does, I'm becoming a good scripter :P
#org 0xD00000
lock
faceplayer
message 0xD00100
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0xD00200
checkflag 0x10A
if 0x1 jump 0xD00500
message 0xD00300
boxset 0x6
release
end

#org 0xD00200
checkflag 0x10A
if 0x1 jump 0xD00500
message 0xD00400
boxset 0x6
setflag 0x10A
givepokemon 0x1 0x5 0x0
release
end

#org 0xD00500
message 0xD00600
boxset 0x6
release
end

'-------
'Strings
'-------

#org 0xD00100
= I really like BULBASAUR.\nDo you?

#org 0xD00400
= You do? Great! Then you deserve to get\none!\p\v\h01 received the BULBASAUR!

#org 0xD00300
= You don't? Too bad.

#org 0xD00600
= How's that BULBASAUR coming along?

Why do you use 'goto' and 'jump' everywhere?
Just use if 0x1 0x( offset ) :)

And strings doesn't belongs there, some people may paste it in their scripts.

]#org 0xD00000
lock
faceplayer
message 0xD00100
boxset 0x5
compare LASTRESULT 0x1
if 0x1 0xD00200
checkflag 0x10A
if 0x1 0xD00500
message 0xD00300
boxset 0x6
release
end

#org 0xD00200
checkflag 0x10A
if 0x1 0xD00500
message 0xD00400
boxset 0x6
setflag 0x10A
givepokemon 0x1 0x5 0x0
release
end

#org 0xD00500
message 0xD00600
boxset 0x6
release
end

#org 0xD00100
= I really like BULBASAUR.\nDo you?

#org 0xD00400
= You do? Great! Then you deserve to get\none!\p\v\h01 received the BULBASAUR!

#org 0xD00300
= You don't? Too bad.

#org 0xD00600
= How's that BULBASAUR coming along?

Irish Witch
February 18th, 2007, 03:15 AM
What I don't get is why you're using boxset 5 (and 6 for text)....

Isn;t it supposed to be
0 text.
1 text no close.
2 yes/no box
3 text close on any keypress

4 5 6 may overlap or something cause of the bit setting (I dunno) but normat text display should be 0 (1 for long text) and yes/no boxes should be 2 !

Why do you use 'goto' and 'jump' everywhere?
Just use if 0x1 0x( offset )

And strings doesn't belongs there, some people may paste it in their scripts.

He uses goto and jump cause in the most recent versions of scripted that's how it says to work. There is also if call and if gosub for returning subroutines.

And he has rem statements in from of the word strings so that won't be processed!

And D-Trogh's looks the most right so far! I don't have the time to do tests unfortunately. I'm a security officer. Every time I think I have time to sit and work one something I have to attent an alarm or something!

D-Trogh
February 18th, 2007, 03:25 AM
And he has rem statements in from of the word strings so that won't be processed!Yes indeed !

He uses goto and jump cause in the most recent versions of scripted that's how it says to work. There is also if call and if gosub for returning subroutines.
I tought so too.. I always use the 'goto' but not with PokéScript ^^
What I don't get is why you're using boxset 5 (and 6 for text)....

Isn;t it supposed to be
0 text.
1 text no close.
2 yes/no box
3 text close on any keypress

4 5 6 may overlap or something cause of the bit setting (I dunno) but normat text display should be 0 (1 for long text) and yes/no boxes should be 2 !
Well.. the 'boxset 0x?' I don't get either.. Christos answerd my question about that in the SQT I think ^^
But, I always use '0x5' for a question box, and '0x6' for a normal textbox..
I never use something else :-\

Edit:
Ok, I can't fount it, maybe he didn't anser my question

Irish Witch
February 18th, 2007, 03:33 AM
Here's my attempt at organising the script..

method:
Check flag first, jump if true
if false ask about pokemon, jump if true
if false display apology!

#org 0xD00000
lonk
faceplayer
checkflag 0x10A
if 0x1 goto 0xD00500
message 0xD00100
boxset 0x2
compare LASTRESULT 0x1
if 0x1 goto 0xd00200
message 0xd00100
boxset 0
release
end

#org 0xD00200
checkflag 0x10A
if 0x1 jump 0xD00500
message 0xD00400
boxset 0x6
setflag 0x10A
givepokemon 0x1 0x5 0x0
release
end

#org 0xD00500
message 0xD00600
boxset 0x6
release
end

All offsetts same, text same. Only section I changed was that first bit in bold.

D-Trogh
February 18th, 2007, 03:42 AM
Aw.. yeah, the 'checkflag' will be beter in the begining :cheeky:
But, your 'lonk' needs to be 'lock' :P
And 'boxset 0' ?? => 'boxset 0x6'

Irish Witch
February 18th, 2007, 05:35 AM
0x simply means hex. If you're doing a number lower than 9 you don't need it (scripted or my program)

And boxset 0 should work! I only ever used 0 to 3 in my scripts. Now I admit I haven't programmed in rubikon for seven months but my scripts used to work!

I'm gonna have to revive my old project :-)


Kudo's picking up on the faulty lock though. I did write that script just as I was walking out the door :-D

I need it to change whilst playing the game.
You see I'm doing a flashback thing in my game and I need a thing (sprite No.152) to change into a MewTwo. I tried using movesprite but it doesn't work when the sprite is hidden away on the side of the map.

Use warp. If you perform a warp from inside a script you retain control of the charactrer after the warp. Warp the character to a new map, perform some scripts then warp back! Then you're flashback can have more than just one character change!

Blaziken626
February 18th, 2007, 05:53 AM
Woah, I guess I slept through a lot of posts last night! Well, to answer the question about the 0x5, 0x5 is used for Yes/No, is it not? And notice that he says "You do?" and "You don't?". And as for the PokeScript, I'm not even sure if I'm using it right. :P Am I just supposed to type this?

#kapush (.rbc file) (offset)

and then

#kapop (.gba ROM)

Because after I do that and press Enter, it says it processed 0 lines.

Irish Witch
February 18th, 2007, 06:20 AM
Woah, I guess I slept through a lot of posts last night! Well, to answer the question about the 0x5, 0x5 is used for Yes/No, is it not? And notice that he says "You do?" and "You don't?". And as for the PokeScript, I'm not even sure if I'm using it right. :P Am I just supposed to type this?

#kapush (.rbc file) (offset)

and then

#kapop (.gba ROM)

Because after I do that and press Enter, it says it processed 0 lines.

?????

It's better to use the file associations in explorer.... But if I have to explain that again...

#encode (.rbc file) ' Encode script

#kapush (offset) (location) ' modify offsetts

#kapop (.gba ROM) ' Write to rom.....

The reason you kapush is because my program doesn't need fixed offsetts to work... Example, using you're script:

#org 0xD00000
lock
faceplayer
checkflag 0x10A
if 0x1 goto $GotBulba
message $TxtLikeBulba
boxset 0x2
compare LASTRESULT 0x1
if 0x1 goto $WantPokemon
message $TxtNoBulba
boxset 0
release
end

#org $WantPokemon
message $TxtHereBulbu
boxset 0x6
setflag 0x10A
givepokemon 0x1 0x5 0x0
release
end

#org $GotBulba
message $TxtGotBulba
boxset 0x6
release
end

#org $TxtLikeBulba
= I really like BULBASAUR.\nDo you?

#org $TxtHereBulba
= You do? Great! Then you deserve to get\none!\p\v\h01 received the BULBASAUR!

#org $TxtNoBulba
= You don't? Too bad.

#org $TxtGotBulba
= How's that BULBASAUR coming along?

Use that in MY program and it wil write into the rom with absolutely no gaps in the script!

If I want to move those around though then I can, either by using #kapush in pokescript or by loading the .buf file in bufrite (the default program) and adjusting it there...

Now flaming well read the 'about' section on my website.
Links in the signiture!

D-Trogh
February 18th, 2007, 06:20 AM
And as for the PokeScript, I'm not even sure if I'm using it right. :P Am I just supposed to type this?

#kapush (.rbc file) (offset)

and then

#kapop (.gba ROM)

Because after I do that and press Enter, it says it processed 0 lines.For PokéScript.. use PokéScripts topic ;)
But => It's easier to just Right-Click your .rbc file and hit 'compile' in the menu ;)

B2T

Blaziken626
February 18th, 2007, 06:43 AM
What do you mean by explorer??? I see no explorer program. And you can't possibly mean Internet Explorer. Anyway, I think we should drop this topic considering it has nothing to do with the topic of this thread.

So anyway, back on topic...I got the givepokemon script to work! I used IrishWitch's script and tweaked around with it a bit. Here's the script:

#org 0xD00000
lock
faceplayer
checkflag 0x10A
if 0x1 goto 0xD00500
message 0xD00100
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0xD00200
message 0xD00300
boxset 0x6
release
end

#org 0xD00200
checkflag 0x10A
if 0x1 jump 0xD00500
message 0xD00400
boxset 0x6
setflag 0x10A
givepokemon 0x1 0x5 0x0
release
end

#org 0xD00500
message 0xD00600
boxset 0x6
release
end

#org 0xD00100
= I really like BULBASAUR.\nDo you?

#org 0xD00400
= You do? Great! Then you deserve to get\none!\p\v\h01 received the BULBASAUR!

#org 0xD00300
= You don't? Too bad.

#org 0xD00600
= How's that BULBASAUR coming along?

The only little problem is that I don't know how to make that receive Pokemon sound happen. But that doesn't really matter.

Irish Witch
February 18th, 2007, 06:44 AM
This will be the last time I write something on pokescript in here I promise!

- UPDATE -
DAAMNIT!@

While trying to fix the bug for the construct handler I screwed up the registry association handler... I've just fixed that now!

*Hopefully* fully functional download now available!

D-Trogh
February 18th, 2007, 07:35 AM
The only little problem is that I don't know how to make that receive Pokemon sound happen. But that doesn't really matter.
Well, you can put 'jingle' before the text.. OR use the 'fanfare' command.. but then you need to look for the right "sound-var"

Irish Witch
February 18th, 2007, 07:57 AM
Hey Blaziken. I've just sent you a Private Message (top of this page, click on private messages)

It hopefully answers some of you're questions about how to use my program (including what explorer is)

Edit, And D-Trog is right, put
fanfare <number>
waitforfanfare <number>

after the boxset command that says you get the pokemon.
In both cases number is the number of the sound you want made!
I think Sappy lets you listen to the sounds.

Blaziken626
February 18th, 2007, 04:52 PM
Great news! I've finally figured out how to get the TrainerBattle to work with DiamondCutter. (I used ScriptEd to find the script for a trainer battle.) All you have to do is put 0x0 between the trainer's number and the ptrintro.

Irish Witch
February 18th, 2007, 07:47 PM
sounds like in scripted the trainerbattle construct wasn't working full stop...
Not only did you have to write a 5C at the beginning (the bytecode for 'trainerbattle' but you had to manually put the filler in as well!

Damn that program was a heap of rubbish!

* Note, I have tried to revive my old hack that got me started on making pokescript. I intend to post a howto very shorty on changing the script for the opening of the game (soon as I figure out how to do it!)

O.G. Duke
February 21st, 2007, 11:48 PM
A quick question: Where should I insert the script?
Is it open elite map and load the rom, ctrl click the event and edit the script? Then how to save the script to the rom?

Monkey
February 22nd, 2007, 12:03 AM
got a question about that battle script

is it

#org 0x800000
trainerbattle 0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

that or

#org 0x800000
0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

this one?

is 800000 the offset then ? so $800000

do i need before i do it in scripted and compile it give a new trainer/people the script offset $80000 then compile it? thit was it i think

Overclocked
February 22nd, 2007, 02:04 AM
#org 0x800000
trainerbattle 0x0 0x1A 0x0 0x800100 0x800200
msgbox 0x800300
callstd 0x6
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

#org 0x800300
= Insert message here

Use this instead. Don't forget to fix it up though.

frank$or
February 22nd, 2007, 02:27 AM
Heey, I've made this script.

#org 0xDDC810
faceplayer
message 0xDDC950
boxset 0x2
applymovement 0xFF 0xDDC940
pause 0x10
applymovement 0x12 0xDDC970
pause 0x10
message 0xDDC980
boxset 0x2
applymovement 0x13 0xDDF990
pause 0x70
message 0xDDD000
boxset 0x2
end

#org 0xDDC940
#raw 0x31
#raw 0xFE

#org 0xDDC950
= Go away!

#org 0xDDC970
#raw 0x01
#raw 0xFE

#org 0xDDC980
= And don't dare it to come back!

#org 0xDDF990
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0xFE

#org 0xDDD000
= Chef!\pGiovanni is in trouble!

The beginning works fine, the team rocket guy kicks me away, says his text and turns around.
But the next event ( also team rocket guy ) doesn't move!
No mather what movement.
It's just takes the time of 7 steps and then says the tekst, without moving.
Help?

D-Trogh
February 22nd, 2007, 02:34 AM
Are you sure that TeamRocketGrunt is person no. 13 on your map ??

frank$or
February 22nd, 2007, 03:23 AM
Are you sure that TeamRocketGrunt is person no. 13 on your map ??

Yes. I'm sure of that. ( message to short xd )

Christos
February 22nd, 2007, 04:20 AM
got a question about that battle script

is it

#org 0x800000
trainerbattle 0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

that or

#org 0x800000
0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

this one?

is 800000 the offset then ? so $800000

do i need before i do it in scripted and compile it give a new trainer/people the script offset $80000 then compile it? thit was it i think

You have to compile the script to work but you can put "800000" on the trainer before if you want.

Heey, I've made this script.

#org 0xDDC810
faceplayer
message 0xDDC950
boxset 0x2
applymovement 0xFF 0xDDC940
pause 0x10
applymovement 0x12 0xDDC970
pause 0x10
message 0xDDC980
boxset 0x2
applymovement 0x13 0xDDF990
pause 0x70
message 0xDDD000
boxset 0x2
end

#org 0xDDC940
#raw 0x31
#raw 0xFE

#org 0xDDC950
= Go away!

#org 0xDDC970
#raw 0x01
#raw 0xFE

#org 0xDDC980
= And don't dare it to come back!

#org 0xDDF990
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0xFE

#org 0xDDD000
= Chef!\pGiovanni is in trouble!

The beginning works fine, the team rocket guy kicks me away, says his text and turns around.
But the next event ( also team rocket guy ) doesn't move!
No mather what movement.
It's just takes the time of 7 steps and then says the tekst, without moving.
Help?

Are the events nr. 12 and 13 in hexadecimal? Because 12 = C, 13 = D.

Monkey
February 22nd, 2007, 05:27 AM
wen i compile i get a error

Rubikon 1.3 by Kyoufu Kawa
--------------------------------------------------------------
Loading command database...
Empty command database detected. Program halted.

i loaded the rom then did compile then saved the script under battletrainer and then did go to pet and did $800000 and tested it on the trainer doesnt work?

D-Trogh
February 22nd, 2007, 05:37 AM
wen i compile i get a error

Rubikon 1.3 by Kyoufu Kawa
--------------------------------------------------------------
Loading command database...
Empty command database detected. Program halted.

i loaded the rom then did compile then saved the script under battletrainer and then did go to pet and did $800000 and tested it on the trainer doesnt work?
Plzz use the search function !
Your ROM must be in your ScriptED folder with no spaces in the name.

Monkey
February 22nd, 2007, 06:00 AM
aah ok ty forgot the search function becouse i tought it was a probleme with script orsomething

edit:when i compile it know i get overflow:S?

frank$or
February 22nd, 2007, 06:31 AM
Are the events nr. 12 and 13 in hexadecimal? Because 12 = C, 13 = D.

I've tried that now with this script:

#org 0xDDC810
faceplayer
message 0xDDC950
boxset 0x2
applymovement 0xFF 0xDDC940
pause 0x10
applymovement 0xC 0xDDC970
pause 0x10
message 0xDDC980
boxset 0x2
applymovement 0xD 0xDDF990
pause 0x70
message 0xDDD000
boxset 0x2
end

#org 0xDDC940
#raw 0x31
#raw 0xFE

#org 0xDDC950
= Go away!

#org 0xDDC970
#raw 0x01
#raw 0xFE

#org 0xDDC980
= And don't dare it to come back!

#org 0xDDF990
#raw 0x06
#raw 0x06
#raw 0x06
#raw 0x06
#raw 0x06
#raw 0x06
#raw 0x06
#raw 0xFE

#org 0xDDD000
= Chef!\pGiovanni is in trouble!

The 'second sprite' does not takes seven steps, but just turns his head to the left.
( 0x06 is 1 step to the left. )

Any ideas?
And btw, if i try the '!' ( alert ) movement, he just jumps.
Are those movements for R/S/E or something?
If so, does anybody have the correct movements for FR/LG?

Christos
February 22nd, 2007, 06:35 AM
Replace the "6"s with "A"s. "Left0" is face left, "Left1" one step left but the person stays there and "Left2" is one normal step left.
The alert raw in the text document is for R/S/E.

frank$or
February 22nd, 2007, 06:44 AM
Replace the "6"s with "A"s. "Left0" is face left, "Left1" one step left but the person stays there and "Left2" is one normal step left.
The alert raw in the text document is for R/S/E.

Thanks.
Last question, i not really understand the 'pause' command.
If i have seven times 0x0A, i entered pause 0x70, but when i tried it, the message came while walking at step 4.
Is it possible to raise the pause?

And do you know more FR/LG applymov. raw commands?
If not, i'll look for it by myself..

D-Trogh
February 22nd, 2007, 07:55 AM
I have a question for you Christos..
Do you have a list with flags we MAY NOT use.. so, a list with flags that are used in the game..
Or, can we use whatever we want ?

frank$or
February 22nd, 2007, 08:20 AM
Another problem .
When team rocket walks away, they just are standing there after the steps.
How can i let them disappear?
I already tried Checkflag and Setflag, but it doesn't help.
Any ideas?

And to make this post easy, christos, do you know any more FR/LG movement commands?
Would be helpfull.

Thanks in advance, frank$or.

D-Trogh
February 22nd, 2007, 08:29 AM
Another problem .
When team rocket walks away, they just are standing there after the steps.
How can i let them disappear?
I already tried Checkflag and Setflag, but it doesn't help.
Any ideas?

And to make this post easy, christos, do you know any more FR/LG movement commands?
Would be helpfull.

Thanks in advance, frank$or.I have an idea..
Try the 'movesprite' command and move those sprites outside the map.. (Or somewhere you can't see them..)

frank$or
February 22nd, 2007, 08:39 AM
I have an idea..
Try the 'movesprite' command and move those sprites outside the map.. (Or somewhere you can't see them..)

Yes, i was also thinking about this, but this isn't good because it will take to much time to bring them out of town.
And btw, if i go into an house or something, and go out, they will be there.
If i knew the FR/LG command for 'hide' then it would be easy.

Irish Witch
February 22nd, 2007, 08:49 AM
Another problem .
When team rocket walks away, they just are standing there after the steps.
How can i let them disappear?
I already tried Checkflag and Setflag, but it doesn't help.
Any ideas?
(using advanced map)

If you set the persons people id to the value you use for your setflag command they should disapear.
Dont used flags in the 0x300 range though!

Also note, the applymovement command refers to the the 'people' number not the event number!

And do you know more FR/LG applymov. raw commands?
If not, i'll look for it by myself..
the attached text file lists all the movements (to my knowledge) and the numbers refer to the amount of cycles for that movement. ie left4 is 4 moves per 'cycle', 1 is 1 move per 'cycle' and 0 no move!

I have yet to find a straight answer as to how long a 'cycle' is though!

How this works is if you are facing up then left1 is the equvelent of tapping left (you turn left) left2 = two taps (turn left, step left) etc etc.

Finally
Last question, i not really understand the 'pause' command.
If i have seven times 0x0A, i entered pause 0x70, but when i tried it, the message came while walking at step 4.
Is it possible to raise the pause?

I think there's a command called waitmovement that will pause the script until the character stops moving????
- EDIT -
Found it! Pausemove 0x0 will make the script wait for all movement scripts to stop!
Under scripted it may also be listed as wait 0x0

D-Trogh
February 22nd, 2007, 10:00 AM
Ok, I've made my second script !
But, it doesn't work :\ :P
(I use PokéScript, so it's written for PokéScript...)
RED » What goes wrong/Doesn't work..
BLUE » This is done every time instead of doing the good thing..
[spoiler]#org $Test
lock
faceplayer
checkflag 0x10A
IfTrue $Item
msgbox $1st
callstd 0x6
applymovement 0x1 $personmove
applymovement 0xFF $playermove
pause 0x10
applymovement 0x1 $personmove2
pause 0x10
setflag 0x10A
release
end

#org $1st
= Piss off !

#org $personmove
#raw 0xA
#raw 0xFE

#org $playermove
#raw 0xE
#raw 0xFE

#org $personmove2
#raw 0xB
#raw 0xFE

#org $Item
lock
faceplayer
checkflag 0x10B
IfTrue $LMA
msgbox $here
callstd 0x5
IfTrue $receive 'It never goes to $receive
msgbox $NO
callstd 0x6
clearflag 0x10A
goto $Test
release
end

#org $here
= Will you leave me alone when I give\nyou this ?

#org $NO
= You won't huh ?!

#org $receive
lock
faceplayer
msgbox $hereitem
callstd 0x6
giveitem 0xD 0x1
setflag 0x10B
release
end

#org $hereitem
= Take it and beat it !

#org $LMA
lock
faceplayer
msgbox $LMalone
callstd 0x6
release
end

#org $LMalone
= L.E.A.V.E M.E. A.L.O.N.E. !!!\nGot the message ?!

I think it's wierd the 'IfTrue $receive' doesn't work, because the 'checkflag 0x10A ; IfTrue $Item' does !!

BTW:
This thread is becoming a 'Script-Debug-Help-Me-WHAAH-Thread' if you know what I mean..
I asked Scizz already to open such a thread next to the 'Simple Questions' one.. but -meh-

Irish Witch
February 22nd, 2007, 10:50 AM
Since you PM'd me I gave you a full answer in a PM as well, but the short half is that iftrue is not a valid command. If you're read the update following that conversation you would have learned I went with TIF and FIF respectively.

You shouldn't be doing it the lazy way anyhow...
pfft. Boys!
*places hands on hips and conspires to look like my mum!*

I made some other sugggestions in the PM btw.

D-Trogh
February 22nd, 2007, 10:54 AM
Since you PM'd me I gave you a full answer in a PM as well, but the short half is that iftrue is not a valid command. If you're read the update following that conversation you would have learned I went with TIF and FIF respectively.

You shouldn't be doing it the lazy way anyhow...
pfft. Boys!
*places hands on hips and conspires to look like my mum!*

I made some other sugggestions in the PM btw.
As I told you in the PM.. I made the IfTrue and IfFalse allias.. :P
And that's not the problem because.. well.. did you read this:
I think it's wierd the 'IfTrue $receive' doesn't work, because the 'checkflag 0x10A ; IfTrue $Item' does !!

Pff.. girls :P

Irish Witch
February 22nd, 2007, 11:01 AM
Dangitall!

This is what I get for scripting at 4am....

Boys and girls please remember the following!

boxset 5 (or boxset 2, whichever you use) must be followed by
: compare LASTRESULT 1

Checkflag must NOT!


This has been a sleepy witch announcement.
Now excuse me while I go turn into a pumpkin!

- LAST MINUTE EDIT -

Ps, I think the reason a lot of movement scripts don't work is becasue people get mixed up between people number, people id and event number. (assuming advanced map)
Event number is the index of the object. It is not referenced.
Peaple number is referenced by applymovement, but if it is accidentally doubled up then neither object will move!
- the above is specific to the map you're on! (you cant have 2 2's on one map) The value written in this field may be written without a 0x in front when you write you're script if you don't want the have to convert it to hex.
- - The above applies to both pokescript and Scripted!
People ID is the flag. Setting this value in a script will make the character disapear!

D-Trogh
February 22nd, 2007, 11:08 AM
Dangitall!

This is what I get for scripting at 4am....

Boys and girls please remember the following!

boxset 5 (or boxset 2, whichever you use) must be followed by
: compare LASTRESULT 1

Checkflag must NOT!


This has been a sleepy witch announcement.
Now excuse me while I go turn into a pumpkin!
Well.. you could've told that a lil sooner !!
Just kiddin ;) I really love working with PokéScript ^^
Will you edit that in a newer release ? Or not ?
You don't need to when your busy or something.. :)

B2T

zak
February 22nd, 2007, 11:29 AM
just a question ......... are we alowed to request scripts here? coz i got script i need written , and i really hate scripting ,

D-Trogh
February 22nd, 2007, 11:38 AM
just a question ......... are we alowed to request scripts here? coz i got script i need written , and i really hate scripting ,
Well.. technicly, this even isn't the place to ask for help. As this is the Documents and Tutorials page..
Maybe when we get Scizz's (or an other Moderators) attention, we can get a 'Script-Debug Thread' next to the Simple Questions Thread ^^
Soo..

To stay on topic:
Christos, will you update this tutorial with new things soon?
I don't know what you can learn us more.. but, try it :P

frank$or
February 22nd, 2007, 11:47 AM
(using advanced map)

If you set the persons people id to the value you use for your setflag command they should disapear.
Dont used flags in the 0x300 range though!

Also note, the applymovement command refers to the the 'people' number not the event number!


the attached text file lists all the movements (to my knowledge) and the numbers refer to the amount of cycles for that movement. ie left4 is 4 moves per 'cycle', 1 is 1 move per 'cycle' and 0 no move!

I have yet to find a straight answer as to how long a 'cycle' is though!

How this works is if you are facing up then left1 is the equvelent of tapping left (you turn left) left2 = two taps (turn left, step left) etc etc.

Finally


I think there's a command called waitmovement that will pause the script until the character stops moving????
- EDIT -
Found it! Pausemove 0x0 will make the script wait for all movement scripts to stop!
Under scripted it may also be listed as wait 0x0

Ofcourse i already tried those commands, but those commands are R/S/E only.
I need the FR/LG commands.

Overclocked
February 22nd, 2007, 01:17 PM
Just keep testing them until you get the right ones.

Also with flags, can I just use any flag (0 - 300) without harming the game? e.g. If I use the flag for Prof. Oak wanting the Pokedex, will he start wanting it again?

Irish Witch
February 22nd, 2007, 09:04 PM
I'm not sure whick is the flag for 'wanting' the pokedex but the reason I say avoid the 300 range is cause I've encountered a number of flags there that cause game crashes, one flag that converted the battle method to the safari zone rules (no safari balls though so no use there on it's own), one that accidentally opened the fly map? 300's and 800's seem to be where most of the system flags are stored. Use them without knowing what they are and there's potential to mess up you'r game.

Use the others freely but know that virtually every script uses a flag so if your game starts playing up then it's possible another object is using the same flag as you're script!

- EDIT -
Alternatively, make sore you remove all the existing scripted objects and program in new ones from scratch, but that could be a harrowing experience.

*Considers making an erase script command in bufrite....*

Overclocked
February 22nd, 2007, 09:16 PM
Sorry, what I meant by him wanting the Pokedex was him giving you the Pokedex.
So does that mean that I can just use the flag 0x1, 0x2, 0x10A without caring?

Irish Witch
February 22nd, 2007, 11:04 PM
Pretty much, although when I decompile Prof Birch I notice that flag 380 is the pokedex flag.. This will turn on the pokedex in the game menu!
That what you're looking for?

Theres another flag to turn on the national dex as well, no idea what it is though!!

- EDIT -
UPDATE
meowths accent :/ We're not spamming ya! Well. maybe we are!

Poke Script is now no longer in Beta Test mode and is compiling scripts smoothely without aparent error.

Please abuse freqently!

Sincerely,
Kirsty [Witch]

Saken
February 23rd, 2007, 09:47 PM
need help with my script
Its rayquazza script so that i click on it
it asks me if i want to battle
you click no and nothing happens
click yes its meant to have its cry then the battle
but it doesnt
it just has the battle no cry before the battle

this is the script i have put in
#org 0x800000
lock
faceplayer
message 0x800100
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x800200
message 0x800300
boxset 0x6
release
end
#org 0x800200
cry 0xA1 0x196
release
wildbattle 0x196 0x46 0x3
end
#org 0x800100
= Are you sure you want to battle?
#org 0x800300
= Suit yourself

help please

Irish Witch
February 23rd, 2007, 09:58 PM
The script won't wait till cry is finished before starting the battle, ie, the battle music is overriding the sound of the cry!
so eithet,
.... put a pause 0x50 after the cry statement.
.... Or put a msgbox with something like "Let's do it" after the cry!
.... Or alternatively, put the cry statement in the beginning of the script before the question...

Saken
February 23rd, 2007, 11:22 PM
i put a pause and still there is no difference :-(

Overclocked
February 24th, 2007, 12:56 AM
Are you sure that it's the right cry? Don't forget to put the pause in RIGHT AWAY. It won't even work if it's after the command "release".

Irish Witch
February 24th, 2007, 07:45 AM
Ok. Here's a fun little tutorial thing I just learned I could do with my own program
<.<
>.>
... Here I designed it and I hadn't even thought of using it like this!


Inside pokescript I have special directives for performing different tasks and one of these is #rawdecode, which will decode an offsett from a source (ROM) at and dump it into a file. These are traditionally typed into the instant window but there is nothing stopping you from writing them in a script.
The attached file was made by using translexhation and the ruby thing table.
Renamed to a .rbc and compiled, will go through and decompile the offsetts for the text at the opening of the game (The stuff prof birch says) into seperate files. It will also create one solitary .buf file.

Once it's done compiling delete all the .psc files, then rename the solitary .buf file to a .rbc file...

Hey presto, a complete list by offsett of the text he says in an easy to read format instead of having to look the characters up on a table and edit them in a hex editor!!
Simply write you're text above it making sure you take up the same amount of space -- Allowing that a letter following a backslash(\p) and letters between square brackets[player] both translate into 1-byte characters!

ChaosKing
March 10th, 2007, 06:39 PM
can someone give me a base script were when i talk to someone you can choose one of three pokemon

so instead of yes and no it has grassiga, pheonx and trewin

Irish Witch
March 10th, 2007, 07:59 PM
there is a 'multi' command that can do tht but I haven't figured out how to use that yet....

... But if your usign ruby then you should be able to use a RS start pokemon changer to change your pokemon then create a script that uses the following line:

special &H9C ' Choosepokemon

That will show 'Prof Birch's bag' without doing the battle or the momements, tranfer to the lab etc etc.....

All you need to do afterwards is link in the 'would you like to name your pokemon' script from my 'professional givepokemon' script in the 'script discussion thread.' (http://pkmncommunity.com/showpost.php?p=2399439&postcount=54)

ChaosKing
March 11th, 2007, 01:29 AM
i mean for pokemon fire red

BlackRainbow*
March 11th, 2007, 05:17 AM
can anyone help me what's wrong whit this script
#org 0x800000
checkflag 0x1
if 0x1 call 0x800200
applymovement 0x3 0x800100
pause 0x30
setflag 0x1
end

#org 0x800200
release
end

#org 0x800100
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw 0xFE

i got run-time error 13
type mismatch

D-Trogh
March 11th, 2007, 05:46 AM
Err..
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
Those need to be '0xA' not 'oxA' - -'
And use 'pausemove 0x0' instead of 'pause 0x30'

Irish Witch
March 11th, 2007, 06:31 AM
can anyone help me what's wrong whit this script
#org 0x800000
checkflag 0x1
if 0x0 call 0x800200
release
end

#org 0x800200
applymovement 0x3 0x800100
pause 0x30
setflag 0x1
release
end

Also, that layout will take up less codespace! (and is a more logical layout)

Saken
March 16th, 2007, 03:56 AM
Hey i wanted to know what is wrong with this script it says Runtime Error: Type mismatch
If there is anything wrong with it.....
#org 0x800000
checkflag 0x300
if 0x1 jump 0x800300
applymovement 0x7 0x800100
pause 0x40
message 0x800400
boxset 0x6
setflag 0x300
applymovement 0x7 0x800200
pause 0x120
release
end

#org 0x800300
release
end

#org 0x800100
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0xFE

#org 0x800200
#raw 0x07
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw ox15
#raw 0x15
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0x60
#raw 0xFE

#org 0x800400
= Oh! Sorry! I was too busy playing\nwith my new game Fire Red!\p Excuse me.
wrapped in spoiler tags so i donot take up much space.

Giovanni.

Irish Witch
March 16th, 2007, 08:52 AM
I just copied and pasted your script into a file and compiled it!
<Picture attached>

If you'r using Pokescript the latest update was 48hrs ago (more or less).
Works for me, except the movement data but thats specific to your map!

pokemon1412
March 16th, 2007, 08:28 PM
Does anyone know how to make shiny pokemon wildbattle event (in emerald)...???

Irish Witch
March 17th, 2007, 05:22 AM
I can guess! The pokemon list only goes up to 0x019B(144).
I would hazzard a guess that it's done internally by using bitswapping. Try adding 0x8000 (32768) to your pokemons number or other variations of that behavior.

#org 0x800200
#raw 0x07
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw ox15
#raw 0x15
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0x60
#raw 0xFE

that should be 0 not o

Shiny_Latios
March 17th, 2007, 08:28 AM
What do you mean by offsets i cannot get my script to work in Advance map (Sorry for the newbish question)

Irish Witch
March 17th, 2007, 10:02 AM
An offset is a values like 0x800000

As used in the phrase #org 0x800000
The above is an absolute offset which tells the program the script should start at offset (address) 0x800000

The word offset in this thread is also used to refer to a phrase like this:
#org $Startscript

This is a relative offset. Bufrite will assign a relative offset to an absolute location and display that location in the log:

- Pushed simplescript.$startjolt to 800000
#PROCESS: D:\PokeWitch\POKEMON SAPPHIRE VERSION.GBA F:2 for read
/---------------------------------------------------------------
| - Pushed simplescript.$joltbattle to 80001C
| - Pushed simplescript.$winjolt to 80003E
| - Pushed simplescript.$sorry to 80005F
| - Pushed simplescript.$givebadge to 800068
| - Pushed simplescript.$domove to 800082
| - Pushed simplescript.$givepoke to 8000BD
| - Pushed simplescript.$error to 800100
| - Pushed simplescript.$nameevee to 80010A


etc etc

Pazuzu
March 17th, 2007, 10:11 AM
Baddabing, baddaboom~
Since most of the questions that are getting asked here are not related to the tutorial, but more to scripting in general, I'm going to put a Happy-Lock on this.
Please take these things to the Script Discussion thread in the main forum.

~closed~