- 7
- Posts
- 9
- Years
- Seen Feb 28, 2019
Hello,
I'm trying to add few merchants to Pokemon Emerald, that would sell Eggs to players.
I used information found in XSE help file and at a certain site detailing money commands .
I use Virtual Boy emulator, Advance Map 1.92 and XSE 1.1.1.
Code I produced:
#dynamic 0xE3E04F
#org @start
lock
faceplayer
msgbox @greeting 0x6
msgbox @wantit 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @no 0x6
release
end
#org @yes
checkmoney 1500 0x0
compare 0x800D 0x1
if 0x4 goto @ok
msgbox @fail 0x6
release
end
#org @greeting
= Welcome to JOTHO EGGS MERCHANTS.
#org @no
= = All right then. \p I'm not going\nanywhere, but these EGGS are very\lpopular; they sell out quickly.\p\lMaybe my collegues have EGGS you\lwill find more interesting.
#org @wantit
= TOGEPI EGG for 1500[$]
#org @fail
= I'm sorry, you can't afford it. \n Come back when you have 1500[$].
#org @ok
= Thank you! I have more TOGEPI\nEGGS to sell. \p Also, don't\lforget to talk to my collegues.\l/p They have more rare EGGS from\lJOTHO!
paymoney 1500 0x0
giveegg 175
But its not working.
When compiled, its is changed to
So, first thing, text in yes/no question is changed to g. for some reason, and it even after I edit it, it still keeps changing to g. after script is compiled.
Yes/no works apart it, no puts appropriate messege, yes goes to money check.
If player can't afford it, it also works as intended- NPC says 'Come back when you have money.'
But if player got enough money, nothing happens- no money is substracted, no egg is given, and g. is stuck on screen.
I can't see what's wrong here (granted I'm not experience with XSE and my programming skills are low), so, please, anyone sees a fix here?
I'm trying to add few merchants to Pokemon Emerald, that would sell Eggs to players.
I used information found in XSE help file and at a certain site detailing money commands .
I use Virtual Boy emulator, Advance Map 1.92 and XSE 1.1.1.
Code I produced:
Spoiler:
#dynamic 0xE3E04F
#org @start
lock
faceplayer
msgbox @greeting 0x6
msgbox @wantit 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @no 0x6
release
end
#org @yes
checkmoney 1500 0x0
compare 0x800D 0x1
if 0x4 goto @ok
msgbox @fail 0x6
release
end
#org @greeting
= Welcome to JOTHO EGGS MERCHANTS.
#org @no
= = All right then. \p I'm not going\nanywhere, but these EGGS are very\lpopular; they sell out quickly.\p\lMaybe my collegues have EGGS you\lwill find more interesting.
#org @wantit
= TOGEPI EGG for 1500[$]
#org @fail
= I'm sorry, you can't afford it. \n Come back when you have 1500[$].
#org @ok
= Thank you! I have more TOGEPI\nEGGS to sell. \p Also, don't\lforget to talk to my collegues.\l/p They have more rare EGGS from\lJOTHO!
paymoney 1500 0x0
giveegg 175
But its not working.
When compiled, its is changed to
Spoiler:
'---------------
#org 0xE3E04F
lock
faceplayer
msgbox 0x8E3E093 MSG_NORMAL '"Welcome to JOTHO EGGS MERCHANTS."
msgbox 0x8E3E158 MSG_YESNO '"g."
compare LASTRESULT 0x1
if 0x1 goto 0x8E3E077
msgbox 0x8E3E0B6 MSG_NORMAL '"All right then. \p I'm not going a..."
release
end
'---------------
#org 0xE3E077
checkmoney 0x5DC 0x0
compare LASTRESULT 0x1
if 0x4 goto 0x8E3E1C4
msgbox 0x8E3E181 MSG_NORMAL '"I'm sorry, you can't afford it. \n..."
release
end
'---------------
#org 0xE3E1C4
checkobedience 0xD5DC
bufferitems2 0xDF 0xED00 0xE9E3
spriteface2 0x0 0xFE
nop
cmdc3 0x0
fadescreen3 0xD5
'---------
' Strings
'---------
#org 0xE3E093
= Welcome to JOTHO EGGS MERCHANTS.
#org 0xE3E158
= g.
#org 0xE3E0B6
= All right then. \p I'm not going anywhere, \n but these EGGS are very popular; they\n sell out quickly.\p Maybe my collegues have \n EGGS you will find more interesting.
#org 0xE3E181
= I'm sorry, you can't afford it. \n Come back when you have 1500[$].
#org 0xE3E04F
lock
faceplayer
msgbox 0x8E3E093 MSG_NORMAL '"Welcome to JOTHO EGGS MERCHANTS."
msgbox 0x8E3E158 MSG_YESNO '"g."
compare LASTRESULT 0x1
if 0x1 goto 0x8E3E077
msgbox 0x8E3E0B6 MSG_NORMAL '"All right then. \p I'm not going a..."
release
end
'---------------
#org 0xE3E077
checkmoney 0x5DC 0x0
compare LASTRESULT 0x1
if 0x4 goto 0x8E3E1C4
msgbox 0x8E3E181 MSG_NORMAL '"I'm sorry, you can't afford it. \n..."
release
end
'---------------
#org 0xE3E1C4
checkobedience 0xD5DC
bufferitems2 0xDF 0xED00 0xE9E3
spriteface2 0x0 0xFE
nop
cmdc3 0x0
fadescreen3 0xD5
'---------
' Strings
'---------
#org 0xE3E093
= Welcome to JOTHO EGGS MERCHANTS.
#org 0xE3E158
= g.
#org 0xE3E0B6
= All right then. \p I'm not going anywhere, \n but these EGGS are very popular; they\n sell out quickly.\p Maybe my collegues have \n EGGS you will find more interesting.
#org 0xE3E181
= I'm sorry, you can't afford it. \n Come back when you have 1500[$].
So, first thing, text in yes/no question is changed to g. for some reason, and it even after I edit it, it still keeps changing to g. after script is compiled.
Yes/no works apart it, no puts appropriate messege, yes goes to money check.
If player can't afford it, it also works as intended- NPC says 'Come back when you have money.'
But if player got enough money, nothing happens- no money is substracted, no egg is given, and g. is stuck on screen.
I can't see what's wrong here (granted I'm not experience with XSE and my programming skills are low), so, please, anyone sees a fix here?