Jar not accepting script variable

Moe Ron

New member
I know I will be reamed on here for asking but I have searched KOL forums and kolmafia forums and can't, for the life of me, find the answer.

Up until v9.9 I used the following statement to run my daily script:
java -jar -Duser.dir=C:\KOLMaf C:\KOLMaf\KoLmafia-9.9.jar --CLI script=C:\KOLMaf\scripts\script.txt

On version 10.0 forward, it has ceased to recognize my script. Can someone help or point me to the right place?

-Moe
 

Moe Ron

New member
Hmm, still no dice

tried:
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI scripts\test.txt
&
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI scripts\test.txt
&
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI \scripts\test.txt
&
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI C:\KolMafia\scripts\test.txt
& Finally
java -jar C:\KOLMafia\KoLmafia-10.2.jar --CLI C:\KolMafia\scripts\test.txt

All of the above just stop at the Login box. I have logged in through the exe multiple times and it is set up to save my password (and has successfully).

The test.txt contains:
mirror arc.txt
login xxNamexx
breakfast

status refresh
effects refresh

outfit birthday suit
outfit sleep

wait 10

exit
 
test.txt you indicated contains "login xxNamexx" using the method below it will need to be changed to just "xxNamexx". The mirror command will have to come after the login command also.

try
Code:
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI<scripts\test.txt

or
Code:
java -jar KoLmafia.jar --CLI<chardata\efilnikufecin.txt

is the exact command line I use within a batch file. I never noticed a change because the above method makes kolmafia think that the contents of test.txt (efilnikufecin.txt in my case) is being manually typed in at the keyboard. The batch file starting kolmafia is in the same folder as the jar. When running characters 1 after the other, this method prevents one character having an error from stopping the rest of them from running.
 

holatuwol

Developer
My mistake.  Also drop the --CLI parameter.  Alternatively, make the --CLI part the LAST thing you pass to KoLmafia and things will work fine.
 

Moe Ron

New member
Works like a charm, THANKS!!!

My new cmd line is:
java -jar -Duser.dir=C:\KolMafia C:\KolMafia\KoLmafia-10.2.jar script=C:\KolMafia\scripts\test.txt --CLI


As an aside, holatuwol: Thanks for the hard work on the project, it makes an already cool game even better.

-Moe
 
Top