Okay, the caveats...
This script assumes you're in aftercore, have an abundance of adventures to burn, room in your head for a couple songs from a public & free buffbot, wearing an all-comer outfit with appropriate combat macros/scripts, and have opened all the possible locations for bounties.
The last time I used it was around Crimbo 2012. I quit playing just before the Castle changes happened in February, but I fixed the location for that. I don't know if anything else needs to change. The script is not commented and not elegant, but it's a relatively simple affair. Figuring out what's going on will not be difficult if you need to alter or fix stuff. Unless Mafia has been radically rewritten since Feb., this script should run as-is on the current version.
The bounties it will refuse are cubist bulls in Haunted Gallery (unlocking is a hassle, too many fussy non-combats even then), filthy hippies & orcish frat boys on the Island (problematic availability in aftercore, depending on War results), and gearheads at Degrassi Knoll (I was usually Muscle sign, very swingy besides). By the math on those settings, there's a 1 in 256 chance it will sit and quit on you; I think I had it happen once in about two man-years of usage.
int lowbhh;
int medbhh;
int highbhh;
int maybe_carl;
int bounty_pal;
location BountyLocation;
item BountyItem;
int for_buffy = (my_adventures() + 1);
void pick_pal() {
if (bounty_pal == 1) {
use_familiar($familiar[Leprechaun]);
}
else {
use_familiar($familiar[Baby Gravy Fairy]);
}
}
void get_carl() {
if (have_effect($effect[Carlweather's Cantata of Confrontation]) < my_adventures()) {
chat_private(1889009 , ""+for_buffy+" carlweather");
repeat {
cli_execute("wait 5");
refresh_status();
} until (have_effect($effect[Carlweather's Cantata of Confrontation]) >= my_adventures());
print("Got Carlweather's...", "purple");
}
}
void get_urkel() {
if (have_effect($effect[Ur-Kel's Aria of Annoyance]) < my_adventures()) {
chat_private(1889009 , ""+for_buffy+" ur-kel");
repeat {
cli_execute("wait 5");
refresh_status();
} until (have_effect($effect[Ur-Kel's Aria of Annoyance]) >= my_adventures());
print("Got Ur-Kel's...", "purple");
}
}
void doAdventuresBOUNTY(item goalItem) {
int cap = my_adventures();
for x from 0 to cap by 1 {
if(adventure(1, BountyLocation)) {
}
if(!is_goal(goalItem)) {
//if your goal has been met, then the goalItem will no longer
//show up as one of your goals.
return;
}
}
}
void BOUNTY_GET() {
pick_pal();
if (maybe_carl == 1) {
get_carl();
}
get_urkel();
doAdventuresBOUNTY(BountyItem);
visit_url("bhh.php");
}
void check_low() {
if (contains_text(visit_url("bhh.php"), "bloodstained briquettes")) {
lowbhh = 9;
print("Today's low bounty is 8 bloodstained briquettes from Knob Goblin Barbecue Teams on the Outskirts of Cobb's Knob.", "teal");
}
else if (contains_text(visit_url("bhh.php"), "empty greasepaint tubes")) {
lowbhh = 7;
print("Today's low bounty is 20 empty greasepaint tubes from clowns in the \"Fun\" House.", "teal");
}
else if (contains_text(visit_url("bhh.php"), "chunks of hobo gristle")) {
lowbhh = 8;
print("Today's low bounty is 8 chunks of hobo gristle from half-orc hoboes in The Sleazy Back Alley.", "teal");
}
else if (contains_text(visit_url("bhh.php"), "oily rags")) {
lowbhh = 0;
print("Today's low bounty is 6 oily rags from the gearheads at Degrassi Knoll.", "teal");
}
else if (contains_text(visit_url("bhh.php"), "pink bat eyes")) {
lowbhh = 6;
print("Today's low bounty is 14 pink bat eyes from albino bats in the Bat Hole.", "teal");
}
else if (contains_text(visit_url("bhh.php"), "shredded can labels")) {
lowbhh = 10;
print("Today's low bounty is 13 shredded can labels from possessed cans in The Haunted Pantry.", "teal");
}
else if (contains_text(visit_url("bhh.php"), "triffid barks")) {
lowbhh = 4;
print("Today's low bounty is 3 triffid barks from triffids in The Spooky Forest.", "teal");
}
else if (contains_text(visit_url("bhh.php"), "bits of wilted lettuce")) {
lowbhh = 5;
print("Today's low bounty is 7 bits of wilted lettuce from weretacos in Fernswarthy's Tower.", "teal");
}
}
void check_med() {
if (contains_text(visit_url("bhh.php"), "broken petri dishes")) {
medbhh = 18;
print("Today's middle bounty is 40 broken petri dishes from the scientists at the Laboratory inside Cobb's Knob.", "blue");
}
else if (contains_text(visit_url("bhh.php"), "bundles of receipts")) {
medbhh = 13;
print("Today's middle bounty is 12 bundles of receipts from bean counters in the Cobb's Knob Treasury.", "blue");
}
else if (contains_text(visit_url("bhh.php"), "callused fingerbones")) {
medbhh = 11;
print("Today's middle bounty is 4 callused fingerbones from mariachi calaveras South of The Border.", "blue");
}
else if (contains_text(visit_url("bhh.php"), "empty aftershave bottles")) {
medbhh = 0;
print("Today's middle bounty is 34 empty aftershave bottles from Orcish frat boys on the Mysterious Island of Mystery.", "blue");
}
else if (contains_text(visit_url("bhh.php"), "greasy dreadlocks")) {
medbhh = 0;
print("Today's middle bounty is 11 greasy dreadlocks from filthy hippies on the Mysterious Island of Mystery.", "blue");
}
else if (contains_text(visit_url("bhh.php"), "vials of pirate sweat")) {
medbhh = 3;
print("Today's middle bounty is 5 vials of pirate sweat from smarmy pirates on the Mysterious Island of Mystery.", "blue");
}
else if (contains_text(visit_url("bhh.php"), "balls of white lint")) {
medbhh = 1;
print("Today's middle bounty is 8 balls of white lint from the Knights of Whitey's Grove.", "blue");
}
else if (contains_text(visit_url("bhh.php"), "worthless pieces of yellow glass")) {
medbhh = 14;
print("Today's middle bounty is 6 worthless pieces of yellow glass from kobolds in The Dungeons of Doom.", "blue");
}
}
void check_high() {
if (contains_text(visit_url("bhh.php"), "billy idols")) {
highbhh = 19;
print("Today's high bounty is 40 billy idols from goats at The Goatlet.", "purple");
}
else if (contains_text(visit_url("bhh.php"), "burned-out arcanodiodes")) {
highbhh = 17;
print("Today's high bounty is 5 burned-out arcanodiodes from MagiMechTech MechaMechs on the Penultimate Fantasy Airship.", "purple");
}
else if (contains_text(visit_url("bhh.php"), "coal buttons")) {
highbhh = 12;
print("Today's high bounty is 40 coal buttons from ninja snowmen on Mt. McLargeHuge.", "purple");
}
else if (contains_text(visit_url("bhh.php"), "discarded pacifiers")) {
highbhh = 20;
print("Today's high bounty is 5 discarded pacifiers from Raver Giants in The Castle in the Sky.", "purple");
}
else if (contains_text(visit_url("bhh.php"), "disintegrating corks")) {
highbhh = 2;
print("Today's high bounty is 20 disintegrating corks from sommeliers in The Haunted Wine Cellar.", "purple");
}
else if (contains_text(visit_url("bhh.php"), "non-Euclidean hooves")) {
highbhh = 0;
print("Today's high bounty is 11 non-Euclidean hooves from cubist bulls in The Haunted Gallery.", "purple");
}
else if (contains_text(visit_url("bhh.php"), "sammich crusts")) {
highbhh = 16;
print("Today's high bounty is 5 sammich crusts from Spam Witches in the Valley of Rof L'm Fao.", "purple");
}
else if (contains_text(visit_url("bhh.php"), "bits of sticky stardust")) {
highbhh = 15;
print("Today's high bounty is 6 bits of sticky stardust from astronomers in the Hole in the Sky.", "purple");
}
}
void main() {
check_low();
check_med();
check_high();
cli_execute("goal clear");
if (highbhh == 20) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2415");
bounty_pal = 1;
maybe_carl = 1;
BountyLocation = $location[The Castle in the Clouds in the Sky (Top Floor)];
BountyItem = $item[discarded pacifier];
add_item_condition(5, $item[discarded pacifier]);
BOUNTY_GET();
}
else if (highbhh == 19) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2409");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Goatlet];
BountyItem = $item[billy idol];
add_item_condition(40, $item[billy idol]);
BOUNTY_GET();
}
else if (medbhh == 18) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2411");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Knob Laboratory];
BountyItem = $item[broken petri dish];
add_item_condition(40, $item[broken petri dish]);
BOUNTY_GET();
}
else if (highbhh == 17) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2106");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Fantasy Airship];
BountyItem = $item[burned-out arcanodiode];
add_item_condition(5, $item[burned-out arcanodiode]);
BOUNTY_GET();
}
else if (highbhh == 16) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2412");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Orc Chasm];
BountyItem = $item[sammich crust];
add_item_condition(5, $item[sammich crust]);
BOUNTY_GET();
}
else if (highbhh == 15) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2471");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Hole in the Sky];
BountyItem = $item[sticky stardust];
add_item_condition(6, $item[sticky stardust]);
BOUNTY_GET();
}
else if (medbhh == 14) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2408");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[Dungeons of Doom];
BountyItem = $item[worthless piece of yellow glass];
add_item_condition(6, $item[worthless piece of yellow glass]);
BOUNTY_GET();
}
else if (medbhh == 13) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2469");
bounty_pal = 1;
maybe_carl = 1;
BountyLocation = $location[Knob Treasury];
BountyItem = $item[bundle of receipts];
add_item_condition(12, $item[bundle of receipts]);
BOUNTY_GET();
}
else if (highbhh == 12) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2105");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Ninja Snowmen];
BountyItem = $item[coal button];
add_item_condition(40, $item[coal button]);
BOUNTY_GET();
}
else if (medbhh == 11) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2468");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[South of the Border];
BountyItem = $item[callused fingerbone];
add_item_condition(4, $item[callused fingerbone]);
BOUNTY_GET();
}
else if (lowbhh == 10) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2100");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[Haunted Pantry];
BountyItem = $item[shredded can label];
add_item_condition(13, $item[shredded can label]);
BOUNTY_GET();
}
else if (lowbhh == 9) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2101");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[Outskirts of The Knob];
BountyItem = $item[bloodstained briquette];
add_item_condition(8, $item[bloodstained briquette]);
BOUNTY_GET();
}
else if (lowbhh == 8) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2099");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[Sleazy Back Alley];
BountyItem = $item[hobo gristle];
add_item_condition(8, $item[hobo gristle]);
BOUNTY_GET();
}
else if (lowbhh == 7) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2473");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Fun House];
BountyItem = $item[empty greasepaint tube];
add_item_condition(20, $item[empty greasepaint tube]);
BOUNTY_GET();
}
else if (lowbhh == 6) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2407");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Bat Hole Entryway];
BountyItem = $item[pink bat eye];
add_item_condition(14, $item[pink bat eye]);
BOUNTY_GET();
}
else if (lowbhh == 5) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2472");
bounty_pal = 0;
maybe_carl = 0;
BountyLocation = $location[Fernswarthy Ruins];
BountyItem = $item[wilted lettuce];
add_item_condition(7, $item[wilted lettuce]);
BOUNTY_GET();
}
else if (lowbhh == 4) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2413");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[Spooky Forest];
BountyItem = $item[triffid bark];
add_item_condition(3, $item[triffid bark]);
BOUNTY_GET();
}
else if (medbhh == 3) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2103");
bounty_pal = 1;
maybe_carl = 1;
BountyLocation = $location[Pirate Cove];
BountyItem = $item[vial of pirate sweat];
add_item_condition(5, $item[vial of pirate sweat]);
BOUNTY_GET();
}
else if (highbhh == 2) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2470");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[Haunted Wine Cellar (Automatic)];
BountyItem = $item[disintegrating cork];
add_item_condition(20, $item[disintegrating cork]);
BOUNTY_GET();
}
else if (medbhh == 1) {
visit_url("bhh.php?pwd&action=takebounty&whichitem=2414");
bounty_pal = 0;
maybe_carl = 1;
BountyLocation = $location[Whitey Grove];
BountyItem = $item[white lint];
add_item_condition(8, $item[white lint]);
BOUNTY_GET();
}
else if ((lowbhh == 0) && (medbhh == 0) && (highbhh == 0)){
print("All of today's bounties suck! 1 in 256 odds do happen once in a while.");
}
else {
print("No valid results were hit... something is very wrong.", "red");
}
}