Chat logger

banjob

New member
Quite hypothetical at this period since I know so little about scripting but I will ask :)

How possible would it be for a simple batch file to launch mafia. Just login to chat and log it?

I can handle the windows auto run features myself along with a bit of the mafia features. Say:

Code:
Chatlog.bat

java -jar KoLmafia-11.3.jar --CLI < login.txt


Code:
login.txt:

login accountname
exit

I believe I could put a call script between login and exit but I'm quite lost on how I should go about it. Mafia logs chat on its own, I believe? So would I need an .ash script? Could I just use a simple .txt file?

login accountname
call chat.txt
ext

chat.txt = chat

?

I'm fairly efficient at figuring out things for myself. So if someone could just point me in the right direction it would be much appreciated!

Thanks
 

holatuwol

Developer
Since you're opening chat anyway, it's fine to go ahead and remove the --CLI part and the attempt to redirect the input from a file. When doing so, you may also benefit from using javaw instead of java. So, "javaw -jar KoLmafia.jar login.txt". Also, the "chat" command opens up chat. So if you have chat logging enabled, your login.txt can be as simple as:

PHP:
login my_user_name
chat

There's no way to access chat URLs using scripting for ... spam reasons, so you're stuck with having a chat window open while you're attempting to log chat.
 
Top