PeregrineFig
Starting Pokémon Obsidian
- 202
- Posts
- 15
- Years
- Michigan, USA
- Seen Feb 22, 2011
For pokemart, use the command pokemart (offset or dynamic label) where you want the shop to open, and after the rest of the script add a string with the offset or label you used above. Under that, use #raw word 0x(hex of item index number) to have the item in the shop. Number of items is just based on how many you put in, and price is stored in the item itself, so to edit that you need to change the item around. At the end of the items, add #raw word 0x0 to end the mart. This is a sample script of a pokemart, it has 2 mart strings though because one of them doesn't sell pokeballs for an early part of the game. It should still show you how it works, though.
'---------------
#org 0x7447AB
lock
faceplayer
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x87447F7
checkflag 0x201
if 0x1 goto 0x87447E1
preparemsg 0x87447FA '"Hi, there!\nMay I help you?"
waitmsg
pokemart 0x874482C
msgbox 0x8744817 MSG_KEEPOPEN '"Please come again!"
release
end
'---------------
#org 0x7447F7
release
end
'---------------
#org 0x7447E1
preparemsg 0x87447FA '"Hi, there!\nMay I help you?"
waitmsg
pokemart 0x8744835
msgbox 0x8744817 MSG_KEEPOPEN '"Please come again!"
release
end
'---------
' Strings
'---------
#org 0x7447FA
= Hi, there!\nMay I help you?
#org 0x744817
= Please come again!
'-----------
' MartItems
'-----------
#org 0x74482C
#raw word 0xD
#raw word 0xE
#raw word 0x12
#raw word 0x0
#org 0x744835
#raw word 0x4
#raw word 0xD
#raw word 0xE
#raw word 0x12
#raw word 0x0
No there isn't, and I don't see why you'd want it to remain compiled. The compilation puts the script into hex form, so leaving it compiled would give you a hex string. If you mean it removes the dynamic labels, either save your scripts in dynamic form for easy editing later, or manually delete the offsets and type in dynamic labels.
Spoiler:
'---------------
#org 0x7447AB
lock
faceplayer
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x87447F7
checkflag 0x201
if 0x1 goto 0x87447E1
preparemsg 0x87447FA '"Hi, there!\nMay I help you?"
waitmsg
pokemart 0x874482C
msgbox 0x8744817 MSG_KEEPOPEN '"Please come again!"
release
end
'---------------
#org 0x7447F7
release
end
'---------------
#org 0x7447E1
preparemsg 0x87447FA '"Hi, there!\nMay I help you?"
waitmsg
pokemart 0x8744835
msgbox 0x8744817 MSG_KEEPOPEN '"Please come again!"
release
end
'---------
' Strings
'---------
#org 0x7447FA
= Hi, there!\nMay I help you?
#org 0x744817
= Please come again!
'-----------
' MartItems
'-----------
#org 0x74482C
#raw word 0xD
#raw word 0xE
#raw word 0x12
#raw word 0x0
#org 0x744835
#raw word 0x4
#raw word 0xD
#raw word 0xE
#raw word 0x12
#raw word 0x0
hi again, is there a way to turn off auto-decompilation or something? because everytime i open a script, it is already de-compiled (even if i didn't click the button)
No there isn't, and I don't see why you'd want it to remain compiled. The compilation puts the script into hex form, so leaving it compiled would give you a hex string. If you mean it removes the dynamic labels, either save your scripts in dynamic form for easy editing later, or manually delete the offsets and type in dynamic labels.
Last edited: