Spherical Ice

Age 21
Bristol, UK
Seen 4 Hours Ago
Posted 3 Weeks Ago
5,254 posts
11.9 Years
That script is pretty inefficient, here's the version I use in my hack, again for FireRed, with the stock progression identical to that of X/Y's:

#dynamic 0x800000
#include stditems.rbh

//---------------
#org @start
lock
faceplayer
special 0x187
compare LASTRESULT 0x2
if 0x1 goto @snippet1
preparemsg @string1 //"Hi, there!\nMay I help you?"
waitmsg
checkflag 0x824
if 0x1 goto @snippet2 // Fifth Badge
checkflag 0x823
if 0x1 goto @snippet3 // Fourth Badge
checkflag 0x822
if 0x1 goto @snippet4 // Third Badge
checkflag 0x821
if 0x1 goto @snippet5 // Second Badge
checkflag 0x820
if 0x1 goto @snippet6 // First Badge
goto @snippet7 // No Badges

//---------------
#org @snippet1
release
end

//---------------
#org @snippet2
pokemart @mart1
goto @snippet8

//---------------
#org @snippet3
pokemart @mart2
goto @snippet8

//---------------
#org @snippet4
pokemart @mart3
goto @snippet8

//---------------
#org @snippet5
pokemart @mart4
goto @snippet8

//---------------
#org @snippet6
pokemart @mart5
goto @snippet8

//---------------
#org @snippet7
pokemart @mart6
goto @snippet8

//---------------
#org @snippet8
msgbox @string2 MSG_KEEPOPEN //"Please come again!"
release
end


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

#org @string2
= Please come again!


//-----------
// MartItems
//-----------
#org @mart1 // 5 Badges
#raw word ITEM_POKEBALL
#raw word ITEM_GREATBALL
#raw word ITEM_ULTRABALL
#raw word ITEM_POTION
#raw word ITEM_SUPERPOTION
#raw word ITEM_HYPERPOTION
#raw word ITEM_MAXPOTION
#raw word ITEM_FULLRESTORE
#raw word ITEM_REVIVE
#raw word ITEM_ANTIDOTE
#raw word ITEM_PARLYZHEAL
#raw word ITEM_AWAKENING
#raw word ITEM_BURNHEAL
#raw word ITEM_ICEHEAL
#raw word ITEM_FULLHEAL
#raw word ITEM_ESCAPEROPE
#raw word ITEM_REPEL
#raw word ITEM_SUPERREPEL
#raw word ITEM_MAXREPEL
#raw word ITEM_NONE

#org @mart2 // 4 Badges
#raw word ITEM_POKEBALL
#raw word ITEM_GREATBALL
#raw word ITEM_ULTRABALL
#raw word ITEM_POTION
#raw word ITEM_SUPERPOTION
#raw word ITEM_HYPERPOTION
#raw word ITEM_MAXPOTION
#raw word ITEM_REVIVE
#raw word ITEM_ANTIDOTE
#raw word ITEM_PARLYZHEAL
#raw word ITEM_AWAKENING
#raw word ITEM_BURNHEAL
#raw word ITEM_ICEHEAL
#raw word ITEM_FULLHEAL
#raw word ITEM_ESCAPEROPE
#raw word ITEM_REPEL
#raw word ITEM_SUPERREPEL
#raw word ITEM_MAXREPEL
#raw word ITEM_NONE

#org @mart3 // 3 Badges
#raw word ITEM_POKEBALL
#raw word ITEM_GREATBALL
#raw word ITEM_ULTRABALL
#raw word ITEM_POTION
#raw word ITEM_SUPERPOTION
#raw word ITEM_HYPERPOTION
#raw word ITEM_REVIVE
#raw word ITEM_ANTIDOTE
#raw word ITEM_PARLYZHEAL
#raw word ITEM_AWAKENING
#raw word ITEM_BURNHEAL
#raw word ITEM_ICEHEAL
#raw word ITEM_FULLHEAL
#raw word ITEM_ESCAPEROPE
#raw word ITEM_REPEL
#raw word ITEM_SUPERREPEL
#raw word ITEM_MAXREPEL
#raw word ITEM_NONE

#org @mart4 // 2 Badges
#raw word ITEM_POKEBALL
#raw word ITEM_GREATBALL
#raw word ITEM_POTION
#raw word ITEM_SUPERPOTION
#raw word ITEM_HYPERPOTION
#raw word ITEM_REVIVE
#raw word ITEM_ANTIDOTE
#raw word ITEM_PARLYZHEAL
#raw word ITEM_AWAKENING
#raw word ITEM_BURNHEAL
#raw word ITEM_ICEHEAL
#raw word ITEM_ESCAPEROPE
#raw word ITEM_REPEL
#raw word ITEM_SUPERREPEL
#raw word ITEM_NONE

#org @mart5 // 1 Badge
#raw word ITEM_POKEBALL
#raw word ITEM_GREATBALL
#raw word ITEM_POTION
#raw word ITEM_SUPERPOTION
#raw word ITEM_ANTIDOTE
#raw word ITEM_PARLYZHEAL
#raw word ITEM_AWAKENING
#raw word ITEM_BURNHEAL
#raw word ITEM_ICEHEAL
#raw word ITEM_ESCAPEROPE
#raw word ITEM_REPEL
#raw word ITEM_NONE

#org @mart6 // No Badges
#raw word ITEM_POKEBALL
#raw word ITEM_POTION
#raw word ITEM_ANTIDOTE
#raw word ITEM_PARLYZHEAL
#raw word ITEM_AWAKENING
#raw word ITEM_REPEL
#raw word ITEM_NONE