- 42
- Posts
- 3
- Years
- West Virginia
- Seen Feb 12, 2025
I'm having an issue with a scrolling multichoice script I was testing. It's using special 0x158 from CFRU and everything is configured correctly in the source files for scrolling multichoice. I realize that my script only has three choices but it should still work. This script is being used as a way of buying unique items. The game freezes on "What would you like to buy?" ![[PokeCommunity.com] Scrolling Multichoice Script Help [PokeCommunity.com] Scrolling Multichoice Script Help](https://data.pokecommunity.com/attachments/18/18265-0e686681f70a69c7eb201856c5884762.jpg)
What Am I doing wrong? Heres the script:
#dynamic 0x160000
#org @start
lock
faceplayer
msgbox @1 0x6
msgbox @2 MSG_KEEPOPEN
setvar 0x8000 0x2
setvar 0x8001 0x3
special 0x158
waitstate
compare LASTRESULT 0x7F
if 0x1 goto @cancelled
compare LASTRESULT 0x0
if 0x1 goto @firegem
compare LASTRESULT 0x1
if 0x1 goto @watergem
compare LASTRESULT 0x2
if 0x1 goto @grassgem
release
end
#org @firegem
checkmoney 0x3E8 0x0
compare LASTRESULT 0x0
if 0x1 goto @notenough
msgbox @firegembuy 0x5
compare LASTRESULT 0x0
if 0x1 goto @cancelled
paymoney 0x3E8 0x0
msgbox @receivegem 0x6
giveitem 0x219 0x1 MSG_OBTAIN
release
end
#org @watergem
checkmoney 0x3E8 0x0
compare LASTRESULT 0x0
if 0x1 goto @notenough
msgbox @watergembuy 0x5
compare LASTRESULT 0x0
if 0x1 goto @cancelled
paymoney 0x3E8 0x0
msgbox @receivegem 0x6
giveitem 0x21A 0x1 MSG_OBTAIN
release
end
#org @grassgem
checkmoney 0x3E8 0x0
compare LASTRESULT 0x0
if 0x1 goto @notenough
msgbox @grassgembuy 0x5
compare LASTRESULT 0x0
if 0x1 goto @cancelled
paymoney 0x3E8 0x0
msgbox @receivegem 0x6
giveitem 0x21B 0x1 MSG_OBTAIN
release
end
#org @notenough
msgbox @notenoughmoney 0x4
closeonkeypress
release
end
#org @cancelled
msgbox @3 0x4
closeonkeypress
release
end
#org @1
= [black_fr]Hi, I sell unique items that\nthe regular clerk doesn't sell.
#org @2
= [black_fr]What would you like to buy?
#org @3
= [black_fr]Please come again.
#org @receivegem
= [black_fr]Thank you for your purchase.
#org @firegembuy
= [black_fr]Would you like the Fire Gem?
#org @watergembuy
= [black_fr]Would you like the Water Gem?
#org @grassgembuy
= [black_fr]Would you like the Grass Gem?
#org @notenoughmoney
= [black_fr]Sorry, not enough money.
![[PokeCommunity.com] Scrolling Multichoice Script Help [PokeCommunity.com] Scrolling Multichoice Script Help](https://data.pokecommunity.com/attachments/18/18265-0e686681f70a69c7eb201856c5884762.jpg)
What Am I doing wrong? Heres the script:
#dynamic 0x160000
#org @start
lock
faceplayer
msgbox @1 0x6
msgbox @2 MSG_KEEPOPEN
setvar 0x8000 0x2
setvar 0x8001 0x3
special 0x158
waitstate
compare LASTRESULT 0x7F
if 0x1 goto @cancelled
compare LASTRESULT 0x0
if 0x1 goto @firegem
compare LASTRESULT 0x1
if 0x1 goto @watergem
compare LASTRESULT 0x2
if 0x1 goto @grassgem
release
end
#org @firegem
checkmoney 0x3E8 0x0
compare LASTRESULT 0x0
if 0x1 goto @notenough
msgbox @firegembuy 0x5
compare LASTRESULT 0x0
if 0x1 goto @cancelled
paymoney 0x3E8 0x0
msgbox @receivegem 0x6
giveitem 0x219 0x1 MSG_OBTAIN
release
end
#org @watergem
checkmoney 0x3E8 0x0
compare LASTRESULT 0x0
if 0x1 goto @notenough
msgbox @watergembuy 0x5
compare LASTRESULT 0x0
if 0x1 goto @cancelled
paymoney 0x3E8 0x0
msgbox @receivegem 0x6
giveitem 0x21A 0x1 MSG_OBTAIN
release
end
#org @grassgem
checkmoney 0x3E8 0x0
compare LASTRESULT 0x0
if 0x1 goto @notenough
msgbox @grassgembuy 0x5
compare LASTRESULT 0x0
if 0x1 goto @cancelled
paymoney 0x3E8 0x0
msgbox @receivegem 0x6
giveitem 0x21B 0x1 MSG_OBTAIN
release
end
#org @notenough
msgbox @notenoughmoney 0x4
closeonkeypress
release
end
#org @cancelled
msgbox @3 0x4
closeonkeypress
release
end
#org @1
= [black_fr]Hi, I sell unique items that\nthe regular clerk doesn't sell.
#org @2
= [black_fr]What would you like to buy?
#org @3
= [black_fr]Please come again.
#org @receivegem
= [black_fr]Thank you for your purchase.
#org @firegembuy
= [black_fr]Would you like the Fire Gem?
#org @watergembuy
= [black_fr]Would you like the Water Gem?
#org @grassgembuy
= [black_fr]Would you like the Grass Gem?
#org @notenoughmoney
= [black_fr]Sorry, not enough money.