Item: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
Oops.
imported>Fredg1
→‎Proxy Record Fields: proxy record: name
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
#REDIRECT [[Datatype_Constants#.24item.5Bconstant.5D]]
{{DISPLAYTITLE:item}}
 
{{TOCright}}
 
This datatype represents any item in all of KoL. Note that unlike most special datatypes,
item references can make use of the item ID number.
{{CodeSample|
description=For example, you could assign the item plexiglass pants as follows:|
code=
<syntaxhighlight>
item it = $item[ 1234 ];
</syntaxhighlight>}}
The full range, besides $item[ none ], is too much to list and keep up with here.  
Please see the Wiki {{kolwiki|Items}} page for more item information.
 
==Related Functions==
 
{{Flink|void|add_item_condition|int|item}}
{{Flink|boolean|autosell|int|item}}
{{Flink|int|autosell_price|item}}
{{Flink|int|available_amount|item}}
{{Flink|boolean|boolean_modifier|item|string}}
{{Flink|boolean|buy|{{opt|coinmaster}}|int|item}}
{{Flink|int|buy|int|item|int}}
{{Flink|int|buy_price|coinmaster|item}}
{{Flink|boolean|buy_using_storage|int|item}}
{{Flink|int|buy_using_storage|int|item|int}}
{{Flink|boolean|buys_item|coinmaster|item}}
{{Flink|boolean|can_equip|item}}
{{Flink|boolean|chew|int|item}}
{{Flink|class|class_modifier|item|string}}
{{Flink|int|closet_amount|item}}
{{Flink|boolean|craft|string|int|item|item}}
{{Flink|string|craft_type|item}}
{{Flink|int|creatable_amount|item}}
{{Flink|int|creatable_turns|{{opt|item}}|{{opt|int}}|{{opt|boolean}}}}
{{Flink|boolean|create|int|item}}
{{Flink|item|daily_special}}
{{Flink|int|display_amount|item}}
{{Flink|boolean|drink|int|item}}
{{Flink|boolean|eat|int|item}}
{{Flink|boolean|eatsilent|int|item}}
{{Flink|effect|effect_modifier|item|string}}
{{Flink|boolean|equip|{{opt|slot}}|item}}
{{Flink|int|equipped_amount|item}}
{{Flink|item|equipped_item|slot}}
{{Flink|int [item]|extract_items|string}}
{{Flink|item|familiar_equipment|familiar}}
{{Flink|item|familiar_equipped_equipment|familiar}}
{{Flink|int [item]|get_campground}}
{{Flink|int [item]|get_chateau}}
{{Flink|int [item]|get_clan_lounge}}
{{Flink|item|get_dwelling}}
{{Flink|int [item]|get_ingredients|item}}
{{Flink|int [item]|get_inventory}}
{{Flink|int|get_power|item}}
{{Flink|int [item]|get_related|item|string}}
{{Flink|int [item]|get_shop}}
{{Flink|boolean|have_equipped|item}}
{{Flink|boolean|hermit|int|item}}
{{Flink|float|historical_age|item}}
{{Flink|int|historical_price|item}}
{{Flink|boolean|is_coinmaster_item|item}}
{{Flink|boolean|is_discardable|item}}
{{Flink|boolean|is_displayable|item}}
{{Flink|boolean|is_giftable|item}}
{{Flink|boolean|is_goal|item}}
{{Flink|boolean|is_npc_item|item}}
{{Flink|boolean|is_tradeable|item}}
{{Flink|boolean|is_trendy|item/familiar/skill/string}}
{{Flink|boolean|is_unrestricted|item/familiar/skill/string}}
{{Flink|int|item_amount|item}}
{{Flink|float|item_drop_modifier}}
{{Flink|int [item]|item_drops|{{opt|monster}}}}
{{Flink|record [int]|item_drops_array|{{opt|monster}}}}
{{Flink|string|item_type|item}}
{{Flink|string|last_item_message}}
{{Flink|int|mall_price|item}}
{{Flink|item|minstrel_instrument}}
{{Flink|int|npc_price|item}}
{{Flink|float|numeric_modifier|item|string}}
{{Flink|float|numeric_modifier|familiar|string|int|item}}
{{Flink|item [int]|outfit_pieces|string}}
{{Flink|boolean|overdrink|int|item}}
{{Flink|boolean|put_closet|int|{{opt|item}}}}
{{Flink|boolean|put_display|int|item}}
{{Flink|boolean|put_shop|int|int|{{opt|int}}|item}}
{{Flink|boolean|put_stash|int|item}}
{{Flink|void|remove_item_condition|int|item}}
{{Flink|boolean|retrieve_item|int|item}}
{{Flink|boolean|sell|coinmaster|int|item}}
{{Flink|int|sell_price|coinmaster|item}}
{{Flink|boolean|sells_item|coinmaster|item}}
{{Flink|int|shop_amount|item}}
{{Flink|int|shop_price|item}}
{{Flink|int|stash_amount|item}}
{{Flink|int|storage_amount|item}}
{{Flink|boolean|take_closet|int|{{opt|item}}}}
{{Flink|boolean|take_display|int|item}}
{{Flink|boolean|take_shop|{{opt|int}}|item}}
{{Flink|boolean|take_stash|int|item}}
{{Flink|boolean|take_storage|int|item}}
{{Flink|buffer|throw_item|item}}
{{Flink|buffer|throw_items|item|item}}
{{Flink|item|to_item|strict_string}}
{{Flink|item|to_item|int}}
{{Flink|item|to_item|string|int}}
{{Flink|string|to_plural|item}}
{{Flink|slot|to_slot|item}}
{{Flink|boolean|use|int|item}}
{{Flink|int|weapon_hands|item}}
{{Flink|stat|weapon_type|item}}
 
==Proxy Record Fields==
 
Here are the proxy record fields for items. Proxy records are discussed in more detail [[Proxy Records|here]].
 
{| cellpadding="3" cellspacing="0" border="1px" class="sortable"
|- | style="background-color: #F2F2F2"
|-
! Field
! Data type
! Default value
! ASH Accessor Function / Notes
|-
| name
| string
| ""
|
|-
| plural
| string
| ""
|
|-
| descid
| string
| ""
|
|-
| image
| string
| ""
|
|-
| smallimage
| string
| ""
|
|-
| levelreq
| int
| 0
|
|-
| quality
| string
| ""
|
|-
| adventures
| string
| ""
|
|-
| muscle
| string
| ""
|
|-
| mysticality
| string
| ""
|
|-
| moxie
| string
| ""
|
|-
| fullness
| int
| 0
|
|-
| inebriety
| int
| 0
|
|-
| spleen
| int
| 0
|
|-
| minhp
| int
| 0
|
|-
| maxhp
| int
| 0
|
|-
| minmp
| int
| 0
|
|-
| maxmp
| int
| 0
|
|-
| dailyusesleft
| int
| 0
|
|-
| notes
| string
| ""
|
|-
| quest
| boolean
| false
|
|-
| gift
| boolean
| false
|
|-
| tradeable
| boolean
| false
|
|-
| discardable
| boolean
| false
|
|-
| combat
| boolean
| false
|
|-
| combat_reusable
| boolean
| false
|
|-
| usable
| boolean
| false
|
|-
| reusable
| boolean
| false
|
|-
| multi
| boolean
| false
|
|-
| fancy
| boolean
| false
|
|-
| candy
| boolean
| false
|
|-
| seller
| coinmaster
| none
|
|-
| buyer
| coinmaster
| none
|
|-
| name_length
| int
| 0
|
|}
 
 
[[Category:Scripting]] [[Category:Data Types]]

Latest revision as of 04:45, 14 August 2020


This datatype represents any item in all of KoL. Note that unlike most special datatypes, item references can make use of the item ID number.

For example, you could assign the item plexiglass pants as follows:

item it = $item[ 1234 ];

The full range, besides $item[ none ], is too much to list and keep up with here. Please see the Wiki Items page for more item information.

Related Functions

void add_item_condition( int, item )

boolean autosell( int, item )

int autosell_price( item )

int available_amount( item )

boolean boolean_modifier( item, string )

boolean buy( [coinmaster], int, item )

int buy( int, item, int )

int buy_price( coinmaster, item )

boolean buy_using_storage( int, item )

int buy_using_storage( int, item, int )

boolean buys_item( coinmaster, item )

boolean can_equip( item )

boolean chew( int, item )

class class_modifier( item, string )

int closet_amount( item )

boolean craft( string, int, item, item )

string craft_type( item )

int creatable_amount( item )

int creatable_turns( [item], [int], [boolean] )

boolean create( int, item )

item daily_special()

int display_amount( item )

boolean drink( int, item )

boolean eat( int, item )

boolean eatsilent( int, item )

effect effect_modifier( item, string )

boolean equip( [slot], item )

int equipped_amount( item )

item equipped_item( slot )

int [item] extract_items( string )

item familiar_equipment( familiar )

item familiar_equipped_equipment( familiar )

int [item] get_campground()

int [item] get_chateau()

int [item] get_clan_lounge()

item get_dwelling()

int [item] get_ingredients( item )

int [item] get_inventory()

int get_power( item )

int [item] get_related( item, string )

int [item] get_shop()

boolean have_equipped( item )

boolean hermit( int, item )

float historical_age( item )

int historical_price( item )

boolean is_coinmaster_item( item )

boolean is_discardable( item )

boolean is_displayable( item )

boolean is_giftable( item )

boolean is_goal( item )

boolean is_npc_item( item )

boolean is_tradeable( item )

boolean is_trendy( item/familiar/skill/string )

boolean is_unrestricted( item/familiar/skill/string )

int item_amount( item )

float item_drop_modifier()

int [item] item_drops( [monster] )

record [int] item_drops_array( [monster] )

string item_type( item )

string last_item_message()

int mall_price( item )

item minstrel_instrument()

int npc_price( item )

float numeric_modifier( item, string )

float numeric_modifier( familiar, string, int, item )

item [int] outfit_pieces( string )

boolean overdrink( int, item )

boolean put_closet( int, [item] )

boolean put_display( int, item )

boolean put_shop( int, int, [int], item )

boolean put_stash( int, item )

void remove_item_condition( int, item )

boolean retrieve_item( int, item )

boolean sell( coinmaster, int, item )

int sell_price( coinmaster, item )

boolean sells_item( coinmaster, item )

int shop_amount( item )

int shop_price( item )

int stash_amount( item )

int storage_amount( item )

boolean take_closet( int, [item] )

boolean take_display( int, item )

boolean take_shop( [int], item )

boolean take_stash( int, item )

boolean take_storage( int, item )

buffer throw_item( item )

buffer throw_items( item, item )

item to_item( strict_string )

item to_item( int )

item to_item( string, int )

string to_plural( item )

slot to_slot( item )

boolean use( int, item )

int weapon_hands( item )

stat weapon_type( item )


Proxy Record Fields

Here are the proxy record fields for items. Proxy records are discussed in more detail here.

Field Data type Default value ASH Accessor Function / Notes
name string ""
plural string ""
descid string ""
image string ""
smallimage string ""
levelreq int 0
quality string ""
adventures string ""
muscle string ""
mysticality string ""
moxie string ""
fullness int 0
inebriety int 0
spleen int 0
minhp int 0
maxhp int 0
minmp int 0
maxmp int 0
dailyusesleft int 0
notes string ""
quest boolean false
gift boolean false
tradeable boolean false
discardable boolean false
combat boolean false
combat_reusable boolean false
usable boolean false
reusable boolean false
multi boolean false
fancy boolean false
candy boolean false
seller coinmaster none
buyer coinmaster none
name_length int 0