• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Archive] Script help thread

Status
Not open for further replies.
Fixes in bold. Try this one...
Also, "applymovement 0xFF" is very simple to understand. "Applymovement" itself is the movement command, while 0x(hex number), in this case 0xFF, means to move which sprite on the map where the script currently is, and 0xFF is to number of the player

Simple fixes, and thanks for explaining. I've read many guides but some things still confuse me I guess since I have to skim through them all.

I'll bookmark this for later reference though. I'll have to try it tomorrow.
 
Who knows the warp command for XSE?
because warp 0x[bank] 0x[mapnumber] 0x[warp number] doesn't work...

It goes like this
warp 0x3(bank) 0x0(map) 0x1 (warp) 0x3(X Coordinate) 0x3(Y Coordinate)
 
Hey Guys i have a problem with this level script

#dynamic 0x800000
#org @start
lockall
checkflag 0x828
if 0x1 goto @no
setvar 4033 0x1
applymovement 0x02 @dadmove1
applymovement 0x02 @dadmove2
msgbox @dadtalk
givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
applymovement 0x02 @dadmove3
releaseall
end

#org @no
releaseall
end


#org @dadmove1
#raw 0x65
#raw 0xFE

#org @dadmove2
#raw 11
#raw 13
#raw 13
#raw 13
#raw 13
#raw 13
#raw 01
#raw FE


#org @dadmove3
#raw 12
#raw 12
#raw 12
#raw 12
#raw 12
#raw 10
#raw FE


#org @dadtalk
= Hey [player]\nYour mother and I have decided\lthat you are old enough to go on\n an adventure.\lSo i got you this Cinderquil.


yes i know i spelt Cqindaquil wrong

Heres what happens
[PokeCommunity.com] [Archive] Script help thread

this just keeps repeating


Please Help

Aside from what dshayabusa said, you also forgot waitmovement 0x0 multiple times.
 
Hackimon.
You forgot the callstd 0x6 under each msgbox command. Try using bigger stevars than 0x4033.
Try 0x7000 and up. I think a lot of setvars are used by the game itself.
 
It goes like this
warp 0x3(bank) 0x0(map) 0x1 (warp) 0x3(X Coordinate) 0x3(Y Coordinate)
Thanks for the help :D

:edit:
I used it in this way but it doesn't work, the () are nopt included when compiling
warp 0x3(4) 0x0(1) 0x1 (0) 0x3(4) 0x3(3)
It's for this warp, Map 4.1 so the bank is 1, and the warp is 0, the offset's are X 0004 Y0003..
What's wrong with what I did?
 
Last edited:
I'm really new to scripting, and need some assistance. ^^; What am I doing wrong with this (XSE) script? I can compile it and everything, but when I go to talk to the sprite on the overworld, she does absolutely nothing except make that "beep" sound when you normally talk to a sprite. (During the course of making changes, I've gotten her to actually talk and start the battle, but all the text boxes are glitchy and she never follows any of the movement commands, meaning if you keep talking to her, you're in an endless battle loop. The script below is the one that yields the "nothing" result).

What I want the sprite to do is say a line while facing in a different direction from you, then turn and get an exclamation point over her head, while the "female rival" music plays. Then I want her to talk a bit more, after which a battle will start. After the battle, she'll talk a little more, than walk up a step, than walk left off the screen and vanish. Flags relating to having met her are either set or cleared.

Thanks so much in advance!

'-----------------------
#org 0x1E40CF
lockall
msgbox 0x1E40D0 '"A dead end? Oh, no[.]and I'm afraid..."
callstd 0x4
playsong 0x19F 0x1
applymovement 0x16 0x1E40D1
waitmovement 0x0
applymovement 0x16 0x1E40D2
waitmovement 0x0
applymovement 0x16 0x1E40D3
waitmovement 0x0
msgbox 0x1E40D4 '"D-don't hurt me! Please! [.] [.] [...."
callstd 0x4
trainerbattle 0x3 0x005 0x0 0x1E40D5
goto 0x1E40D6
end

'-----------------------
#org 0x1E40D6
msgbox 0x1E40D7 '"Rosie: Even though I ended up losin..."
callstd 0x4
goto 0x1E40D8
end

'-----------------------
#org 0x1E40D8
closeonkeypress
applymovement 0x16 0x1E40D9
waitmovement 0x0
goto 0x1E578D
end

'-----------------------
#org 0x1E578D
hidesprite 0x16
clearflag 0x205
setflag 0x206
clearflag 0x207
playsong2 0x0
fadedefault
releaseall
end

'-----------
' Movements
'-----------
#org 0x1E40D1
#raw 3E 'Face Player
#raw FE 'End of Movements

#org 0x1E40D2
#raw 56 'Exclamation Mark (!)
#raw FE 'End of Movements

#org 0x1E40D3
#raw 14 'Delay5
#raw 14 'Delay5
#raw 14 'Delay5
#raw FE 'End of Movements

#org 0x1E40D9
#raw 5 'Step Up (Normal)
#raw 6 'Step Left (Normal)
#raw 6 'Step Left (Normal)
#raw 6 'Step Left (Normal)
#raw 6 'Step Left (Normal)
#raw 6 'Step Left (Normal)
#raw 6 'Step Left (Normal)
#raw 6 'Step Left (Normal)
#raw FE 'End of Movements

(the strings follow here)
 
Spoiler:


It works perfectly, but the pointer $talk0 is being said after the wrap command.

Here's what it looks like in XSE.

Spoiler:


The same message came twice(the large sized words). I placed it only one place.
Is there a problem?

Edit: Pink Parka Girl, try replacing the 0x16 with 0x10. It needs to be in hex. 16 in hex is 10. Try that.
 
Last edited:
Edited: The first script works fine, now. But now I have a problem with another. The first part of the script works - but once the first flag is set, it stops working. Can anyone help? (Like the first, this is an XSE script.)

What I want to have happen: Lady Linwood, (the sprite in question) is seeking a runaway, who you happen to find. You have the choice of either revealing their location (and earning a Nugget) or following your morals and saying you have no idea. I want you to only be offered the Yes/No option once - not like in a typical Pokemon game (and many other RPGs, for that matter) where you'll keep getting badgered until you pick the "correct" response. If you say Yes, you'll be given a Nugget and a specific flag will not be set. If you say No, you won't get the Nugget and a specific flag WILL be set. But...I have no idea what I'm doing wrong. Can anyone help me fix up this script?

'-----------------------
#org 0x80048C
lock
faceplayer
checkflag 0x44C
if 0x1 goto 0x81E57A9
msgbox 0x880058C '"Upon my word! Who are you?\nI certa..."
callstd 0x6
release
end

'-----------------------
#org 0x81E57A9
lock
faceplayer
checkflag 0x578
if 0x1 goto 0x81E57E5
checkflag 0x514
if 0x1 goto 0x81E57B3
msgbox 0x81E57BD '"Trainer! You're back here,\nagain? Ready t..."
callstd 0x5
compare LASTRESULT 0x1
if 0x1 call 0x81E57C7
compare LASTRESULT 0x0
if 0x1 call 0x81E57D1
release
end

'-----------------------
#org 0x81E57C7
msgbox 0x81E57DB '"Oh, Lady Linwood's eyes don't\ndecieve her..."
callstd 0x4
giveitem 0x6E 0x1
setflag 0x514
release
end

'-----------------------
#org 0x81E57D1
msgbox 0x81E57F9 '"Pah! You detestable child! If you\nwon't ..."
callstd 0x4
setflag 0x578
release
end

'-----------------------
#org 0x81E57E5
msgbox 0x81E57EF '"Get out, urchin!"
callstd 0x4
setflag 0x5DC
release
end

'-----------------------
#org 0x81E57B3
msgbox 0x81E5803 '"Perhaps there are still a\nfew honest Trai..."
callstd 0x4
release
end


'---------
' Strings
'---------
(the strings follow here.)
 
Last edited:
Edited: The first script works fine, now. But now I have a problem with another. The first part of the script works - but once the first flag is set, it stops working. Can anyone help? (Like the first, this is an XSE script.)

What I want to have happen: Lady Linwood, (the sprite in question) is seeking a runaway, who you happen to find. You have the choice of either revealing their location (and earning a Nugget) or following your morals and saying you have no idea. I want you to only be offered the Yes/No option once - not like in a typical Pokemon game (and many other RPGs, for that matter) where you'll keep getting badgered until you pick the "correct" response. If you say Yes, you'll be given a Nugget and a specific flag will not be set. If you say No, you won't get the Nugget and a specific flag WILL be set. But...I have no idea what I'm doing wrong. Can anyone help me fix up this script?

'-----------------------
#org 0x80048C
lock
faceplayer
checkflag 0x44C
if 0x1 goto 0x81E57A9
msgbox 0x880058C '"Upon my word! Who are you?\nI certa..."
callstd 0x6
release
end

'-----------------------
#org 0x81E57A9
lock
faceplayer
checkflag 0x578
if 0x1 goto 0x81E57E5
checkflag 0x514
if 0x1 goto 0x81E57B3
msgbox 0x81E57BD '"Trainer! You're back here,\nagain? Ready t..."
callstd 0x5
compare LASTRESULT 0x1
if 0x1 call 0x81E57C7
compare LASTRESULT 0x0
if 0x1 call 0x81E57D1
release
end

'-----------------------
#org 0x81E57C7
msgbox 0x81E57DB '"Oh, Lady Linwood's eyes don't\ndecieve her..."
callstd 0x4
giveitem 0x6E 0x1
setflag 0x514
release
end

'-----------------------
#org 0x81E57D1
msgbox 0x81E57F9 '"Pah! You detestable child! If you\nwon't ..."
callstd 0x4
setflag 0x578
release
end

'-----------------------
#org 0x81E57E5
msgbox 0x81E57EF '"Get out, urchin!"
callstd 0x4
setflag 0x5DC
release
end

'-----------------------
#org 0x81E57B3
msgbox 0x81E5803 '"Perhaps there are still a\nfew honest Trai..."
callstd 0x4
release
end


'---------
' Strings
'---------
(the strings follow here.)

I'm guessing flag 0x44C is set in another script? could you show the script when you encounter the runaway?
 
The "runaway script" is a modified version of the one I posted earlier, in my first post on the thread. Here is the finalized version:

'-----------------------
#org 0x1E40CF
lockall
msgbox 0x81E4235 '"A dead end? Oh, no[.]and I'm afraid..."
callstd 0x4
playsong 0x19F 0x1
applymovement 0x10 0x81A0839
waitmovement 0x0
sound 0x15
applymovement 0x10 0x81A0833
waitmovement 0x0
applymovement 0x10 0x81A0835
waitmovement 0x0
msgbox 0x881B38B '"D-don't hurt me! Please!\p[.] [.]\n..."
callstd 0x4
trainerbattle 0x3 0x5 0x0 0x81E420F
msgbox 0x81759A1 '"Rosie: Remember your promise, pleas..."
callstd 0x4
closeonkeypress
pause 0x1E
fadescreen 0x1
hidesprite 0x10
movesprite2 0x10 0x3F 0x19
fadescreen 0x0
setflag 0x44C
fadedefault
releaseall
end

After I compiled the "Lady Linwood" script, this is what XSE spits back at me:

'-----------------------
#org 0x80048C
lock
faceplayer
checkflag 0x44C
if 0x1 goto 0x81E57A9
msgbox 0x880058C '"Upon my word! Who are you?\nI certa..."
callstd 0x6
release
end

'-----------------------
#org 0x1E57A9
nop
nop
nop
nop
(and so on...for a good 200 or so lines)
warp5 0x0 0x0 0x0 0x0 0xE041

I'll try using a different flag pointer (what are some good, safe values to work in?), but not sure how much good that will do...Apologies for asking so many questions, but I'm still such a newbie... ^^'
 
Not really scripting help, but a question.
Without flag 0x828, how can I tell that the player has caught a pokemon?
Because the player catches a Pokemon with a masterball, and I cannot set the flag 0x828 until I am 100% sure they have caught it.
 
Thanks for the help :D

:edit:
I used it in this way but it doesn't work, the () are nopt included when compiling
warp 0x3(4) 0x0(1) 0x1 (0) 0x3(4) 0x3(3)
It's for this warp, Map 4.1 so the bank is 1, and the warp is 0, the offset's are X 0004 Y0003..
What's wrong with what I did?
If you are warping to a warp tile then use:
Code:
warp 0x4 0x1 0x1 0x0 0x0
If you are not and you want to warp to a specific place use:
Code:
warp 0x4 0x1 0xff 0x4 0x3

Spoiler:


It works perfectly, but the pointer $talk0 is being said after the wrap command.

Here's what it looks like in XSE.

Spoiler:


The same message came twice(the large sized words). I placed it only one place.
Is there a problem?

Edit: Pink Parka Girl, try replacing the 0x16 with 0x10. It needs to be in hex. 16 in hex is 10. Try that.
The warp command has two extra parameters; x-coordinate and y-coordinate.
Basically you want to add two nop below the warp command.

The "runaway script" is a modified version of the one I posted earlier, in my first post on the thread. Here is the finalized version:

Spoiler:


I'll try using a different flag pointer (what are some good, safe values to work in?), but not sure how much good that will do...Apologies for asking so many questions, but I'm still such a newbie... ^^'
You might want to change those callstd 0x4 to callstd 0x6. What happens exactly? And don't worry about it, thats what this thread is for. :D

Not really scripting help, but a question.
Without flag 0x828, how can I tell that the player has caught a pokemon?
Because the player catches a Pokemon with a masterball, and I cannot set the flag 0x828 until I am 100% sure they have caught it.
Catching a Pokemon does not cause flag 0x828 to be set. You can check for a Pokemon using the following method:
Spoiler:

Credit to thethethethe, taken from his tutorial on PHO.
 
Catching a Pokemon does not cause flag 0x828 to be set. You can check for a Pokemon using the following method:
Spoiler:

Credit to thethethethe, taken from his tutorial on PHO.
What if it's not a certain pokemon, seeing how that script needs the pokemon's number?
 
You might want to change those callstd 0x4 to callstd 0x6. What happens exactly? And don't worry about it, thats what this thread is for. :D

Thanks! I changed those, along with a few other little things, and now the script works wonderfully! I'm so excited that I'm finally getting better at this :)
 
Status
Not open for further replies.
Back
Top