Bug - Fixed Untinkering from the CLI doesn't work

psly4mne

Member
Not sure if this is a duplicate, but I couldn't find a relevant open report.

I hit level 9 and entered "untinker abrid" in the CLI. Mafia bought the abridged dictionary, then attempted to untinker it without accepting the untinker's quest and failed silently. I manually accepted the quest, and then it worked.
 

Theraze

Active member
It's a duplicate to what I posted here: http://kolmafia.us/showthread.php?5...it-innabox-link.&p=38603&viewfull=1#post38603

But that got ignored, so... I use a modified form of Rinn's untinker script (actually posted just above that) to unlock the untinker, because mafia has always been flaky about detecting whether or not the untinker is actually unlocked for me...

Edit: Basically, the issue is that since the move, you actually have to accept the untinker's quest. In that closed bug, they decorated the relay brower with the proper links to do the quest, but skipped actually ever actually starting the quest for people using the gCLI.

As well, the gCLI hasn't been intelligent about whether or not you've completed the quest. If you type untinker without parameters even after completing the quest, you'll get a request to rerun the quest again, which will use all your turns on the knoll as you'll never get another screwdriver...
 
Last edited:

Theraze

Active member
Example of mafia's current untinker handling.

First is me running untinker, and it trying to find the screwdriver without accepting the quest. I cancelled partially through the third autoadventure, hence the odd location of the could not complete notice.

Second is me running Rinn's script, it accepting the quest, and completing it.

Third is me running untinker, and it trying to find the screwdriver... again. As I only had one adventure left, it failed on its own.
> untinker
Request 1 of 7 (Plains: Degrassi Knoll) in progress...
[496] Degrassi Knoll
Encounter: Gnollish Plungermaster
Strategy: C:\Program Files (x86)\KoLMafia\ccs\default.ccs [default]
Round 0: Theraze wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Monster value: 42.91
HP/round from Mosquito: 3.25
Profit per round: 21.67
No stasis item found!
You don't have any stasis items.
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: gnollish plungermaster takes 65 damage.
You gain 21 Meat
You gain 1 Beefiness
You gain 2 Mysteriousness
You gain 2 Smarm
Request 2 of 7 (Plains: Degrassi Knoll) in progress...
[497] Degrassi Knoll
Encounter: Gnollish Flyslayer
Strategy: C:\Program Files (x86)\KoLMafia\ccs\default.ccs [default]
Round 0: Theraze wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Monster value: 37.66
HP/round from Mosquito: 3.25
Profit per round: 21.67
No stasis item found!
You don't have any stasis items.
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: gnollish flyslayer takes 70 damage.
You gain 15 Meat
You gain 1 Muscleboundness
You gain 3 Chutzpah
Request 3 of 7 (Plains: Degrassi Knoll) in progress...
KoLmafia declares world peace.
[498] Degrassi Knoll
Encounter: Gnollish Plungermaster
Strategy: C:\Program Files (x86)\KoLMafia\ccs\default.ccs [default]
Round 0: Theraze wins initiative!
Unable to complete untinkerer's quest.
Round 1: Theraze attacks!
Round 2: gnollish plungermaster takes 66 damage.
Round 2: Tog sucks some blood out of your opponent and injects it into you.
Round 2: gnollish plungermaster takes 6 damage.
You gain 6 hit points
You gain 17 Meat
You acquire an item: Gnollish plunger
You gain 2 Beefiness
You gain 1 Wizardliness
You gain 2 Cheek
> call untinker
Accepting quest to find the Untinker's screwdriver
Countdown: 1 second...
Waiting completed.
Conditions list cleared.
Condition added: rusty screwdriver
rusty screwdriver
Mood swing complete.
Request 1 of 4 (Plains: Degrassi Knoll) in progress...
[499] Degrassi Knoll
Encounter: Gnollish Workshop
You acquire an item: spring
You acquire an item: sprocket
You acquire an item: cog
Request 2 of 4 (Plains: Degrassi Knoll) in progress...
[500] Degrassi Knoll
Encounter: Gnollish Gearhead
Strategy: C:\Program Files (x86)\KoLMafia\ccs\default.ccs [default]
Round 0: Theraze wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Monster value: 46.3
HP/round from Mosquito: 3.25
Profit per round: 21.67
No stasis item found!
You don't have any stasis items.
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: gnollish gearhead takes 70 damage.
You gain 15 Meat
You acquire an item: Gnollish toolbox
You gain 2 Fortitude
You gain 2 Magicalness
Request 3 of 4 (Plains: Degrassi Knoll) in progress...
[501] Degrassi Knoll
Encounter: Screwdriver, wider than a mile.
You acquire an item: rusty screwdriver
Conditions satisfied after 3 adventures.
> untinker
Visit to Plains: Degrassi Knoll in progress...
[502] Degrassi Knoll
Encounter: one-eyed Gnoll
Strategy: C:\Program Files (x86)\KoLMafia\ccs\default.ccs [default]
Round 0: Theraze wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Monster value: 33.31
HP/round from Mosquito: 3.25
Profit per round: 21.67
No stasis item found!
You don't have any stasis items.
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: one-eyed gnoll takes 79 damage.
You gain 16 Meat
You gain 2 Beefiness
You gain 1 Wizardliness
You gain 2 Cheek
Conditions not satisfied after 1 adventure.
Unable to complete untinkerer's quest.
 
Last edited:

Veracity

Developer
Staff member
In that closed bug, they decorated the relay brower with the proper links to do the quest, but skipped actually ever actually starting the quest for people using the gCLI.
By golly, you are right! That "closed bug" had the title "Latest change to untinkerer quest needs matching change to the [visit innabox] link". I fixed that.

Now, just because somebody adds a whole bunch of other crap to a bug report doesn't mean that the other crap needs to be addressed before the original bug gets to be marked fixed.

But that got ignored, so...
Uh-yup. You apparently imagined that KoLmafia's internal quest-completion code was, somehow, related to Relay Browser "use links". It's not.

As well, the gCLI hasn't been intelligent about whether or not you've completed the quest. If you type untinker without parameters even after completing the quest, you'll get a request to rerun the quest again, which will use all your turns on the knoll as you'll never get another screwdriver...
Considering that I have always done the untinker's quest in the Relay Browser, I can't say I've ever seen the Untinker menu item or gCLI command try to unlock it. And considering that I ascended 3 days ago - and visited the untinker and accepted and did his quest in the Relay Browser without even considering that I should try it any other way - it will be a LONG time before I can look at, fix, and verify this issue.
 

Theraze

Active member
Well, you can see the buggy command if you type untinker into the gCLI, as opposed to untinker <item>... it'll decide that you must not have completed the quest, and if you allow it, start trying to run the quest again.

Possible fixes:
Check the Untinker before deciding you must not have completed the quest, every time. Means another server hit, but skips the extra adventuring server hits.

Save a preference, lastUntinkerAscension. If value is set to this ascension, can_untinker returns true. If value is not set to this ascension, check the untinker. If quest is done, set preference. If quest is not started, accept quest. Then run adventures. If quest is completed, set preference.

Remove the gCLI quest completion completely. People can always use relay browsers and scripts, and at least then it won't burn through all their adventures fruitlessly.
 

psly4mne

Member
By golly, you are right! That "closed bug" had the title "Latest change to untinkerer quest needs matching change to the [visit innabox] link". I fixed that.

Now, just because somebody adds a whole bunch of other crap to a bug report doesn't mean that the other crap needs to be addressed before the original bug gets to be marked fixed.


Uh-yup. You apparently imagined that KoLmafia's internal quest-completion code was, somehow, related to Relay Browser "use links". It's not.
Yeah, I saw that report, and I thought I remembered some discussion of this behavior there, but I decided it was sufficiently unrelated that it would be better to open a new report.


Considering that I have always done the untinker's quest in the Relay Browser, I can't say I've ever seen the Untinker menu item or gCLI command try to unlock it. And considering that I ascended 3 days ago - and visited the untinker and accepted and did his quest in the Relay Browser without even considering that I should try it any other way - it will be a LONG time before I can look at, fix, and verify this issue.
I'm usually under a muscle sign, so I've always filed the untinker quest under "things I can ignore entirely thanks to mafia". The CLI command and the menu item have started and completed the screwdriver quest as long as I can remember. I didn't know they also did that under a non-muscle sign - I would always want to do that by hand, since it involves actual adventuring, but it's not as important. I'll be ascending in a few days, so I can get everything you need then, if you tell me what that is. Page source of the Untinker pre-quest? That would seem to be enough, as the commands could submit whatever clicking the "accept" button does, and then continue as they already do.
 

Theraze

Active member
It's posted in the earlier post...
PHP:
 if (contains_text(visit_url("forestvillage.php?place=untinker"),"I lost my screwdriver somewhere"))
  visit_url("forestvillage.php?place=untinker&action=screwquest");

Basically, if the visit to the untinker says "I lost my screwdriver somewhere" then you should visit the untinker again with action as screwquest. If it doesn't say "I lost my screwdriver somewhere" or the other message... I believe that one is about really needing his screwdriver... that full message would be nice. Though I can get that myself tonight I suppose. The question is which of those 3 we'd like it to do...
 

Theraze

Active member
HTML Bits.

Before you start the quest:
<tr><td><centeR><table><tr><td><img src="/images/otherimages/untinker.gif" width=60 height=100></td><td valign=center><b>The Untinker</b></td></tr></table></centeR><br>"Hey, man -- is an adventurer you? I lost my screwdriver somewhere near Degrassi Knoll, but every time I try to get it back, the Gnolls punch me in the eye.<p>You look pretty tough, though -- do you think you could get it back for me?"<center><form action=forestvillage.php method=post><input type=hidden name=action value=screwquest><input class=button type=submit value=""Sure Thing.""></form></center></td></tr></table></center></td></tr>

Starting the quest:
<centeR><table><tr><td><img src="/images/otherimages/untinker.gif" width=60 height=100></td><td valign=center><b>The Untinker</b></td></tr></table></centeR><br>"Thanks! I'll tell ya, I'm just lost without my screwdriver. Here, lemme mark the Knoll on your map."<font size=1>[<a href="adventure.php?snarfblat=18">Degrassi Knoll</a>]</font><P><center><table width=400 cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>New Area Unlocked</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td valign=center><img src="/images/adventureimages/knoll.gif"></td><td valign=center class=small><b>Degrassi Knoll</b>, on the <a class=nounder href=plains.php><b>Nearby Plains</b></a>.</td></tr></table></center></td></tr></table></center>

Returning back to the Untinker during the quest:
<centeR><table><tr><td><img src="/images/otherimages/untinker.gif" width=60 height=100></td><td valign=center><b>The Untinker</b></td></tr></table></centeR><br>"Have you had any luck finding my screwdriver? I lost it at Degrassi Knoll, you'll recall."<font size=1>[<a href="adventure.php?snarfblat=18">Degrassi Knoll</a>]</font></td></tr></table></center>
 

Theraze

Active member
A note... the bug regarding it wanting to repeat the quest happens anytime you go to Untinker and you don't have any untinkerable items. This makes the untinker page not have the item selection box, making mafia not have the dropdown that it currently matches to decides whether or not you've completed the quest.

A better choice would be matching for the screwdriver messages.
 

Edir

Member
Autosolving the untinker sign as muscle for the chasm doesn't work

Was playing a Muscle sign, had not yet gotten the screwdriver for the untinker.

I tried to autoadventure in the chasm(which wasn't bridged yet) and mafia bought an abridged dictionary and visited the untinker - to untinker it for the bridge, obviously.

However that didn't work - it got stuck, and actually ended up buying more than one abridged dictionary, so I had to do get the screwdriver from the knoll manually to progress..

It's not a big thing but it should be able to do spare you the few clicks it takes to do this as Muscle...
 

jijineiro

Member
Automated untinkerer quest

Mafia asked me if I want it to solve the untinkerer quest for me (I was at the chasm quest and didn't get the screwdriver yet). I answered yes and Mafia started adventuring in the knoll. But it didn't accept the quest first, so basically was just wasting adventures. I stopped automated adventuring, I accepted the quest manually and completed it one manual adventure later. Obviously there was no debug log and the cli output I think is useless as it contained just normal adventures from the knoll.

Mafia 9089 - daily build (.jar)
 

slyz

Developer
Look at the session log: if Mafia did try to visit the Untinker when you were asked if you wanted to automate the quest, there should be a line with the URL to the Untinker.
 

jijineiro

Member
OK, I just looked at the session log and this is the relevant bit:

untinker * abridged dictionary

[670] Degrassi Knoll
Encounter: one-eyed Gnoll
[671] Degrassi Knoll
Encounter: Gnollish Plungermaster
.....
[698] Degrassi Knoll
Encounter: Gnollish Workshop
[699] Degrassi Knoll
Encounter: Gnollish Gearhead

Accepting quest to find the Untinker's screwdriver
[700] Degrassi Knoll
Encounter: Screwdriver, wider than a mile.
You acquire an item: rusty screwdriver

Visiting the Untinker
untinker 1 abridged dictionary
You acquire an item: bridge
You acquire an item: dictionary

At adventure 699 I stopped mafia and took care of the quest manually. There's no URL at all in between those lines.
 

Theraze

Active member
Yeah. The issue is, when you tell mafia to automatically solve the quest for you, it doesn't accept the quest... just starts adventuring without any hope of success. :)
 

lostcalpolydude

Developer
Staff member
I used this patch to get mafia to grab the screwdriver and untinker an item as a muscle class when I used a CLI command to untinker an item (NPZR head, not that it matters).
 

Attachments

  • untinker.patch
    947 bytes · Views: 21

fronobulax

Developer
Staff member
That patch is pretty close to what I wrote but have not tested. I'll try and commit something later today.
 

fronobulax

Developer
Staff member
r9245

I tested it on a non-muscle sign and have every reason to believe it will work for a muscle sign. Basically, if mafia thinks you have not completed the quest, it will accept the quest before attempting to complete it.
 
Top