Results 1 to 5 of 5

Thread: Tracking the Daily Lyle buff at the Monorail

  1. #1
    Senior Member Erich's Avatar
    Join Date
    Jul 2010
    Posts
    388

    Default Tracking the Daily Lyle buff at the Monorail

    Every day you can hit up Lyle to get the "Favored by Lyle" buff at the monorail (place.php?whichplace=monorail&action=monorail_lyl e). I would like to ask for a pref that tracks whether or not you nabbed it for that day.

    Thank you kindly

  2. #2
    Developer
    Join Date
    Apr 2010
    Posts
    4,751

    Default

    So I'm probably being dumb, or just haven't woken up yet, but where would we put the checks for this page?
    place.php?whichplace=monorail&action=monorail_lyle redirects to choice.php?forceoption=0, but there is then no choice number in evidence.

    (Other than that have a patch which does this and adds it to maximizer).

  3. #3
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,386

    Default

    I visited in the relay browser:

    https://www.kingdomofloathing.com/place.php?whichplace=monorail
    https://www.kingdomofloathing.com/place.php?whichplace=monorail&action=monorail_lyle
    Field: Location = [choice.php?forceoption=0]
    https://www.kingdomofloathing.com/choice.php?forceoption=0
    You acquire an effect: Favored by Lyle (10)

    You are correct: it is handled by a redirection to a choice page, but we never get to see which one it is.

    Looking at ChoiceManager, I see that we've encountered this difficulty before.

    Code:
    		case 1093:
    		{
    			// The WLF Bunker
    
    			// The following won't work, since visiting the WLF bunker is:
    			//     place.php?whichplace=airport_hot&action=airport4_questhub
    			// which redirects to
    			//     choice.php?forceoption=0
    			// but if there is no "whichchoice" on that page, we won't know
    			// to come here.
    
    			// You enter the bunker, but the speaker is silent. You've already done your day's work, soldier!
    			if ( text.contains( "the speaker is silent" ) )
    Perhaps we could add something to ChoiceManager to handle "forceoption=0"pages that don't actually have a choice on the page. I see the following code in ChoiceManager.visitChoice():

    Code:
    	public static void visitChoice( final GenericRequest request )
    	{
    		String text = request.responseText;
    		ChoiceManager.lastChoice = ChoiceManager.extractChoice( text );
    
    		if ( ChoiceManager.lastChoice == 0 )
    		{
    			// choice.php did not offer us any choices.  This would
    			// either be a bug in KoL itself or a non-choice page
    			// that you can visit at any time that we don't know
    			// about yet.
    			return;
    		}
    That spot right there with the "did not offer us any choices" comment. That could call a method which would look at the response text to deduce what it can - like WLF bunker or Lyle stuff. Or, perhaps better, if we saved the place you redirect FROM, that method could look at that and do (stuff) for the WLF bunker and (stuff) for Lyle and so on.

  4. #4
    Developer
    Join Date
    Apr 2010
    Posts
    4,751

    Default

    r18583 adds _lyleFavored and adds it to Maximizer.

    Added the check to extractChoice, where we did for Hippy Talkin'. Also fixes visiting Bunker when it is silent (but Bunker checks aren't working after handing in for some reason). Unfortunately we still don't know what choice it is, so added the update to _lyleFavored in extractChoice, which is perhaps hacky.

    Edit - bunker checks handing in worked fine for me today, so working.
    Last edited by Darzil; 05-02-2018 at 06:41 PM.

  5. #5
    Senior Member Erich's Avatar
    Join Date
    Jul 2010
    Posts
    388

    Default

    Thank you both kindly for your work, it's truly appreciated 8^)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •