autoBasement.ash - Better basement automation

Bale

Minion
I like the idea of this script, so in hopes of making it better, how about implementing Dr. Lucifers something like this?

PHP:
boolean festering_restore(int mp) {
	if(my_maxmp() < mp)
		return false;
	if(get_property("sidequestNunsCompleted") == "fratboy" && floor((mp - my_mp()) / 1000) < 3- get_property("nunsVisits").to_int())
		while(mp - my_mp() > 999 && get_property("nunsVisits").to_int() < 3)
			cli_execute("nuns");
	if(mp - my_mp() < 1000)
		restore_mp(mp);
	else if(my_fullness() < fullness_limit())
		eat(1, $item[Jumbo Dr. Lucifer]);
	if(my_mp() < mp)
		return false;
	return true;		
}
Obviously if it returns false, don't do the test. If it returns true, then do the test.
 

Rinn

Developer
Just curious... I d/l the script today to take a peek at it and I saw within the code:

Code:
cli_execute("mood basement");
cli_execute("mood execute");
So I'm assuming this means I'm supposed to have two moods corresponding to the calls but there is no mention of these moods in the first post... what should these contain exactly?

Thanks
"Mood execute" is the command to run the mood, I can see how that might be confusing. The basement mood can have whatever you want, I just use it for low mana skills that will always help so they all just get recast at once (trivial skills, etc.).

I'll look into adding better combat support and restoration after the new years.
 

Bazaaretw

Member
I'm getting an error, I'm not sure if it's because of your script or something else, it's the first time I've run your script.

But when it goes against any monster it gets this error:

[11423] Fernswarthy's Basement (Level 1)
Encounter: 1 Stone Golem
Round 0: bazaaretw wins initiative!
Bad monster value: "1 stone golem"
You don't seem to be in the basement
 

Bazaaretw

Member
I'm getting an error, I'm not sure if it's because of your script or something else, it's the first time I've run your script.

But when it goes against any monster it gets this error:

[11423] Fernswarthy's Basement (Level 1)
Encounter: 1 Stone Golem
Round 0: bazaaretw wins initiative!
Bad monster value: "1 stone golem"
You don't seem to be in the basement

I don't know what the issue was but I guess it fixed itself.

Not I run across that I get the same Unable to dive in the basement, but I clicked the relay and it just didn't take the sandwich for level 100, you should make that happen.

:)
 

Bazaaretw

Member
I don't know what the issue was but I guess it fixed itself.

Now I run across that I get the same Unable to dive in the basement, but I clicked the relay and it just didn't take the sandwich for level 100, you should make that happen.

:)

Ok well I take that back, after about 100 levels I started getting the error again.

[11522] Fernswarthy's Basement (Level 0)
Encounter: 7 Stone Golem
Round 0: bazaaretw wins initiative!
Bad monster value: "7 stone golem"
You don't seem to be in the basement

I am running the latest version available every time I run mafia, and the latest version of your script.
 
I found that if you have an unidentified bang potion the script will quit with the helpful error message:

Code:
Mood swing complete.
Basement: Muscle Test
Maximizing...
80 combinations checked, best score 3887.0
[COLOR="Red"][¶-1] has no matches.[/COLOR]
Unable to continue automating the basement.

So in the bang potion function at line 81 i added:
Code:
		else if (potion == "")
		{
			abort("Unidentified bang potion!");
		}

in case i forget what the error means next time :)

Edit: Previous code didn't work :p
 
Last edited:

Nagol

New member
Everytime I run the script, i get "Bad item value: 'Ben-Galo Balm" (autoBasement.ash, line 118)"

I'm running the newest version of mafia (13.8)

any ideas?
 

Bazaaretw

Member
Everytime I run the script, i get "Bad item value: 'Ben-Galo Balm" (autoBasement.ash, line 118)"

I'm running the newest version of mafia (13.8)

any ideas?

Because that's not how you spell the item, look in the script, at the 118th line or ctrl+f and find it and fix the spelling.
 

Bazaaretw

Member
[11558] Fernswarthy's Basement (Level 138)
Maximum HP Test: 1,431 current, 10696 * 0.26 (700 DA) = 2,817 needed
You lose 2,100 hit points
Unable to continue automating the basement.

It's apparently having trouble realizing that I needed more hp. :/
 

Bazaaretw

Member
Maximizing...
4680 combinations checked, best score 1171.0
Putting on Hodgman's porkpie hat...
Equipment changed.
Wielding stainless steel shillelagh...
Equipment changed.
Taking off stainless steel shillelagh...
Equipment changed.
Holding stainless steel shillelagh...
Why bother putting a weapon into your offhand if you don't have anything in your on-hand? "On-hand?" Whatever.

Ok so now, I'm going well, except I'm breaking because it's not taking the stainless steel club from my disembodied hand, and the modifier recognizes that it's still in my inventory.
 

matt.chugg

Moderator
Excellent script! I hate the basement this should make things easier.

I have a couple of suggestions!

with the elemental resistance tests, would it be useful to attempt to increase mainstat or maxhp after increasing elemental resistance if you are still unable to complete the level?

also, I think it may be a mafia issue, but it thinks im on level 125 all the time!

[10287] Fernswarthy's Basement (Level 125)
Encounter: Save the Dolls/Save the Cardboard
You lose 1 hit point
You lose 532 hit points
Casting Disco Aerobics 1 times...
You acquire an effect: Disco State of Mind (duration: 5 Adventures)
Disco Aerobics was successfully cast.
Searching for "connery's elixir of audacity"...
Purchasing Connery's Elixir of Audacity (1 @ 1,480)...
You acquire an item: Connery's Elixir of Audacity
Purchases complete.
Using 1 Connery's Elixir of Audacity...
You acquire an effect: Cock of the Walk (duration: 5 Adventures)
Finished using 1 Connery's Elixir of Audacity.
Searching for "potion of temporary gr8tness"...
Purchasing potion of temporary gr8tness (1 @ 1,485)...
You acquire an item: potion of temporary gr8tness
Purchases complete.
Using 1 potion of temporary gr8tness...
You acquire an effect: Gr8tness (duration: 5 Adventures)
Finished using 1 potion of temporary gr8tness.
Using soft green whatever...
Coldform removed.
Using 1 phial of stench...
You acquire an effect: Stenchform (duration: 5 Adventures)
Finished using 1 phial of stench.
Verifying ingredients for serum of sarcasm (1)...
Creating serum of sarcasm (1)...
You acquire an item: serum of sarcasm
Successfully created serum of sarcasm (1)
Using 1 serum of sarcasm...
You acquire an effect: Superhuman Sarcasm (duration: 5 Adventures)
Finished using 1 serum of sarcasm.
Mood swing complete.
Basement: Monster
Attempting to increase Muscle to 1190
Maximizing...
4032 combinations checked, best score 1126.0
Putting on Hodgman's porkpie hat...
Equipment changed.
Wielding Zombo's shoulder blade...
Equipment changed.
Putting on Chester's muscle shirt...
Equipment changed.
Putting on Hodgman's lobsterskin pants...
Equipment changed.
Putting on Talisman of Baio...
Equipment changed.
Putting on Hodgman's bow tie...
Equipment changed.
Putting on corncob pipe...
Equipment changed.
Putting on velcro broadsword...
Equipment changed.
Searching for "oil of slipperiness"...
Purchasing oil of slipperiness (1 @ 840)...
You acquire an item: oil of slipperiness
Purchases complete.
Using 1 oil of slipperiness...
You acquire an effect: Slippery Oiliness (duration: 5 Adventures)
Finished using 1 oil of slipperiness.
Putting 092 the Disembodied Hand back into terrarium...
Taking 111 the Baby Sandworm out of terrarium...
Using 1 scroll of drastic healing...
Finished using 1 scroll of drastic healing.

[10288] Fernswarthy's Basement (Level 125)
Encounter: 91 Bottles of Beer on a Golem
Round 0: mskc wins initiative!
Round 1: mskc uses the divine can of silly string and uses the divine can of silly string!
You gain 23 Wizardliness
You gain 23 Magicalness
You gain 145 Strongness
You gain 165 Enchantedness
You gain 338 Smarm
Using 1 phial of stench...
You acquire an effect: Stenchform (duration: 5 Adventures)
Finished using 1 phial of stench.
Mood swing complete.
Maximizing...
4284 combinations checked, best score 100.5
Putting on sponge helmet...
Equipment changed.
Stealing velcro broadsword from 092 the Disembodied Hand...
Wielding velcro broadsword...
Equipment changed.
Holding Bag o' Tricks...
Equipment changed.
Putting on yak anorak...
Equipment changed.
Putting on square sponge pants...
Equipment changed.
Putting on hardened slime belt...
Equipment changed.
Putting on velcro boots...
Equipment changed.
Putting on vampire pearl earring...
Equipment changed.
Stealing little box of fireworks from 072 the Exotic Parrot...
Putting on little box of fireworks...
Equipment changed.

[10289] Fernswarthy's Basement (Level 125)
Encounter: Save the Dolls/Save the Cardboard
You gain 520 Sarcasm
You gain a Moxie point!
Mood swing complete.
Basement: Monster
Attempting to increase Muscle to 1213
Maximizing...
169 combinations checked, best score 1293.0
Putting on star hat...
Equipment changed.
Wielding Zombo's shoulder blade...
Equipment changed.
Putting on Chester's muscle shirt...
Equipment changed.
Putting on star pants...
Equipment changed.
Putting on Talisman of Baio...
Equipment changed.
Putting on Hodgman's bow tie...
Equipment changed.
Putting on corncob pipe...
Equipment changed.
Using 1 scroll of drastic healing...
Finished using 1 scroll of drastic healing.

[10290] Fernswarthy's Basement (Level 125)
Encounter: 2,248-Headed Hydra
Round 0: mskc wins initiative!
Round 1: mskc uses the divine can of silly string and uses the divine can of silly string!
You gain 23 Magicalness
You gain 23 Magicalness
You gain a Mysticality point!
You gain 142 Fortitude
You gain 162 Wizardliness
You gain 364 Smarm
Mood swing complete.
Basement: MP Test
Unable to continue automating the basement.
 

Rinn

Developer
I made a new version to add some additional output to say why the script stops executing, added bale's festering powder restoring support (off by default), as well as fixed the Unicode character issue with Ben-Gal™ Balm. I'm working on some more improvements.

I need some assistance on what ratios exactly to maximize to on elemental and hp tests, I have some pretty ridiculous equipment so I've never had an issue with not being able to pass these.
 
Last edited:

Bazaaretw

Member
I made a new version to add some additional output to say why the script stops executing, added bale's festering powder restoring support (off by default), as well as fixed the Unicode character issue with Ben-Gal™ Balm. I'm working on some more improvements.

I need some assistance on what ratios exactly to maximize to on elemental and hp tests, I have some pretty ridiculous equipment so I've never had an issue with not being able to pass these.

Did you post an updated version? or was this just your personal progress as of now?
 

matt.chugg

Moderator
I made a new version to add some additional output to say why the script stops executing, added bale's festering powder restoring support (off by default), as well as fixed the Unicode character issue with Ben-Gal™ Balm. I'm working on some more improvements.

I need some assistance on what ratios exactly to maximize to on elemental and hp tests, I have some pretty ridiculous equipment so I've never had an issue with not being able to pass these.

I'm not really sure, when I use the inbuilt relay stuff, I generally used a combination of the elemental resistance items, flipbook sp51 etc, increasing maxhp along with the phials, I never really have major trouble passing a level, it just takes some odd combinations!
 

Nagol

New member
alrighty, so i get

"Function 'vprint( string, int )' undefined (autoBasement.ash, line 270)"

I dont know how to fix it. A little help?

this is version 1.2 by the way.
 

matt.chugg

Moderator
added at line 737ish in mine to handle the rewards at 100,200,300, 400

Code:
		else if(page.contains_text("De Los Dioses") || page.contains_text("The Dusk Zone") || page.contains_text("Giggity Bobbity Boo!") || page.contains_text("No Good Deed"))
		{
			page = visit_url("basement.php?action=1&pwd");
		}

untested!
 
Last edited:
The way I manage elemental tests: I do maximize of the element that won't be phialed.

I either have enough hp to pass or...

You can either use a phial to reduce the other element to 1, or you can jack up your hp. I usually just jack up the hp.

It's basically the same way I handle the gauntlet. After you have 1000 DA, adding more isn't going to help, so I use those slots for more hp.
 
Top