Equipped amount

From Kolmafia
Revision as of 08:56, 24 March 2023 by Ryo Sangnoir (talk | contribs) (add boolean)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

int equipped_amount(item it )

int equipped_amount(item it ,boolean includeAllFamiliars )

  • it is the item that will be checked for among your worn gear.
  • includeAllFamiliars is whether you want to check the familiars in your terrarium in addition to your current familiar.

Returns the amount of a given item currently equipped on your character.

Code Sample

Checks if you're safe to chat.

if (equipped_amount($item[sword behind inappropriate prepositions]) == 1 && have_effect($effect[Wanged]) == 0)
// Sword doesn't fire if you have this particular effect.
   abort("You aren't safe to chat!");

See Also

closet_amount() | display_amount() | item_amount() | shop_amount() | stash_amount() | storage_amount()