Proxy Records: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
added bounty proxy information in r9881
imported>Gnocchi masala
m Refreshed output of code samples.
Line 19: Line 19:
descid => 936288573
descid => 936288573
image => cpstick.gif
image => cpstick.gif
smallimage => cpstick.gif
levelreq => 4
levelreq => 4
quality =>
quality =>
Line 28: Line 29:
inebriety => 0
inebriety => 0
spleen => 4
spleen => 4
minhp => 0
maxhp => 0
minmp => 0
maxmp => 0
dailyusesleft => 0
notes =>
notes =>
quest => false
gift => false
tradeable => false
discardable => true
combat => false
combat => false
reusable => false
reusable => false
usable => false
usable => true
multi => true
multi => true
bounty => none
fancy => false
bounty_count => 0
candy => false
seller => Arcade Ticket Counter
seller => Arcade Ticket Counter
buyer => none
buyer => none
name_length => 18


> ash $coinmaster[Arcade Ticket Counter]
> ash $coinmaster[Arcade Ticket Counter]
Line 44: Line 55:
item => Game Grid ticket
item => Game Grid ticket
property =>
property =>
available_tokens => 0
available_tokens => 13
buys => false
buys => false
sells => true
sells => true


> ash $location[Fantasy Airship]
> ash $location[The Penultimate Fantasy Airship]


Returned: Fantasy Airship
Returned: The Penultimate Fantasy Airship
nocombats => false
nocombats => false
zone => Beanstalk
zone => Beanstalk
parent => Plains
parent => Beanstalk
parentdesc => Nearby Plains
parentdesc => Above the Beanstalk
environment => outdoor
bounty => burned-out arcanodiode
bounty => burned-out arcanodiode
combat_queue => Irritating Series of Random Encounters; Quiet Healer; Irritating Series of Random Encounters; Burly Sidekick; Protagonist
noncombat_queue => Rip Rop Wrappety Do; F-F-Fantastic!; The Super Secret Canadian Mind-Control Device; The Super Secret Canadian Mind-Control Device; The Super Secret Canadian Mind-Control Device
kisses => 0


> ash $item[burned-out arcanodiode]
> ash $item[burned-out arcanodiode]
Line 63: Line 78:
descid => 207784873
descid => 207784873
image => diode.gif
image => diode.gif
smallimage => diode.gif
levelreq => 0
levelreq => 0
quality =>
quality =>
Line 72: Line 88:
inebriety => 0
inebriety => 0
spleen => 0
spleen => 0
minhp => 0
maxhp => 0
minmp => 0
maxmp => 0
dailyusesleft => 0
notes =>
notes =>
quest => true
gift => false
tradeable => false
discardable => false
combat => false
combat => false
reusable => false
reusable => false
usable => false
usable => false
multi => false
multi => false
bounty => Fantasy Airship
fancy => false
bounty_count => 5
candy => false
seller => none
seller => none
buyer => none
buyer => none
name_length => 22


> ash $skill[empathy of the newt]
> ash $skill[empathy of the newt]
Line 86: Line 112:
Returned: Empathy of the Newt
Returned: Empathy of the Newt
level => 8
level => 8
traincost => 6500
image => empathy.gif
traincost => 3250
class => Turtle Tamer
class => Turtle Tamer
libram => false
libram => false
Line 92: Line 119:
buff => true
buff => true
combat => false
combat => false
song => false
expression => false
permable => true
permable => true
dailylimit => -1
timescast => 0


> ash $familiar[slimeling]
> ash $familiar[slimeling]
Line 101: Line 132:
image => slimeling.gif
image => slimeling.gif
name => Princess Vina
name => Princess Vina
charges => 0


> ash $monster[black widow]
> ash $monster[black widow]


Returned: Black Widow
Returned: black widow
base_hp => 130
base_hp => 121
base_attack => 139
base_attack => 132
base_defense => 128
base_defense => 110
base_initiative => 0
raw_hp => 121
raw_attack => 132
raw_defense => 110
base_initiative => 50
raw_initiative => 50
attack_element => none
attack_element => none
defense_element => none
defense_element => none
physical_resistance => 0
min_meat => 40
min_meat => 40
max_meat => 60
max_meat => 60
base_mainstat_exp => 17.375
base_mainstat_exp => 16.5
phylum => bug
phylum => bug
poison => Really Quite Poisoned
poison => Really Quite Poisoned
boss => false
image => blackwidow.gif


> ash $effect[sugar rush]
> ash $effect[sugar rush]


Returned: Sugar Rush
Returned: Sugar Rush
default => use either 1 Angry Farmer candy, 1 Tasty Fun Good rice candy, 1 Crimbo candied pecan,
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
Crimbo fudge, Crimbo peppermint bark, 1 Breath mint
note =>
note =>
all => aggregate boolean [string]
all => aggregate boolean [string]
Line 130: Line 168:
  use Crimbo peppermint bark => true
  use Crimbo peppermint bark => true
  use 1 Breath mint => true
  use 1 Breath mint => true
  use 1 that gum you like => true
image => http://images.kingdomofloathing.com/itemimages/hoppedup.gif
image => http://images.kingdomofloathing.com/itemimages/hoppedup.gif
descid => 83695b70e0470a36125feca3198a16b4
descid => 83695b70e0470a36125feca3198a16b4

Revision as of 07:06, 30 March 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
reusable => false
usable => true
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 => 13
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 => Irritating Series of Random Encounters; Quiet Healer; Irritating Series of Random Encounters; Burly Sidekick; Protagonist
noncombat_queue => Rip Rop Wrappety Do; F-F-Fantastic!; The Super Secret Canadian Mind-Control Device; The Super Secret Canadian Mind-Control Device; The Super Secret Canadian Mind-Control Device
kisses => 0

> ash $item[burned-out arcanodiode]

Returned: burned-out arcanodiode
plural => burned-out arcanodiodes
descid => 207784873
image => diode.gif
smallimage => diode.gif
levelreq => 0
quality =>
adventures =>
muscle =>
mysticality =>
moxie =>
fullness => 0
inebriety => 0
spleen => 0
minhp => 0
maxhp => 0
minmp => 0
maxmp => 0
dailyusesleft => 0
notes =>
quest => true
gift => false
tradeable => false
discardable => false
combat => false
reusable => false
usable => false
multi => false
fancy => false
candy => false
seller => none
buyer => none
name_length => 22

> 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 => 0

> 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 => 121
base_attack => 132
base_defense => 110
raw_hp => 121
raw_attack => 132
raw_defense => 110
base_initiative => 50
raw_initiative => 50
attack_element => none
defense_element => none
physical_resistance => 0
min_meat => 40
max_meat => 60
base_mainstat_exp => 16.5
phylum => bug
poison => Really Quite Poisoned
boss => false
image => blackwidow.gif

> 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