Dog Hair Pill Farming Script

garjon

Member
Moon Pill Farming Scripts

My first foray into script writing, so be cruel. :D
I'm calling this v 0.01. Just calling the script will use a Map to Safety Shelter Grimace Prime, and go through the path to get a pill for you. Once.
I intend to add more ID10T checking, and self-reiteration.

v 0.1 -- added some ID10T checking, self-reiteration, some lag mitigation, and a sister script for distention pill farming.
 

Attachments

  • doghairpillfarm.ash
    2.4 KB · Views: 287
  • distentionpillfarm.ash
    2.3 KB · Views: 285
Last edited:

bumcheekcity

Active member
Tip:

Mafia will automatically put your hash into any visit_url() call if you want. You don't have to write, for example:

Code:
visit_url("inv_use.php?pwd=" + my_hash() + "&which=3&whichitem=5172");

You can just type:

Code:
visit_url("inv_use.php?pwd=&which=3&whichitem=5172");
 
Here's the Pill Farmer I wrote. There are two variables you can set at the top.
string mapmode = "use"; // Choices are: "use" existing maps, or "farm" for maps
string setgoal = "booze"; // Choices are: "food", "booze", "both"

Might be nice to make those properties or something so they can be changed on the fly in the cli.

ETA: Ok, I imported zlib and made these properties.
Code:
setvar("Pill_Farmer_mapmode", "use");
// Uses only exiting maps.  If you want to farm for maps, type in the cli 
// zlib Pill_Farmer_mapmode = "farm";

setvar("Pill_Farmer_goal", "both");
// Other values for goal are "booze" or "food" if you just want one or the other
// zlib Pill_Farmer_goal = "booze"; or zlib Pill_Farmer_goal = "food";

string mapmode = get_property("Pill_Farmer_mapmode");  
string setgoal = get_property("Pill_Farmer_goal");
 

Attachments

  • pill_farmer.ash
    2.8 KB · Views: 175
Last edited:

Theraze

Active member
Tip:

Mafia will automatically put your hash into any visit_url() call if you want. You don't have to write, for example:

Code:
visit_url("inv_use.php?pwd=" + my_hash() + "&which=3&whichitem=5172");

You can just type:

Code:
visit_url("inv_use.php?pwd=&which=3&whichitem=5172");

Sort of true. As Veracity said this week, post and get have different behaviour regarding the hash. Being explicit means you don't have to worry about possibly needing to change between them at some point in the future if KoL changes what's 'standard' for submissions.
 

Veracity

Developer
Staff member
Sort of true. As Veracity said this week, post and get have different behaviour regarding the hash. Being explicit means you don't have to worry about possibly needing to change between them at some point in the future if KoL changes what's 'standard' for submissions.
visit_url() uses POST unless you specifically tell it to use a GET. If KoL changes from expecting a POST to a GET, you need to change your visit_url() calls, anyway, and may as well adjust how you include the pwd at that time.
 

Theraze

Active member
My assumption was that if at some point in the future KoL moves their 'standard' from POST to GET, mafia would change its default as well, thereby breaking legacy scripts with lazy-password-hashing, but fixing everything else...
 

slyz

Developer
Here's the Pill Farmer I wrote.
It worked like a charm, except that
PHP:
string mapmode = get_property("Pill_Farmer_mapmode");  
string setgoal = get_property("Pill_Farmer_goal");
should be
PHP:
string mapmode = vars["Pill_Farmer_mapmode"];  
string setgoal = vars["Pill_Farmer_goal"];
 

Orbrisa

Member
I laughed at the "I'm going deep" that the scripts output. Thanks, garjon. (And Weatherboy. I just erred on the side of laziness and not having to modify any files.)
 

Ethelred

Member
I've used this script from time to time for several months. Today, it started failing with the output:

Code:
Getting a distention pill...

[3127] Map to Safety Shelter Grimace      Prime
Successfully Entered Grimace...
I'm going deep...
Waiting 5      seconds to mitigate lag...
Countdown: 5 seconds...
Countdown: 4      seconds...
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown:      1 second...
Waiting completed.
[COLOR=red]Thwarted by either      monster or lag![/COLOR]

There was no noticeable lag.

Mafia version: KoLmafia-11528M.jar
System: Mac OS X 10.6.8
Java: java version "1.6.0_26"
 

Bale

Minion
I don't know what is wrong with the script, but it doesn't really matter since mafia now has this as native functionality.

Adventure Tab -> Choice Advs Tab (Look near the middle of the window for the tabs) -> Item (This is on the left) -> Deep Inside Grimace ->
Set the choice adventure to distention pill or synthetic dog hair. Then simply use the maps from the mafia interface.
 
Last edited:

Ethelred

Member
I don't know what is wrong with the script, but it doesn't really matter since mafia now has this as native functionality.

Adventure Tab -> Choice Advs Tab (Look near the middle of the window for the tabs) -> Item (This is on the left) -> Deep Inside Grimace ->
Set the choice adventure to distention pill or synthetic dog hair. Then simply use the maps from the mafia interface.

Thanks for the tip, Bale. I somehow totally missed that update.
 

cameron

New member
did you have the sword of buggered speech equipped? i noticed when i modified this script to farm pill bottles from lost keys before mafia made it native that having the sword equipped gave me that same error...
 
Top