int minutes = [put your favorite beach patch here.You know, something with a sandcastle or whatever.];
buffer b;
int combed = 69420;
int new_combed;
int start = gametime_to_int();
int last_time = gametime_to_int();
string very_interesting;
waitq(3);
visit_url("main.php?comb=1",false,false);
visit_url("choice.php?whichchoice=1388&option=1&minutes="+minutes);
while(gametime_to_int()- start >= 0){
if((gametime_to_int()-last_time)/1000 >= 10){
last_time = gametime_to_int();
b = visit_url("main.php");
new_combed = b.group_string("/beachcomb/combedsand").count();
if(combed > new_combed){
print("square refreshed at "+last_time);
}
combed = new_combed;
if(b.group_string("/beachcomb/(?!sand[0-2])(?!combed)(?!wave)(?!surfline)").count() > 0){
print("interesting things at "+last_time+": ");
foreach i,j,k in b.group_string("/beachcomb/(?!sand[0-2])(?!combed)(?!wave)(?!surfline)(((?!\\.png).)+)"){
if(j == 1){
print(k);
//make sure thing isn't really cool.
if(!k.contains_text("sandcastle")){
very_interesting = k;
//grab really cool thing if it's available.
visit_url("choice.php?whichchoice=1388&option=4&coords="+b.group_string("name=\"coords\" value=\"([^\"]+)\"[^>]*><[^>]*"+very_interesting)[0][1]);
abort("we got something really cool.");
}
}
}
//do the same thing but just grab the first uncommon thing.
foreach i,j,k in b.group_string("/beachcomb/(?!sand[0-2])(?!combed)(?!wave)(?!surfline)(((?!\\.png).)+)"){
if(j == 1){
visit_url("choice.php?whichchoice=1388&option=4&coords="+b.group_string("name=\"coords\" value=\"([^\"]+)\"[^>]*><[^>]*"+k)[0][1]);
if(my_adventures() == 0){
abort("no more turns");
}
else{
visit_url("choice.php?whichchoice=1388&option=1&minutes="+minutes);
}
break;
}
}
}
}
waitq(1);
}
Comments