Equipped amount: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
m Made the code sample more accurate. And documented!
imported>Bale
mNo edit summary
Line 5: Line 5:
FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Item Management|
second_category=Equipment|


function1={{Function|
function1={{Function|
Line 32: Line 30:
see_also={{SeeAlso|closet_amount|display_amount|item_amount|shop_amount|stash_amount|storage_amount}}|
see_also={{SeeAlso|closet_amount|display_amount|item_amount|shop_amount|stash_amount|storage_amount}}|
}}
}}
[[Category:Item Management]]|[[Category:Equipment]]

Revision as of 21:46, 21 May 2010

Function Syntax

int equipped_amount(item it )

  • it is the item that will be checked for among your worn gear.

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()

|