//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
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");
}