I got something working, feel free to use this code if you want, I'm not confident enough to submit it as a pull request, but it works for me.
session/ResponseTextParser.java line 323 add:
Java:
} else if (responseText.contains("How do you want to digest the legendary noodles?")) {
AdventureResult item = ChoiceManager.lastItemUsed;
if (item != null) {
UseItemRequest.setLastItemUsed(item);
UseItemRequest.parseConsumption(responseText, false);
SpadingManager.processConsumeItem(item, responseText);
UseItemRequest.clearLastItemUsed();
}
request/UseItemRequest.java line 1419 add:
Java:
if (!this.responseText.contains("How do you want to digest the legendary noodles?"))
I tested eating from the command line, "eat 1 Linguini Ubriacapa", it works properly. It gives "Unsupported choice adventure #1599", which is currently expected, so support for that choice adventure might need to be added.
When I run the following ash script:
Code:
$item[Linguini Ubriacapa].eat(1);
run_choice(5);
it crashes the script before the run_choice with "Unsupported choice adventure #1599". I assume that adding that adventure will fix this problem and let run_choice(5) do its work.
I also tested it with visit_url("inv_eat.php?pwd=" + my_hash() + "&which=f1&whichitem=12240"); and run_choice(5) after that succeeded. Which is probably good enough for scripting.
I tried eating it with Milk of Magnesium and Special Seasoning. The Milk of Magnesium message wasn't included in the choice.php response even though it added 5 adventures, so it wasn't able to parse that consumption out. I will bug report that to KoL developers. But the Special Seasoning worked correctly. And the number of Linguini Ubriacapa was also decremented properly. So it all seems to work.
Also, the result of choice 1599 should probably be reported to the CLI/Log.
Edit: fixed the code for bugs it introduced. My previous code caused bugs related to Mayam calendar and archaeologist's spade (and potentially other items) when scripting.