Buffbot on a Server

FlashGordon

New member
I have an account that I'd like to turn into a buffbot. (Possibly two, as I have a clannie leaving the game.) The idea I'm thinking is putting it on my server account under one of my domain names, then allowing clan members to simply kmail the account and receive the buffs. I'm pretty okay with setting up the buffbot, but it's putting it online that I need help with.

1: I'd like that account to simply auto-adventure every day at a certain area to keep up with items. Thinking Icy Peak, as unrefined mountain stream soda is plentiful with the right equipment and the clan isn't so large to use up too much at a time.

2: Buy AND eat & drink certain items, then autoadventure down to 0 every day without me having to take a 2nd glance at the account for awhile, or at least till a clannie says they didn't get their buffs. I'm not concerned about overdrinking, as I'm only really looking for a low-maintenance bot.

Is this all possible through mafia? If so, how would I put it online?

My server is Linux Cent0S running hsphere 3.0 as the control panel.

Cheers,

Flash
 

holatuwol

Developer
Yes, it's a simple CLI script.  All the commands you need are documented in the KoLmafia CLI manual located on the KoLmafia homepage at sourceforge.net.

To run it on a CentOS server, setup a cron job and make sure Java knows that it should run headless; this should bypass any potential headless exceptions that get thrown.  Also force it into CLI mode.  This is something like what you should have (all on one line, naturally -- I just added line breaks and indents so you could see that they're all separate):

PHP:
/path/to/sun/jre
	-Djava.awt.headless=true
	-Duser.home=/path/to/kolmafia/folder
	-Duser.dir=/path/to/kolmafia/folder
	-jar /path/to/KoLmafia.jar
		--CLI /path/to/script
			&
 

FlashGordon

New member
Just to make sure I'm thinking about this in the right terms... the .jar is placed on the server with the script placed in the appropriate folder. The cron activates it whenever (daily) and it runs its course. The file that this script would be is the .ash file?

Is there an example script out there that I could use to compare the manual notes with? Sometimes its easier for me to break down a script than it is to build one from scratch.

Cheers.
 
Top