Hobopolis Ash Requests

Bazaaretw

Member
Hey, I was looking around and I couldn't find either of these, I'm looking for a script that will complete an optimal sewer, or at the very least buy all of the items needed for it.

And for the second, a script that optimally farms the town square and puts up scare hobos.

I've completed a few solo hobo runs, and it gets very tiresome, and I was hoping to finish up a few more with some between ascension downtime.

Let me know if you can help.

Thanks,
Baz
 

slyz

Developer
I'll shamelessly direct you to the very first script I posted here: This one.

It simply buys enough sewer items to pass all the sewer tests, or closets them all if you don't want to use any.

As for doing an "optimal" sewer, what is the problem with auto-adventuring until enough grates/valves are open, changing the settings for the non-combats, and finishing off?

Same thing for TS: how do you kill hobos? Aren't a few CCSs enough? Or maybe simply buffing with elemental vials and simply auto-adventuring?

I think what you are looking for is very simple to do, but you will need to explain precisely what you want.
 

fronobulax

Developer
Staff member
While waiting for a better answer, have you used the mafia preference "Require appropriate items to adventure in clan sewers"? That will stop automation whenever you lack the items. I know it won't equip the new umbrella after you lose one (or rather I don't recall that it did for me on my last sewer run) but it may pull the other items from the clan stash. You can also obtain a reasonable degree of automation by setting the choice adventures.

My experience with a coordinated attempt at an optimal run says you don't want too much automation on the sewers. If it is an uncoordinated, every clannie for herself descent then setting the choices might get you close enough that you don't need a script.

As for the scarehobos that is a good idea but I shudder to think of the ways the script can fail if someone else is also killing Town Square Hobos at the same time. As for the rest, I'm not sure how much support mafia has for geting information from Richard so the script would probably have to start out by visiting a url and parsing a page.
 

Bazaaretw

Member
While waiting for a better answer, have you used the mafia preference "Require appropriate items to adventure in clan sewers"? That will stop automation whenever you lack the items. I know it won't equip the new umbrella after you lose one (or rather I don't recall that it did for me on my last sewer run) but it may pull the other items from the clan stash. You can also obtain a reasonable degree of automation by setting the choice adventures.

My experience with a coordinated attempt at an optimal run says you don't want too much automation on the sewers. If it is an uncoordinated, every clannie for herself descent then setting the choices might get you close enough that you don't need a script.

As for the scarehobos that is a good idea but I shudder to think of the ways the script can fail if someone else is also killing Town Square Hobos at the same time. As for the rest, I'm not sure how much support mafia has for geting information from Richard so the script would probably have to start out by visiting a url and parsing a page.
I did neglect to remember about Mafia's auto sewer preferences, and with your "first script" that should work.
I wouldn't have to worry about anyone else killing hobo's but I'm looking for a script that could make scare hobo's and buff myself accordingly. when I did my previous solo runs, it was just a pain having to switch to a new vial every 10 or so adventures, if anything:
Vial buff 1, adventure till expire
Vial buff 2, adventure till expire
Vial buff 3, adventure till expire
Vial buff 4, adventure till expire
Vial buff 5, adventure till expire
Make scare hobo's
Repeat till Hodgeman

And even better being able to add the subzones in there and using the non-combats to minimize adventures used in each zone.
If someone could put this together, I'd be willing to donate some meat for your cause. :D

Thanks,
Baz
 

Winterbay

Active member
Vial buff 1, adventure till expire
Vial buff 2, adventure till expire
Vial buff 3, adventure till expire
Vial buff 4, adventure till expire
Vial buff 5, adventure till expire
Make scare hobo's
Repeat till Hodgeman

Wouldn't that fail on not having enough non-vial parts, i.e. the physical part? You'd need a 6th 10 adventure thingie without vial wouldn't you?
 

slyz

Developer
Wow, no wonder you were getting tired.

Why not do 214 of each part, then switch to the next one? And only do a couple more scobos if needed at the end? This way all you need is to chug enough vials to do 214 parts, then automate 214 advs before switching to the next element.

I hardly see how having a script that creates the scobos at Richard's would speed things up, since it's not exactly a repetitive task when you call them all in one go. So, for TS at least, a very simple CLI script should be enough:
Code:
use 22 phial of hotness
adventure 214 town square
uneffect Hotform
use 22 phial of coldness
...

For the sidezones, it's generally just a matter of putting on some -/+ combat, setting the correct choices for noncombats, and happily autoadventure away. You can add "35 choiceadv" as a goal in BB for example, and check how many tires you have stacked when Mafia stops (it will count the noncombats that don't take a turn towards the 35 choiceadvs, so apart from making a complicated script, there's no real way to make Mafia stop at the correct number of tires).

If you are burned out by Hobopolis, why not try to learn a little bit of CLI or ASH scripting? For me, Mafia is almost as much the Game as ascending is. The wiki is a great place to start.
 
Last edited:

mredge73

Member
As for the Sewer part, I built a little routine a while back based off of Cagebot.ash but haven't updated it in a while.

You can use it as a starting point if you like. Keep in mind that it will not work as is, it includes a few functions that are pre-defined in my support scripts (check my signature).
I don't have the time right now to replace them but I think only one is necessary (run_choice) and the rest can be commented out.
If you run it, mafia will let you know what lines will need editing.

Warning: This will not work as is!
Code:
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
void Sewer()
{
        if (my_adventures()<10)
        {    
            print("Aborting Sewer Due to Adventures < 10","red");
            return;
        }
        
        //Set_HeartBeat();
        //check if you can adventure
        if( contains_text( visit_url( "clan_basement.php" ) , "sewergrate.gif" ) )
        {
            print( "I'm sorry, the sewer is currently closed!","red" );
            return;
        }
        matcher HoboCHECK=create_matcher("picture #(\\d+)", visit_url("clan_hobopolis.php?place=2&pwd"));    
        if(HoboCHECK.find())
        {    
            print("You already made it through the sewers!, Hobo Image is "+HoboCHECK.group(1).to_int(),"red");
            return;
        }
        
        //purchase Sewer Items
        int [item] Sewer_Items;
        Sewer_Items[$item[sewer wad]] = 5;
        Sewer_Items[$item[unfortunate dumplings]]= 5;
        Sewer_Items[$item[bottle of Ooze-O]] = 5;
        Sewer_Items[$item[oil of oiliness]] = 15;
        Sewer_Items[$item[gatorskin umbrella]] = 5;
        foreach Nasty in Sewer_Items
            retrieve_item(Sewer_Items[Nasty],Nasty);
        set_property("requireSewerTestItems","true");
        //Suit up
        //cli_execute("outfit sewer");
        if (!have_equipped( $item[hobo code binder] ))
                equip( $item[hobo code binder] );
        print("My Combat Bonus is "+ LessCombats(),"blue");
        //set choices
        set_property( "choiceAdventure197" , "1" );//take tunnel
        set_property( "choiceAdventure198" , "1" );//take tunnel
        set_property( "choiceAdventure199" , "1" );//take tunnel
        set_property( "choiceAdventure211" , "1" );//gnaw on the bars
        set_property( "choiceAdventure212" , "1" );//gnaw on the bars
        set_property( "battleAction" , "custom combat script" );
        //cli_execute( "ccs sewer" );
        //Adventuring        
        string page_text = visit_url( "adventure.php?snarfblat=166" );
        while( my_adventures() > 9 && !contains_text(page_text,"You've already found your way through these sewers"))
        {
            //Set_HeartBeat();
            if (!have_equipped( $item[gatorskin umbrella] ))
                equip( $item[gatorskin umbrella] );
            if( contains_text( page_text , "Combat" ) )
                run_combat();
            else 
                if( contains_text( page_text , "choice.php" )  )
                {
                    page_text = run_choice( page_text );
                    if( contains_text( page_text , "Combat" ) )
                        run_combat();
                }
            LessCombats();
            ComeBack();    
            page_text = visit_url( "adventure.php?snarfblat=166" );
        }
        if( contains_text(page_text,"You've already found your way through these sewers"))
            print("You are through the Sewers!","green");
}
 
Last edited:

Grotfang

Developer
Snippets from my hobopolis library that may help.

1) Code to return a map of part numbers from Richard:

Code:
int [string] have;				// current qty of each hobo part
void check_richard()
{
	print( "Checking Richard for part numbers" );
	string richard = visit_url( "clan_hobopolis.php?place=3&action=talkrichard&whichtalk=3" );
	if(!contains_text(richard, "bring me enough hobo bits"))
		abort("You don't appear to have Town Square access.");
	richard = replace_string(richard, "<b>", "");
	richard = replace_string(richard, "</b>", "");
	string [int, int] t;
	t = group_string(richard, "has (\\d+) pairs? of charred");
	have["hot"] = to_int(t[0][1]);
	t = group_string(richard, "has (\\d+) pairs? of frozen");
	have["cold"] = to_int(t[0][1]);
	t = group_string(richard, "has (\\d+) piles? of stinking");
	have["stench"] = to_int(t[0][1]);
	t = group_string(richard, "has (\\d+) creepy");
	have["spook"] = to_int(t[0][1]);
	t = group_string(richard, "has (\\d+) hobo crotch");
	have["sleaze"] = to_int(t[0][1]);
	t = group_string(richard, "has (\\d+) hobo skin");
	have["phys"] = to_int(t[0][1]);
}

2) Code to return the number of grates already open:

Code:
int grates_open()
{	
	print( "Checking grates" );
	int count = 0;
	int open_grates = 0;
	string parsed_grates = visit_url( "clan_raidlogs.php" );
	if( contains_text( parsed_grates , "sewer grate" ) )
	{
		string p = substring(parsed_grates , index_of( parsed_grates, "sewer grate" ));

		string leftover(string s)
		{
			p = substring(s, index_of( s, "sewer grate" ));
			p = substring(p, index_of(p, "("));
			int i = to_int(substring( p, 0, index_of( p , " turn" ) ));
			count = count + i;
			return p;
		}
	
		while( contains_text( p, "sewer grate" ) )
		{
			leftover(p);
		}
	}
	open_grates = count;
	print( count + " open grates" , "blue" );
	return open_grates;
}

3) Code to determine Richard's lowest part (works with check_richard() above):

Code:
void individual_parts()
{
	string town_square = visit_url( "clan_hobopolis.php?place=2" );
	if( !contains_text( town_square , "townsquare25.gif" ) )
	{
		check_richard();
		string strategy;
		int best = 9999;
		int secondbest = 9999;
		foreach i in have
		{
			int n = have[i];
			if((n < best) || ((n == best) && (random(2) == 0)))
			{
				strategy = i;
				secondbest = best;
				best = n;
			}
			else if( n < secondbest )
			{
				secondbest = n;
			}
		}
		print( "Strategy is: " + strategy , "red" );
	}
	else
	{
		## What to do if Hodg is up!
		print( "Hodg is up!" );
	}
}

4) Code to complement the above to set your strategy (according to the Richard check):

Code:
##Shamelessly stolen from Bale's scareFlavMag script
// skills:
skill boots = $skill[Spirit of Cayenne];
skill eyeballs = $skill[Spirit of Peppermint];
skill guts = $skill[Spirit of Garlic];
skill skulls = $skill[Spirit of Wormwood];
skill crotches = $skill[Spirit of Bacon Grease];
skill skins = $skill[none];	// placeholder for skins

// skill => effect:
effect [skill] s2e;
s2e[boots] = $effect[Spirit of Cayenne];
s2e[eyeballs] = $effect[Spirit of Peppermint];
s2e[guts] = $effect[Spirit of Garlic];
s2e[skulls] = $effect[Spirit of Wormwood];
s2e[crotches] = $effect[Spirit of Bacon Grease];
s2e[skins] = $effect[none];

// and the reverse:
skill [effect] e2s;
foreach p in s2e {
	e2s[s2e[p]] = p;
}

skill alignment( string desired_alignment )
{
	skill desired_skill;
	if( desired_alignment == "hot" )
		desired_skill = boots;
	else if( desired_alignment == "cold" )
		desired_skill = eyeballs;
	else if( desired_alignment == "stench" )
		desired_skill = guts;
	else if( desired_alignment == "sleaze" )
		desired_skill = crotches;
	else if( desired_alignment == "spooky" )
		desired_skill = skulls;
	else if( desired_alignment == "physical" )
		desired_skill = skins;
	else
		abort( "Can't work out what skill to use. Check settings." );
	return desired_skill;
}

effect needed_effect()
{
	effect skill_effect;
	if ( alignment() == boots )
		skill_effect = s2e[boots];
	else if ( alignment() == eyeballs )
		skill_effect = s2e[eyeballs];
	else if ( alignment() == skulls )
		skill_effect = s2e[skulls];
	else if ( alignment() == guts )
		skill_effect = s2e[guts];
	else if ( alignment() == crotches )
		skill_effect = s2e[crotches];
	else if ( alignment() == skins )
		skill_effect = s2e[skins];
	else
		abort( "You shouldn't see this message." );
	return skill_effect;
}

Note I have deliberately not provided a full script here. Look at the code, work out what you are trying to do, then adapt it. If you intend to use phials, I used to use the following code. I am unsure whether new game additions warrant a change here, but check. Note, dead_hobos is the number of hobos you want to kill for the duration of the phial effect. I know this appraches hobo killing from the other direction, but the script can then accommodate other people killing stuff.

Code:
int phials_to_use( int dead hobos )
{
	int turns_of_form = 5;
	if( have_skill( $skill[Impetuous Sauciness] ) )
		turns_of_form = turns_of_form + 5;
	if( my_class() == $class[sauceror] )
		turns_of_form = turns_of_form + 5;
	int phial_number_full = dead_hobos / turns_of_form;
	int phial_number = ceil( phial_number_full );
	return phial_number + 1;
}

Hope this helps.
 
Top