Proxy Records: Difference between revisions
Jump to navigation
Jump to search
imported>Gnocchi masala m Refreshed output of code samples. |
imported>Bale update |
||
Line 40: | Line 40: | ||
discardable => true | discardable => true | ||
combat => false | combat => false | ||
combat_reusable => false | |||
usable => true | |||
reusable => false | reusable => false | ||
multi => true | multi => true | ||
fancy => false | fancy => false | ||
Line 55: | Line 56: | ||
item => Game Grid ticket | item => Game Grid ticket | ||
property => | property => | ||
available_tokens => | available_tokens => 0 | ||
buys => false | buys => false | ||
sells => true | sells => true | ||
Line 68: | Line 69: | ||
environment => outdoor | environment => outdoor | ||
bounty => burned-out arcanodiode | bounty => burned-out arcanodiode | ||
combat_queue => | combat_queue => MagiMechTech MechaMech; Quiet Healer; MagiMechTech MechaMech; MagiMechTech MechaMech; lobsterfrogman | ||
noncombat_queue => | noncombat_queue => Random Lack of an Encounter; Random Lack of an Encounter; F-F-Fantastic!; Rainy Fax Dreams on your Wedding Day; Rainy Fax Dreams on your Wedding Day | ||
turns_spent => 30 | |||
kisses => 0 | kisses => 0 | ||
recommended_stat => 90 | |||
water_level => 2 | |||
> ash $skill[empathy of the newt] | > ash $skill[empathy of the newt] | ||
Line 123: | Line 91: | ||
permable => true | permable => true | ||
dailylimit => -1 | dailylimit => -1 | ||
timescast => | timescast => 1 | ||
> ash $familiar[slimeling] | > ash $familiar[slimeling] | ||
Line 137: | Line 105: | ||
Returned: black widow | Returned: black widow | ||
base_hp => | base_hp => 257 | ||
base_attack => | base_attack => 268 | ||
base_defense => | base_defense => 246 | ||
raw_hp => 121 | raw_hp => 121 | ||
raw_attack => 132 | raw_attack => 132 | ||
raw_defense => 110 | raw_defense => 110 | ||
base_initiative => | base_initiative => 430 | ||
raw_initiative => 50 | raw_initiative => 50 | ||
attack_element => none | attack_element => none | ||
Line 150: | Line 118: | ||
min_meat => 40 | min_meat => 40 | ||
max_meat => 60 | max_meat => 60 | ||
base_mainstat_exp => | base_mainstat_exp => 56.16666666666667 | ||
phylum => bug | phylum => bug | ||
poison => Really Quite Poisoned | poison => Really Quite Poisoned | ||
boss => false | boss => false | ||
image => blackwidow.gif | image => blackwidow.gif | ||
attributes => Atk: 132 Def: 110 HP: 121 Init: 50 Meat: 50 "Really Quite Poisoned" P: bug | |||
> ash $effect[sugar rush] | > ash $effect[sugar rush] | ||
Line 171: | Line 140: | ||
image => http://images.kingdomofloathing.com/itemimages/hoppedup.gif | image => http://images.kingdomofloathing.com/itemimages/hoppedup.gif | ||
descid => 83695b70e0470a36125feca3198a16b4 | descid => 83695b70e0470a36125feca3198a16b4 | ||
> ash $thrall[Spice Ghost] | |||
Returned: Spice Ghost | |||
id => 7 | |||
name => | |||
level => 0 | |||
image => spiceghost.gif | |||
tinyimage => t_spiceghost.gif | |||
skill => Bind Spice Ghost | |||
current_modifiers => | |||
</pre> | </pre> | ||
[[Category:Scripting]] | [[Category:Scripting]] |
Revision as of 06:20, 4 November 2014
Proxy Records is a way for KoLmafia to pass additional information to the scripter. Many datatypes contain these proxy records. such as items, skills, effects, monsters and coinmasters. This information is referred to as proxy records because the manner of reference is similar to a field of a record.
This is an example of how to retrieve proxy record information in a script. Notice it uses the same notation as if the item datatype is a record.
item it = $item[coffee pixie stick];
print("You can buy a "+ it +" at the "+ it.seller);
print("It will consume "+ it.spleen +" spleen and give "+ it.adventures +" adventures.");
Here's an example of displaying a proxy record in the CLI. Note that it displays all fields associated with that datatype.
> ash $item[coffee pixie stick] Returned: coffee pixie stick plural => coffee pixie sticks descid => 936288573 image => cpstick.gif smallimage => cpstick.gif levelreq => 4 quality => adventures => 5-10 muscle => 0 mysticality => 0 moxie => 0 fullness => 0 inebriety => 0 spleen => 4 minhp => 0 maxhp => 0 minmp => 0 maxmp => 0 dailyusesleft => 0 notes => quest => false gift => false tradeable => false discardable => true combat => false combat_reusable => false usable => true reusable => false multi => true fancy => false candy => false seller => Arcade Ticket Counter buyer => none name_length => 18 > ash $coinmaster[Arcade Ticket Counter] Returned: Arcade Ticket Counter token => ticket item => Game Grid ticket property => available_tokens => 0 buys => false sells => true > ash $location[The Penultimate Fantasy Airship] Returned: The Penultimate Fantasy Airship nocombats => false zone => Beanstalk parent => Beanstalk parentdesc => Above the Beanstalk environment => outdoor bounty => burned-out arcanodiode combat_queue => MagiMechTech MechaMech; Quiet Healer; MagiMechTech MechaMech; MagiMechTech MechaMech; lobsterfrogman noncombat_queue => Random Lack of an Encounter; Random Lack of an Encounter; F-F-Fantastic!; Rainy Fax Dreams on your Wedding Day; Rainy Fax Dreams on your Wedding Day turns_spent => 30 kisses => 0 recommended_stat => 90 water_level => 2 > ash $skill[empathy of the newt] Returned: Empathy of the Newt level => 8 image => empathy.gif traincost => 3250 class => Turtle Tamer libram => false passive => false buff => true combat => false song => false expression => false permable => true dailylimit => -1 timescast => 1 > ash $familiar[slimeling] Returned: Slimeling combat => true hatchling => squirming Slime larva image => slimeling.gif name => Princess Vina charges => 0 > ash $monster[black widow] Returned: black widow base_hp => 257 base_attack => 268 base_defense => 246 raw_hp => 121 raw_attack => 132 raw_defense => 110 base_initiative => 430 raw_initiative => 50 attack_element => none defense_element => none physical_resistance => 0 min_meat => 40 max_meat => 60 base_mainstat_exp => 56.16666666666667 phylum => bug poison => Really Quite Poisoned boss => false image => blackwidow.gif attributes => Atk: 132 Def: 110 HP: 121 Init: 50 Meat: 50 "Really Quite Poisoned" P: bug > ash $effect[sugar rush] Returned: Sugar Rush default => use either 1 Angry Farmer candy, 1 Tasty Fun Good rice candy, 1 Crimbo candied pecan, Crimbo fudge, Crimbo peppermint bark, 1 Breath mint, 1 that gum you like note => all => aggregate boolean [string] use 1 Angry Farmer candy => true use 1 Tasty Fun Good rice candy => true use 1 Crimbo candied pecan => true use Crimbo fudge => true use Crimbo peppermint bark => true use 1 Breath mint => true use 1 that gum you like => true image => http://images.kingdomofloathing.com/itemimages/hoppedup.gif descid => 83695b70e0470a36125feca3198a16b4 > ash $thrall[Spice Ghost] Returned: Spice Ghost id => 7 name => level => 0 image => spiceghost.gif tinyimage => t_spiceghost.gif skill => Bind Spice Ghost current_modifiers =>