Equip
Function Syntax
boolean equip(item equip_me ,slot where )
boolean equip(slot where ,item equip_me )
- equip_me is the item to equip
- where is the slot to place the item in
boolean equip(item equip_me ,familiar fam )
boolean equip(familiar fam ,item equip_me )
- equip_me is the item to equip
- where is the familiar to equip the item on
Attempts to equip the item equip_me in the slot where if specified, and returns true if the operation was successful, and false if it was not. If parameter where is not specified, it defaults to the "standard" place for such an item (main-hand for 1-handed weapons, first open slot for accessories or acc1 if no slots are open).
- If where is specified and equip_me is set to $item[none], this function will unequip whatever is in slot where and return true.
- If where is not specified and equip_me is set to $item[none], the function aborts and you get a funky error because that makes no sense.
- If you cannot equip equip_me, or where is supplied and the item cannot be used in that slot, you will be given an error message and this function will return false.
- The overload for equipping a familiar with equip_me can be used to equip familiars with familiar equipment without requiring the familiar to be your currently active familiar. This will return false if you don't have (or can't use) the familiar or if the familiar can't equip the item you are attempting to equip.
Code Sample
Equips the Swashbuckling Getup carefully to ensure that the parrot is in the second accessory slot.
equip($item[eyepatch]);
equip($item[swashbuckling pants]);
equip($slot[acc2], $item[stuffed shoulder parrot]);
Code Sample
Equips the blue plate on the Shorter-Order Cook without switching to it first.
equip($familiar[shorter-order cook], $item[blue plate]);
CLI Equivalent
The CLI commands "equip" (and others, for specific slots) function similarly.