Bug - Fixed Recognize that we've left the Council in KoE

zarqon

Well-known member
It's my understanding that available_choice_options() is intended to return non-empty results only when you are currently in a choice and those choices are available. If that is incorrect, please disregard this report.

In KoE, when leaving the Council (which redirects to place.php), available_choice_options() still returns the choices that were available to you in the Council, even though you are now looking at the main map and can no longer make those choices.

I discovered this because one of my scripts has a clear_status() function which attempts to complete any combats or choices you were stuck in when beginning the script, and this was causing it to make its maximum number of attempts before failing. I've worked around it for now by simply excluding that particular choice.

In case it helps, this is what the redirect looks like:

Code:
Submitting option 25 for choice 1389
class net.sourceforge.kolmafia.session.ChoiceManager$1
Connecting to choice.php...

Requesting: https://www.kingdomofloathing.com/choice.php?whichchoice=1389&option=25&pwd
4 request properties
Field: Cookie = [PHPSESSID=2i24m1kftk9t6f8j745a917m85; AWSALB=B6JlV2iz9cf4w7MBnracNGK3hbeQ8WJqpu3D4OtZYwX00aJ1OdHoe1jdfCYUv+kVtEIEaW+fImkP6mvbExMVUGh/sppUTjBywNDR4OwKXpFKcCw8MNEJIOlTlfXy]
Field: User-Agent = [KoLmafia v19.11]
Field: Accept-Encoding = [gzip]
Field: Content-Type = [application/x-www-form-urlencoded]

Retrieving server reply...

Retrieved: https://www.kingdomofloathing.com/choice.php?whichchoice=1389&option=25&pwd
12 header fields
Field: Transfer-Encoding = [chunked]
Field: null = [HTTP/1.1 302 Moved Temporarily]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Field: Server = [nginx/1.10.3]
Field: Connection = [keep-alive]
Field: Set-Cookie = [AWSALB=T/qHC4left6Vc2WeOTM1rF3GbBMZ7rprbI+7NdaTkKDhXz7qky5ylpv/fw0qhJo2Dv+N3gEq7C4dxPUm6FvxeSTb9HmP+6mA3sd/8iqXEfjcUs1gFWX95Sr5+eWx; Expires=Wed, 27 Nov 2019 13:37:34 GMT; Path=/]
Field: Pragma = [no-cache]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Date = [Wed, 20 Nov 2019 13:37:34 GMT]
Field: Location = [place.php?whichplace=exploathing]
Field: X-Powered-By = [PHP/5.3.29]
Field: Content-Type = [text/html]

class net.sourceforge.kolmafia.request.GenericRequest
Connecting to place.php...

Requesting: https://www.kingdomofloathing.com/place.php?whichplace=exploathing
4 request properties
Field: Cookie = [PHPSESSID=2i24m1kftk9t6f8j745a917m85; AWSALB=T/qHC4left6Vc2WeOTM1rF3GbBMZ7rprbI+7NdaTkKDhXz7qky5ylpv/fw0qhJo2Dv+N3gEq7C4dxPUm6FvxeSTb9HmP+6mA3sd/8iqXEfjcUs1gFWX95Sr5+eWx]
Field: User-Agent = [KoLmafia v19.11]
Field: Accept-Encoding = [gzip]
Field: Content-Type = [application/x-www-form-urlencoded]

Retrieving server reply...

Retrieved: https://www.kingdomofloathing.com/place.php?whichplace=exploathing
13 header fields
Field: Transfer-Encoding = [chunked]
Field: null = [HTTP/1.1 200 OK]
Field: Server = [nginx/1.10.3]
Field: Connection = [keep-alive]
Field: Pragma = [no-cache]
Field: Date = [Wed, 20 Nov 2019 13:37:34 GMT]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Field: Content-Encoding = [gzip]
Field: Vary = [Accept-Encoding]
Field: Set-Cookie = [AWSALB=qrJE0WNeVyQYEFagomep9lwrVpcCRHzvC20hHxOHlfhVEnvGFeseqqpdOfOj6xfIGlxbyuHtTylb0Ut3WZqE9oI/VWlrqaEv6DV9w8iJ7FPKxiyT5Z7O371Faqj3; Expires=Wed, 27 Nov 2019 13:37:34 GMT; Path=/]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: X-Powered-By = [PHP/5.3.29]
Field: Content-Type = [text/html; charset=UTF-8]

Retrieving server reply
ResponseText has 13669 characters.
<html><head><script language=Javascript><!--if (parent.frames.length == 0) location.href="game.php";//--></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/window.20111231.js"></script><script language="javascript">function chatFocus(){if(top.chatpane.document.chatform.graf) top.chatpane.document.chatform.graf.focus();}if (typeof defaultBind != 'undefined') { defaultBind(47, 2, chatFocus); defaultBind(190, 2, chatFocus);defaultBind(191, 2, chatFocus); defaultBind(47, 8, chatFocus);defaultBind(190, 8, chatFocus); defaultBind(191, 8, chatFocus); }</script><script language="javascript">function updateParseItem(iid, field, info) {var tbl = $('#ic'+iid);var data = parseItem(tbl);if (!data) return;data[field] = info;var out = [];for (i in data) {if (!data.hasOwnProperty(i)) continue;out.push(i+'='+data[i]);}tbl.attr('rel', out.join('&'));}function parseItem(tbl) {tbl = $(tbl);var rel = tbl.attr('rel');var data = {};if (!rel) return data;var parts = rel.split('&');for (i in parts) {if (!parts.hasOwnProperty(i)) continue;var kv = parts[i].split('=');tbl.data(kv[0], kv[1]);data[kv[0]] = kv[1];}return data;}</script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/jquery-1.3.1.min.js"></script><script type="text/javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/pop_query.20130705.js"></script><script type="text/javascript"> function pop_ircm(clicked) { return false; } </script>	<link rel="stylesheet" type="text/css" href="https://s3.amazonaws.com/images.kingdomofloathing.com/styles.20151006.css"><style type='text/css'>.faded {zoom: 1;filter: alpha(opacity=35);opacity: 0.35;-khtml-opacity: 0.35;-moz-opacity: 0.35;}</style></head><body><centeR><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>The Kingdom of Exploathing</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><div id=background  style='position: relative; width:700px;height:1400px'  ><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/exploathingbg.gif" width=700 height=1400 border=0><div id=expl_bathole style=' position: absolute; top: 600; left: 562; height: 90; width: 90;'><a  href=place.php?whichplace=bathole><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/bathole.gif" width=90 height=90 border=0 alt="The Bat Hole" title="The Bat Hole"></a></div><div id=expl_battlefield style=' position: absolute; top: 867; left: 26; height: 90; width: 90;'><a  href=adventure.php?snarfblat=533><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/battlefield.gif" width=90 height=90 border=0 alt="The Exploaded Battlefield (1)" title="The Exploaded Battlefield (1)"></a></div><div id=expl_beach style=' position: absolute; top: 729; left: 167; height: 90; width: 90;'><a  href=place.php?whichplace=exploathing_beach><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/desertbeach.gif" width=90 height=90 border=0 alt="Exploaded Beach" title="Exploaded Beach"></a></div><div id=expl_blackforest style=' position: absolute; top: 563; left: 263; height: 90; width: 90;'><a  href=adventure.php?snarfblat=405><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/blackforest.gif" width=90 height=90 border=0 alt="The Black Forest (1)" title="The Black Forest (1)"></a></div><div id=expl_blackmarket style=' position: absolute; top: 555; left: 360; height: 90; width: 90;'><a  href=shop.php?whichshop=blackmarket><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/blackmarket.gif" width=90 height=90 border=0 alt="The Black Market" title="The Black Market"></a></div><div id=expl_campaway style=' position: absolute; top: 1229; left: 203; height: 90; width: 90;'><a  href=place.php?whichplace=campaway><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/campaway.gif" width=90 height=90 border=0 alt="Getaway Campsite" title="Getaway Campsite"></a></div><div id=expl_campground style=' position: absolute; top: 236; left: 20; height: 90; width: 90;'><a  href=campground.php><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/campsite.gif" width=90 height=90 border=0 alt="Your Campsite" title="Your Campsite"></a></div><div id=expl_castle style=' position: absolute; top: 1067; left: 24; height: 90; width: 90;'><a  href=place.php?whichplace=giantcastle><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/castle.gif" width=90 height=90 border=0 alt="The Castle in the Clouds in... Space" title="The Castle in the Clouds in... Space"></a></div><div id=expl_chasm style=' position: absolute; top: 855; left: 412; height: 90; width: 90;'><a  href=place.php?whichplace=orc_chasm><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/chasm.gif" width=90 height=90 border=0 alt="The Orc Chasm" title="The Orc Chasm"></a></div><div id=expl_copperhead style=' position: absolute; top: 973; left: 571; height: 90; width: 90;'><a  href=place.php?whichplace=town_wrong><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/wrongside.gif" width=90 height=90 border=0 alt="The Wrong Side of the Tracks" title="The Wrong Side of the Tracks"></a></div><div id=expl_cosmicrays style=' position: absolute; top: 198; left: 200; height: 90; width: 90;'><a  href=shop.php?whichshop=exploathing><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/cosmicrays.gif" width=90 height=90 border=0 alt="Cosmic Ray's Bazaar" title="Cosmic Ray's Bazaar"></a></div><div id=expl_council style=' position: absolute; top: 124; left: 63; height: 90; width: 90;'><a  href=place.php?whichplace=exploathing&action=expl_council><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/council.gif" width=90 height=90 border=0 alt="The Council" title="The Council"></a></div><div id=expl_cyrpt style=' position: absolute; top: 431; left: 560; height: 90; width: 90;'><a  href=crypt.php><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/cyrpt.gif" width=90 height=90 border=0 alt="The Cyrpt" title="The Cyrpt"></a></div><div id=expl_dailydungeon style=' position: absolute; top: 668; left: 32; height: 90; width: 90;'><a  href=adventure.php?snarfblat=325><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/dailydungeon.gif" width=90 height=90 border=0 alt="The Daily Dungeon (1)" title="The Daily Dungeon (1)"></a></div><div id=expl_friars style=' position: absolute; top: 429; left: 24; height: 90; width: 90;'><a  href=friars.php><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/friars.gif" width=90 height=90 border=0 alt="The Deep Fat Friars' Grove" title="The Deep Fat Friars' Grove"></a></div><div id=expl_generalstore style=' position: absolute; top: 1233; left: 464; height: 90; width: 90;'><a  href=shop.php?whichshop=generalstore><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/generalstore.gif" width=90 height=90 border=0 alt="The General Store" title="The General Store"></a></div><div id=expl_hiddencity style=' position: absolute; top: 1061; left: 431; height: 90; width: 90;'><a  href=place.php?whichplace=hiddencity><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/hiddencity.gif" width=90 height=90 border=0 alt="The Hidden City" title="The Hidden City"></a></div><div id=expl_highlands style=' position: absolute; top: 798; left: 535; height: 90; width: 90;'><a  href=place.php?whichplace=highlands><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/highlands.gif" width=90 height=90 border=0 alt="The Highlands" title="The Highlands"></a></div><div id=expl_holeinthesky style=' position: absolute; top: 198; left: 461; height: 90; width: 90;'><a  href=adventure.php?snarfblat=83><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/theholeinthesky.gif" width=90 height=90 border=0 alt="The Hole in the Sky (1)" title="The Hole in the Sky (1)"></a></div><div id=expl_invader style=' position: absolute; top: 27; left: 242; height: 90; width: 90;'><a  href=adventure.php?snarfblat=534><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/invader.gif" width=90 height=90 border=0 alt="The Invader (1)" title="The Invader (1)"></a></div><div id=expl_knob style=' position: absolute; top: 1266; left: 63; height: 90; width: 90;'><a  href=cobbsknob.php><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/cobbsknob.gif" width=90 height=90 border=0 alt="Cobb's Knob" title="Cobb's Knob"></a></div><div id=expl_mclargehuge style=' position: absolute; top: 466; left: 431; height: 90; width: 90;'><a  href=place.php?whichplace=mclargehuge><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/mclargehuge.gif" width=90 height=90 border=0 alt="Mt. McLargeHuge" title="Mt. McLargeHuge"></a></div><div id=expl_other style='text-align: center; position: absolute; top: 101; left: 586; height: 100; width: 100;'><a style='text-decoration: none; font-size: 11px; padding: 10px; display: block' href=place.php?whichplace=exploathing_other><div class="pp"><div><img  alt="Other Stuff" title="Other Stuff" src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/O.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/t.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/h.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/e.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/r.gif" height="10" border="0" style="margin-right: 4px"/></div><div><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/S.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/t.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/u.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/f.gif" height="10" border="0" /><img  alt='' src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/zonefont/f.gif" height="10" border="0" /></div></div></a></div><div id=expl_palindome style=' position: absolute; top: 703; left: 307; height: 90; width: 90;'><a  href=place.php?whichplace=palindome><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/palindome.gif" width=90 height=90 border=0 alt="The Palindome" title="The Palindome"></a></div><div id=expl_tavern style=' position: absolute; top: 340; left: 171; height: 90; width: 90;'><a  href=tavern.php><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/tavern.gif" width=90 height=90 border=0 alt="The Typical Tavern" title="The Typical Tavern"></a></div><div id=expl_temple style=' position: absolute; top: 1098; left: 301; height: 90; width: 90;'><a  href=adventure.php?snarfblat=280><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/temple.gif" width=90 height=90 border=0 alt="The Hidden Temple (1)" title="The Hidden Temple (1)"></a></div><div id=expl_tower style=' position: absolute; top: 966; left: 227; height: 90; width: 90;'><a  href=place.php?whichplace=nstower><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/nslair.gif" width=90 height=90 border=0 alt="The Lair of the Naughty Sorceress" title="The Lair of the Naughty Sorceress"></a></div><div id=expl_townright style=' position: absolute; top: 1112; left: 580; height: 90; width: 90;'><a  href=place.php?whichplace=town_right><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/rightside.gif" width=90 height=90 border=0 alt="The Right Side of the Tracks" title="The Right Side of the Tracks"></a></div><div id=expl_woods style=' position: absolute; top: 233; left: 328; height: 90; width: 90;'><a  href=adventure.php?snarfblat=15><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/spookyforest.gif" width=90 height=90 border=0 alt="The Spooky Forest (1)" title="The Spooky Forest (1)"></a></div><div id=expl_zeppelin style=' position: absolute; top: 68; left: 424; height: 90; width: 90;'><a  href=place.php?whichplace=zeppelin><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/exploathing/zeppelin.gif" width=90 height=90 border=0 alt="The Red Zeppelin's Mooring" title="The Red Zeppelin's Mooring"></a></div></div><p></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></body></html>
Processing results...
Unhandled redirect to place.php?whichplace=exploathing
 

zarqon

Well-known member
Oh also, the code in the script that handles this is at least several weeks old, but this behavior started yesterday. (Though I wasn't able to play the day before that.) So this is probably a side effect of something that changed in the last few days.

EDIT: And this also just happened with the sausage grinder. I created some magical sausages, and then my script got stuck trying to exit the sausage grinder choice, even though it had already exited it.

EDIT EDIT: And it happens at the Registration Desk at the NS's tower. Using maximizer to prep for the tests is also quite difficult in this case because mafia won't perform the specified actions, aborting with the message "You are currently in a choice."
 
Last edited:

Veracity

Developer
Staff member
I expect this is a result of my removing the line that cleared the global static variable "handlingChoice" when it looked like you walked away from the choice.
In your case, you actually did walk away from the choice.
In my case, I had NOT walked away from the choice, but a non-choice.php request had run in another thread as part of internal automation.

I'll think about it, but unless/until I stop getting IOExceptions (connection timeouts) from every KoL server when I try to log in from my computer, I am done with KoL.

Very strange; they started at November 19 00:12 (EST) while I was actively doing stuff in the Relay Browser and I have been unable to connect since.

Almost as if my IP address was added to a blacklist.
 

Veracity

Developer
Staff member
Revision 19617 restores clearing handlingChoice when you "walk away from" a choice and adds a kludge to count diary.php as not walking away.

Untested, obviously.
 

fronobulax

Developer
Staff member
Almost as if my IP address was added to a blacklist.

It is entirely up to you whether this is worth any of your time and effort, but you could try a VPN. In my experience the wall clock time playing KoL over a VPN is about the same as not using a VPN. There are free VPNs that are reasonable to use.
 

Veracity

Developer
Staff member
I just logged in to KoL from a nearby cafe. Nothing wrong with my accounts, or KoL in general.
My home IP address continues to get connection timeouts to the game, but not the KoL forums.
I sent CDMoyer a polite note on the KoL forums asking for advice.
We'll see if he has any insights.
 

Veracity

Developer
Staff member
Ha ha ha. That is my problem. So I guess I can say that "Ezandora made me break my system"? :)

I'd say that if it prevents you from logging in, the patch as presented certainly is "no longer necessary" - whether or not they have fixed their server issues.

But, perhaps the reason it suddenly failed was they just then fixed (or changed) their servers?
 

xKiv

Active member
Ha ha ha. That is my problem. So I guess I can say that "Ezandora made me break my system"? :)

I'd say that if it prevents you from logging in, the patch as presented certainly is "no longer necessary" - whether or not they have fixed their server issues.

But, perhaps the reason it suddenly failed was they just then fixed (or changed) their servers?

It is my understanding that, among other things, simply restarting an AWS instance can change its public IP address. That doesn't mean anything got fixed, just that hardwiring IP addresses is not a fire-and-forget practice.
 

Veracity

Developer
Staff member
EDIT EDIT: And it happens at the Registration Desk at the NS's tower. Using maximizer to prep for the tests is also quite difficult in this case because mafia won't perform the specified actions, aborting with the message "You are currently in a choice."
Now that I fixed the Ezandora Problem 😉 and am able to log in again, I ran all my turns and freed the king today, with full consumption and a bunch of turns left over. A pity I missed a day; I would have freed him today with NO consumption, had I been able to run turns yesterday. Or maybe even yesterday.

In any case, I did the lair tests and had no problems with the maximizer. One oddity, having maximized, with the test still displayed, if I clicked on a button (which can’t work, since I walked away from the choice), sometimes it took me to the Source Terminal? How in the world can that happen?

I’ll get a DEBUG log next time. Sigh.
 

Veracity

Developer
Staff member
I did the lair tests and had no problems with the maximizer. One oddity, having maximized, with the test still displayed, if I clicked on a button (which can’t work, since I walked away from the choice), sometimes it took me to the Source Terminal? How in the world can that happen?
I believe that when I maximized for Initiative, I used the Source Terminal to get init.enh - terminal enhance init.enh - which is done via choice.php. That will save the last response text to return to the browser. When you try to take a choice from the registration desk at the lair, having "walked away" from that choice, presumably KoL will give you an error message, which we do NOT save, for some reason, as the response to the bogus choice. Instead, we return the saved response text.

I'll have to see what that error message is and figure out what path we take such that we don't save & display it.

Edit: Hmm. I could probably test that before the lair. The Shore is a choice you can walk away from. I could go there, issue a "terminal" command in the gCLI, and then take one of the Shore choices. Or the Time-Spinner.
 
Last edited:

Veracity

Developer
Staff member
Nope. That is a KoL thing.

I went to the registration desk.
I maximized and did a bunch of things with choices, ending with source terminal.
In the relay browser, I clicked the "Fastest Adventurer button.

Code:
Requesting: https://www.kingdomofloathing.com/choice.php?pwd&whichchoice=1003&option=1
Retrieved: https://www.kingdomofloathing.com/choice.php?pwd&whichchoice=1003&option=1
Field: Location = [choice.php]
Requesting: https://www.kingdomofloathing.com/choice.php
Retrieved: https://www.kingdomofloathing.com/choice.php
ResponseText has 18723 characters.
... and the response text is the last response from the Source Terminal.

Now, we do send the saved response from the last choice, rather than KoL's response for visiting the source terminal.
I'll fix that, but KoL is certainly behaving weirdly.
 

Veracity

Developer
Staff member
Actually, the response text is what Ezandora's Source Terminal relay script does with the response text that KoL sent back for "choice.php".
KoL sent a response which said internally it was choice 1191, so choice.ash called choice.1191.ash with that response.

This is, at heart, a KoL bug. I don't see anything sensible I can do with this.
 

Crowther

Active member
I've always suspected this was a KoL bug, but never verified it. Like you, the main place I see it is maximizing for the tower tests. Thanks for looking into it.
 

Veracity

Developer
Staff member
I can sort of see how it works.

- Go to the source terminal
- Get init.enh
- Do not exit the source terminal or "walk away" from it
- (At the lair) submit a choice.php request for a different whichchoice
--> KoL thinks you are still in the source terminal choice (since you didn't walk away) and redirects to choice.php
--> When the browser requests that URL, the response is what you'd see when simply visiting the source terminal.

You CAN click the "off switch", which will exit the terminal.
I wonder what would happen if I made the "terminal" command do that after doing the educate/extrude/enhance/enquiry command?

Edit: actually, that just takes you to campground.php. Which is probably "walking away".
WIll experiment.
 
Last edited:

Veracity

Developer
Staff member
Nope. I tested with the pillkeeper, since that has a "do nothing" option.

- I made the terminal command end with a call to campground.php
- I opened the pillkeeper in the Relay Browser
- I invoked a "terminal" command from the gCLI
--> It ended with a casll to campground.php, as expected.
I clicked on the do nothing option of the pill keeper

choice.php?pwd&whichchoice=1395&option=9
No redirect. ResponseText has 18283 characters.
It is the source terminal - whichchoice = 1191
 
For the last couple of day, I've gotten stuck in the daycare choice adventure when I use the built-in mafia command to pick up the buff. And today I finally managed to get a debug log.

cli-output:
Purchasing glowing spore pod (1 @ 300)...
Purchases complete.
Preference _daycareSpa changed from false to true
You acquire an effect: Uncucumbered (100)
You are currently in a choice.

Code-snippet that keeps failing (just in case it has to do with the next attempted action):
Code:
StockUp(1,$item[glowing spore pod],123,567);
if ( !get_property_bool("_daycareSpa") && !has_effect($effect[Uncucumbered]) && (get_property_bool("daycareOpen") || get_property_bool("_daycareToday")) ) {
	cli_execute("debug on");
	cli_execute("daycare mysticality");
	cli_execute("debug off");
}
if ( has_effect($effect[Hypnotized]) )
	cli_execute("uneffect Hypnotized");
if ( get_property_int("_freeBeachWalksUsed") < 11 && !has_effect($effect[We're All Made of Starfish]) && !contains_text(","+get_property("_beachHeadsUsed")+",",",7,") )
	cli_execute("beach head mysticality");

Edit: the null pointer error at the start of the debug log is unrelated (I think), but might want a fix too/anyway.
 

Attachments

  • DEBUG_20191123.txt
    50.6 KB · Views: 10

Veracity

Developer
Staff member
It would certainly be the next action that failed.

Code:
[color=green]> debug on[/color]

[color=green]> daycare mysticality[/color]

You acquire an effect: Uncucumbered (100)

[color=green]> up Phat Loot[/color]

Casting Fat Leon's Phat Loot Lyric 3 times...
You acquire an effect: Fat Leon's Phat Loot Lyric (60)
Fat Leon's Phat Loot Lyric was successfully cast.

[color=green]> ashq visit_url( "inventory.php" )[/color]

[color=green]> debug off[/color]
Not happening for me. All of the daycare choices are walk-away-able.
Does it abort your script when you are currently in a choice? What does the "choice" command say in the gCLI?
 
last_choice() and available_choice_options() both thought I was in the main daycare choice (1334), run_choice(4) didn't resolve it when tried those a couple of days ago, but clicking main.php in the relay browser worked fine.
And yes, it aborts my script, it doesn't show the red color of that last line in the above cli-copypaste.
 
Last edited:

Veracity

Developer
Staff member
The issue was that your "next action" was combing the beach - and there was a bug in BeachCombRequest that broke things when you are in a choice you could walk away from.
That was fixed in revision 19851 on March 14 - almost 4 months since you reported the problem.

I think that is last outstanding bug in this thread, so I will close it.
 
Top