- 3
- Posts
- 9
- Years
- Seen Mar 16, 2018
Hello, I am new to scripting with XSE and am having a tough time figuring out how to make a NPC move after asking a yes no question. everything except the movement seems to go off without a problem.
Script:
'---------------
#org 0xE7FBA5
lock
faceplayer
checkflag 0x195
if 0x1 goto 0x8E82E62
msgbox 0x8E83B3D MSG_YESNO '"Do you wish to challange the\nLege..."
compare LASTRESULT 0x1
if 0x1 goto 0x8E82E01
if 0x0 goto 0x8E82E62
'---------------
#org 0xE82E62
msgbox 0x8E82FB2 MSG_NORMAL '"Safe travels."
release
end
'---------------
#org 0xE82E01
msgbox 0x8E82E6D MSG_NORMAL '"Good luck."
setflag 0x195
applymovement 0x17 0x8E83BA1
waitmovement 0x0
release
end
'---------
' Strings
'---------
#org 0xE83B3D
= Do you wish to challange the\nLegendary Trial? Once you enter\lyou cannot escape till its\lcomplete.
#org 0xE82FB2
= Safe travels.
#org 0xE82E6D
= Good luck.
'-----------
' Movements
'-----------
#org 0xE83BA1
#raw 0xA 'Step Left (Normal)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements
Script:
'---------------
#org 0xE7FBA5
lock
faceplayer
checkflag 0x195
if 0x1 goto 0x8E82E62
msgbox 0x8E83B3D MSG_YESNO '"Do you wish to challange the\nLege..."
compare LASTRESULT 0x1
if 0x1 goto 0x8E82E01
if 0x0 goto 0x8E82E62
'---------------
#org 0xE82E62
msgbox 0x8E82FB2 MSG_NORMAL '"Safe travels."
release
end
'---------------
#org 0xE82E01
msgbox 0x8E82E6D MSG_NORMAL '"Good luck."
setflag 0x195
applymovement 0x17 0x8E83BA1
waitmovement 0x0
release
end
'---------
' Strings
'---------
#org 0xE83B3D
= Do you wish to challange the\nLegendary Trial? Once you enter\lyou cannot escape till its\lcomplete.
#org 0xE82FB2
= Safe travels.
#org 0xE82E6D
= Good luck.
'-----------
' Movements
'-----------
#org 0xE83BA1
#raw 0xA 'Step Left (Normal)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements