A collection of utilities for the online game Kingdom of Loathing.
Run this command in the graphical CLI:
svn checkout https://github.com/sachamm/KoLUtils/branches/main/
Will require a recent build of KoLMafia.
To use the subroutines from this ASH file in the CLI, do this in the CLI:
using smmUtils.ash;
You can then call any subroutine in this file from the command line. For example:
itemDescription (yellow rocket); NOTE this ^ space between the name of the subroutine and the parenthesis is important for some reason
Subroutines without any params must be called without the empty parens (), e.g.:
timeToRollover;
To stop using this on the CLI, do:
get commandLineNamespace set commandLineNamespace =
(if you have other files that you are "using", the first command will show them -- you'll have to re-"using" them after resetting the name space)
Sacha Mallais (ingame: TQuilla #2771003) [email protected]
Licenced under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
A very incomplete list of useful functions in this project.
void assert(boolean asserted, string abortString)
Assert "asserted" is true, aborting with abortString if not.
timeToRollover;
Prints the time until rollover in the CLI.
boolean isUnlocked(location aLocation)
Partially implemented. Returns true if the given location is unlocked and available to adventure in. Does not check if the proper outfit is being worn -- or other preconditions -- just if it is theoretically possible to adventure there.
boolean mmcd()
Maximizes the Monster Control Device to level 10 or 11, depending on which is available.
boolean fullAcquire(int target, item anItem) boolean fullAcquire(item anItem)
Acquire target amount of anItem, using all possible means including buying from the market (will confirm before buying). Tries Hganks, the closet, folding it, creating it, and finally buying. Similar to retrieve_item(), but with slightly different semantics around equipped items (fullAcquire won't unequip items and put them into your inventory for example), and the buying.
int accordionSongsActive()
Returns the number of AT songs being played.
int maxAccordionSongs()
Max possible songs at the current moment.
void unequipAll() void unequipAll(boolean unequipFamiliar)
Unequip everything. unequipFamiliar defaults to true.
int nutrition(item food_booze)
Returns the expected adventure gain from consuming the given food or booze.
boolean isPPUseful() boolean isPPUseful(location aLocation)
Returns true if at least one monster has a pickpocketable item at the given (or current) location.