matt.chugg
Moderator
If anyone would like to test this, i'd appreciate it!
It should check, and (if aquiretrophies is true) aquire any and all trophies available, I only had one available to collect but if anyone ever has more than one i'd appreciate them testing this!
I think the regex pattern is "good" but regex is most definatly not my strong point!
Its part of a soon to be released pre-ascension script!
It should check, and (if aquiretrophies is true) aquire any and all trophies available, I only had one available to collect but if anyone ever has more than one i'd appreciate them testing this!
I think the regex pattern is "good" but regex is most definatly not my strong point!
Its part of a soon to be released pre-ascension script!
Code:
boolean aquiretrophies = true;
void checkandaquiretrophies() {
print("Checking for trophies...","olive");
string trophypage = visit_url("trophy.php");
matcher trophymatcher = create_matcher("name\=whichtrophy.*?value\=(.*?)\>",trophypage);
while (find(trophymatcher)){
print("You are entitled to trophy " + group(trophymatcher,1),"red");
if (aquiretrophies==true) {
print("Purchasing trophy " + group(trophymatcher,1),"blue");
if (my_meat() >= 10000) {
string buytrophy=visit_url("trophy.php?action=buytrophy&whichtrophy="+group(trophymatcher,1),true);
} else {
print("Not enough meat","red");
}
}
}
if (aquiretrophies==true) {
trophypage = visit_url("trophy.php");
if (contains_text(trophypage,"entitled to the") == true) {
print("Something may have gone wrong, there are still trophies to collect!");
}
}
}