Scripting

From ZeldaHacking Wiki
Jump to: navigation, search

Useful functions

In addition to the standard scripting opcodes, you can use these functions with the "asm15" opcode for more useful effects.

Function name Address Description
loseTreasure $1733 Analogous to the "giveitem" opcode. See constants/treasure.s for what parameters to give.
removeRupeeValue $1778 Removes some rupees based on the parameter. See the Rupee value table.
blossom_checkHasRupees $4ffb Checks whether Link has a certain number of rupees. Writes 0 to var3c if he has at least that many, or 1 otherwise.

See the Rupee value table.

Example

This will cause Link to lose his seed shooter:

asm15 loseTreasure TREASURE_SHOOTER

If you're using ZOSE, you won't have the benefit of labels and constant definitions. This is equivalent:

asm15 1733 0f