Difference between pages "Quest Tracking Preferences" and "Equip"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>Paladinwhite
 
(add new overloads for equipping familiars directly and code example)
 
Line 1: Line 1:
{{TOCright}}
+
{{
KoLMafia internally tracks progress for a number of quests. These are stored as preferences in settings\[charactername]_prefs.
+
#vardefine:name|equip}}{{
 +
#vardefine:return_type|boolean}}{{
  
==Quests Granted by Familiars==
+
FunctionPage|
===questF01Primordial===
+
name={{#var:name}}|
=unstarted
 
===questF02Hyboria===
 
=unstarted
 
===questF03Future===
 
=unstarted
 
===questF04Elves===
 
=unstarted
 
===questF05Clancy===
 
=unstarted
 
  
==Guild Quests==
+
function1={{Function|
===questG01Meatcar===
+
name={{#var:name}}|
Possible values: unstarted, started
+
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
parameter1={{Param|item|equip_me}}|
 +
}}|
  
===questG02Whitecastle===
+
function2={{Function|
=unstarted
+
name={{#var:name}}|
===questG03Ego===
+
aggregate={{#var:aggregate}}|
=started
+
return_type={{#var:return_type}}|
===questG04Nemesis===
+
return_also={{#var:return_also}}|
=started
+
parameter1={{Param|item|equip_me}}|
===questG05Dark===
+
parameter2={{Param|slot|where}}|
=unstarted
 
===questG06Delivery===
 
=unstarted
 
  
==Quests Granted by Items==
+
}}|
===questI01Scapegoat===
 
=unstarted
 
===questI02Beat===
 
=unstarted
 
  
==Council Quests==
+
function3={{Function|
===questL02Larva===
+
name={{#var:name}}|
=finished
+
aggregate={{#var:aggregate}}|
===questL03Rat===
+
return_type={{#var:return_type}}|
=finished
+
return_also={{#var:return_also}}|
===questL04Bat===
+
parameter1={{Param|slot|where}}|
=finished
+
parameter2={{Param|item|equip_me}}|
===questL05Goblin===
+
p1desc={{Pspan|equip_me}} is the item to equip|
=finished
+
p2desc={{Pspan|where}} is the slot to place the item in|
===questL06Friar===
+
}}|
=finished
 
===questL07Cyrptic===
 
=finished
 
===questL08Trapper===
 
=finished
 
===questL09Lol===
 
=unstarted
 
===questL09Topping===
 
=finished
 
  
====booPeakProgress====
+
function4={{Function|
booPeakProgress tracks the hauntedness level of {{kolwiki|A-boo Peak}}. A value of 18, for instance, indicates that A-boo Peak is 18% haunted.
+
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
parameter1={{Param|item|equip_me}}|
 +
parameter2={{Param|familiar|fam}}|
  
Possible values: 0 - 100
+
}}|
  
====chasmBridgeProgress====
+
function5={{Function|
chasmBridgeProgress tracks the player's progress in building a bridge across the {{kolwiki|Orc Chasm}}. A value of 10, for instance, indicates that the bridge is 10 planks long.
+
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
parameter1={{Param|familiar|fam}}|
 +
parameter2={{Param|item|equip_me}}|
 +
p1desc={{Pspan|equip_me}} is the item to equip|
 +
p2desc={{Pspan|where}} is the familiar to equip the item on|
 +
}}|
  
Possible values: 0 - 30
+
function_description=Attempts to equip the item {{pspan|equip_me}} in the slot {{pspan|where}} if specified, and returns true if the operation was successful, and false if it was not. If parameter {{pspan|where}} is not specified, it defaults to the "standard" place for such an item (main-hand for 1-handed weapons, first open slot for accessories or acc1 if no slots are open).  
====oilPeakProgress====
+
*If {{pspan|where}} is specified and {{pspan|equip_me}} is set to $item[none], this function will unequip whatever is in slot {{pspan|where}} and return true.  
oilPeakProgress tracks the remaining pressure at {{kolwiki|Oil Peak}}. It decreases as the player reduces the pressure in the zone.
+
*If {{pspan|where}} is not specified and {{pspan|equip_me}} is set to $item[none], the function aborts and you get a funky error because that makes no sense.  
 
+
*If you cannot equip {{pspan|equip_me}}, or {{pspan|where}} is supplied and the item cannot be used in that slot, you will be given an error message and this function will return false.
Possible values: 0.00 - 310.66
+
*The overload for equipping a familiar with {{pspan|equip_me}} can be used to equip familiars with familiar equipment without requiring the familiar to be your currently active familiar. This will return false if you don't have (or can't use) the familiar or if the familiar can't equip the item you are attempting to equip.
* 310.66: Pressure not yet reduced
+
 |
* 0.00: Subquest completed
 
 
 
====twinPeakProgress====
 
twinPeakProgress is a nibble bitmask with least significant bit set for the first choice and the most significant for the fourth. You can parse this with bitwise operators. Here's some code that demonstrates how to use it.
 
  
 +
code1={{CodeSample|
 +
title=Code Sample|
 +
description=Equips the Swashbuckling Getup carefully to ensure that the parrot is in the second accessory slot.|
 +
code=
 
<syntaxhighlight>
 
<syntaxhighlight>
void comma(buffer b, string s) {
+
equip($item[eyepatch]);
if(length(b) > 0)
+
equip($item[swashbuckling pants]);
b.append(", ");
+
equip($slot[acc2], $item[stuffed shoulder parrot]);
b.append(s);
 
}
 
 
 
boolean mysterious(int progress, int c) {
 
return (progress & (1 << c)) == 0;
 
}
 
 
 
string twinPeak() {
 
int p = get_property("twinPeakProgress").to_int();
 
buffer need;
 
if(mysterious(p, 0)) need.comma("4 Stench Resistance");
 
if(mysterious(p, 1)) need.comma("+50% Item Drop");
 
if(mysterious(p, 2)) need.comma("Jar of Oil");
 
// Only check for final if first three complete
 
if(length(need) == 0) {
 
if(mysterious(p, 3))
 
return "Need +40% Initiative";
 
return "Twin Peak Completed";
 
}
 
return "Need " + need;
 
}
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
}}|
  
===questL10Garbage===
+
code2={{CodeSample|
 
+
title=Code Sample|
questL10Garbage tracks the player's progress in {{kolwiki|Giant_Trash_Quest|the Giant Trash Quest}}.
+
description=Equips the blue plate on the Shorter-Order Cook without switching to it first.|
 
+
code=
Possible values: unstarted, started, step1-step9, finished
 
* unstarted: quest not yet received from the Council
 
* started: quest received from the Council
 
* step2: giant beanstalk grown
 
* step3 - step6: four Immateria acquired
 
* step7: S.O.C.K. acquired ({{kolwiki|The_Castle_in_the_Clouds_in_the_Sky_(Basement)|Castle Basement}} open)
 
* step8: {{kolwiki|The_Castle_in_the_Clouds_in_the_Sky_(Basement)|Castle Ground Floor}} open
 
* step9: {{kolwiki|The_Castle_in_the_Clouds_in_the_Sky_(Basement)|Castle Top Floor}} open
 
* finished: quest complete
 
 
 
===questL11MacGuffin===
 
=finished
 
 
 
====questL11Black====
 
Tracks Black Market discovery
 
 
 
====questL11Manor====
 
=finished
 
 
 
=====wineCellarProgress=====
 
=3
 
 
 
====questL11Desert====
 
Explore the Arid, Extra-Dry Desert to find the pyramid mentioned in your father's journal.
 
 
 
====questL11Pyramid====
 
Make your way into the depths of the Ancient Buried Pyramid.
 
 
 
=====gnasirProgress=====
 
gnasirProgress is a nibble bitmask with one bit for each possible way you can advance {{kolwiki|Quest_for_the_Holy_MacGuffin|Gnasir's quest}}. You can parse this with bitwise operators. Here's some code that demonstrates how to use it.
 
 
<syntaxhighlight>
 
<syntaxhighlight>
int gnasirProgress = get_property("gnasirProgress").to_int();
+
equip($familiar[shorter-order cook], $item[blue plate]);
buffer gnasir;
 
if((gnasirProgress & 1) == 0)
 
print("Gnasir wants a stone rose");
 
if((gnasirProgress & 2) == 0)
 
print("Gnasir wants a can of black paint");
 
if((gnasirProgress & 4) == 0)
 
print("Gnasir wants a killing jar");
 
if((gnasirProgress & 8) == 0)
 
print("Gnasir wants a 15 worm-riding manual page");
 
if((gnasirProgress & 16) == 0)
 
print("You need to use a drum machine to ride the worm");
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
}}|
  
====questL11Ron====
+
see_also={{SeeAlso|can_equip|equipped_amount|equipped_item|have_equipped}}|
Ron Copperhead
+
cli_equiv=The CLI commands "equip" (and others, for specific slots) function similarly.|
 
+
}}
=====zeppelinProtestors=====
 
Tracks protesters removed
 
 
 
====questL11Shen====
 
Shen Copperhead
 
 
 
====questL11Palindome====
 
questL11Palindome tracks the player's progress in the {{kolwiki|Quest_for_the_Holy_MacGuffin#The_Palindome|Palindome portion of the Never Odd or Even quest}}.
 
 
 
Possible values: unstarted, started, step1-stepX, finished
 
* unstarted:
 
* started: spent at least one turn Inside the Palindome
 
* step1: arranged the photos in Dr. Awkward's office
 
 
 
====questL11Worship====
 
=finished
 
 
 
=====questL11Business=====
 
=====questL11Curses=====
 
=====questL11Doctor=====
 
=====questL11Spare=====
 
 
 
 
 
=====hiddenApartmentProgress=====
 
hiddenApartmentProgress tracks progress through the {{kolwiki|Hidden Apartment Building}} during the Quest for the Holy MacGuffin.
 
 
 
Possible values: 0, 1, 6 - 8
 
* 0: Haven't opened the Hidden Apartment Building
 
* 1: Hidden Apartment Building is open for adventuring
 
* 6: Encountered the Protector Spirit
 
* 7: Found the stone sphere
 
* 8: Placed the stone sphere in the relevant overgrown shrine
 
 
 
=====hiddenBowlingAlleyProgress=====
 
hiddenBowlingAlleyProgress tracks progress through the {{kolwiki|Hidden Bowling Alley}} during the Quest for the Holy MacGuffin.
 
 
 
Possible values: 0, 1, 6 - 8
 
* 0: Haven't opened the Hidden Bowling Alley
 
* 1: Hidden Bowling Alley is open for adventuring
 
* 6: Encountered the Protector Spirit
 
* 7: Found the stone sphere
 
* 8: Placed the stone sphere in the relevant overgrown shrine
 
 
 
=====hiddenHospitalProgress=====
 
hiddenHospitalProgress tracks progress through the {{kolwiki|Hidden Hospital}} during the Quest for the Holy MacGuffin.
 
 
 
Possible values: 0 - 8
 
* 0: Haven't opened the Hidden Hospital
 
* 1: Hidden Hospital is open for adventuring, but haven't bowled.
 
* 2-5: Number of times bowled is 1 less than hiddenHospitalProgress
 
* 6: Encountered the Protector Spirit
 
* 7: Found the stone sphere
 
* 8: Placed the stone sphere in the relevant overgrown shrine
 
 
 
=====hiddenOfficeProgress=====
 
hiddenOfficeProgress tracks progress through the {{kolwiki|Hidden Office Building}} during the Quest for the Holy MacGuffin.
 
 
 
Possible values: 0, 1, 6 - 8
 
* 0: Haven't opened the Hidden Office Building
 
* 1: Hidden Office Building is open for adventuring
 
* 6: Encountered the Protector Spirit
 
* 7: Found the stone sphere
 
* 8: Placed the stone sphere in the relevant overgrown shrine
 
 
 
=====hiddenTavernUnlock=====
 
hiddenTavernUnlock tracks whether or not you have unlocked the {{kolwiki|Hidden Tavern}} during the Quest for the Holy MacGuffin.
 
 
 
Possible values: 0 - N
 
* When the value is equal to your number of ascensions, the Tavern is unlocked
 
* When the value is any other number, the Tavern is locked
 
 
 
===questL12War===
 
=finished
 
 
 
====warProgress====
 
Possible values for the progress of the {{kolwiki|Mysterious Island Quest|Isle War}}:
 
*unstarted: We can still visit the small version of the Mysterious Island
 
*started: The war is in progress
 
*finished: The final boss or bosses were defeated
 
 
 
====sideDefeated====
 
Which side of the {{kolwiki|Mysterious Island Quest|Isle War}} was defeated during the Level 12 quest.  
 
 
 
Possible values:
 
*neither
 
*hippies
 
*fratboys
 
*both
 
 
 
===questL13Final===
 
Progress for the {{kolwiki|Naughty Sorceress Quest}}.
 
 
 
*unstarted - Lair is closed
 
*started - Contest booth is available
 
*step1 - Coronation ceremony
 
*step2 - Hedge maze
 
*step3 - Tower door
 
*step4 - Wall of skin
 
*step5 - Wall of meat
 
*step6 - Wall of bone
 
*step7 - Mirror
 
*step8 - Your Shadow
 
*step9 - Naughty Sorceress
 
*step10 - Prism awaits breaking
 
*finished - Gash is available
 
 
 
===questL13Warehouse===
 
the final quest if you ascend as {{kolwiki|Actually Ed the Undying}} where you adventure in {{kolwiki|The Secret Council Warehouse}}.
 
*unstarted
 
*started
 
*finished
 
Current progress in the warehouse is tracked in warehouseProgress.
 
 
 
==Miscellaneous Quests==
 
===questM01Untinker===
 
=finished
 
===questM02Artist===
 
=unstarted
 
===questM03Bugbear===
 
=unstarted
 
===questM04Galaktic===
 
=started
 
===questM05Toot===
 
=unstarted
 
===questM06Gourd===
 
=unstarted
 
===questM07Hammer===
 
=unstarted
 
===questM08Baker===
 
=unstarted
 
===questM09Rocks===
 
=unstarted
 
===questM10Azazel===
 
=finished
 
===questM11Postal===
 
=unstarted
 
===questM12Pirate===
 
=finished
 
===questM13Escape===
 
=unstarted
 
===questM14Bounty===
 
=unstarted
 
===questM15Lol===
 
=started
 
===questM16Temple===
 
Dakota Fanning's quest to find the Hidden Temple
 
 
 
===questM17Babies===
 
Lady Spookyraven's Babies
 
 
 
===questM18Swamp===
 
Marty and His Swamp Problems
 
 
 
===questM19Hippy===
 
Hippy Give a Hippy a Boat...
 
 
 
===questM20Necklace===
 
Lady Spookyraven's Necklace
 
 
 
===questM21Dance===
 
Lady Spookyraven's Dance
 
 
 
===questM22Shirt===
 
The Shirt Off His Lack of Back
 
 
 
===questM23Meatsmith===
 
Helping Make Ends Meat
 
* unstarted
 
* started
 
* step1 - Got a {{kolwiki|check to the Meatsmith}}.
 
* finished - Returned {{kolwiki|check to the Meatsmith}} to the Meatsmith.
 
 
 
===questM24Doc===
 
What's Up, Doc?
 
* unstarted
 
* started
 
* step1 - Collected the Herbs and need to return them to Doc Galaktik
 
* finished
 
 
 
==Sea Quests==
 
===questS01OldGuy===
 
=finished
 
===questS02Monkee===
 
=unstarted
 
 
 
When Mom is rescued the Quest is completed
 
 
 
=finished
 
 
 
====merkinQuestPath====
 
merkinQuestPath indicates which path the player has chosen in the {{kolwiki|Mer-Kin Deepcity}}, during the {{kolwiki|Sea Monkees Quest}}.
 
 
 
Possible values:
 
* none: Player has not yet chosen a path
 
* gladiator: Player will fight Yog-Urt, Elder Goddess of Hatred
 
* scholar: Player will fight Shub-Jigguwatt, Elder God of Violence
 
* done: Player has completed the Sea Monkees Quest
 
 
 
====skateParkStatus====
 
 
 
==Bug Bear Invasion Properties==
 
 
 
===mothershipProgress===
 
mothershipProgress tracks progress of level completion in the {{kolwiki|Bugbear Mothership}}. It goes from 0 to 3 as that level is cleared.
 
 
 
Possible values: 0-3
 
 
 
===statusEngineering===
 
===statusGalley===
 
===statusMedbay===
 
===statusMorgue===
 
===statusNavigation===
 
===statusScienceLab===
 
===statusSonar===
 
===statusSpecialOps===
 
===statusWasteProcessing===
 
All of these work the same way.
 
*0-x (integers): insufficient bodata collected)
 
*open: all biodata collected and zone accessible
 
* unlocked: biodata collected but zone not yet accessible
 
* cleared: zone has been cleared
 
 
 
==Quests from the Elemental Planes==
 
===Spring Break Beach===
 
The Elemental Plane of Sleaze
 
=====questESlMushStash=====
 
Jimmy's Quest to collect receipts from the Fun-Guy Mansion.
 
=====questESlAudit=====
 
Taco Dan's Quest to collect receipts from the Fun-Guy Mansion.
 
=====questESlBacteria=====
 
Broden's Quest to collect bacteria from the Fun-Guy Mansion.
 
=====questESlCheeseburger=====
 
Jimmy's Quest to collect ingredients from the Sloppy Seconds Diner.
 
=====questESlSprinkles=====
 
Taco Dan's Quest to collect ingredients from the Sloppy Seconds Diner.
 
=====questESlCocktail=====
 
Broden's Quest to collect sprinkles from the Sloppy Seconds Diner.
 
=====questESlSalt=====
 
Jimmy's Quest to collect salt from the Sunken Yacht.
 
=====questESlFish=====
 
Taco Dan's Quest to collect fish meat from the Sunken Yacht.
 
=====questESlDebt=====
 
Broden's Quest to collect broupons from the Sunken Yacht.
 
  
===Conspiracy Island===
+
[[Category:Equipment]]
The Elemental Plane of Spooky
 
=====questESpOutOfOrder=====
 
Deep Dark Jungle - Out of Order
 
=====questESpJunglePun=====
 
Deep Dark Jungle - Pungle in the Jungle
 
=====questESpSmokes=====
 
Deep Dark Jungle - Everyone's Running Out of Smokes
 
=====questESpClipper=====
 
Mansion of Dr. Weirdeaux - The Big Clipper
 
=====questESpSerum=====
 
Mansion of Dr. Weirdeaux - Serum Sortie
 
=====questESpEVE=====
 
Secret Government Laboratory - Choking on the Rind
 
=====questESpFakeMedium=====
 
Secret Government Laboratory - Fake Medium at Large
 
=====questESpGore=====
 
Secret Government Laboratory - Gore Tipper
 

Latest revision as of 16:49, 12 April 2024

Function Syntax

boolean equip(item equip_me )

boolean equip(item equip_me ,slot where )

boolean equip(slot where ,item equip_me )

  • equip_me is the item to equip
  • where is the slot to place the item in

boolean equip(item equip_me ,familiar fam )

boolean equip(familiar fam ,item equip_me )

  • equip_me is the item to equip
  • where is the familiar to equip the item on

Attempts to equip the item equip_me in the slot where if specified, and returns true if the operation was successful, and false if it was not. If parameter where is not specified, it defaults to the "standard" place for such an item (main-hand for 1-handed weapons, first open slot for accessories or acc1 if no slots are open).

  • If where is specified and equip_me is set to $item[none], this function will unequip whatever is in slot where and return true.
  • If where is not specified and equip_me is set to $item[none], the function aborts and you get a funky error because that makes no sense.
  • If you cannot equip equip_me, or where is supplied and the item cannot be used in that slot, you will be given an error message and this function will return false.
  • The overload for equipping a familiar with equip_me can be used to equip familiars with familiar equipment without requiring the familiar to be your currently active familiar. This will return false if you don't have (or can't use) the familiar or if the familiar can't equip the item you are attempting to equip.

 

Code Sample

Equips the Swashbuckling Getup carefully to ensure that the parrot is in the second accessory slot.

equip($item[eyepatch]);
equip($item[swashbuckling pants]);
equip($slot[acc2], $item[stuffed shoulder parrot]);

Code Sample

Equips the blue plate on the Shorter-Order Cook without switching to it first.

equip($familiar[shorter-order cook], $item[blue plate]);

CLI Equivalent

The CLI commands "equip" (and others, for specific slots) function similarly.

See Also

can_equip() | equipped_amount() | equipped_item() | have_equipped()