I have a lousy memory (and I swap around whats in the CoT a bunch), so I'm trying to work on a charpane override to to display that info.
What I have so far:
Which is based on St Doodle's Boris override. And it works, except whenever I get to stuff like the Louvre or the Spooky Forest choice trees and select "auto", The mainpane displays the item description of the Crown, instead of solving the Louvre or getting the coin non-combat.
So, is there a way to figure out what is in the Crown of thrones without visiting the description page? Or maybe just a better way of going about this in general?
What I have so far:
PHP:
string crownOf(string page){
matcher m;
if (equipped_item($slot[hat]) == $item[Crown of Thrones]) {
m = create_matcher("<tr>(<td[^>]+?>Mus(?:cle)?:</td>)", page);
if (m.find()) {
matcher mfamenthro;
matcher mfamenchat;
//t: <b>.+[, ] the ([^<]+) //matches familiar in crown
//Fight<br>([^<]+?)< //matches familiar specfic enchantment
string hatsuit = visit_url("desc_item.php?whichitem=239178788");
mfamenthro = create_matcher("t: <b>.+[, ] the ([^<]+)",hatsuit);
mfamenchat = create_matcher("Fight<br>([^<]+)<",hatsuit);
if (mfamenchat.find() && mfamenthro.find()){
string famenthrows = "</center></td></tr><tr>";
page = replace_first(m, famenthrows + "<font size=-1 title='"+mfamenchat.group(1)+"'>"+mfamenthro.group(1) +"</font>"+ m.group(1));
}
}
}
return page;
}
Which is based on St Doodle's Boris override. And it works, except whenever I get to stuff like the Louvre or the Spooky Forest choice trees and select "auto", The mainpane displays the item description of the Crown, instead of solving the Louvre or getting the coin non-combat.
So, is there a way to figure out what is in the Crown of thrones without visiting the description page? Or maybe just a better way of going about this in general?