Bug - Fixed "[use] link" generated when acquiring an LT&T telegram does not work

Boesbert

Member
When getting a telegram from the LT&T office, the text looks something like this

You acquire an item: plaintive telegram use

You can read it now or read it later from your inventory.

Clicking on the "read it now" link correctly transports one to the "The Investigation Begins" encounter. Clicking on the "use" link however takes one to the inventory, where at the top the following message is displayed:

Results:
Reading the telegram...

The process stops here. No actual redirect to the "The Investigation Begins" encounter or anything else is taking place.

I am not sure why the debug log got so massive. I turned it off before getting a (new) telegram, turned it on before getting one, got the telegram, then clicked on the use link, then turned it off. Did this with r17422. I am using Chromium (Version 53.0.2785.143 Built on Ubuntu , running on Ubuntu 16.04 (64-bit)), my usual relay scripts that are running are Ezandora's guide and Bale's chit.

View attachment DEBUG_20161123.txt.zip
 
Last edited:

Veracity

Developer
Staff member
Interesting. The "plaintive telegram" is marked "usable", so KoLmafia adds a [use] link which does this:

inv_use.php?which=3&whichitem=8837&pwd

KoL itself lets you:

Read it now: adventure.php?snarfblat=474
Read it later from your inventory: inventory.php?which=3

I bet that when it is in your inventory, the [use] link goes straight to adventure.php.

Our "use" link is redundant, but if we add it, we should go right to adventure.php. Especially since going to inv_use behaves like this:

Requesting: https://www.kingdomofloathing.com/inv_use.php?which=3&whichitem=8837&pwd
Retrieved: https://www.kingdomofloathing.com/inv_use.php?which=3&whichitem=8837&pwd
Field: Location = [inventory.php?which=3&action=message]
(redirect)
Requesting: https://www.kingdomofloathing.com/inventory.php?which=3&action=message
Server returned response code 403 (Forbidden)

That's a new one on me. 4xx codes are "client errors" - i.e., it is the Browser's fault for submitting that. Considering that KoL itself gave us a redirect to the URL we submitted, that seems harsh. But, I do believe that KoL itself would not have given the Browser an inv_use.php URL for this item.

Perhaps the right solution is to mark the plaintive telegram as not "usable" since you cannot, in fact, "use" it via inv_use.php. That would make us not generate a "use" link and would prevent you from trying to use it from the Item Manager.

(Note that if we mark it NO_CONSUME, we can add a redundant navigation link which would go to adventure.php. Although, why bother, since KoL gives you that link?)
 

Veracity

Developer
Staff member
Revision 17426 marks it as "none". So, no redundant "use" link. Use KoL's "investigate it now" link.
 
Top