• 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.
I redid my movement script, following thethethe's tutorial and HockeyPanda's XSE tutorial and the XSE command helper :P. To reinterprate the movement script in thethethe's tutorial into XSE. Well anyway here's the script
Before being compiled:
Code:
#Dynamic 0x456772

#ORG @Main
checkflag 0x828
if 0x1 goto @Starter
message @1
boxset 0x6
applymovement 0xff @movement
pause 0
nop
release
end

#ORG @Starter
release
end

#ORG @movement
#raw 0x10 0x12 0x12

#ORG @1
= Crap!\nI forgot Pikachu!

After being compiled
Code:
'-----------------------
#org 0x456773
checkflag 0x828
if 0x1 goto 0x8456792
msgbox 0x8456799 '"Crap!\nI forgot Pikachu!"
callstd 0x6
applymovement MOVE_PLAYER 0x8456795
pause 0x0
nop
release
end

'-----------------------
#org 0x456792
release
end


'-----------
' Movements
'-----------
#org 0x456795
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)


'---------
' Strings
'---------
#org 0x456799
= Crap!\nI forgot Pikachu!

It simply freezes you. That is all.

EDIT- I'd prefer someone telling me what's wrong with it as opposed to just posting the script :P.
 
@Shadow-X
I dunno.. Try some things.. First, the check item.. maybe do it with 0x72 0x01 0x01 0x00.. Second.. in the movement script, add 0xFE.. Third.. remove the '"I'm the guardian..." and '"Is that a...."
If it doesn't work, I'll check again..

@Onvoloper
Maybe your problem is the script tile? I guess it is a script tile anyway.. try putting 0003 in the unknown.
 
@Shadow-X
I dunno.. Try some things.. First, the check item.. maybe do it with 0x72 0x01 0x01 0x00.. Second.. in the movement script, add 0xFE.. Third.. remove the '"I'm the guardian..." and '"Is that a...."
If it doesn't work, I'll check again..

Nope it still didn't work......but at least the screen went from light red purplish to bright red
 
For some reason the script goes to #org $done right away. I didn't have an hm01. Does the tm case need to be enabled or something?

#org $begin
lock
faceplayer
checkitem 0x153
#raw 0x01 0x00
compare 0x800D 0x1
if 0x4 goto $done
message $would
boxset 5
compare LASTRESULT 1
if 0x1 goto $takegive
release
end

#org $done
lock
faceplayer
message $how
boxset 6
release
end

#org $takegive
giveitem 0x153 0x1
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
message $there
boxset 6
release
end

#org $would
$would 1 = Hey, I've started to sell HM01's.\nDo you want one? They're 1500\na pop.

#org $how
$how 1 = You don't need two crazy!

#org $there
$there 1 = There you go.
 
Anyone know how to make it so when you walk on a space, it activates a script? Do I just make the script like normal, but enter the offset into a script square in advance map?
 
Hm, well I'm a n00b to scripting, but I made this script:
The thing is, when I talk to the person, the screen goes red. BTW, I'm using pokescript.
Thanks in advance and if it's pretty bad, it's because I still know very little.

When using movements you need to put a 0xFE at the end otherwhise the game will keep on reading next values till infinity (more or less:P). Hence the freeze.
I've adjusted your script in order to work with XSE. I've just tested and it's working fine.

Previous Script:
Code:
#org $start
lock
faceplayer
checkitem 0x172 0x1
compare LASTRESULT 0x1
if 0x1 goto $pass
message $nopass '"I'm the guardian of the\secret..."
boxset 6
release
end

#org $pass
message $passx '"Is that a SILVER WING?\pYou may pa..."
boxset 6
applymovement 0x1D $move
pause 0x10
setflag 0x1041
release
end

#org $move
#raw 0x01 0x11 0x60

#org $nopass
= I'm the guardian of the\nsecret legendary POKéMON that is\lsaid to live here.\pUnless you have a SILVER WING,\nyou will not pass.

#org $passx
= Is that a SILVER WING?\pYou may pass...

Adjusted one
Code:
#dynamic 0x800000 'just keep it like that or find another offset filled by FFs

#org @start
lock
faceplayer
checkitem 0x172 0x1
compare LASTRESULT 0x1
if B_TRUE goto @pass
message @nopass '"I'm the guardian of the\secret..."
boxset 6
release
end

#org @pass
message @passx '"Is that a SILVER WING?\pYou may pa..."
boxset 6
applymovement 0x1D @move
waitmovement 0x0
setflag 0x1041
release
end

#org @move
#raw 0x01 0x11 0x60 0xFE

#org @nopass
= I'm the guardian of the\nsecret legendary POKéMON that is\lsaid to live here.\pUnless you have a SILVER WING,\nyou will not pass.

#org @passx
= Is that a SILVER WING?\pYou may pass...


I redid my movement script, following thethethe's tutorial and HockeyPanda's XSE tutorial and the XSE command helper :P. To reinterprate the movement script in thethethe's tutorial into XSE. Well anyway here's the script
[...]

You need to put an extra 0xFE at the end of each movement #raw data. Also, you should replace that pause 0 and nop with just waitmovement 0x0. I've fixed the script and tried on my own. It worked just fine.


For some reason the script goes to #org $done right away. I didn't have an hm01. Does the tm case need to be enabled or something?

No, the TM case gets "enabled" automatically the first time you get one TM/HM.
I fixed the script (even the message which wasn't correclty displayed) and adjusted it for XSE. I've already tested it and it's working like a charm.

Previous script
Code:
#org $begin
lock
faceplayer
checkitem 0x153
#raw 0x01 0x00
compare 0x800D 0x1
if 0x4 goto $done
message $would
boxset 5
compare LASTRESULT  1
if 0x1 goto $takegive
release
end

#org $done
lock
faceplayer
message $how
boxset 6
release
end

#org $takegive
giveitem 0x153 0x1
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
message $there
boxset 6
release
end

#org $would
$would 1 = Hey, I've started to sell HM01's.\nDo you want one?\lThey're 1500 a pop.

#org $how
$how 1 = You don't need two crazy!

#org $there
$there 1 = There you go.

Adjusted one
Code:
#dynamic 0x800000 'or wherever there's some free space

#org @begin
lock
faceplayer
checkitem 0x153 0x1
compare LASTRESULT 0x1
if 0x4 goto @done
message @would
boxset 5
compare LASTRESULT 1
if 0x1 goto @takegive
release
end

#org @done
lock
faceplayer
message @how
boxset 6
release
end

#org @takegive
giveitem 0x153 0x1 0x0
paymoney 1500 0x0
message @there
boxset 6
release
end

#org @would
= Hey, I've started to sell HM01's.\nDo you want one?\pThey're [$]1500 a pop.

#org @how
= You don't need two crazy!

#org @there
= There you go.


Anyone know how to make it so when you walk on a space, it activates a script? Do I just make the script like normal, but enter the offset into a script square in advance map?

Basically yes. You may want to put some checkflag in order to not repeat it all the times.
 
I don't understand. When I script it for the person, it works fine. But, when I put the script in a "script" box in advance map, it freezes when you walk on it.
 
Hi guys!

What command I need to activate a script when the trainer steps on a tile?
 
#dynamic 0x2E51F2

#org @main
lock
faceplayer
checkflag 0x232
message @there
boxset 0x6
giveitem 0x16F 0x1 0x0
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
setflag 0x232
setflag 0x828
release
end

#org @there
= Here you go! \nGood luck on your journey!

#raw 0x53 0x0F 0x80

Its supposed to give you the National Dex then go away, but instead it gives you the Tri-Pass and never leaves. What is wrong? D:
 
National dex is special 0x16F not giveitem.

Well, now all it does is say what it is supposed to. I get nothing at all.

Here is the script.

#dynamic 0x2E51F2

#org @main
lock
faceplayer
checkflag 0x232
message @there
boxset 0x6
special 0x16F 0x1 0x0
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
setflag 0x232
setflag 0x828
release
end

#org @there
= Here you go! \nGood luck on your journey!

#raw 0x53 0x0F 0x80
 
I don't understand. When I script it for the person, it works fine. But, when I put the script in a "script" box in advance map, it freezes when you walk on it.

in the script tile, there you can find some unknown and variables on A-Map's right corner.
fill those in so it won't freeze.
[PokeCommunity.com] [Archive] Script help thread




@avatar...
remove the 0x1 0x0 from the special...
 


in the script tile, there you can find some unknown and variables on A-Map's right corner.
fill those in so it won't freeze.
[PokeCommunity.com] [Archive] Script help thread




@avatar...
remove the 0x1 0x0 from the special...

Does the same thing as before. Also... (sorry for being rude when your trying to help but this really bugs me.) by using "..." you implied that I am being stupid by putting those. Well tell me this, did you know how to script everything when you have only been scripting for 3 days? Oh, and without a tutorial on how to actually do it?

#dynamic 0x2E51F2

#org @main
lock
faceplayer
checkflag 0x232
message @there
boxset 0x6
special 0x16F
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
setflag 0x232
setflag 0x828
release
end

#org @there
= Here you go! \nGood luck on your journey!

#raw 0x53 0x0F 0x80

That is it now. Someone please help. D:
 
Try setting the Regional Pokedex before the National Pokedex.. Setflag 0x829 in Fire Red.
 
Last edited:
Thanks! I figured it out :D


Now... another quick question... I know you can make yes/no scripts, but is it possible to make a script that says "which pokemon would you like" and then lists options? If so ... could you point me to a tutorial with it... or, give me an example script. Thanks :D
 
You would use this command:
msgbox2 $question
multi 0xE 0x0 0x08 0x0
the 3rd value is one of the already existing multi choice boxes in the game.
If in pokescript, you have to add in the command to the command file.
 
Status
Not open for further replies.
Back
Top