macguffin.ash (a script in progress)

Orinks

New member
Hey all,

Well I finally have my error, and it says something about that it can't apply an operator to a weapon type on line 85 in outfitchange.ash. Furthermore, the go too option isn't working in notepad.
 

dangerpin

Member
There are some strange spacing issues with the last version of this script wherein some lines that I expect to be comments share a line with the end of a previous line of code, but the error points towards somewhere in here...

Code:
boolean can_wear(item wearthis)
{
 return (can_equip(wearthis) && got_item(wearthis));
} // can_wear
 

plurialibus

New member
A few fixes, including the wine cellar splitting into 4 areas. Should be less buggy now. My version doesn't complain about line 85, but I changed all the files to use DOS linebreaks, so debugging should be less confusing for all of you notepad users =P. If you still have trouble with line 85, report it along with the context (in what part of the quest were you when the error happened?).\

Hey, you know what? An error like that might be a problem with your outfit config file! Check it for funky stuff involving weapons, like using a goatskin umbrella for pants or familiar equipment.

Good luck!
 

Attachments

  • macguffin.ash
    32.1 KB · Views: 198
  • macguffin_status.ash
    4.7 KB · Views: 212
  • outfit_change.ash
    11.3 KB · Views: 215

aphroguy

New member
One thing I noticed: After obtaining the drum machine, one must go back to desertH to speak with Gnasir, then he tells you to go find the pages. The script lacks this check and in fact just stops altogether once it realizes that you already have a drum machine.

Adding the snippet:

Code:
	while(quest_check("something that produces a rhythmic vibration to summon sandworms")) {

		hydrate();

		int max = less_combats();

		if(max > have_effect(to_effect("ultrahydr"))) max = have_effect(to_effect("ultrahydrated"));

		cliE("conditions clear");

		adventure(max, desertH);

	}

after it's checked for the drum machine, and before attempting to acquire the pages seems to take care of it and the script seems to run as expected.
 

FlashGordon

New member
Just a quick question, pretty new at using these scripts. All the ash files are in one folder, "ASH Files" on my computer. When I load macguffin.ash, it says it can't find the other ones, even in the same folder. Where should these be so they work?
 

WeeLittleMike

New member
Good job on the scripts!

I did have it start crashing on me in the cellar. To get it to work again, I had to change the word RANDOM to AUTOMATIC in the Macguffin.ash file.

Code:
adventure(pump_ML(), $location[haunted wine cellar (random)]);
to
Code:
adventure(pump_ML(), $location[haunted wine cellar (automatic)]);

thanks again
 

darius180

Member
Attached is the version with the wine cellar fix (also, a change to 'I love me vol I')

But if there could be more updates to have this completely take care of the quest, that would eb fantastic
 

Attachments

  • macguffin.ash
    32.1 KB · Views: 97

zarqon

Well-known member
I went through a few days ago and overhauled the hidden city script. Took a ton of code out while improving functionality. This version is about 300 lines shorter! (Granted, about half of that is due to my preferred formatting being more compact.) This version also has a fairly important fix -- previous versions would not properly detect revealed but undefeated protector spectres. Enjoy!
 

kain

Member
That's great! I have a hacked up version that I had been maintaining, too, but I hadn't done the full rewrite ...

Now to finish my update of the combat consult script the OP put up, too ... *sigh*
 

Catch-22

Active member
[quote author=zarqon link=topic=1307.msg10811#msg10811 date=1230706700]
I went through a few days ago and overhauled the hidden city script. Took a ton of code out while improving functionality. This version is about 300 lines shorter! (Granted, about half of that is due to my preferred formatting being more compact.) This version also has a fairly important fix -- previous versions would not properly detect revealed but undefeated protector spectres. Enjoy!
[/quote]

You can't redefine got_item on line 13 of "hidden city.ash", it's already defined in "outfit_change.ash" which is included in "macguffin.ash". To get this script to work you should either comment out lines 13 to 15, or remove the original got_item from "outfit_change.ash".

Edit: If you plan on using this script as a stand-alone script, not part of "macguffin.ash" then you will need to have got_item defined in "hidden city.ash".

Too bad you can't have something like:

If (!isDefined(got_item))
{
boolean got_item(item tolookup)
{
return (item_amount(tolookup) + equipped_amount(tolookup) > 0);
}
};
 

zarqon

Well-known member
Sorry -- I didn't make sure it plays nice with the other scripts, since I don't use them. It works fine on its own, however.

I took another look and got_item() was only called twice, and in locations where an item_amount() check would be sufficient. So I just removed got_item() entirely. It should play nice now.

EDIT: I also took out another handful of code and variables from the first two functions that wasn't needed.

EDIT: Oops, fixed my fix. I forgot that there is a random integer in the map_unruins image filename. This version is now tested working.
 

Catch-22

Active member
[quote author=zarqon link=topic=1307.msg10902#msg10902 date=1231120213]
Sorry -- I didn't make sure it plays nice with the other scripts, since I don't use them. It works fine on its own, however.

I took another look and got_item() was only called twice, and in locations where an item_amount() check would be sufficient. So I just removed got_item() entirely. It should play nice now.
[/quote]

Makes sense, I was wondering why you were checking to see if orbs were equipped! ;)
 

noxious

New member
I just recieved this quest from the council, and immediately started this script after purchasing one of each dusty bottle. I couldn't even get it started. Here's what it said...

>call scripts\macguffin.ash

Bad location value: "haunted wine celler (random)" (macguffin.ash, line 162)

Too bad, I was looking forward to trying it :(
Maybe could it be that I saved the wrong (outdated) scripts? I had to search thru the thread and piece together the scripts from different posts.
 

zarqon

Well-known member
The previous page has a couple different versions with the wine cellar fixed.

Also, it might make your life fractionally easier to know that you don't need to specify the path or extension for the call command, and if the filename is long enough you don't even need "call". So to run macguffin.ash, instead of call scripts\macguffin.ash you can just type macguffin.
 

Senkrad

New member
Great script! I learned a lot from it, and it saved me the sense of failure I have by wanting to write this and knowing I never would/could :)

I did find one issue in the version I have (although I might not have the most curernt one? Should I always get it from the first post?) in the check for wet stunt nut stew I found this:

Code:
if(!got_item(birdRib) && !got_item(lionOil))

and it was looping constantly when I already had one of items, as it was never doing the adventures in the Grove. I changed it to:

Code:
if(!got_item(birdRib) || !got_item(lionOil))

and it works as expected.

thanks for this and outfit_change!!!

Senkrad
 

Catch-22

Active member
[quote author=noxious link=topic=1307.msg11044#msg11044 date=1231816653]I had to search thru the thread and piece together the scripts from different posts.
[/quote]

Good point, attached are the scripts that I have. It has all posted fixes/workarounds included (to my knowledge) and it uses zarqon's optimized hidden city.ash
 

Attachments

  • macguffin.ash
    32.1 KB · Views: 57
  • macguffin_status.ash
    4.7 KB · Views: 61
  • outfit_change.ash
    11.3 KB · Views: 56

zarqon

Well-known member
Macguffin 2.0

After revamping the hidden city script, I decided to give a go at reworking the macguffin script. I pretty much started from scratch, consulting izchak's original as I went.

I have made it through the quest three times using this script, so it's pretty safe for general use, but I think it might still have some kinks. If you find any please let me know.

Some differences:
  • This one is much smaller, and with fewer files.
  • It makes full use of mafia properties to save server hits, as well as improve reliability.
  • This one does not have outfit handling, other than switching to your "current" outfit for all combats. Add it back in at your own discretion.
  • Only two boolean variables at the top, buyratchets (whether or not to allow purchasing tomb ratchets to speed up the pyramid) and fightbosses (if true, fights Dr. Awkward and Spookyraven in-script, if false, aborts for you to go fight them yourself)
  • When checking quest progress, it avoids checking phrases that have prepositions over them, just against case.

I feel like this version is in a few ways a step backwards (due to removal of outfit handling and lots of simplification) but it's a much better foundation for future development.

Everyone! Let's work on fixing the kinks and making the best macguffin script ever! (I'm teaching ESL in Korea now so I say things like that.)
 
Last edited:

asturia

Minion
Do we need to delete all the old files to make the new one work?
If so could you list the old files we need to delete?

Thanks.
 

zarqon

Well-known member
If you want to keep the older macguffin.ash: rename it to "macguffin_old.ash", or rename the new one to "macguffin2.ash". They will both still work. The existence of the older files will not interfere with the new script, as long as you have the two files I posted.

If you only want the new one, you can safely delete all macguffin-related files other than the two I just posted.
 
Top