dapanda
Member
I am trying to automate my slimetube turns (and soon to be the rest of the dungeon for the final drops) and I am running into an issue with matcher / create_matcher raidlogs.php. I was able to get matcher / create_matcher on the slime tube bucket using this code I borrowed:
And it works fine, returning the number of Chamoix I have as a numerical value (99 in the bucket).
When I try to use a similar code for determining turns spent in the slime tube:
I get the following error:
No match attempted or previous match failed (tester2.ash, line 5)
at main (tester2.ash:5)
Using https://regexr.com/ I do see that their is a match for (([0-9]+) turns spent in this dungeon:) is being found as Group 1 for the raid log shows as the numerical value: 244
I feel like I am missing something really simple but I can't figure out what it is.
Code:
matcher numbucket = create_matcher("There are ([0-9]+) chamoix in the bucket",visit_url("clan_slimetube.php?action=bucket"));
if (!find(numbucket) || group(numbucket,1).to_int() == (100 * bundles))
{
if (retrieve_item(bundles,$item[big bundle of chamoix])){
use(bundles,$item[big bundle of chamoix]);
}else{
print("Need some chamoix up in here! In the bucket, to be precise.","red");
}
} else{
print(group(numbucket,1).to_int()+" Chamoix up in here! In the bucket, to be precise.","green");
}
And it works fine, returning the number of Chamoix I have as a numerical value (99 in the bucket).
When I try to use a similar code for determining turns spent in the slime tube:
Code:
//Code to open slimetube and setup bucket for first run
void main() {
matcher slimedefeated = create_matcher("([0-9]+) turns spent in this dungeon:",visit_url("clan_raidlogs.php"));
print(group(slimedefeated,1).to_int() + " defeated","green");
}
I get the following error:
No match attempted or previous match failed (tester2.ash, line 5)
at main (tester2.ash:5)
Using https://regexr.com/ I do see that their is a match for (([0-9]+) turns spent in this dungeon:) is being found as Group 1 for the raid log shows as the numerical value: 244
Code:
Log:
The Slime Tube:
244 turns spent in this dungeon:
Miscellaneous
dapanda (#2456712) defeated a Slime Tube monster x 242 (242 turns)
dapanda (#2456712) was defeated by a Slime Tube monster x 2 (2 turns)
Loot Distribution:
(none yet)
I feel like I am missing something really simple but I can't figure out what it is.