Playing KoL exclusively through CLi

tombh

New member
Hi,

I'm wondering if anyone else plays KoL exclusively through the Kolmafia Cli? The main reason is so I can play it at work whilst looking like I'm programming, naughty I know.

There are a few things I've not been able to figure out how to do purely via the CLi:

* The lack of a map can be difficult, ideally I'd like a nested text tree of all the locations and whether they are adventurable, accessible etc.
* I would like to be able to manually combat, so that I can choose what to do in each round; attack with weapon, use skill, etc.
* I can't find a way to read my Quest Log.
* I can't find anyway to show whether I have the "Beaten Up" effect.
* More an aesthetic thing, but is there any way to enable the up and down keys to scroll through the history of my commands?

Many thanks for any advice,
tom :)
 

fronobulax

Developer
Staff member
Well shame on you. Can't you alt-tab and select fast enough on a Windows machine? :)

Just to clarify, how are you running just the CLI, i.e your command line parameters?

My hunch is that what you are asking for is new cli commands. In that case rephrasing your request as a collection of commands and a description of what each one does might generate interest. I suspect some of your requests could be met by scripts rather than mafia changes.

In the gCLI the up and down arrows do work as you requested.
 

tombh

New member
Ha, my Alt-Tab Fu is good, but the geometry of the office works against me :(

I'm running the CLI on Linux with `java -jar -Djava.awt.headless=true ./KoLmafia-16.0.jar --CLI'

I'm a programmer so I might be able to do this making of new commands. I didn't know you could do that. So for instance, how would I make a list of all the adventurable areas available to me?

How do I run the gCLI?

Thank you!
 

Theraze

Active member
* The lack of a map can be difficult, ideally I'd like a nested text tree of all the locations and whether they are adventurable, accessible etc.
The canadv script will tell you for an individual location whether it's accessible. It's possible to run it through
ashq import <canadv.ash> foreach it in $locations[] if (can_adv(it, false)) print(it+" can be adventured in currently.");
or something similar to see all of the currently available locations.

* I would like to be able to manually combat, so that I can choose what to do in each round; attack with weapon, use skill, etc.
Code:
use_attack	ashq buffer dump = visit_url("fight.php?action=macro&macrotext=attack")
use_item	ashq buffer dump = visit_url("fight.php?action=macro&macrotext=use " + to_int(to_item($string[%%])))
use_skill	ashq buffer dump = visit_url("fight.php?action=macro&macrotext=skill " + to_int(to_skill($string[%%])))
Any other fight aliases are up to you, but I suggest (at home, if not at work) opening the actual graphical interface and running a round of combat in the mini-browser, which gives you the specifics of what mafia submitted to KoL, making additional command information possible. Note that use_item doesn't funksling.

* I can't find a way to read my Quest Log.
To read what? Most of the current ascension-type quests can be viewed with "pref quest" which will give you something like:
lastBuffRequestType (global, now '0', default 0)
logChatRequests (global, now 'false', default false)
showAllRequests (global, now 'false', default false)
showExceptionalRequests (global, now 'false', default false)
_requestSandwichSucceeded (user, now 'false', default false)
autostartGalaktikQuest (user, now 'true', default true)
lastQuartetRequest (user, now '2', default 0)
lastTr4pz0rQuest (user, now '66', default -1)
questF01Primordial (user, now 'unstarted', default unstarted)
questF02Hyboria (user, now 'unstarted', default unstarted)
questF03Future (user, now 'unstarted', default unstarted)
questF04Elves (user, now 'unstarted', default unstarted)
questF05Clancy (user, now 'unstarted', default unstarted)
questG01Meatcar (user, now 'finished', default unstarted)
questG02Whitecastle (user, now 'unstarted', default unstarted)
questG03Ego (user, now 'unstarted', default unstarted)
questG04Nemesis (user, now 'unstarted', default unstarted)
questG05Dark (user, now 'unstarted', default unstarted)
questG06Delivery (user, now 'unstarted', default unstarted)
questI01Scapegoat (user, now 'unstarted', default unstarted)
questI02Beat (user, now 'unstarted', default unstarted)
questL02Larva (user, now 'finished', default unstarted)
questL03Rat (user, now 'finished', default unstarted)
questL04Bat (user, now 'finished', default unstarted)
questL05Goblin (user, now 'started', default unstarted)
questL06Friar (user, now 'started', default unstarted)
questL07Cyrptic (user, now 'started', default unstarted)
questL08Trapper (user, now 'started', default unstarted)
questL09Topping (user, now 'started', default unstarted)
questL10Garbage (user, now 'started', default unstarted)
questL11MacGuffin (user, now 'started', default unstarted)
questL11Manor (user, now 'unstarted', default unstarted)
questL11Palindome (user, now 'unstarted', default unstarted)
questL11Pyramid (user, now 'unstarted', default unstarted)
questL11Worship (user, now 'unstarted', default unstarted)
questL12War (user, now 'unstarted', default unstarted)
questL13Final (user, now 'unstarted', default unstarted)
questM01Untinker (user, now 'unstarted', default unstarted)
questM02Artist (user, now 'unstarted', default unstarted)
questM03Bugbear (user, now 'unstarted', default unstarted)
questM04Galaktic (user, now 'started', default unstarted)
questM05Toot (user, now 'unstarted', default unstarted)
questM06Gourd (user, now 'unstarted', default unstarted)
questM07Hammer (user, now 'unstarted', default unstarted)
questM08Baker (user, now 'unstarted', default unstarted)
questM09Rocks (user, now 'unstarted', default unstarted)
questM10Azazel (user, now 'unstarted', default unstarted)
questM11Postal (user, now 'unstarted', default unstarted)
questM12Pirate (user, now 'unstarted', default unstarted)
questM13Escape (user, now 'unstarted', default unstarted)
questM14Bounty (user, now 'unstarted', default unstarted)
questM15Lol (user, now 'unstarted', default unstarted)
questS01OldGuy (user, now 'unstarted', default unstarted)
questS02Monkees (user, now 'unstarted', default unstarted)
sidequestArenaCompleted (user, now 'none', default none)
sidequestFarmCompleted (user, now 'none', default none)
sidequestJunkyardCompleted (user, now 'none', default none)
sidequestLighthouseCompleted (user, now 'none', default none)
sidequestNunsCompleted (user, now 'none', default none)
sidequestOrchardCompleted (user, now 'none', default none)
* I can't find anyway to show whether I have the "Beaten Up" effect.
> ash have_effect($effect[beaten up]);

Returned: 0
Nope, not beaten up currently.
 

tombh

New member
Thank you so much Theraze! You've totally given me a breakthrough in insight.

So I've made my own do.ash script in the /scripts folder and I load it with `using do.ash'. It contains;

Code:
import <canadv.ash>

void able(){
	print("Listing adventurable locations");
	foreach it in $locations[]
		if (can_adv(it, false)) print(it);
}

void use_attack() {
	buffer dump = visit_url("fight.php?action=macro&macrotext=attack");
}

I can't seem to get that `prefs quest' command working though.

Considering that the list of locations is enormous, I didn't think it made sense to list every location and flag the adventurable ones, so I've just opted to exclude the ones unavailable to me so far.

I've just been using the native `effects' command to show me if I'm beaten up or not.
 

Winterbay

Active member
Yeah that command requires you to set up the alias first. My preference checking alias looks like:
Code:
[B]prefref [/B]=> ashq record r{string d ; }; r[string,string]m;      file_to_map("defaults.txt",m); foreach t,p,d in m      if(to_lower_case(p).contains_text(to_lower_case($string[%%]))) print(p+"      ("+t+", now '"+get_property(p)+"', default "+d.d+")")
 

Theraze

Active member
Yeah... somewhere in here there's a thread with helpful aliases. Many of my aliases come from there including some form of the pref alias. :) I believe that the one I'm currently using is from Bale and will set a preference if it matches only one...
Code:
pref => ashq record r{string d;};r[string,string] m; string[int]a;     file_to_map("defaults.txt",m); matcher s =     create_matcher("(\\w+)(\\s=*\\s*([\\w\\.]+))?",$string[%%]);     if(find(s)){foreach t,p,d in m     if(to_lower_case(p).contains_text(to_lower_case(s.group(1)))) {print(p+"     ("+t+", now '"+get_property(p)+"', default "+d.d+")"); a[count(a)] =     p;}if(s.group(2)!=""){if(count(a)==1)set_property(a[0],s.group(3));else     print("You do not match exactly one preference!","red");}}else     print("Invalid parameters","red");
 
Top