Definitely noob question about URLs

jag2k2

New member
I am playing around with scripting and many of the actions that I want to automate have to do with creating potions at the DNA lab, checking the plumber arcade, summoning clip art, resting at the chateau etc. I get the sense from reading the forums that many of the actions are invoked using the visit_url command. What continues to escape me is how you guys can tell what the url is.

Lets take the "Make a gene tonic" button in the DNA workshop. The discussion here shows that the url that I want to use is "campground.php?action=dnapotion" but my question is how would I figure that out on my own?

Thanks!
 

Darzil

Developer
I am playing around with scripting and many of the actions that I want to automate have to do with creating potions at the DNA lab, checking the plumber arcade, summoning clip art, resting at the chateau etc. I get the sense from reading the forums that many of the actions are invoked using the visit_url command. What continues to escape me is how you guys can tell what the url is.

Lets take the "Make a gene tonic" button in the DNA workshop. The discussion here shows that the url that I want to use is "campground.php?action=dnapotion" but my question is how would I figure that out on my own?

Thanks!
Here are three ways:
1. When you mouse over a link, you can get the link displayed (not applicable for buttons on forms).
2. Look at the source code of the frame.
3. Start debug log, take actions, stop debug log, read debug log.
 

ckb

Minion
Staff member
Also to note, most of the actions you want are built in KolMafia commands. Some are CLI only, some in ASH. Using 'help' or 'ashref' in the CLI will often find the command you need. visit_url() calls are used when something comes out and has not yet been implemented into Mafia or for some commands that are more obscure and not supported.

Creating potions in the DNA lab, CLI command: camp dnapotion
Checking the plumber arcade is done at breakfast, if the preference is set: "checkJackassHardcore" or "checkJackassSoftcore"
summoning clip are can be done in ASH or the CLI with the create or acquire command
resting can be done with the 'rest' command, and it will be done at the Chateau if the preference "restUsingChateau" is true

Likely, unless it is a new feature to KOL, it can be done with a Mafia command.
 

fronobulax

Developer
Staff member
The 'mini-browser' built in to KoLmafia is also very good for figuring out URLs.

Several of the things mentioned already have a command built into KoLmafia so visit_url might not be the best or preferred way.
 
Top