// What would maximum HP be if I wasn't beaten up? Or if I was in a different outfit?
// Need to send p as a parameter because of the different outfit possibility...
int find_maxhp(int mus, float p){
float g = .05 * to_int(have_skill($skill[Gnomish Hardigness])) +1;
float a = .1 * to_int(have_skill($skill[Abs of Tin])) +1;
float r = .25 * to_int(have_skill($skill[Spirit of Ravioli])) +1;
float c = .5 * to_int(my_primestat() == $stat[muscle]) +1;
// float p = numeric_modifier("Maximum HP");
return ceil(g* ceil(a* ceil(r* (floor((mus+3) *c) +p))));
}
// What would maximum MP be if I wasn't beaten up? Or if I was in a different outfit?
int find_maxmp(int mys, float p){
float g = .05 * to_int(have_skill($skill[Cosmic Ugnderstanding])) +1;
float m = .1 * to_int(have_skill($skill[Marginally Insane])) +1;
float w = .5 * to_int(have_skill($skill[Wisdom of the Elder Tortoises])) +1;
float c = .25 * to_int(my_primestat() == $stat[mysticality]) +1;
// float p = numeric_modifier("Maximum MP");
return ceil(g* ceil(m* floor(w* (floor(mys *c) +p))));
}
Is this script broken for anyone else? It was workign before, but now it always says the best outfit is equipped...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
KoLmafia r6957, Windows XP, Java 1.6.0_10
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Please note: do not post these logs in the KoLmafia thread. If
you would like us to look at the log, please instead email logs
to veracity@hambo.com using the subject "KoLmafia Debug Log"
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Timestamp: Sun Feb 15 21:39:34 CET 2009
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Unexpected error, debug log printed.
class java.lang.StringIndexOutOfBoundsException: String index out of range: 1
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.substring(Unknown Source)
at net.sourceforge.kolmafia.textui.RuntimeLibrary.substring(RuntimeLibarary.java:2599)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:119)
at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:157)
at net.sourceforge.kolmafia.textui.parsetree.Operator.applyTo(Operator.java:139)
at net.sourceforge.kolmafia.textui.parsetree.Expression.execute(Expression.java:111)
at net.sourceforge.kolmafia.textui.parsetree.WhileLoop.execute(WhileLoop.java:73)
at net.sourceforge.kolmafia.textui.parsetree.Scope.execute(Scope.java:397)
at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:125)
at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:240)
at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:185)
at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:178)
at net.sourceforge.kolmafia.KoLmafiaCLI.executeScriptCommand(KoLmafiaCLI.java:4370)
at net.sourceforge.kolmafia.KoLmafiaCLI.access$300(KoLmafiaCLI.java:140)
at net.sourceforge.kolmafia.KoLmafiaCLI$Call.run(KoLmafiaCLI.java:2186)
at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:551)
at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:445)
at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:317)
at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:298)
I think thats because the script is expecting an 'unquoted' attribute at the endI called to script with these parameters "call equipt.ash -fill[Item Drop]" and it gave me an error message