autoBasement.ash - Better basement automation

Theraze

Active member
As it says, it sets a variable... you need to set your variable of autobasement_break_on_mp_amount to 5000 in your data file.
 

Theraze

Active member
Only if the value isn't set yet. If you run the script on a new account, it would take that 5000. Otherwise, the 2000 it originally used remains.
 
Don't have time to go through 29 pages of thread to see if this has been brought up, sorry if it already has. My CLI output keeps telling me I'm on the same basement level even though I'm advancing through the basement. Also if I get beaten up it hangs instead of healing and continuing. Is it intended to pause in this situation?
 

Bale

Minion
Don't have time to go through 29 pages of thread to see if this has been brought up, sorry if it already has. My CLI output keeps telling me I'm on the same basement level even though I'm advancing through the basement.

I understand that you could not read 29 pages, but sorry, I have no pity for someone that can't find a problem which was addressed within the first 50 posts. I'm sure you can go through that much. It's a mafia issue.
 
Last edited:

fronobulax

Developer
Staff member
but i changed the setting of the variable in the code itself. doesn't that line get executed when i run the script?

setvar is in zLib. Basically it sets an uninitialized variable to the value. Since you have run the script before the variable is already initialized and changing it in the script does nothing until the time that you delete the vars file. That would be vars_<username>.txt in the data subdirectory. Easiest thing for you to do would be to edit the vars file directly.
 

dantose

New member
getting an odd error message:
Code:
call scripts/autoBasement.ash

Initializing items and effects...
Items and effects initialization complete!
Caching outfits...
Putting on outfit: Mysticality
Equipment changed.
Maximizing...
304 combinations checked, best score 2710.0
Putting on Hodgman's porkpie hat...
Equipment changed.
Wielding drywall axe...
Equipment changed.
Putting on letterman's jacket...
Equipment changed.
Putting on Hodgman's lobsterskin pants...
Equipment changed.
Unexpected error, debug log printed.
debug log:
Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
            KoLmafia v14.3 r8863, Linux, Java 1.6.0_22
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the dev team to look at it, please write a bug report
 at kolmafia.us. Include specific information about what you were 
 doing when you made this and include the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Tue Dec 28 21:29:46 EST 2010
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.swingui.MaximizerFrame.maximize(MaximizerFrame.java:711)
	at net.sourceforge.kolmafia.textui.command.ModifierMaximizeCommand.run(ModifierMaximizeCommand.java:60)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:527)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:401)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.cli_execute(RuntimeLibrary.java:1421)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:119)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.Loop.execute(Loop.java:57)
	at net.sourceforge.kolmafia.textui.parsetree.WhileLoop.execute(WhileLoop.java:98)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:265)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:198)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:191)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.call(CallScriptCommand.java:194)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.run(CallScriptCommand.java:63)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:527)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:401)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:194)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:175)
browsed though the first few posts and the last few in case it was a recent issue. Then did a search of the thread for the "unexpected error" message

Is this a mafia issue or a script issue?
 

slyz

Developer
It seems like a Maximizer issue... do you have a fossilized necklace? If so, can you view its description through the relay browser and try again to run autobasement.ash?
 

jchous2

New member
I've been using the script, and have to say thank you. It's an absolute life saver. However, I have a problem where it saves all the outfits and then stops. The last message in the CLI is:
"Saving outfit Damage...
Outfit saved""

Is there any way to fix this?
 

slyz

Developer
You Zlib verbosity setting was probably set to 0 for some reason. Try doing this in the gCLI and running autobasement.ash again:
Code:
zlib verbosity = 4
 

dantose

New member
The fossilized necklace did it. I am occationally getting errors after it fails to find the outfit "MP Regen" but manually putting it on seems to get it running. It still fails to find it every time though. Typo in the code? maybe looking for "MP Rehgen" or something?

EDIT: noticed that mafia thinks there is also an outfit "MP+Regen" which does nto really exist.
 
Last edited:

Winterbay

Active member
I edited my local copy to save that outfit as "MPRegen" instead which removes the whole + or not problem.
 
After having successfully used this script previously (thank you for that) I am now having trouble with the Uncle Hobo's Highest Bough. As the script goes through all my outfits it's getting stuck here:

Putting on outfit: Damage
Equipment changed.
Maximizing...
152 combinations checked, best score 1736.0
Holding Uncle Hobo's highest bough...
That's not an item, or it's not something you own.

When I look at my equipment, I'm currently wielding the bough in my offhand, presumably the direct result of another outfit.

I'm guessing this is a bug with autobasement, but if it's a mafia bug (or something else) i'm happy to report it elsewhere as necessary. in the meantime i'll closet the bough or something.
 

Ferdawoon

Member
I am not sure if this is a script or Mafia error, but since it have only happened now when I run this script, I take my chances that this is the right post to add this error report.

After a while, not sure if it is a specific monster, the text in the graphical CLI tab get modified.
Example:
Code:
[9550] Fernswarthy's Basement (Level 0)
Test: 0 current, 0 needed
Basement level 138: Monster
Putting on outfit: Damage
At this point the text below turn all red and seem to be aligned to the right side of the textbox instead of the left, but not completly to the right side of the box either. Maybe 3/4 to the right:
Code:
It appears you're already wearing all the parts of the outfit "Damage" which you possess or can wear.    Item NOT found:
Maximizing...
88 combinations checked, best score 1765.0
Holding Uncle Hobo's highest bough...
Equipment changed.
Putting Mr Handy the Disembodied Hand back into terrarium...
Taking Shai-Hulud the Baby Sandworm out of terrarium...
Casting Cannelloni Cocoon 1 times...
You gain 2,124 hit points
Cannelloni Cocoon was successfully cast.

[9551] Fernswarthy's Basement (Level 0)
Encounter: 8 Stone Golem
Round 0: ferdawoon wins initiative!
Round 1: ferdawoon executes a macro!
Round 1: ferdawoon attacks!
You lose 120 hit points
Round 2: ferdawoon attacks!
You lose 118 hit points
Round 3: ferdawoon attacks!
You lose 122 hit points
Round 4: ferdawoon attacks!
You lose 122 hit points
Round 5: ferdawoon attacks!
You lose 119 hit points
Round 6: ferdawoon attacks!
You lose 118 hit points
Round 7: ferdawoon attacks!
Below this point the text turn black again, but stay aligned to the almost-right:
Code:
You lose 118 hit points
Round 8: ferdawoon attacks!
You lose 116 hit points
Round 9: ferdawoon attacks!
You lose 117 hit points
Round 10: ferdawoon attacks!
You lose 122 hit points
Round 11: ferdawoon attacks!
You lose 121 hit points
Round 12: ferdawoon attacks!
You lose 114 hit points
Round 13: ferdawoon attacks!
You lose 117 hit points
Round 14: ferdawoon attacks!
You lose 118 hit points
Round 15: ferdawoon attacks!
You lose 120 hit points
Round 16: ferdawoon attacks!
You lose 122 hit points
Round 17: ferdawoon attacks!
You lose 117 hit points
Round 18: ferdawoon attacks!
You lose 122 hit points
Round 19: ferdawoon attacks!
You lose 121 hit points
Round 20: ferdawoon attacks!
You lose 1 hit point
You lose 113 hit points
You lose an effect: Beaten Up
and below this, the text is red again:
Code:
lost the fight, quitting
Basement sucessfully automated for 25 out of 76 adventures.

Restarting the script after fiddling some with my CCS, the text is still aligned to the almost-right, and for some reason, it have gone back in the log and changed the text that was black during my 9551 adventure and turned it all red. Now all the text below that part, except for the Call autobasement.ash command, the caching of outfits and initialization of items and effects, is red.

Logging out and back in don't solve the problem, so I have to close mafia completly and restart it to make the text aligned to the left and the right color. However, when running the script again, it all happen again.

EDIT: Seems after restarting the script, but not restarting Mafia, the text that was almost-right aligned have turned completly right-aligned, yes, also the part that had already been printed before, but at least it is mostly black now.

EDIT2: I take that back. It have gone back and made all black text red again, but it is back to printing black, which it did in the middle of a rebuffing.
And no, for some unknown reason (I was not looking at the CLI to see what it did when it happened) the text is all aligned to the Left again. Lets see how long this stay.
 
Last edited:

Winterbay

Active member
You can enter "cls" into the CLI-window and that will solve the alignment problem. For the rest I can't say anything :)
 

Ferdawoon

Member
I am curious as well, if I am a moxie class, and the script want me to use the outfit Damage, why not boost moxie? Atm my moxie is low enough for me to always miss the monsters, which make any +damage kinda pointless.
I have 1423 buffed moxie in my Damage outfit but if I maximize Moxie I get 2260, at which point, if I do that floor manually, I beat the monster. Sure I dont do very high damage but I take less damage and at least I manage to hit the monster..
At the moment I am using fearful fettucini for pretty much every monster because a normal attack or Maneuver always miss.
 
Top