auto BHH and friends

Is there a version which contains some sort of get_bounty(location), so if there is a bounty available for that location today it will automatically get it? Thinking Top Floor of the castle farming

Edit: This is what I came up with, unless there is a better way to accomplish it?

PHP:
boolean get_bounty(item it){
	string bhh_page = visit_url("bhh.php");
	if( bhh_page.contains_text("be a Bounty Hunter") && bhh_page.contains_text("value=" + it.to_int()) ){ 
		visit_url("bhh.php?pwd&action=takebounty&whichitem=" + it.to_int());
		return true;
	}
	return false;
}

// If there is a bounty available for a certain location, get it
boolean get_bounty(location loc){
	foreach it in $items[]{
		if( it.bounty == loc ){ return get_bounty(it);  }
	}
	return false;
}
 
Last edited:
I'm not sure if this is a bounty problem or a canadv problem but my unlockedLocations preference keep growing every time I log in (and bounty is called to check for interesting bounties). It currently is:
Code:
unlockedLocations => 182-- South of the Border The Oasis The Shore, Inc.      Travel Agency The Lower Chambers The Dungeons of Doom The Haunted      Conservatory The Haunted Billiards Room The Haunted Wine Cellar      (automatic) The Haunted Wine Cellar (Northwest) The Haunted Wine Cellar      (Northeast) The Haunted Wine Cellar (Southwest) The Haunted Wine Cellar      (Southeast) The Hidden Temple Whitey's Grove The Degrassi Knoll Restroom      The Degrassi Knoll Bakery The Degrassi Knoll Gym The Degrassi Knoll Garage      The Fun House Post-Cyrpt Cemetary Cobb's Knob Barracks Cobb's Knob      Kitchens Cobb's Knob Harem Cobb's Knob Treasury The F'c'le The Poop Deck      Belowdecks The Valley of Rof L'm Fao A-Boo Peak Twin Peak Oil Peak The      Goatlet Lair of the Ninja Snowmen The eXtreme Slope Icy Peak The      Penultimate Fantasy Airship Outside the Club The Haunted Wine Cellar      (Northeast) The Fun House Whitey's Grove The Fun House The Valley of Rof      L'm Fao The Dungeons of Doom The Goatlet The Goatlet The Valley of Rof L'm      Fao Cobb's Knob Treasury Whitey's Grove The Goatlet Cobb's Knob Treasury      Lair of the Ninja Snowmen Whitey's Grove The "Fun" House Whitey's Grove      The "Fun" House The Penultimate Fantasy Airship

And as you can see there are quite a few duplicates in there...
 
I'm a little bit confused. I'm used to the first post in any script thread to include a link to said script...

This is the only thread I've found that talks about an automatic-bounty-hunter-hunter script. And the first post - nay the first page - seems to not have any sort of link.

Can anyone point me in the right direction?
 
Can anyone point me in the right direction?

Pointing here.

The script is no longer maintained by its original author so you have to scan back in the thread to find the latest version.

If anyone would like to take over this script and put it on SVN I'd be glad to make it the official version to allay such confusion.
 
Yay! Thanks for that pointer.

Sadly, it's giving me this:
Unknown variable 'bountyDB' (bounty.ash, line 68)

I'm a sort of dilettante coder, but I'll see if I can figure it out.

EDIT: Nevermind, apparently I needed a separate script. I need to read in more detail.
 
Last edited:
So yeah... this doesn't work quite yet, but at least it will report back your available bounties and colourize based on canadv. If we get a bounty.location field, it should be relatively easy to make it able to adventure again. Without that, I'll probably deal with it within the next week or so. :)
> bounty list

13 pink bat eyes from albino bat
8 unlucky claws from lucky cat statue
And while it's not visible and it'd be actual effort to add the colours, the pink bat eyes are green, the unlucky claws are red, and the bent pipe wasn't known in r13596.
 

Attachments

We now have a bounty location field, but apparently KoL itself uses different names for the types than the visible names. The visible names are easy/hard/special, while the used names are low/high/special. This means that you can't actually use bounty.type to accept and drop bounties. Regardless, the attached version does actually try to do both. It works on the specials, at least...
 

Attachments

> bounty hard

6 pieces of triffid bark from triffid

8 pop art banana peels from velvet underground dweller
Now hunting: 10 discarded pacifiers from Raver Giant
Impossible! Skipping...
Accepting the hunt for 6 pieces of triffid bark from triffid...
6 pieces of triffid bark from triffid
6 pieces of triffid bark from triffid
8 pop art banana peels from velvet underground dweller
Now hunting: 6 pieces of triffid bark from triffid
Now hunting: 10 discarded pacifiers from Raver Giant
So we can actually accept multiple bounties now, and through the magic of $bounty[].kol_internal_type we can actually drop bounties as well.
> bounty abort

6 pieces of triffid bark from triffid
6 pieces of triffid bark from triffid
8 pop art banana peels from velvet underground dweller
Now hunting: 6 pieces of triffid bark from triffid
Now hunting: 10 discarded pacifiers from Raver Giant
Aborting current hunt...
10 discarded pacifiers from Raver Giant
8 pop art banana peels from velvet underground dweller
Now hunting: 10 discarded pacifiers from Raver Giant
Now hunting: 10 discarded pacifiers from Raver Giant
Bounty hunt canceled.
Unless something else terrible shows up, I'm probably fine just using the attached version for my last 5 or so lazy bounty hunts that actually matter. Think I'm otherwise done with it.
 

Attachments

Really? What is?
The latest I see on http://builds.kolmafia.us/ is 13608
Am I not seeing an updated page or perhaps I'm lookin for love in all the wrong places?

I'm also seeing 13608 as latest there but the Latest SVN Changes forum currently lists 13611 as the latest. As far as I can tell, 13610 adds the field name that will fix the error you are getting.
 
Last edited:
See how the "Last 30 Changes" section is blank? When that happens, it means something has gone wrong server-side. It usually fixes within an hour or so, but if it stays busted, posting in Community Support may bring it to fewyn's attention. :)
 
So... did find one of those bugs that forced an update. :) The version above won't actually adventure in the locations, because they aren't real items anymore. The attached version will, using the +1 filthy lucre goal.

Additionally, if you've accepted multiple bounties, it will adventure for all of them in sequence of low/high/special. So no need to limit yourself to only taking one bounty at a time...
 

Attachments

Back
Top