if(contains_text(sonar_room, "combat"))
run_combat();
else if (!contains_text(sonar_room, "So Close and Yet So Nar")) {
index = index_of(sonar_room, "name=pingvalue") + 28;
value1 = to_int(char_at(sonar_room, index));
index = index_of(sonar_room, "name=whurmvalue") + 29;
value2 = to_int(char_at(sonar_room, index));
index = index_of(sonar_room, "name=boomchuckvalue") + 33;
value3 = to_int(char_at(sonar_room, index));
if (value1 != 2)
sonar_room = visit_url("choice.php?whichchoice=588&pwd&option=1&pingvalue=2&butt1=Set+Pinging+Machine");
else if (value2 != 4)
sonar_room = visit_url("choice.php?whichchoice=588&pwd&option=2&whurmvalue=4&butt2=Set+Whurming+Machine");
else if (value3 != 8)
sonar_room = visit_url("choice.php?whichchoice=588&pwd&option=3&boomchuckvalue=8&butt3=Set+Boomchucking+Machine");
else
checkStage("Sonar", true);
}