Nemesis quest script

slyz

Developer
[SIZE=+1]Nemesis.ash[/SIZE]

This script is SVN powered. This means that installing it is as simple as pasting this in the Mafia Command Line Interface:
Code:
svn checkout https://svn.code.sf.net/p/slyz-nemesis/code/

This script will automatically:
  • do the LEW and nemesis Cave quests
  • farm until you get the volcano map
  • unlock the volcano island
  • unlock the nemesis lair for all the classes
  • try to solve the volcano maze

The script will of course spend adventures and possibly a little bit of meat (to buy clownosity items, nemesis cave door items or a 2 handed club for killling Mother Hellseals, if needed), but nothing absurd will happen.

To make it work:
  • Install the script using the SVN command given above.
  • There are a few zlib variables* you can setup to configure the farming:
    - nemesis_farm
    - nemesis_farm_location
    - nemesis_farm_familiar
    - nemesis_farm_outfit
    - nemesis_farm_mood
    - nemesis_farm_CCS
    - nemesis_autobuy_LTS
  • Surviving combats is your responsibility. This generally won't be a problem if you do this after breaking the prism. Simply make sure that the way Mafia is setup for combat when you launch the script is good enough to survive the Poop Deck (although you don't really need to win fights there), or the farming location (if you didn't setup nemesis_farm_CCS).
  • Launch the script by typing call nemesis.ash in the gCLI.

*You can configure those by typing zlib settingname = value in the gCLI. If nemesis_farm is set to something other than 'true', the script will stop so you can spend your adventures as you want while waiting for the henchmen. If you choose to farm, only nemesis_farm_location really needs to be setup (the default is the Giant's Castle). For the rest, the script will either use the zlib setting if it has been set, or the setting you had on when you launched the script.

For the lazy, you can simply equip your meat farming gear, setup your meat farming CCS and mood, get your meat farming buffs, and launch the script: the default farming location is the Giant's Castle.

If you encounter any problem, please post your issues. To help with debugging, you should type zlib verbosity = 10 in the gCLI, run the script and copy here the gCLI log.

Changelog

24.08.10 - ver. 0.1 alpha posted.
07.11.10 - ver. 0.2 alpha: added going through the Nemesis Lair and the Volcano Maze, added DB and S Nemesis Lair unlock.
09.11.10 - ver. 0.3 alpha: added framework for the AT unlock
15.11.10 - ver. 0.31 alpha: fix using bottle of gu-gone for S, make the volcano unlock more verbose, more fiddling with the AT unlock (still not tested)
20.11.10 - ver. 0.32 alpha: fixed the AT unlock, only try to solve the Volcano Maze once
20.11.10 - ver. 0.33 alpha: added a "conditions clear" before each use of adventure()
24.11.10 - ver. 0.4 alpha: added PM unlock, fix recognizing paper strips in edge cases
07.12.10 - ver. 0.5 alpha: added TT unlock (untested), added the nemesis_farm zlib setting.
31.01.11 - ver. 0.51 alpha: various tweaks
13.03.11 - ver. 0.52 alpha: Try to avoid Mafia's current problem with goals
13.03.11 - ver. 0.53 alpha: A couple of bug fixes for the DB part thanks to Theraze
14.04.11 - ver. 0.6 alpha: added SC unlock
18.04.11 - ver. 0.61 alpha: tweak raveosity checking for DBs
18.04.11 - ver. 0.62 alpha: added check for familiar equipment that does damage for mother hellseal killing
02.05.11 - ver. 1: bumped to version 1, added notify, version checking
08.05.11 - ver. 1.1: do not use the return value of equip()
01.06.11 - ver. 1.2: "nemesis_AT_noncombat_keys" is now reset along with other preferences
15.06.11 - ver. 1.3: use the ASH maximize(), remove auto-attack (and restore it when exiting)
28.06.11 - ver. 1.4: use a data file instead of checking the wiki for passive damage sources
18.09.11 - ver. 1.5: add a dummy action at the start of the macro used to liberate turtles
25.09.11 - ver. 1.6: do not rely on a KoL macro to tame turtles, keep trying to solve the volcano maze
14.11.11 - ver. 1.7: you need to tame 6 turtles to open the gates, call nemesisQuest() from a try/finally structure so the script restores your settings after an abort or after the user hits escape
23.01.12 - ver. 1.8: make sure your familiar equipment doesn't deal damage when doing the TT, S and DB parts. Other small bug fixes thanks to Theraze.
24.01.12 - ver. 1.9: respect Zlib's is_100_run familiar if it is set. Avoid equipping the Space Trip safety headphones when doing the DB part.
02.02.12 - ver. 2.0: you have to tame 6 turtles, not 5, so don't say "X/5 turtles tamed".
11.03.12 - ver. 2.1: even mighty Turtle Tamers need to restore HP from time to time.
16.03.12 - ver. 2.2: visit your guild NPC twice after getting your EW, to make sure the Fun House is available.
09.09.12 - ver. 2.3: only restore the autoattack before exiting the script.
09.09.12 - ver. 2.4: restore the choiceAdventure189 setting when exiting.
20.10.12 - ver. 2.5: stop using Zarqon's regretted map manager.
27.10.12 - ver. 2.6: fix matching of special raver moves.
21.02.13 - ver. 2.7: use "Giant's Castle (top floor)" as the default farming location. Add more possible drinks for the DB nemesis cave unlock, thanks to janusfenix.
07.11.13 - r1: Migrate to SVN. Commit messages can now be browesed here
.
 
Last edited:

Winterbay

Active member
So, if you like me generally do this in-run then it does not yet do anything for me? I generally try to get my LEW and farm some evil parts during run...
 

slyz

Developer
Well, because of the 150 advs spend farming in the middle, you would have to stop it yourself. But if you can survive the nemesis cave and if retreive_item() manages to make the items for the doors, it should work.

Here are a couple of aliases you can use to break it down in parts:

Code:
alias get_lew => ashq import "nemesis.ash"; get_LEW();
alias nemesis_cave => ashq import "nemesis.ash"; nemesisCave();
alias open_island => ashq import "nemesis.ash"; if(item_amount($item[secret tropical island volcano lair map])>0)openVolcanoIsland();
openVolcanoIsland() will be called only if you have the map already, so the script won't spend 150 or so adventures farming, it will only adventure in the poop deck to get the O'Capn adventure.

I'll be glad to hear any feedback from people using the script, in-run or after breaking the prism.
 
Last edited:

Theraze

Active member
Personally I'm looking forwards to using it. Currently heavily embroiled in Bad Moon, but I'll probably at least try out the LEW and NC bits irregularly before I get to go back to regular HC easiness.

Edit: One possibility... could throw crafting the regular epic weapon in there. Check for big rock (some people may already have one, or be in BM), check (silently) if they have a clover and if so, ask if they want to use it to get a rock (so it doesn't break someone trying to unlock BM), then loot the hermit for the item and smith it with their starting item.
 
Last edited:

slyz

Developer
I'd rather not have a script use a clover for me automatically, getting a big rock is not that hard (it could easily be aliased).

I should check how retrieve_item() handles the worthless items: it might even spend adventures in the sewers to get one to buy the Hermit item.

EDIT: apparently it does. So all you need to start the script is a big rock in your inventory. I had some code in place to craft the EW but I took it out because I was expecting this to be used after breaking the prism (the EW can simply be bought in the mall).

EDIT2: My bad, it will only advenure in the sewer if you specifically want to retrieve worthless items. If you simply ask for a hermit item, it will only use already available worthless items.

EDIT3: Here is a little script that gets your Epic Weapon (untested). You can call it simply by typing call EW in the gCLI.
 

Attachments

  • EW.ash
    2.2 KB · Views: 197
Last edited:

kain

Member
So I tried, without even going to the guild to 'start' the quest:

Code:
> ash import "nemesis.ash"; get_LEW();

nemesis_Step => 0
nemesis_lastReset => 222
Resetting mind control device...
Mind control device reset.
Internal checkpoint created.
Verifying ingredients for 5-Alarm Saucepan (1)...
Verifying ingredients for heavy hot sauce (1)...
You need 1 more jabañero pepper to continue.
Unable to obtain your Epic Weapon, please craft/buy one.
Returned: false

> hagnk 1 5 alarm

Pulling items from storage...
18 pulls remaining,0 budgeted for automatic use.

> ash import "nemesis.ash"; get_LEW();

Internal checkpoint created.
Maximizing (1st time may take a while)...
936 combinations checked, best score 0.0 (FAIL)
Putting on jewel-eyed wizard hat...
Equipment changed.
Wielding finger cymbals...
Equipment changed.
Putting on ASCII shirt...
Equipment changed.
Putting on filthy corduroys...
Equipment changed.
Putting on navel ring of navel gazing...
Equipment changed.
Putting on Mr. Accessory Jr....
Equipment changed.
Unable to meet all requirements via equipment changes.
See the Modifier Maximizer for further suggestions.
Could not obtain Funhouse item
Returned: false
Go to the guild, start the quest, same maximizer issue, pull 4 clownosity (clown buckler/whip), and away we go!

--edit to add--
I'm glad it doesn't auto-pull stuff. Very nice touch. It stopped 'cause it couldn't generate an insanely spicy enchanted bean burrito.

Also, I just noticed it doesn't obtain a LEW by design, nevermind on that part :)
 

slyz

Developer
It wasn't really meant to be used in-run, so I'll add a few checks for sanity (like not farming for 150 advs).

I use retrieve_item() or Zarqon's obtain() function, I never thought of checking if those used pulls!

EDIT: oh, and I also added code to get the Hermit item. I'll put up a newer version after this run.
 
Last edited:

Mr Purple

Member
EDIT - This is a placeholder for a SC script - the initial one was pretty poor, not helped by a lack of testing on my part. I will be working on it, bringing combat into the script, and hopefully making it, you know, usable. Sorry.
 
Last edited:

slyz

Developer
Thanks, I'll take a long hard look once I'm done with this run.

I'm going to avoid making the user setup CCSs and use the 3 variable version of adventure().
 

Mr Purple

Member
Thanks, I'll take a long hard look once I'm done with this run.

I'm going to avoid making the user setup CCSs and use the 3 variable version of adventure().

In which case you'll enjoy this. TT version of script, made to collect snailmail pieces at the same time. As with the SC version, I'm just bringing things up to the Volcano itself, as that's basically the same for each class.
 

Attachments

  • guardTurtles.ash
    1.3 KB · Views: 124

Mr Purple

Member
Time for some myst-class love. Pastamancer and Sauceror version. Pastamancer is tested, and I believe it to work. Sauceror is untested, and I believe it to work. If anyone would like to run these scripts and give feedback, it would be very welcome. They should both pick up from where slyz's original script leaves off, and take you through to the lair. So you need to fight a few guards, then the various versions of your nemesis.
 

Attachments

  • slimeConvention.ash
    2.5 KB · Views: 119
  • cultMembers.ash
    2 KB · Views: 116

Fluxxdog

Active member
So I came across this as I was searching for addresses for the doors. So you know, I'm going to shamelessly carve some of it for use in my own script, but I thought I'd thank you by sharing a library script I developed for my own version.
PHP:
item epic_gear(string type[, string class])
Details for use are in the attached, but it provides any class's different parts of epic gear. If you use it, just import it and uncomment the possess_item() function.
 

Attachments

  • epicgear.ash
    3.7 KB · Views: 122

slyz

Developer
Ver. 0.2 alpha uploaded. I added the DB and Sauceror unlocking. The DB one might be a little quirky (see why here), so more testing is in order. Oh, and I also botched getting the URLs for actually unlocking the Lair once enough Raveosity has been gathered, so if anyone could check the URLs and post them here, I would be grateful.

@Mr Purple: I never thanked you for you contributions, and I haven't ascended into those classes yet to test them, but thanks!

@Fluxxdog: thanks, but I already have the necessary code, and I wanted to minimize the support scripts needed (as well as the configuration options).
 

slyz

Developer
Ver. 0.3 alpha uploaded. I added in the AT unlock, which is almost complete (I just need a way to automatically accept to fight Mariachis in the Barracks, and someone to actually test it).

Oh, and the DB part wasn't as complete as I thought - I realized the Dance Club was actually a two step adventure. When trying to check if the Lair is already unlocked, you might be 'trapped' in that choice.
 
Last edited:

Winterbay

Active member
Ver. 0.3 alpha uploaded. I added in the AT unlock, which is almost complete (I just need a way to automatically accept to fight Mariachis in the Barracks, and someone to actually test it).

Oh, and the DB part wasn't as complete as I thought - I realized the Dance Club was actually a two step adventure. When trying to check if the Lair is already unlocked, you might be 'trapped' in that choice.

Give me a few days and I'll be able to test the AT part at least :)
 

slyz

Developer
When you do, use Mafia's Mini-Browser to find out what URL is used when you hit the "Fight!" button when you get a Mariachi encounter in the Barracks.

And if you could set the zlib verbosity to 10, you should see what the script knows about the locations in the Barracks between each adventure: "special" is a key or a hint, "nothing" is... nothing, "combat_no_key" is a Mariachi you didn't successfully pickpocket, and "combat_key" is a Mariachi you got a Hacienda key from already.

If you got a hint, the script will visit the location next. If not, it will visit the first unvisited location. Once you know what is in every location, it will keep trying to pickpocket Mariachis until they drop one. Then it will just leave the adventure.

I also included the logic that was in the Wiki: each room has one location that contains a key or a hint, one mariachi, and one location with nothing helpful. Once 2/3 locations are visited in each room, it will deduce the 3rd one.

You might want to re-download the script before you try because I can't stop tweaking it ^^
 

Winterbay

Active member
I'm not sure which URL you wanted so I got them all :)

Code:
choice.php?pwd&whichchoice=409&option=1&choiceform1=Continue

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=1&choiceform1=Enter+the+kitchen
choice.php?pwd&whichchoice=413&option=1&choiceform1=Check+the+cupboards

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=1&choiceform1=Enter+the+kitchen
choice.php?pwd&whichchoice=413&option=2&choiceform2=Check+the+pantry

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=1&choiceform1=Enter+the+kitchen
choice.php?pwd&whichchoice=413&option=3&choiceform3=Check+the+fridges

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=2&choiceform2=Enter+the+dining+room
choice.php?pwd&whichchoice=414&option=1&choiceform1=Search+the+tables

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=2&choiceform2=Enter+the+dining+room
choice.php?pwd&whichchoice=414&option=2&choiceform2=Search+the+sideboard

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=2&choiceform2=Enter+the+dining+room
choice.php?pwd&whichchoice=414&option=3&choiceform3=Search+the+china+cabinets

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=3&choiceform3=Enter+the+storeroom
choice.php?pwd&whichchoice=415&option=1&choiceform1=Search+the+crates

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=3&choiceform3=Enter+the+storeroom
choice.php?pwd&whichchoice=415&option=2&choiceform2=Search+the+workbench

-

choice.php?pwd&whichchoice=410&option=1&choiceform1=Head+down+the+hall+to+the+left
choice.php?pwd&whichchoice=411&option=3&choiceform3=Enter+the+storeroom
choice.php?pwd&whichchoice=415&option=3&choiceform3=Search+the+gun+cabinet

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=1&choiceform1=Enter+the+bedroom
choice.php?pwd&whichchoice=416&option=1&choiceform1=Search+the+beds

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=1&choiceform1=Enter+the+bedroom
choice.php?pwd&whichchoice=416&option=2&choiceform2=Search+the+dressers

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=1&choiceform1=Enter+the+bedroom
choice.php?pwd&whichchoice=416&option=3&choiceform3=Search+the+bathroom

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=2&choiceform2=Enter+the+library
choice.php?pwd&whichchoice=417&option=1&choiceform1=Search+the+bookshelves

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=2&choiceform2=Enter+the+library
choice.php?pwd&whichchoice=417&option=2&choiceform2=Search+the+chairs

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=2&choiceform2=Enter+the+library
choice.php?pwd&whichchoice=417&option=3&choiceform3=Examine+the+chess+set

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=3&choiceform3=Enter+the+parlour
choice.php?pwd&whichchoice=418&option=1&choiceform1=Examine+the+pool+table

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=3&choiceform3=Enter+the+parlour
choice.php?pwd&whichchoice=418&option=2&choiceform2=Examine+the+bar

-

choice.php?pwd&whichchoice=410&option=2&choiceform2=Head+down+the+hall+to+the+right
choice.php?pwd&whichchoice=412&option=3&choiceform3=Enter+the+parlour
choice.php?pwd&whichchoice=418&option=3&choiceform3=Examine+the+fireplace

There appears to be no special URL for when you get a fight. You just end up in the fight from the choice adventure.

The script did seem to have some trouble doing anything before I manually assembled all 5 keys and gave me this output (even with verbosity already at 10):
Code:
Problem encountered while naviguating the Barracks: encountered an unexpected adventure
Please type 'zlib verbosity = 10' in the gCLI, naviguate out of the current adventure, and try again so you can post the details.

It didn't give any other information.

It did output this table first:
Code:
 > location 1 - parent: 413, visited: false, result: nothing
 > location 2 - parent: 413, visited: false, result: special
 > location 3 - parent: 413, visited: false, result: combat_no_key
 > location 4 - parent: 414, visited: false, result: combat_key
 > location 5 - parent: 414, visited: false, result: 
 > location 6 - parent: 414, visited: false, result: 
 > location 7 - parent: 415, visited: false, result: 
 > location 8 - parent: 415, visited: false, result: 
 > location 9 - parent: 415, visited: false, result: 
 > location 10 - parent: 416, visited: false, result: 
 > location 11 - parent: 416, visited: false, result: 
 > location 12 - parent: 416, visited: false, result: 
 > location 13 - parent: 417, visited: false, result: 
 > location 14 - parent: 417, visited: false, result: 
 > location 15 - parent: 417, visited: false, result: 
 > location 16 - parent: 418, visited: false, result: 
 > location 17 - parent: 418, visited: false, result: 
 > location 18 - parent: 418, visited: false, result:

The first I guess is from my first visit to the island (before breaking the prism some days ago) and it died upon start then as well. After having fumbled around for myself for a while and restarting the script it still gave the same output so I'm not sure where those actually recorded visits came from.

I then ran away from the three henchmen in the volcano since the script set my combat actuin to "run away" but didn't change it back before entering the volcano (managed to change it before somerset Lopex came on) followed by failing to pass the volcano maze. I had to stop the script and manually go there and click the solve button for Mafia to actually solve it.
It did all the nessecary steps and then swam back to shore, followed by 1 failed attempt at a correct solution and 5 where it went 1 step and then swam back. No idea what was up with that.
 

slyz

Developer
Thank you for testing, but I think I did something to correct the problems you report for navigating the Barracks. Did you download the script from the first post just before testing? If not, does line 1153 in the version you used read:
PHP:
adv = create_matcher( "(?i)you sneak (?:around|back)", html );

If you did use that version, then I'm stumped and I guess I'll just ascend AT next to work things out. I guess I shouldn't post things I didn't test myself, nothing went as I was expecting ^^

Thank you for the URLs you posted, but the one I needed is missing (the one that is submitted when you hit the "Fight!" button to make the fight happen in the Barracks).

Concerning the problem with running away, maybe I should add a check for that. What happened is that the script aborted with "try to run away" as Mafia's combat setting, and this setting was kept when the script was restarted.

I'll change the logic for using Mafia's built-in Volcano solver soon, I hope.

Thanks again!

EDIT:
I didn't get a map that Mafia couldn't solve, but I think the logic I had already should work. I'll just add a message saying not to touch anything while Mafia solves the maze.

Did you hit escape or do something in the Relay Browser after Mafia printed the message saying it examined the paths? I think you simply needed to wait while Mafia was hoping around in the Maze. Unfortunately, nothing is printed in the gCLI while this happens.

If anyone else is in a position to test this, this is the code I use:
PHP:
while ( !cli_execute( "volcano visit; volcano solve" ) )
	cli_execute( "volcano jump 1" );
The "volcano jump 1" makes you swim back to the shore, and this happens when Mafia enters an Error state if no solution was found after the first 5 hops.
 
Last edited:
Top