Chronosplit

I play for keeps!

Male
Seen August 5th, 2019
Posted May 7th, 2019
463 posts
8.7 Years
I don't think this has been done before, so I'm going to throw it out here to share. No need to credit me.

ROM: FireRed (US)

This is a PokeMart script that uses the Oak's Parcel variable to determine how many badges you have, and then it goes to a PokeMart item list based on that. Basically it results in a PokeMart acting just like in games where how many badges you have determines what normal PokeMarts will sell you.

Just insert where you want to compile the script, your items in the item lists at the Mart section, point any Mart you wish to where the script is, and you're ready to go!

Spoiler:
#dynamic 0x

#org @start
lock
faceplayer
compare 0x4057 0x0
if 0x1 goto @mart1
compare 0x4057 0x1
if 0x1 goto @mart2
compare 0x4057 0x2
if 0x1 goto @mart3
compare 0x4057 0x3
if 0x1 goto @mart4
compare 0x4057 0x4
if 0x1 goto @mart5
compare 0x4057 0x5
if 0x1 goto @mart6
release
end

#org @mart1
preparemsg @talk '"Hi, there!\nMay I help you?"
waitmsg
pokemart @items1
msgbox @talk2 MSG_KEEPOPEN '"Please come again!"
release
end

#org @mart2
preparemsg @talk '"Hi, there!\nMay I help you?"
waitmsg
pokemart @items2
msgbox @talk2 MSG_KEEPOPEN '"Please come again!"
release
end

#org @mart3
preparemsg @talk '"Hi, there!\nMay I help you?"
waitmsg
pokemart @items3
msgbox @talk2 MSG_KEEPOPEN '"Please come again!"
release
end

#org @mart4
preparemsg @talk '"Hi, there!\nMay I help you?"
waitmsg
pokemart @items4
msgbox @talk2 MSG_KEEPOPEN '"Please come again!"
release
end

#org @mart5
preparemsg @talk '"Hi, there!\nMay I help you?"
waitmsg
pokemart @items5
msgbox @talk2 MSG_KEEPOPEN '"Please come again!"
release
end

#org @mart6
preparemsg @talk '"Hi, there!\nMay I help you?"
waitmsg
pokemart @items6
msgbox @talk2 MSG_KEEPOPEN '"Please come again!"
release
end

'---------
' Strings
'---------
#org @talk
= Hi, there!\nMay I help you?

#org @talk2
= Please come again!


'-----------
' MartItems
'-----------
#org @items1


#org @items2


#org @items3


#org @items4


#org @items5


#org @items6