autoBasement.ash - Better basement automation

Winterbay

Active member
Also, the top of the script and the second posts informs you on how to do it. You shoudl've seen that on the way to change the variable in the script (incliding the note that says not to change them in the script iirc) :)

just type "zlib <variablename> = <new value>" into the CLI.
 

Nes

New member
Is there a way to disable the scratch and sniff sword/crossbow? Everytime I try to use winterbay's script, kol mafia sorts and stores the appropriate outfits but when it goes to switch, it has problems with the sword. I would like the script to simply ignore the scratch and sniff variables all together.
 

Theraze

Active member
Does it skip it if you have it folded into a sword?

Edit: No, since you specifically mention it above. I truncated before the slash though... tired. :(
 
Last edited:

Winterbay

Active member
I can't due to the fact that "Nobody puts quest items in the corner (or the closet.)" same with display case

Could you post the CLI output around when it tries and fails to equip the sword and also which stickers your sword has on it?
 

Magus_Prime

Well-known member
The latest version of the script errors out on multiple checks where an operation is failing due to a type mismatch.

Code:
Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 384)
Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 619)
Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 640)
Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 661)
Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 682)
Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 714)
Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 757)

I changed the ^ to a * under the assumption that multiplication was the desired operator.
 

slyz

Developer
What version of Mafia are you running?

EDIT: scratch that. Which version of autobasement.ash are you running? Did you use Winterbay's version in the second post of this thread?

The desired operator was exponent, which is now "**" in ash instead of "^".

EDIT2: I changed the minion text in the first post to red.
 
Last edited:

lostcalpolydude

Developer
Staff member
You did the wrong thing then, since it's supposed to be an exponent. This sounds like something that was fixed a while ago though. Just guessing... did you grab the version from the second post (probably the one you want) rather than the first post (probably hasn't been updated in a while)?

Edit: Ninja'd by slyz, and now I see that the red text wasn't red until right before I checked.
 

Magus_Prime

Well-known member
I was just about to post an update. I looked at the formulae for the encounters in the wiki and saw that it was supposed to be an exponent. That caused me to re-examine my version of the script. I had grabbed the version from the first post rather than the second.

Sorry for the confusion.
 

Magus_Prime

Well-known member
I'm running r10239, I went basementing, using Winterbay's autobasement script, freshly downloaded from the second post, and encountered the following:

Code:
Encounter: 93 Bottles of Beer on a Golem
Round 0: Arbos wins initiative!
Round 1: Arbos executes a macro!
Round 1: Arbos casts ENTANGLING NOODLES!
Round 2: n-headed hydra takes 1 damage.
Round 2: n-headed hydra takes 4 damage.
Round 2: n-headed hydra takes 5 damage.
You lose 208 hit points

Even though the monster was a beer golem Mafia was behaving as if it were an n-headed hydra. This caused my CCS to misfire and I got beaten up. I queried Mafia on what it thought my last monster was and got:

Code:
> ash last_monster()

Returned: A n-Headed Hydra
base_hp => 649
base_attack => 762
base_defense => 686
base_initiative => 70
attack_element => none
defense_element => none
min_meat => 0
max_meat => 0
base_mainstat_exp => 95.25
phylum => none
poison => none

I just fought the battle manually, in the relay browser, and KoLMafia recognized the monster appropriately. I'm guessing that autobasement.ash can't handle the changes made in r10233.

Code:
> ash last_monster()

Returned: n Bottles of Beer on a Golem
base_hp => 2303
base_attack => 2708
base_defense => 2438
base_initiative => 70
attack_element => none
defense_element => none
min_meat => 0
max_meat => 0
base_mainstat_exp => 338.5
phylum => none
poison => none

Update: I checked the line in the script where monster matching is handled and it looks like it should work just fine. I'm puzzled.
 
Last edited:

slyz

Developer
Could you post your CCS?

EDIT: it looks like we should add basement.php to ResponseTextParser.java and RequestLogger.java...
 
Last edited:

Veracity

Developer
Staff member
Just ResponseTextParser; we want it to parse the text of the basement page every time we visit basement.php.
I am experimenting.
 

Winterbay

Active member
Oh cool. If you manage to fix this will it also fix the fact that Mafia seems to lock onto the last seen Basement level in the relay browser while automating the basement?
 

Veracity

Developer
Staff member
And revision 10243 parses the responseText every time we visit basement.php, either in the Relay Browser or automated. I used autoBasement.ash to run a bunch of levels and it correctly saw what each level was - and the session log correctly logged it, too.

Note that I was under the effect of Just the Best Anapests, so I had to change the script to look for winning the battle.

Replace:

Code:
			else if (page.contains_text("You win the fight"))

with

Code:
			else if (page.contains_text("WINWINWIN"))
 

Winterbay

Active member
Thanks! I've made that change locally as well, thanks for pointing that out.
I'm looking forward to testing this new extended functionality of Mafia.
 

mstieler

Member
I seem to be having issues here. Yesterday, it was running fine. Today, I'm down to Floor 300, and Autobasement keeps quitting after every combat (You don't seem to be in the basement, quitting).

Any reason for this?

Edit: Whoops. Just realized I had Anapests somehow. Thought I took that off.
 
Last edited:
Top