PDA

View Full Version : Buffbot on a Server



FlashGordon
03-02-2008, 06:41 AM
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
03-02-2008, 06:56 AM
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):


/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
03-03-2008, 02:11 AM
Thanks!

Got a direct link to the doc? "Documentation" is empty on the sourceforge site.
https://sourceforge.net/docman/?group_id=126572

macman104
03-03-2008, 02:44 AM
http://kolmafia.sourceforge.net/manual.html

FlashGordon
03-04-2008, 12:35 AM
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.