- 241
- Posts
- 12
- Years
- USA
- Seen Mar 25, 2016
Ok now I have my own question.
I'm editing the Nurse Joy script to make you pay based on how many badges you have. Everything is working, except that the when it checks if you have enough money I think it checks for $0x4001 ($16385) instead of what is stored in that variable...
Or at least, it doesn't think I have enough money when I test it, even though I do.
Any thoughts?
I'm editing the Nurse Joy script to make you pay based on how many badges you have. Everything is working, except that the when it checks if you have enough money I think it checks for $0x4001 ($16385) instead of what is stored in that variable...
Or at least, it doesn't think I have enough money when I test it, even though I do.
Any thoughts?
Spoiler:
'---------------
#org 0x800000
lock
faceplayer
call 0x880000A
release
end
'---------------
#org 0x80000A
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
showmoney 0x0 0x0 0x0
call 0x8800058
buffernumber 0x0 0x4001
preparemsg 0x88001CB '"Welcome to our POKéMON CENTER!\pWo..."
waitmsg
multichoice 0x13 0x8 0x0 0x2
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x88000E1
compare 0x8000 0x1
if 0x1 goto 0x8800116
compare 0x8000 0x7F
if 0x1 goto 0x8800116
end
'---------------
#org 0x1A7AE0
release
end
'---------------
#org 0x800058
setvar 0x4001 0x32
checkflag 0x820
if 0x1 call 0x88000A7
checkflag 0x821
if 0x1 call 0x88000AE
checkflag 0x822
if 0x1 call 0x88000B5
checkflag 0x823
if 0x1 call 0x88000BC
checkflag 0x824
if 0x1 call 0x88000C3
checkflag 0x825
if 0x1 call 0x88000CA
checkflag 0x826
if 0x1 call 0x88000D1
checkflag 0x827
if 0x1 call 0x88000D8
return
'---------------
#org 0x8000E1
cmdc3 0xF
checkmoney 0x4001 0x0 <-here is seemingly the problem...
compare LASTRESULT 0x0
if 0x1 goto 0x8800108
preparemsg 0x81A54E1 '"Okay, I'll take your POKéMON for a..."
waitmsg
call 0x8800123
special 0x169
goto 0x81A65EC
'---------------
#org 0x800116
msgbox 0x81A5511 MSG_KEEPOPEN '"Come again anytime!"
hidemoney 0x0 0x0
return
'---------------
#org 0x8000A7
setvar 0x4001 0x64
return
'---------------
#org 0x8000AE
setvar 0x4001 0x96
return
'---------------
#org 0x8000B5
setvar 0x4001 0xFA
return
'---------------
#org 0x8000BC
setvar 0x4001 0x190
return
'---------------
#org 0x8000C3
setvar 0x4001 0x258
return
'---------------
#org 0x8000CA
setvar 0x4001 0x384
return
'---------------
#org 0x8000D1
setvar 0x4001 0x4B0
return
'---------------
#org 0x8000D8
setvar 0x4001 0x5DC
return
'---------------
#org 0x800108
msgbox 0x88002FD MSG_KEEPOPEN '"I'm sorry, but it appears that you..."
hidemoney 0x0 0x0
release
end
'---------------
#org 0x800123
applymovement LASTTALKED 0x81A75E7
waitmovement 0x0
doanimation 0x19
checkanimation 0x19
applymovement LASTTALKED 0x81A75ED
waitmovement 0x0
special 0x0
paymoney 0x4001 0x0
return
'---------------
#org 0x1A65EC
special2 LASTRESULT 0x1B1
compare LASTRESULT 0x0
if 0x1 goto 0x8800179
special2 LASTRESULT 0x183
copyvar 0x8008 LASTRESULT
compare 0x8008 0x0
if 0x1 goto 0x8800179
compare 0x8008 0x1
if 0x1 goto 0x880019A
end
'---------------
#org 0x800179
updatemoney 0x0 0x0 0x0
preparemsg 0x81A552B '"Thank you for waiting.\nWe've rest..."
waitmsg
applymovement LASTTALKED 0x81A666C
waitmovement 0x0
msgbox 0x81A5511 MSG_KEEPOPEN '"Come again anytime!"
hidemoney 0x0 0x0
return
'---------------
#org 0x80019A
checkflag 0x842
if 0x1 goto 0x8800179
msgbox 0x81A552B MSG_KEEPOPEN '"Thank you for waiting.\nWe've rest..."
setflag 0x842
preparemsg 0x81BCCCA '"It appears as if [buffer1] is play..."
waitmsg
applymovement LASTTALKED 0x81A666C
waitmovement 0x0
msgbox 0x81A5511 MSG_KEEPOPEN '"Come again anytime!"
hidemoney 0x0 0x0
return
'---------
' Strings
'---------
#org 0x8001CB
= Welcome to our POKéMON CENTER!\pWould you like me to heal your\nPOKéMON back to perfect health?\pIt will cost [$][buffer1].
#org 0x1A54E1
= Okay, I'll take your POKéMON for a\nfew seconds.
#org 0x1A5511
= Come again anytime!
#org 0x8002FD
= I'm sorry, but it appears that you\ndon't have enough money to heal\pyour POKéMON[.]
#org 0x1A552B
= Thank you for waiting.\nWe've restored your POKéMON to\lfull health.
#org 0x1BCCCA
= It appears as if [buffer1] is playing\nright now.\lGo for it!
'-----------
' Movements
'-----------
#org 0x1A75E7
#raw 0x2F 'Face Left (Delayed)
#raw 0xFE 'End of Movements
#org 0x1A75ED
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements
#org 0x1A666C
#raw 0x5B 'mov5B
#raw 0x1A 'Delay3
#raw 0xFE 'End of Movements
#org 0x800000
lock
faceplayer
call 0x880000A
release
end
'---------------
#org 0x80000A
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
showmoney 0x0 0x0 0x0
call 0x8800058
buffernumber 0x0 0x4001
preparemsg 0x88001CB '"Welcome to our POKéMON CENTER!\pWo..."
waitmsg
multichoice 0x13 0x8 0x0 0x2
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x88000E1
compare 0x8000 0x1
if 0x1 goto 0x8800116
compare 0x8000 0x7F
if 0x1 goto 0x8800116
end
'---------------
#org 0x1A7AE0
release
end
'---------------
#org 0x800058
setvar 0x4001 0x32
checkflag 0x820
if 0x1 call 0x88000A7
checkflag 0x821
if 0x1 call 0x88000AE
checkflag 0x822
if 0x1 call 0x88000B5
checkflag 0x823
if 0x1 call 0x88000BC
checkflag 0x824
if 0x1 call 0x88000C3
checkflag 0x825
if 0x1 call 0x88000CA
checkflag 0x826
if 0x1 call 0x88000D1
checkflag 0x827
if 0x1 call 0x88000D8
return
'---------------
#org 0x8000E1
cmdc3 0xF
checkmoney 0x4001 0x0 <-here is seemingly the problem...
compare LASTRESULT 0x0
if 0x1 goto 0x8800108
preparemsg 0x81A54E1 '"Okay, I'll take your POKéMON for a..."
waitmsg
call 0x8800123
special 0x169
goto 0x81A65EC
'---------------
#org 0x800116
msgbox 0x81A5511 MSG_KEEPOPEN '"Come again anytime!"
hidemoney 0x0 0x0
return
'---------------
#org 0x8000A7
setvar 0x4001 0x64
return
'---------------
#org 0x8000AE
setvar 0x4001 0x96
return
'---------------
#org 0x8000B5
setvar 0x4001 0xFA
return
'---------------
#org 0x8000BC
setvar 0x4001 0x190
return
'---------------
#org 0x8000C3
setvar 0x4001 0x258
return
'---------------
#org 0x8000CA
setvar 0x4001 0x384
return
'---------------
#org 0x8000D1
setvar 0x4001 0x4B0
return
'---------------
#org 0x8000D8
setvar 0x4001 0x5DC
return
'---------------
#org 0x800108
msgbox 0x88002FD MSG_KEEPOPEN '"I'm sorry, but it appears that you..."
hidemoney 0x0 0x0
release
end
'---------------
#org 0x800123
applymovement LASTTALKED 0x81A75E7
waitmovement 0x0
doanimation 0x19
checkanimation 0x19
applymovement LASTTALKED 0x81A75ED
waitmovement 0x0
special 0x0
paymoney 0x4001 0x0
return
'---------------
#org 0x1A65EC
special2 LASTRESULT 0x1B1
compare LASTRESULT 0x0
if 0x1 goto 0x8800179
special2 LASTRESULT 0x183
copyvar 0x8008 LASTRESULT
compare 0x8008 0x0
if 0x1 goto 0x8800179
compare 0x8008 0x1
if 0x1 goto 0x880019A
end
'---------------
#org 0x800179
updatemoney 0x0 0x0 0x0
preparemsg 0x81A552B '"Thank you for waiting.\nWe've rest..."
waitmsg
applymovement LASTTALKED 0x81A666C
waitmovement 0x0
msgbox 0x81A5511 MSG_KEEPOPEN '"Come again anytime!"
hidemoney 0x0 0x0
return
'---------------
#org 0x80019A
checkflag 0x842
if 0x1 goto 0x8800179
msgbox 0x81A552B MSG_KEEPOPEN '"Thank you for waiting.\nWe've rest..."
setflag 0x842
preparemsg 0x81BCCCA '"It appears as if [buffer1] is play..."
waitmsg
applymovement LASTTALKED 0x81A666C
waitmovement 0x0
msgbox 0x81A5511 MSG_KEEPOPEN '"Come again anytime!"
hidemoney 0x0 0x0
return
'---------
' Strings
'---------
#org 0x8001CB
= Welcome to our POKéMON CENTER!\pWould you like me to heal your\nPOKéMON back to perfect health?\pIt will cost [$][buffer1].
#org 0x1A54E1
= Okay, I'll take your POKéMON for a\nfew seconds.
#org 0x1A5511
= Come again anytime!
#org 0x8002FD
= I'm sorry, but it appears that you\ndon't have enough money to heal\pyour POKéMON[.]
#org 0x1A552B
= Thank you for waiting.\nWe've restored your POKéMON to\lfull health.
#org 0x1BCCCA
= It appears as if [buffer1] is playing\nright now.\lGo for it!
'-----------
' Movements
'-----------
#org 0x1A75E7
#raw 0x2F 'Face Left (Delayed)
#raw 0xFE 'End of Movements
#org 0x1A75ED
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements
#org 0x1A666C
#raw 0x5B 'mov5B
#raw 0x1A 'Delay3
#raw 0xFE 'End of Movements