MacGuffin 2.0 -- level 11 quest, automated

I agree that AFUE shouldn't be used unless required.

From a low-skilled perspective...
I'm generally running a fairy thru hidden city unless I'm getting badly beaten in which case I'd shift to a whelp/starfish type. If I've found the spectre and I was unprepared, then I'd most likely pray as I tried various combat items knowing I'll lose and end up dead lol.

If I'm prepared, I'd probably have some elemental dmg pool ball, ninja hot pants, asshat, dirty hobo gloves, unless I've found better elemental damage gear along the way. As a DB, sometimes I'll use Disco Inferno combo, maybe chronic indigestion skill... the spookyraven manor quest skills are handy if I have them.

As a caster I'd just entangle and blast shit up. I say this though i haven't done a HC caster yet, but in SC I always have a chefstave and big bumboozer/plethora of spellbooks.

Muscle class, TT, I'd try to get a painted shield or some other elemental damage shield; Seal clubber, I always run snarl once I have it.

I am far from optimal and I always manually adventure there and come and go from the hidden city as HP permits.
 
I often sling love songs, or bottles of alcohol, or in BM I've been sticking on any old +elemental gear I happen to have, all the way down to the hobo gloves if needed, if I didn't get an elemental damage skill/spell as part of my usual rotation.

Unfortunately I'm slogging through early BM right now, and my softcore multi /just/ finished the hidden city, or I'd gladly offer to test. If you still need testing pre-release in...um...six or eight days............

I'm looking forward to it, regardless.
 
Does this script restart whenever I open mafia? Whenever I run it, it always says

'Black market found.
Obtaining diary...
Purchasing forged identification documents (1 @ 5,000)...
Desired purchase quantity not reached (wanted 1, got 0)
You need 1 more forged identification documents to continue.'

But I have already gotten the dairy, please help
 
Okay, so here's what we've got so far regarding specters.

Pre-combat:

EFFECTS: Spookyraven buffs, eating a spicy burrito. No one mentioned getting elemental damage effects from items (i.e. fire flower), so perhaps it's not worth including. (?)
GEAR: dragon stickers, offhand pool ball, ninja hot pants, asshat, dirty hobo gloves, painted shield or some other elemental damage shield, haiku katana. Prefer familiar equipment that adds elemental damage (e.g. ant hoe)??
FAMILIAR: No one mentioned relying on an elemental attack familiar (e.g. a MAS), but I think it would be good for the script to include that. I think the elemental gravy fairies would be particularly handy, myself, although initial calculations show that at low weights they would not contribute enough damage by themselves. Although the attack rate is only on the Wiki for the sleazy fairy, it seems likely that they all behave identically (attack 33% of the time).

In-combat:

IDENTIFY SPHERES, then:
SKILLS: any Myst-class elemental attack, Spookyraven attacks, Winter's Bite, chronic indigestion, Disco Inferno combo
ITEMS: love songs, bottles of alcohol, feathers, others??
ONLY AS A LAST RESORT: scroll of AFUE

So it seems, then, that here is our

Pre-combat Algorithm

  • If able, buy a few cheap items as insurance (love songs or feathers).
  • If sufficient attack skills are present, ensure enough MP. Otherwise:
  • If sufficient items are present (including possible damage from previous), do nothing further. Otherwise:
  • Use Spookyraven buffs (Snarl, Dirge). If this is sufficient (added to the results of the previous), do nothing further. Otherwise:
  • Put on some elemental damage gear. By this point the power of a Scratch 'n' Sniff weapon would be maxed, so even if you haven't summoned your weapon yet, if you have even one dragon sticker that seems like an excellent option. Then consider others, keeping in mind survivability and that your to-hit stat must be over 150. Ugh. This is easily the most difficult bit to write.

In-Combat Algorithm

The script would choose, in order of preference:

  • unknown spheres
  • the attack skill or item that does the closest to the target damage needed (help spading the HP of the final specter would be appreciated -- does it scale with your stats?)
  • attack with weapon
  • if you are likely to be beaten up or the combat is round 29 with little chance of victory, a scroll of AFUE

You may find it wasteful to prefer spending MP/items over regular attacks, but the regular attack is the most hit-and-miss, so to speak. Gear-changing is very complicated to code -- it may lower your moxie too much to survive long enough to kill it, or lower your hit-stat too much to connect with your attacks. The other options are far more reliable.

Any further considerations? Do I seem to be going in a good direction with this?
 
A note on the last point of the pre-combat algorithm: the problem of maximizing X while still passing the Y threshold is similar to the problem in levelup: maximize +ML while still keeping the monster hit-able. Point being that if you write a nice general purpose implementation, it might have broader applicability.
 
personally, if I don't have an elemental attack available (non-myst bad moon) I like to farm the grungy bandanna in the bellow decks while getting the talisman pieces. This grants 15 damage per attack. With high moxie or HP this is enough to kill any of the spirits in less than 15 rounds. Add elemental damage weapons and offhand items to make this quicker.
 
I think I will leave vs-specter item farming out of this (there are some good elemental damage items you may get in the Oasis as well during the desert part of the quest), but the script will definitely consider the bandana if you have one; I've used that from time to time myself to smack down those pesky spirits.
 
That was what I was alluding to, it should consider it (and others like happiness, etc) and equip it before adventuring in the hidden city. I was not suggesting that the script deliberately farm for it.
 
I found a small bug that kept causing the manor_of_spooking() function to return false for no good reason.
Lines 167-168:
Code:
if (equipped_amount($item[Lord Spookyraven's spectacles]) == 0 &&
!equip($slot[acc3],$item[Lord Spookyraven's spectacles])) return false;
Should be changed to this:
Code:
equip($slot[acc3],$item[Lord Spookyraven's spectacles]);
if(equipped_item($slot[acc3]) != $item[Lord Spookyraven's spectacles]) return false;

The problem is that !equip($slot[acc3],$item[Lord Spookyraven's spectacles]) will return false whether the spectacles are successfully equipped or not. Just a heads up if anyone else has been having this issue.

Z, as always, thanks for the script and I'm looking forward to the new version with your new hidden city code packed nicely inside!
 
Ah, those pesky unintuitive return values. Thanks for catching that. But, we still need to check before calling equip(), or the script may abort if the spectacles are already equipped and none are in inventory:

Code:
if (equipped_amount($item[Lord Spookyraven's spectacles]) == 0)
   equip($slot[acc3],$item[Lord Spookyraven's spectacles]);
if (equipped_item($slot[acc3]) != $item[Lord Spookyraven's spectacles]) return false;

This will be in the next update.
 
Well, since I've been using obtain a lot lately, I've noticed that if you are wearing an item and you use obtain to try and get it obtain will unequip the item if you have none in inventory. Since obtain(1, "Lord Spookyraven's spectacles", $location[Haunted bedroom]); is the line right before the lines in question a check to see if you are already wearing the spectacles is unnecessary because obtain would have unequipped them. ;)
 
Hmmmm, you're right! That seems to be a rather undesirable side-effect of retrieve_item(). Didn't know it did that.
 
One more thing I had trouble with. I'm not sure when the dusty bottles are supposed to be identified, but it wasn't happening for me. Every time the get_this_wine(int wine_no) function was called it would always abort because none of the wines had been identified and so all the lastdustybottle properties were 0. I added cli_execute("dusty"); after line 170 (the wine puzzle parsing part) and that fixed my the problem this time, but I won't be able to do further testing until next ascension.
 
One more thing I had trouble with. I'm not sure when the dusty bottles are supposed to be identified, but it wasn't happening for me. Every time the get_this_wine(int wine_no) function was called it would always abort because none of the wines had been identified and so all the lastdustybottle properties were 0. I added cli_execute("dusty"); after line 170 (the wine puzzle parsing part) and that fixed my the problem this time, but I won't be able to do further testing until next ascension.

They're supposed to be identified when you get the glasses. If they aren't, you can use the dusty command like you did to identify them.
 
Running the script on multiple computers is one way this could happen. But however it happened, the fix would be calling "dusty" if the properties haven't yet been updated this ascension. I'll add that in as well. Thanks for the debugging work, Ninj.
 
If you are wearing the spectacles and visit the item description for the bottles, you can still ID them, even without any bottles in inventory. Mafia does this automatically when you first get the spectacles, but evidently in some cases it doesn't happen as it should, so adding a failsafe to the script is a good idea.
 
Please forgive in advance my fairly newbie-esque question, but I appear to be having a problem with this script. When I try to run this script, I get the following error: Undefined reference to function 'max' (zlib.ash, line 208). On a semi-related note, whenever I try to run any of the functions in the zlib.ash script, I get the error: Unable to invoke int.

I'm sure there's some silly little thing that I'm overlooking, but I'm afraid I can't figure out what exactly it is myself.

Thanks in advance.
 
Back
Top