KingdomExplorer

Donavin69

Member
KingdomExplorer 0.4

This script requires ZLib and CanAdv

This script is designed to adventure in every zone you haven't been to in the past 5 days.

Any suggestions, let me know.

Revision History:
0.1 Initial release (July 2, 2012)
0.2 Change Can_adv call to prep for the adv
0.3 Exclude Hobo and slimetube
0.4 Blacklist locations that the script doesn't handle well

To install this script copy-paste the following line into the CLI and press return:

svn checkout https://svn.code.sf.net/p/kingdom-explorer/code/
 
Last edited by a moderator:

slyz

Developer
It will call can_adv() with prep = true.

That will make can_adv() try to prep you for adventuring (equip any outfit/item/familiar needed to access the location).
 

slyz

Developer
I would try to put it in the original call, but maybe Theraze will chime in with some more fine-tuned advice on that.
 

Flanders

New member
Great script, Don! I have a few comments.

-The script stops at unsupported noncombats, which is only to be expected. However, when I restart the script, it takes me to Richard's gym first every time, regardless of whether I've adventured there before.
-The script got me lost in the Velvet Fog, and also in absintheland (whatever that area's called).
-The script quit after 100 locations visited. Is that all of them?

This is an awesome script, and way beyond what I thought possible. Thanks!
 

Donavin69

Member
Do you have access to hobopolis (through the sewers)? If you aren't it never actually can get the adv (look at the CLI output, it never spends an adv there) I haven't tested on an account that is through the sewers yet.

The stopping at unsupported NC's, I didn't have that problem...it did give the error message, and then continue.

I read through your session logs, for the past 5 days, and visit every location in $locations[] that you haven't been to, so since you ran with a ring of teleport yesterday, you hit a lot of locations (I spent 62 advs to finish it yesterday)
 
Thanks for doing this! It found about 15 places I didn't even think about adventuring in.

For some reason it has issues with these locations because it runs them every time the script is run, even if it successfully adventured there the last time the script is run. I guess it has to do with the fact that the logs and mafia display them differently.
Haunted Wine Cellar
Hidden City
Wartime Sonofa Beach

It repeats other locations, but those fail, so they don't use an adventure each time the script is run.

Not sure if it's fixable, but if it's not, 3 adventures wasted isn't a huge deal...
 

Theraze

Active member
Yeah, if you're going to actually adventure immediately following, just run can_adv(location, true). That will get transpondent and other such things for you so you should adventure successfully... When you want to just run can_adv(location) or can_adv(location, false) is when you're looking through locations to see if you might WANT to go there later. If you already know that you're going to adventure there because you haven't yet... it's always useful prepping.
 

nworbetan

Member
I don't know if this will solve all the small issues IceColdFever noticed, but it looks to me like it could, possilby.

PHP:
int days = 5;
int [location] visited;
string [int] logs = session_logs(days);
foreach day in logs {
    print("Parsing day " + day + "...");
    if (logs[day] == "") continue;
    string [int] lines = logs[day].split_string();
    foreach line in lines if (index_of(lines[line], "[") == 0) {
        location loc = substring(lines[line], 2 + index_of(lines[line], "]")).to_location();
        if (loc != $location[none] && !(visited contains loc)) {
             visited[loc] = day;
        }
    }
}

/*print("");
for i from 0 to days - 1 {
    foreach loc in visited if (i == visited[loc]) {
        string when = (i == 0 ? "Today" : (i == 1 ? "Yesterday" : (i + " days ago")));
        print(when + " you adventured here: " + loc);
    }
}
print("I counted " + count(visited) + " locations in the last " + days + " days.");*/

foreach loc in $locations[] {
        if (visited contains loc) etc

Even if the extra precision isn't strictly needed, at the very least using (visited contains loc) instead of contains_text(a_greater_than_five_megabyte_string, loc) cuts a couple seconds of parsing time off. ;)

The section I commented out is pretty frivolous, but may be useful for debugging.

Oops, almost forgot, this is mostly holatuwol's code, so if it's helpful thank him, and if not, blame me.
 
Last edited:

Aramada

Member
-The script stops at unsupported noncombats, which is only to be expected. However, when I restart the script, it takes me to Richard's gym first every time, regardless of whether I've adventured there before

I had this experience as well. The two that it said "I got nuthin', it's all you, Boss" on were the "O Cap'm, My Cap'm" noncombat in The Poop Deck (could possible set it to automatically choose the "no adventure loss" option somehow?), and the "The Hidden Heart of the Hidden Temple (Stone)" noncombat in The Hidden Temple.

I took manual control via the Relay browser, made my choice, and then when I restarted the script, it took me to Richard's and then tried to take me through the Hobopolis side zones each time, even though all of that had been visited previously.


But OMGWTFBBQ I can't tell you how delightful this script is. Thank you so very much for the work!

~Aramada
 

Donavin69

Member
Since the script is using Mafia to adventure, if the choice isn't set, it won't know what to do...Apparently I was lucky and only hit NC's that I had set up. (I was also running a lot of +combat)
 

Donavin69

Member
I've received a couple of KMails, where people are stating that they are re-adventuring in zones they've already adventured in. What zones are these?

I've also received a KMail that Hobopolis should search to make sure that you don't have a multi in it, I think it would be better to completely exclude it, and let you manually do Hobo/slimetube if you choose to. I'll work on that change.

Edit: one other thing that I keep having reported is that it is adventuring in zones that don't count. What are these zones?
 
Last edited:
Top