matt.chugg
Moderator
zarqon said:1) I love the equipcheck() idea. Added that in, along with outfitcheck(). These will only swap gear if prep is true.
Excellent!
zarqon said:2) For boss zones, often the link to the boss area changes depending on whether the boss is defeated, so detecting whether the area is open and the boss remains undefeated should usually be doable in a single server hit.
I'm currently on day 2 of an ascension, but forgot to check again the boss bat and goblin king yesterday, I will however try and remember to check any bosses I encounter today.
3) Bat zones definitely need special handling for the use of sonars. I think the script ought to attempt to use enough sonars to reveal the desired zone, regardless of prep. If done right, the detection for that could be done in a single server hit. The question now becomes how to script that efficiently. For now, I added this after all three sonar-only bat zones, which I think is fairly nice:
Code:if (!levelcheck(4)) return false; string bathole = visit_url("bathole.php"); int sonarsneeded = to_int(!contains_text(bathole,"batratroom.gif")) + to_int(!contains_text(bathole,"batbeanroom.gif")) + to_int(!contains_text(bathole,"batbossroom.gif")); if (sonarsneeded > 0) { use_upto(sonarsneeded,$item[sonar-in-a-biscuit],true); bathole = visit_url("bathole.php"); } return (contains_text(bathole,substring(to_url(where),0,index_of(to_url(where),"&"))));
Note that this will detect whether the Boss Bat has been defeated.
Also note that this uses a function from ZLib. Since this script also needed to use resist(), I simply made it require ZLib. Scripts that want to use both ZLib and CanAdv can now just import CanAdv.
Nice, thats looks very elegant and handles all of the all of the bats very nicely, I guess its true what they say about you and bats!
That's a good thought, but the existing operators already work that way.
....
I asked about this long ago and was happy to discover that ASH behaves this way. I take advantage of it all the time in my scripts.
Thats really excellent, I had no idea that mafia handled this in this manner!
Now, if only use() had a useful return value...
Unfortunatly I have nothing to help you there