macguffin.ash (a script in progress)

tebee

Member
I think I've found a little bug - if you are adventuring in middle chamber and run out of adventures when you restart the next day it goes to the upper chamber to look for a carved wooden wheel which you don't need and I don't think ever drops again. I must admit I hadn't realised this was consumed when you turn the chambers for the first time.

Tom
 
Here's a question.

I'm trying to use Miniborg Destroy-O-Bots as my default attack (For everything, not just spirits)

I've made the script use them for spirits, how can I make it use them for everything else while still identifying the spheres on it's own?
Currently it's defaulting to attack for everything but spirits.

Thanks,
-Duff.
 

Weens

New member
I'm going to start this off by saying that my coding skills are slim to nil. With that in mind, I'm attempting to use the Hidden City script. I have two of the spheres already found and placed in the altars. I have the elemental dagger, and have only found 3/4 altars. This seems to throw things for a loop, I keep getting error messages along the lines of "Undefined reference 'got_item'(hidden city.ash, line XXX)"

Line XXX was originally line 114, then after some attempts at fixing things myself, line 115 and then line 103. So by attempting to fix, things seems to have been confuzzled even more. Any ideas?
 

AgnesM

New member
I had a lot of problems using this script with the newest daily build, it assumed the palindrome was completed when it was not, and it didnt know when to properly obtain items from the bottom chamber, along with a few other things, I assume this is to the same changes that caused problems with the 12.1 release?
 

macman104

Member
Indeed, it does not complete the palindome for me either. It thinks it is done.

EDIT: I discovered the issue is that currently the script doesn't handle the talisman. After I equipped the talisman and saw the palindome in the nearby plains, then it ran better. Then it crashed because I had mafia saying it couldn't cook without a chef. Then I unchecked the chef requirement, and then it ran better again.

However, it also thought that just because I had a drum machine that the desert was done. However, I still didn't have the worm riding manual or any of the pages at all.
 

dragonflare

New member
I'm having a bit of problem with this script,

whenever I try to use it, it says "map load failure". I'm very new at using these things, and I can't figure out what's wrong.

Thanks,
 

fewyn

Administrator
Staff member
[quote author=dragonflare link=topic=1307.msg7225#msg7225 date=1203181038]
I'm having a bit of problem with this script,

whenever I try to use it, it says "map load failure". I'm very new at using these things, and I can't figure out what's wrong.

Thanks,
[/quote]

put the text files in the data directory
 

beardedrobot

New member
I searched the forums, but the search terms are pretty generic (scripts, osx, etc), so I couldn't find the results I wanted.

I'm using Kolmafia 12.2 on a Mac (OSX 10.4.10). When I tried to load the macguffin script, I got an error in mafia saying 'outfit_change.ash could not be found'. I've downloaded all the scripts, and placed them in the same directory. Since I'm on a Mac, there is no data directory for Kolmafia.

Where do I save the scripts on a Mac? ???
[size=10pt]I guess this applies to all scripts.[/size]
 

evilspoons

Member
Using the latest daily build, attempting to run the script simply returns:

Code:
Cannot apply operator != to weapon_type() (stat) and (string) (outfit_change.ash, line 86)

Any ideas?
 

tebee

Member
If you look at the code there's comment in it that this may not work if it returns a string and I think this was changed so it did a few daily builds ago.I just commented it out see below-

Code:
# this generic function tries to equip the best item into a slot
# this works for hats, shirts, weapons, offhand, and pants
# I s'pose it could work for familiar equipment too
boolean equip_best(string bias, slot type) {
	oc_debug("equipping for " + bias + " in slot : " + to_string(type));
	foreach i in custom_outfits[bias, type] {
 		item tryme = custom_outfits[bias, type, i];
		# if we lack skullsmashing, and want to equip an offhand
		# weapon, skip
		# NOTE: this needs testing, as my limited testing
		# indicates that weapon_type returns blank when passed a
		# non-weapon. If it ever returns a string for a non-weapon, it'd
		# cause a problem. 
		# That the main reason for the print_html thingy being in colour
		#if(!dualwield &&
		#(type == $slot[offhand]) &&
		#(weapon_type(tryme) != "")) {
		#	print_html("<font color=red>You lack skullsmashing, so you can't equip " + tryme.to_string() + " in your offhand!</font>");
	        #} else {
			oc_debug("trying item ("+i+") : " + to_string(tryme));
			if (can_wear(tryme)) {
				# maybe some kind of check to see if this is an offhand weapon compatible
				# with mainhand weapon
				equip(type, tryme);
				if(equipped_item(type) == tryme ) return true;
		#	}
		}
 	}
	# if we fail to find something to wear, try the defaults
	if(bias == "default") return false;
 	return equip_best("default", type);
}
 

plurialibus

New member
I fixed a few things that were buggy in the Mafia version I'm using (12.4), and made an attempt to improve the condition checking parts (which weren't very robust and failed most times when I played in some area without using the script). The outfit changer now handles familiars, and I changed the custom outfits file to add bounty hunter equipment and island war medals (and probably a few other things)

I also changed the coding style. A lot.

It's working much better for me now, so I thought I should contribute.

I'm not telling anybody to use it, so I won't take complaints.

Izchak, thanks for the original code. Hope you aren't offended by me changing this much without telling you.
 

Attachments

  • macguffin.ash
    29.8 KB · Views: 96
  • macguffin_status.ash
    4.5 KB · Views: 89
  • custom_outfits.txt
    8.6 KB · Views: 112
  • outfit_change.ash
    10.1 KB · Views: 87

kethoth

New member
Code:
Conditions not satisfied after 5 adventures.
quest page was loaded 0 times
Phase 5 false

maybe make it loop until the condistions are satisfied?
also, it is not adventuring in the oasis to get the manual pages
 

Leperconartist

New member
;D I originally posted this in the wrong spot...
Anyway here's what I found with it, I think he was mentioning it earlier ^^^ I'm just adding more details
Thanks for the script it's great except for when you get to the point where it searches for a drum, I don't know if any of these things are errors, or whether they are intentional.

Once I got to the point where it searches for a drum (I think?) this is what your script does
-It checked how many adventures worth of the effect "Ultrahydrated" I have
-Adventured that amount at the Desert(Ultrahydrated)
-Messed up with the same message as before
-Conditions not satisfied after 5 adventures.
-quest page was loaded 0 times
-Phase 5 false

So then I loaded the script and it just repeated doing that over and over again

I continually reloaded the script until I ran out of adventures, and then this happened
-Ran out of adventures.
-Conditions list cleared.
-Ran out of adventures.
-quest page was loaded 0 times
-rehydration failed! *Big surprise* ;))

So it looks like you have a rehydration thing installed but it just doesn't work. I'm pretty sure that the script will eventually get passed the desert if I continually reload it.

(That's the only BIG problem I found with the script, this is another problem though, that's not applicable to Seal Clubbers :-\??)

Visit to Plains: Palindome in progress...
Encounter: Drawn Onward
Drawn Onward

You lose 133 hit points
You acquire an item: "I Love Me, Vol. I"

Using soft green whatever...
Beaten Up removed.
(I then heal)
["I Love Me] has no matches.
quest page was loaded 0 times
Phase 4 false

This never happened to my Seal Clubber, but happened to my Disco Bandit now I'm very confused...
You're program seems to abort whenever you run out health which isn't neccesary here, but is still a great feature because instead of making me lose 100 adventures fighting Doctor Awkward I was able to beat him myself. Then again I'm not sure if it aborted because ["I Love Me] had no matches. Hope this isn't spam, and I also hope that it helps. I would try and fix this myself but I'm not that good at programming yet.
 

kethoth

New member
Code:
> call scripts\hidden city.ash

Undefined reference to function 'got_item' (hidden city.ash, line 114)
 

Leperconartist

New member
Did you load the hidden city script by itself? Because I always load the macguffin script and it then loads the hidden city script and it works out fine for me.
 

GuardianElm

New member
[quote author=Leperconartist link=topic=1307.msg7920#msg7920 date=1208835464]
;D I originally posted this in the wrong spot...
Anyway here's what I found with it, I think he was mentioning it earlier ^^^ I'm just adding more details
Thanks for the script it's great except for when you get to the point where it searches for a drum, I don't know if any of these things are errors, or whether they are intentional.

Once I got to the point where it searches for a drum (I think?) this is what your script does
-It checked how many adventures worth of the effect "Ultrahydrated" I have
-Adventured that amount at the Desert(Ultrahydrated)
-Messed up with the same message as before
-Conditions not satisfied after 5 adventures.
-quest page was loaded 0 times
-Phase 5 false
... ...
[/quote]
Does this happen with the original script, or the updated one posted by plurialibus?
 
Top