PDA

View Full Version : Script help


zman27
December 23rd, 2007, 07:55 AM
I am attempting to write a script where the player walks up to a pokeball and get a message to choose the pokemon (if he/she wants), and if not, can go to one of the other pokeballs. Basically, I am attempting to write the script from the orignal game (like in fire red, where u can choose).

I currently have:
#org $givedragon
checkflag 0x830
if B_true goto $donealready
message $wantdragon
$wantdragon 1 = Do you want the DRAGON pokemon ORMR?
boxset 5
compare LASTRESULT B_TRUE
if B_False goto $dontwant
jingle
message $gotdragon
$gotdragon 1 = You got the DRAGON pokemon ORMR!
givepokemon 1 5 0x8
setflag 0x830
release
end

#org $dontwant
release
end

#org $donealready
release
end

The problems are:
1) It does not play any sound (jingle)
2) It gives you the pokemon regardless if you said yes or no
3) It does not enable the pokemon menu (as flag 830 should do [or at least I think so])

Any help is greatly appreciated.

EVIL DARK MEW
December 23rd, 2007, 11:06 AM
I am attempting to write a script where the player walks up to a pokeball and get a message to choose the pokemon (if he/she wants), and if not, can go to one of the other pokeballs. Basically, I am attempting to write the script from the orignal game (like in fire red, where u can choose).

I currently have:
#org $givedragon
checkflag 0x830
if B_true goto $donealready
message $wantdragon
$wantdragon 1 = Do you want the DRAGON pokemon ORMR?
boxset 5
compare LASTRESULT 1
if B_False goto $dontwant
jingle
message $gotdragon
$gotdragon 1 = You got the DRAGON pokemon ORMR!
givepokemon 1 5 0x8
setflag 0x830
release
end

#org $dontwant
release
end

#org $donealready
release
endThe problems are:
1) It does not play any sound (jingle)
2) It gives you the pokemon regardless if you said yes or no
3) It does not enable the pokemon menu (as flag 830 should do [or at least I think so])

Any help is greatly appreciated.

try that ...but im not too sure...i THINK that should fix it

Blazichu
December 23rd, 2007, 11:18 AM
I think you do not need another script help thread seeing as there is one here: http://www.pkmncommunity.com/showthread.php?t=120081

Please refer to that next time, just so the mods do not have to clean and lock alot of Script Help topics.

Teh Baro
December 23rd, 2007, 03:21 PM
actually jingle isn't jingle. Kawa just messed up when naming some commands.
Hackmew (I think it was him, not sure) did a rubikon.dat edit and named it "dontfaceplayer", which doesn't make much sense either.
command 0x69 (which scripted calls jingle) closes previously opened messageboxes. Sometimes, if you don't use it and run the script while the location window (the map name when you enter a city, for example) is disappearing, the message is misplaced.
about the rest... It's sunday, hangovers, etc, not in the mood to analyze the script

thethethethe
December 23rd, 2007, 03:36 PM
actually jingle isn't jingle. Kawa just messed up when naming some commands.
Hackmew (I think it was him, not sure) did a rubikon.dat edit and named it "dontfaceplayer", which doesn't make much sense either.
command 0x69 (which scripted calls jingle) closes previously opened messageboxes. Sometimes, if you don't use it and run the script while the location window (the map name when you enter a city, for example) is disappearing, the message is misplaced.
about the rest... It's sunday, hangovers, etc, not in the mood to analyze the script

I heard that jingle isn't jingle either. I heard that it is a sprite lock. Instead of locking the hero, I was told that it locks the Ow, you'd talked to.

And about the script, you use the wrong flag. 0x828, not 0x830.
and when I script a boxset 5 in pokescript, I try to use
compare LASTRESULT b_true
if b_true goto $yes
By using them as both b_true's it seems to work better with pokescript.

zman27
December 23rd, 2007, 06:13 PM
hey, thanks for all your help. It worked. Now just to figure out how to get it to jingle...

Teh Baro
December 23rd, 2007, 08:32 PM
hey, thanks for all your help. It worked. Now just to figure out how to get it to jingle...
the "jingle" is a fanfare. Just find the da-da-da-dam sound index. In fire red it's 0x101, dunno ruby, dunno which one are you using. (check in elitemap)
Can also be inserted as a text command in the message, inserting the bytes FC 0B YY XX where XXYY is the song index. For example, in fire red, you can insert the sound 102 in a message inserting the bytes FC 0B 02 01.

zman27
December 23rd, 2007, 11:05 PM
so what actual code would you put in? just like message FC 0B 02 01?

MCRAIDER19
May 24th, 2008, 12:18 PM
I can help you with the pokemon menu and the regardless of if you say yes or no

instead of compare LASTRESULT B_true put in compare LASTRESULT 1

on the next line put if B_true goto $soandso

its better somehow i don't know why

as for the pokemon menu

it's not 0x830 it's 0x828

i hope this helps

i'm not sure about the jingle though i'm just a basic scripter.