MacGuffin 2.0 -- level 11 quest, automated

Nope, because there's an infinite loop on buying the tree. You COULD hook it using a modified form of Rinn's old Mr Alarm check... something like:
Code:
boolean alarm_fight()
{
 request_noncombat(0);
 buffer page = visit_url("adventure.php?snarfblat=50");
 
 if (contains_text(page, "Combat"))
 {
   run_combat();
 }
 else if (contains_text(page, "Mr. Alarm"))
 {
  run_choice(page);
  return true;
 }
 else
 {
  run_choice(page);
 }
 return false;
}

Basically, if it's combat, run combat. If it matches text (in this example, Mr. Alarm. In the case of the Spooky Forest, you'll want to match Arboreal Respite or something like that instead) that you want, give it the specific choices, one at a time... Actually, that sort of tempts me to make a script bit for that now. :D

Haven't gotten to test this yet, but here goes... Unlock Temple should use the following logic:
Loop the following as long as adventures remain, if temple.gif doesn't show up in woods.php...
1) Adventure in the Spooky Forest.
2a) If combat, run combat.
2b) If Arboreal Respite, more handling, listed below.
2c) If other non-combat, use run_choice.
3) Check if we have a map, fertilizer, and a sapling. If so, use the map and return true.
4) Return false.

Arboreal Respite handling should do the following.
1) If a tree-holed coin exists, get a map. 3/3/1.
2) If no map exists, get a tree-holed coin. 2/2.
3) If no fertilizer exists, get some. 3/2.
4) If no sapling exists, get one, selling bar skins along the way if we have them to increase chances of meat being available. 1/3/<check for skins, if multiple 2, if single, 1, if none, skip>/3/4.

Edit: Also included run_choice() from Find Adventure.ash, so it doesn't have to be found separately.

Put this in the Rinn scripts thread, since it directly replaces the Unlock Temple script from there.
 
Last edited:
See post 164. After the "hiddencity temple" command, which evidently won't actually fight the final spectre, I added your run_combat() call.

I took a look and it seems you failed to steal something else. I've found that adv1() requires cli_execute("mood execute; burn extra"); to follow it, or else mood and mana burning are not maintained.
 
Since the script checks for whose concert you're flyering when it first loads, would it make sense to get the flyers immediately, so that if you've set it to flyer everything, it can start flyering the various earlier fights and work towards it (for those of us running BM Wossnames who need to get HitS everytime) earlier? It won't hurt the people who have flyer everything turned off, and it saves some turns later on for the FE people. Thanks! :)
 
Gaudy keys have broken the script. It'll adventure continuously even after you get 2 keys. The breakdown happens on line 75. Since the script uses obtain(), I'm not sure where the collapse occurs, with the script, zlib, or Mafia.
 
It's because it wants 2 charms, not 2 keys... To fix, you need to convert it to try to check charm count, check key count, and collect 2-both numbers in keys. Once that's done, use the keys, then create the talisman.

This is what I'm using in Rinn's Level 11 quest script:
PHP:
      if (available_amount($item[snakehead charrrm]) < 2)
      {
       cli_execute("conditions clear");
       add_item_condition(2-available_amount($item[snakehead charrrm])-available_amount($item[gaudy key]), $item[gaudy key]);
       adventure(request_monsterlevel(my_adventures()), $location[Belowdecks]);
       use(available_amount($item[gaudy key]), $item[gaudy key]);
      }

Edit: Confirmed today that this worked to automate for me.
 
Last edited:
Ummm yeah. What Theraze said. I am so glad I collected 59 gaudy keys...

That's what happens when you play from work and have to go to a meeting.

*sigh*
 
Also, if you want it to be super-robust, then the conditional can be
Code:
 if (available_amount($item[snakehead charrrm]) + available_amount($item[gaudy key]) + 2 * available_amount($item[talisman o' nam]) < 2)

Although I'm not sure that it'd change anything.
 
Last edited:
Well, in the Rinn code at least, all of this is inside this conditional already:
if (available_amount($item[Talisman o' Nam]) == 0)
{ if (creatable_amount($item[Talisman o' Nam]) == 0)

I suppose I could make it double check that nobody has manually found and created a talisman during the half second it takes to get from verifying that there's no talisman, to that the belowdecks is unlocked... but most people don't click that fast. :)
 
Didn't Jick say in one of the recent radio shows that he would fix it so that you couldn't get more than any combination of two of the keys and charrms? (meaning it might fix itself sometime...)
 
But still, running the extra ~150 or so adventures that would otherwise have gotten the 59 (or 2, with change) charrms... quite a waste. The issue isn't getting 59 charrms... it's that the script didn't stop after it got 2.
 
I added code to my local version to get ratchets instead of wheel noncombats. I changed
Code:
      return obtain(1,"choiceadv",$location[middle chamber]);
to
Code:
      if(to_boolean(vars["macguffin_ratchetsonly"]))
      {
         obtain(1,"tomb ratchet",$location[upper chamber]);
         return use(1,$item[tomb ratchet]);
      }
      else
      {
         return obtain(1,"choiceadv",$location[middle chamber]);
      }
 
For some reason macguffin is skipping getting the mega gem:

Verifying ingredients for wet stunt nut stew (1)...
Creating wet stunt nut stew (1)...
You acquire an item: wet stunt nut stew
Successfully created wet stunt nut stew (1)
Well, it's time to go stop evil "agnieb" Dr. Awkward being alive. (pots! O got emit still! ...ew)
 
For some reason macguffin is skipping getting the mega gem:

Verifying ingredients for wet stunt nut stew (1)...
Creating wet stunt nut stew (1)...
You acquire an item: wet stunt nut stew
Successfully created wet stunt nut stew (1)
Well, it's time to go stop evil "agnieb" Dr. Awkward being alive. (pots! O got emit still! ...ew)

I saw something like this a couple of weeks ago but thought it was operator error. I'll see if it occurs again and I can provide additional information.
 
I know most folks will be able to do this on their own, but just in case someone doesn't know how and they come looking . . .

The new Knob revamp changed some location values for Mr. Alarm and the lab key.

You'll get errors like these -
Bad location value: "goblin kitchen" (macguffin.ash, line 183)
Bad location value: "goblin lab" (macguffin.ash, line 199)
Bad location value: "goblin laboratory" (macguffin.ash, line 205)

To fix, go to your scripts directory, open macguffin.ash and go to the line indicated.
Replace references to the kitchen with Knob Kitchens and references to the lab with Knob Laboratory

If you didn't update your mafia build to the latest this won't fix anything at all and you'll feel silly if you ask about it later, so go ahead and verify that as well while you are thinking about it. : )
 
Last edited:
Also, I think the standard on most replacements has been to do "knob" instead of "cobb's knob", as that works for both the old and new. Though the old areas don't work anymore, but...
 
That usually happens after editing a script in a non-text-only editor. Editors such as WordPad which allow you to format text save extra formatting information in the file, meaning mafia can't parse it. Use a text-only editor like NotePad or TextEdit or Notepad+.
 
Back
Top