Equipment: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
No edit summary
 
imported>Fredg1
→‎Equipment Commands: equipped_amount()
 
(48 intermediate revisions by 23 users not shown)
Line 1: Line 1:
{{TOCright}}
==Equipment Commands==
{{Flink|boolean|equip|{{opt|slot}}|item|desc=Equips the specified item and reports success.}}
{{Flink|item|equipped_item|slot|desc=Returns the item equipped in the specified slot.}}
{{Flink|boolean|have_equipped|item|desc=Reports if the specified item is currently equipped by your character.}}
{{Flink|int|equipped_amount|item|desc=Returns the amount of a given item currently equipped on your character.}}
{{Flink|boolean|can_equip|item|desc=Tells if you meet the requirements for equipping the given item (regardless of its availability).}}
{{Flink|int|weapon_hands|item|desc=Reports how many weapon-hand slots are required for a given item (0 - 2). Off-hand items return 0.}}
{{Flink|stat|weapon_type|item|desc=Returns the equip requirement stat for the specified item. If it is not a weapon, this function returns $stat[none].}}
{{Flink|boolean|have_familiar|familiar|desc=Reports on whether you have the specified familiar either in your Terrarium or equipped.}}
{{Flink|boolean|use_familiar|familiar|desc=Attempts to make the specified familiar your currently used one and reports success.}}
{{Flink|item|familiar_equipment|familiar|desc=Reports the most commonly associated familiar equipment for the specified familiar.}}
{{Flink|item|familiar_equipped_equipment|familiar|desc=Returns the item currently equipped on the specified familiar (or $item[none] if you don't have that familiar).}}
{{Flink|boolean|enthrone_familiar|familiar|desc=Enthrones the specified familiar.}}
{{Flink|familiar|my_enthroned_familiar|desc=Returns the familiar currently enthroned.}}
{{Flink|boolean|bjornify_familiar|familiar|desc=Bjornifies the specified familiar.}}
{{Flink|familiar|my_bjorned_familiar|desc=Returns the familiar currently in the Buddy Bjorn.}}
{{Flink|boolean|maximize|string|boolean}}
{{Flink|boolean|maximize|string|int|int|boolean|desc=Checks for and optionally equips the optimal gear for any given parameters.}}


Part 3 - Equipment
==Outfit Commands==
{{Flink|boolean|have_outfit|string|desc=Reports on whether or not you're currently capable of equipping the specified (in-game or custom) outfit, based on your stats & inventory availability of all outfit pieces.}}
{{Flink|boolean|outfit|string|desc=Attempts to wear the specified outfit and reports success.}}
{{Flink|item [int]|outfit_pieces|string|desc=Returns an array of the items which compose an outfit.}}
{{Flink|boolean|is_wearing_outfit|string|desc=Reports on whether or not you're wearing the specified (in-game or custom) outfit.}}
{{Flink|string [int]|get_outfits|desc=This function returns a  list of all KoL outfits that the character currently owns and can wear.}}
{{Flink|string [int]|get_custom_outfits|desc=This function returns a  list of all currently defined custom outfits.}}


Time to get dressed!
[[Category:Scripting]]
 
boolean equip( item it )
Puts on the specified item in the “natural” slot. For example, it won’t equip a weapon to the off-hand and it will only put a accessory into an empty slot.
 
boolean unequip( item it )
Takes off one of the specified item.
 
boolean equip_slot( slot sl, item it )
boolean unequip_slot( slot sl )
Equipment management that targets a specific slot.
 
slot item_to_slot( item it )
Returns the natural slot for the item, if it is equippable.
 
item current_equipment( slot sl )
Returns the item currently equipped in the given slot.
Sample:Battlefield_gather
 
boolean have_equipped( item it )
Tells you if the specified item is currently equipped (as it would not otherwise show up in item_amount()).
 
boolean can_equip( item it )
Tells you if you meet the requirements to equip the given item (regardless of whether you own it).
 
string weapon_type( item )
Returns a string indicating the type of weapon which was passed as a parameter.
 
int weapon_hands( item it )
Tells you if a weapon will keep you from using your off-hand slot. Even if a weapon is described as being 3-handed, this function will return 2.
Sample:Battlefield_gather
 
boolean ranged_weapon( item it )
Tells you if a weapon’s chance of hitting the opponent is based on your Moxie instead of your Muscle.
 
boolean have_familiar( familiar pet )
Tells you if you have placed the specified familiar in your Terrarium (or have it equipped now).
 
boolean equip_familiar( familiar pet )
Takes the specified familiar out of your Terrarium. Use equip() and unequip() to manage your familiar’s gear.
 
item familiar_equipment( familiar pet )
Returns the most common piece of equipment that is specially designed for the familiar’s type. If you want to find out what item is being equipped by your familiar of a specific species, then you would need to take that familiar out of the Terrarium with equip_familiar() and then check current_equipment( $slot[ familiar ]).
 
boolean have_outfit( string outfit_name )
Lets you know if you could wear a specified outfit right now, either an in-game or a custom outfit. A false result means either that you are missing one or more pieces of the outfit or that your stats are not high enough to equip all of the pieces.
Sample:Seltzer
 
boolean outfit( string outfit_name )
Wears the specified outfit.
Sample:Battlefield_gather

Latest revision as of 21:37, 31 July 2020

Equipment Commands

boolean equip( [slot], item )

Equips the specified item and reports success.

item equipped_item( slot )

Returns the item equipped in the specified slot.

boolean have_equipped( item )

Reports if the specified item is currently equipped by your character.

int equipped_amount( item )

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

boolean can_equip( item )

Tells if you meet the requirements for equipping the given item (regardless of its availability).

int weapon_hands( item )

Reports how many weapon-hand slots are required for a given item (0 - 2). Off-hand items return 0.

stat weapon_type( item )

Returns the equip requirement stat for the specified item. If it is not a weapon, this function returns $stat[none].

boolean have_familiar( familiar )

Reports on whether you have the specified familiar either in your Terrarium or equipped.

boolean use_familiar( familiar )

Attempts to make the specified familiar your currently used one and reports success.

item familiar_equipment( familiar )

Reports the most commonly associated familiar equipment for the specified familiar.

item familiar_equipped_equipment( familiar )

Returns the item currently equipped on the specified familiar (or $item[none] if you don't have that familiar).

boolean enthrone_familiar( familiar )

Enthrones the specified familiar.

familiar my_enthroned_familiar()

Returns the familiar currently enthroned.

boolean bjornify_familiar( familiar )

Bjornifies the specified familiar.

familiar my_bjorned_familiar()

Returns the familiar currently in the Buddy Bjorn.

boolean maximize( string, boolean )

boolean maximize( string, int, int, boolean )

Checks for and optionally equips the optimal gear for any given parameters.


Outfit Commands

boolean have_outfit( string )

Reports on whether or not you're currently capable of equipping the specified (in-game or custom) outfit, based on your stats & inventory availability of all outfit pieces.

boolean outfit( string )

Attempts to wear the specified outfit and reports success.

item [int] outfit_pieces( string )

Returns an array of the items which compose an outfit.

boolean is_wearing_outfit( string )

Reports on whether or not you're wearing the specified (in-game or custom) outfit.

string [int] get_outfits()

This function returns a list of all KoL outfits that the character currently owns and can wear.

string [int] get_custom_outfits()

This function returns a list of all currently defined custom outfits.