MacGuffin 2.0 -- level 11 quest, automated

zarqon

Well-known member
Comment out that line (the one that visits beach.php, in the pyramid function) after you have revealed the chambers of the pyramid. I had to do that myself this last time around too!
 

dj_d

Member
So, not crazy? Good to hear. :) Let me know if you find a programmatic solution.

BTW, finally starting to update to zlib-compatible scripts. Great stuff! You should merge canadv and map manager in to zlib...
 

kain

Member
A couple of tweaks

In hidden_city.ash, I've made this modification a number of times on my own copy, and always forget to re-add it until it's too late (IE, I get beaten up) ...

In the options of hidden_city.ash, where you define the spirit_skill variable I've added some additional options:
Code:
skill spirit_skill = $skill[Cannelloni Cannon];      // skill vs. spirits; $skill[none] to skip
if have_skill($skill[Wave of Sauce]))
	spirit_skill = do_skill($skill[Wave of Sauce]);
else if(have_skill($skill[Ravioli Shurikens]))
	spirit_skill = do_skill($skill[Ravioli Shurikens]);
else if (have_skill($skill[Chronic Indigestion]) && my_fullness() > 10)
	spirit_skill = do_skill($skill[Chronic Indigestion]);
else if(have_skill($skill[tango of terror]))
	spirit_skill = do_skill($skill[tango of terror]);
else if(have_skill($skill[stream of sauce]))
	spirit_skill = do_skill($skill[stream of sauce]);

And then in boolean explore_entire_city() function, I've added a check so that any pasta spells we happen to cast are cold (if you have flavor of magic) -- bolded text is new
Code:
    if (item_amount($item[ancient amulet]) + item_amount($item[staff of ed]) > 0) return true;
	[b]if (have_skill($skill[Spirit of Peppermint]) == true && have_effect($effect[Spirit of Peppermint]) > 26)
	{
		use_skill(1, $skill[Spirit of Peppermint]);
	}[/b]
    find_all();
 

Bale

Minion
I'd modified my copy of hiddencity to use my ccs instead, but it is a very nice improvement.

However there is still an important case that it doesn't catch. What if you are out-moxieing your enemies with a source of elemental damage like Snarl of the Timberwolf? Then there is no need to cast a spell.
 

kain

Member
There used to be a "use CCS" option in a really old version ... let me fire up my editor and see what's available.

Ahh yes ...

Toss a
Code:
boolean use_ccs = false;
in at the beginning somewhere and this code into the handle_combat() function ...

Code:
string handle_combat(string url) 
{
	[b]if(use_ccs)
	{
		print("Handing off combat to mafia ....");
		run_combat();
	}[/b]

And now that I look at this all over again ... eew! I need to finally get around to stripping all this out and rewrite it anyhow. Why are feathers in there? I duplicate most of this in my combat consult script anyhow.

As for out-moxie'ing ... gimme another bit of time and I'll write that into the skill checks above.
 

bumcheekcity

Active member
Just to say, the script can go ahead and use one of the seventy love songs in my collection rather than funkslinging Spectre Sceptres at the Protector Spirits :p

Edit: Not to mean that this script isn't excellent or anything - thanks for it, it's great :D
 
Last edited:

kain

Member
So many combat methods, period. It's time to really think hard about working my consult combat script into something that isn't just kludged together and merely functions.
 

matt.chugg

Moderator
> call scripts\macguffin.ash

Checking for updates (running MacGuffin ver. 2.0.6)...
_version_macguffin => 2.0.6
Sorry, but you cannot complete this quest twice.

I'm level 11, but havn't visited the council! since I haven't been give the quest yet....

!contains_text(questlog,"MacGuffin") == true

and

(get_property("pyramidBombUsed") == "true") == true


lastPyramidReset=16 (I think i'm on 17 because lastPirateInsultReset=17)

therefore all the pyramid properties are invalid and shouldn't be used!


tbh, I think the easiest way is to force a visit to the council if both of those are true, then check them again. Or check lastPyramidReset
 

matt.chugg

Moderator
it also assumes you have access to the temple, and if you havn't goes into an infinite loop:

Code:
[856] Hidden Temple
Encounter:
You can't get to that area yet.

Conditions list cleared.
Condition added: Choices Left: 1

Request 1 of 161 (Woods: Hidden Temple) in progress...

[856] Hidden Temple
Encounter:
You can't get to that area yet.

Conditions list cleared.
Condition added: Choices Left: 1

Request 1 of 161 (Woods: Hidden Temple) in progress...

[856] Hidden Temple
Encounter:
You can't get to that area yet.

Conditions list cleared.
Condition added: Choices Left: 1
 

kain

Member
it also assumes you have access to the temple, and if you havn't goes into an infinite loop:

Prior to calling macguffin, I use the following:
Code:
<inline-ash-script>
int yep = 0;
if (contains_text(visit_url("woods.php"), "temple.gif") == false)
{
	if (item_amount($item[Spooky Temple map]) == 0)
	{
		add_item_condition(1, $item[Spooky Temple map]);
		yep = 2;
		print("We need the temple map");
	}
	if (item_amount($item[spooky sapling]) == 0)
	{
		add_item_condition(1, $item[spooky sapling]);
		yep = 2;
		print("We need the sapling");
	}
	if (item_amount($item[Spooky-Gro fertilizer]) == 0)
	{
		add_item_condition(1, $item[Spooky-Gro fertilizer]);
		yep = 2;
		print("We need fertilizer");
	}
	if (yep == 2)
	{
		adventure(my_adventures(), $location[spooky forest]);
	}
	use(1, $item[spooky temple map]);
}
</inline-ash-script>
council
macguffin.ash

I suppose I should probably clean that code up and integrate it into the main code ... along with a check on the council.
 
Last edited:

mredge73

Member
found error:

Code:
> Checking for updates (running ZLib ver. : 1)...
> Checking for updates (running MacGuffin ver. 2.0.6)...
> Black market found.
> Diary obtained.
> Oasis revealed.
> Hidden city revealed.
> Cellar revealed.
> Palindome revealed.
 > Macguffin quest started.
> Hidden city complete.
> Pyramid revealed.
> Dr. Awkward defeated.
> Lord Spookyraven defeated.
Server www6.kingdomofloathing.com returned a blank page from beach.php. Complain to Jick, not us.
Well the problem is that after you enter the pyramid beach.php?action=woodencity&pwd no longer exist, it is replaced by pyramid.php so this line of code causes an error:
Code:
boolean pyramid() {
   if (!contains_text(questlog,"A Pyramid Scheme")) return true;
   if (!retrieve_item(1,$item[Staff of Ed])) return false;
   visit_url("beach.php?action=woodencity");        // ensure pyramid is revealed
   visit_url("pyramid.php");                        // ensure mafia properties are set
   if (get_property("pyramidBombUsed") == "true") return true;
   set_property("choiceAdventure134","1");          // turn the wheel in the pyramid
   set_property("choiceAdventure135","1");
   if (!outfit(defaultoutfit)) print("Unable to wear the custom outfit named '"+defaultoutfit+"'.");
   if (get_property("pyramidPosition") == "1" && !user_confirm("Did you already use a carved wooden wheel?")) {
      obtain(1,"carved wooden wheel",$location[upper chamber]);
      obtain(1,"choiceadv",$location[middle chamber]);
   }
Since I don't know the intention of the line:
visit_url("beach.php?action=woodencity"); // ensure pyramid is revealed
I just commented it out and it cured the problem. Other than that I have no other suggested fixes.
 

kain

Member
Perhaps something like:

Code:
if (contains_text(visit_url("beach.php"), "pyramid.php") == false)
{
     visit_url("beach.php?action=woodencity");
}
else { visit_url("pyramid.php");}

Hmm, I'll add and test that once I get back to that point
 
Okay, first off just let me say awesome script and thank you!!

I know this script assumes "You have already revealed the second floor of Spookyraven Manor", but does it also assume that you have already unlocked the Ballroom? I get:

Black market found.
Diary obtained.
Oasis revealed.
Hidden city revealed.
Opening cellar..

[3907] Haunted Ballroom
Encounter:
You can't get to that area yet.

I checked in the relay browser and I just haven't aquired the key yet. Is that something the script is supposed to handle or should I do it manually?
 
Last edited:
I'm still not sure if this script is supposed to get the ballroom key or not, I looked through the script and didn't see that functionallity so I got it manually and then ran the script again. It worked great until the final spectre in the Hidden City:

[4339] Hidden City (Square 16)
Encounter: Protector Spectre
Round 0: That FN Ninja wins initiative!
Spectre detectred!
No suitable combat items found. Handing off to mafia...
Round 1: That FN Ninja attacks!
Round 1: protector spectre takes 1 damage.
Round 2: That FN Ninja attacks!
Round 2: protector spectre takes 1 damage.
Round 3: That FN Ninja attacks!
Round 3: protector spectre takes 1 damage.
Round 4: That FN Ninja attacks!
Round 4: protector spectre takes 1 damage.
You acquire an effect: Tangled Up (duration: 1 Adventure)
Round 5: That FN Ninja attacks!
Round 5: protector spectre takes 1 damage.
You lose 17 hit points
Round 6: That FN Ninja attacks!
Round 6: protector spectre takes 11 damage.
You lose 13 hit points
Round 7: That FN Ninja attacks!
Round 7: protector spectre takes 1 damage.
Round 8: That FN Ninja attacks!
Round 8: protector spectre takes 10 damage.
You lose 13 hit points
Round 9: That FN Ninja attacks!
Round 9: protector spectre takes 5 damage.
You lose 5 hit points
You lose 14 hit points
Spectre detectred!
No suitable combat items found. Handing off to mafia...
Spectre detectred!
No suitable combat items found. Handing off to mafia...
Spectre detectred!
No suitable combat items found. Handing off to mafia...
Spectre detectred!
No suitable combat items found. Handing off to mafia...
KoLmafia declares world peace.

I manually defeated the last spectre after I aborted that loop. Now every time I run the script I get the following:

[4345] Hidden City (Square 2)
Encounter: Turnabout Pygmies
You gain 20 Cheek
Noncombat encountered.
spheres : 0 / 4
altars : 4 / 4
Altars and temple all found!
MCD: unavailable

[4346] Hidden City (Square 5)
Encounter: Altared Perceptions
This altar's spherehole has already been plugged.

[4346] Hidden City (Square 6)
Encounter: Altared Perceptions
This altar's spherehole has already been plugged.

[4346] Hidden City (Square 11)
Encounter: Altared Perceptions
This altar's spherehole has already been plugged.

[4346] Hidden City (Square 14)
Encounter: Altared Perceptions
This altar's spherehole has already been plugged.
Unable to complete the hidden city.
 

codster62

Member
Ok. This is just a simple error. I had the same problem. The problem is you don't have any suitable items to defeat the spectre. Maybe stock up on the alcohol next time and you should be fine. If the problem still occurs, something may be wrong with your css. I have no programatical solution. Good luck.


Ok, as far as the second post goes, I have no answer. I have not experienced that problem.
 

zarqon

Well-known member
@codster: spoken like a true alcoholic! :)

Update Update Update

I've updated macguffin.ash -- it now makes use of the "defaultoutfit" setting in your vars_myname.txt file, rather than having your outfit name saved in the script.

I also incorporated some of the things suggested in previous posts:

  • Fixed the detection of completing the quest already, by comparing "lastPyramidReset" to my_ascensions() before checking "pyramidBombUsed."
  • Included kain's workaround for avoiding that stupid "blank page" error.
  • Now unlocks the hidden temple in the bizarre event that you may have left that lovely leveling zone unopened.
  • If you haven't unlocked the ballroom, it now adventures in the bedroom in the hopes of getting a ballroom key. Will it? I don't know, actually.

That ought to take care of all the issues people mentioned with macguffin.ash. All of the other issues seem to be coming from hiddencity.ash, in particular when encountering spectres.

Let me tell you something about hiddencity.ash.

This version of hiddencity.ash is still just a revision (revised for conciseness and utility of code, but the algorithm was unchanged) of izchak's original, which was written before mafia even knew that the hidden city was an adventurable area. Mafia had far fewer abilities back then. Compared to the mafia of today it was a clunky, simpleminded brute without bendable knees or opposable thumbs.

This hidden city script was created to run on that beast, and assumed that its users were watching the script run and stopping it if there were problems. It used primarily visit_url() calls to accomplish everything because there was no mafia framework to use.

That said, I don't want to fix this version. A ground-up rewrite needs to be made, one that is designed to work with mafia's current knowledge/handling of the hidden city.

Fighting spectres also needs to be addressed. As others have noted, there are many ways to deal with these suckers, but just calling run_combat() when you run out of alcohol and feathers is not most people's idea of a good one. The solution which would fit best is a separate CCS for use exclusively against physically-resistant monsters. Then, hidden city squares can be dealt with using a simple call to adventure(), which would no longer break counters.

I have no idea when these scripts (rewritten hiddencity.ash and new CCS physresist.ash) will be done, but I wanted to let you all know they're on my list of scripting things to do. If anyone else cares to tackle them before I get to it, I would be happy to help critique your code when you get done! ;)
 

HasteBro

Member
I had a problem with the script while using ascend.ash (and when macguffin.ash was used directly as well):

Checking step #37, 'Macguffin'.
Working on quest step Macguffin.
Resetting mind control device...
Mind control device reset.
Black market found.
Diary obtained.
Oasis revealed.
Hidden city revealed.
Cellar revealed.
Palindome revealed.
Macguffin quest started.
Hidden city complete.
Pyramid revealed.
Dr. Awkward defeated.
Putting on Lord Spookyraven's spectacles...
Equipment changed.
You can't wear that outfit.
Unable to complete Spookyraven section of the MacGuffin quest.

It won't specifically fight the bosses (or sometimes it won't do the dusty bottles/pyramid wheel).

I checked the macguffin.ash script and the fight bosses boolean is true.


After downloading the newer version of macguffin.ash I got this:

> call scripts\ASCENSION\Ascend\macguffin.ash

Checking for updates (running MacGuffin ver. 2.0.7)...
_version_macguffin => 2.0.7
Black market found.
Diary obtained.
Oasis revealed.
Hidden temple revealed.
Hidden city revealed.
Cellar opened.
Palindome revealed.
Macguffin quest started.
Hidden city complete.
Pyramid revealed.
Dr. Awkward defeated.
Taking off Lord Spookyraven's spectacles...
Equipment changed.
Putting on Lord Spookyraven's spectacles...
Equipment changed.
You can't wear that outfit.
Unable to wear the custom outfit named 'current'.
Wine (3) not found!

And I already have all the different types of wines in my inventory.


EDIT: Same thing happened in the pyramid, the script wouldn't neither use the ratchets I had in the inventory, nor get the wooden wheel

Black market found.
Diary obtained.
Oasis revealed.
Hidden city revealed.
Cellar revealed.
Palindome revealed.
Macguffin quest started.
Hidden city complete.
Pyramid revealed.
Dr. Awkward defeated.
Got 1 Lord Spookyraven's spectacles already.
Lord Spookyraven defeated.
Verifying ingredients for Staff of Ed (1)...
Creating 2 meat paste...
You acquire meat paste (2)
You lose 20 Meat
Successfully created meat paste (2)
Verifying ingredients for headpiece of the Staff of Ed (1)...
Creating headpiece of the Staff of Ed (1)...
You acquire an item: headpiece of the Staff of Ed
Successfully created headpiece of the Staff of Ed (1)
Creating Staff of Ed (1)...
You acquire an item: Staff of Ed
Successfully created Staff of Ed (1)
choiceAdventure134 => 1
choiceAdventure135 => 1
You can't wear that outfit.
Unable to reveal Ed's chamber.
 
Last edited:
Top