Quote:
Originally Posted by Shadow-X
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...
Quote:
Originally Posted by Onvoloper
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.
Quote:
Originally Posted by megiddo
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.
Quote:
Originally Posted by Austinia
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.