Need some help with creating a script to complete dailies

VariusAvus

New member
Hello! I'm really new to creating .ash scripts for KoLMafia and have no experience in Javascript (though, I do have very little experience in Python). I'm trying to create a script that can accomplish all my dailies with a single command. I think I've gotten it pretty much figured out but there were a few tasks I was having trouble with. I've been using the documentation on the KoLMafia wiki but I'm still having problems.
  1. I'm having a bit of trouble with checking the Jackass Plumber. Currently, I'm using just
    Code:
    visit_url( "place.php?whichplace=arcade&action=arcade_plumber" );
    but that doesn't work as it doesn't return anything indicating that I've actually checked the Jackass Plumber which proves itself to be the case and simply indicates that the script was successfully executed.
  2. I'd also like to use my Telescope at the Campground for the "Starry-Eyed" buff but I haven't been able to figure that one out either. Currently, I'm using just
  3. Code:
    visit_url( "campground.php?action=telescope" );
    run_choice(1);
    but that doesn't seem to quite work. What's strange is that
    Code:
    if(outfit( "Smooth velvet" )){
        visit_url( "place.php?whichplace=airport_hot&action=airport4_zone1" );
        run_choice(7);
        print("You have recieved a Volcoino from the Tower.");
    }
    does work when I try to collect my daily volcoino.
  4. This problem also falls into a similar vein as #2 on this list but I'd also collect one of each type of chip from our Clan Vending Machine. I've been using
    Code:
    visit_url( "clan_rumpus.php?action=click&spot=9&furni=2" );
    run_choice(0);
    and repeating those lines of codes 2 more times while changing the choice value but it doesn't quite work the first time. All it stated is that I visited the Vending Machine and the script was complete.
I'm really sorry if this is organized poorly.
 

ckb

Minion
Staff member
  1. I'm having a bit of trouble with checking the Jackass Plumber.

Mafia will check Jackass Plumber automatically during the 'breakfast' command. You can set this in the Preferences under Automation.
Or set the prefs 'checkJackassHardcore' and/or 'checkJackassSoftcore'


  1. I'd also like to use my Telescope at the Campground for the "Starry-Eyed" buff but I haven't been able to figure that one out either.

You can use the Mafia CLI 'telescope command':
Code:
if (!to_boolean(get_property("telescopeLookedHigh"))) { cli_execute("telescope high"); }



  1. This problem also falls into a similar vein as #2 on this list but I'd also collect one of each type of chip from our Clan Vending Machine.
Mafia has a 'chips' command for that
Code:
if ((get_clan_rumpus() contains "Snack Machine") && to_int(get_property("_chipBags"))<3) { cli_execute("chips ennui, radium, wintergreen"); }
 

ckb

Minion
Staff member
Other good advice for finding stuff about Mafia: In the CLI, get to know the commands 'help' for CLI commands, 'ashref' for ASH commands and 'prefref' for Mafia properties. You can often find what you are looking for in one of those places.
 

Pazleysox

Member
I wrote a rollover management script some time ago. It covers just about every daily deed that mafia doesn't automatically handle with breakfast. Link below. Feel free to modify it as you see fit.
 
Top