Here's a version of your script that will work:
Your issue stemmed these three lines in your original script:
Quote:
checkitem 0x167 0x1
compare LASTRESULT 0x6
if 0x1 goto 0x8290721
|
The checkitem command works by comparing the number of a specified item that you have to a chosen value (in this case, 0x1). If you have that many of the item or more, 0x800D is set to 0x1, if you have less, its set to 0x0. The compare line is then completely wrong, as 0x800D will never have 0x6 as a value from the previous command. This run on also breaks the if command as it will always be false, allowing the script to continue regardless as to whether you have the item or not.
Whenever you're making a script, I'd highly suggest that you use dynamic pointers. It ensures that you don't overwrite anything in the ROM by accident and if you're trying to get help here, its easier for others to follow the script's structure.