Making a Clan Buffbot, could use some help

dapanda

Member
Hi everyone,

I have been working on a Clan BuffBot for a while and now it is finally ready to be released. I a full plan for its scripting but I am not sure how to make KoLmafia do what I want. Besides using the "wait()" command and the topic listed below, is there any way to have commands run at a certain time?

From 2011:
http://kolmafia.us/showthread.php?7562-Buffbot-Script-help&highlight=buffbot

I am really just wanting to have a logout script run before rollover and exit KoLmafia. I know I could have the java quit forcely but I was wondering if there was a cleaner way.

Is there also a way to have the bot be free? I see the one meat option.

Thanks!
 

Pazleysox

Member
Hi everyone,

Is there also a way to have the bot be free? I see the one meat option.

Thanks!

Make it into a chatbot. Simply copy the simple script I have below, made your needed changes, and add the buffs you want, set up in preferences as a chatbot. Should be pretty straight forward.

This code is pretty simple, You should have mafia, or a script setup to maintain MP as needed.

PHP:
import <zlib.ash>
void main( string sender , string message, string channel )
{
int [item] map;
map[$item[adder]] = 0; 

	if (channel=="")
	{
        channel="PM";
	if(contains_text(to_lower_case(message), "help"))
		{
        kmail(sender, 
		"Ode: single shot of ode to booze\n" + // You can put as many buffs in here as you wish.  Just make sure you script them below
		"Astral 10: 10 shots of Astral Shell\n" + // keep the information to be sent between the first " and put the \n" + at the end of the line.  This will add a carriage return (enter) on the message line
		"Some other buff", 0, map);  // Do not change the 0, map
		return; }

        print("Incoming PM from " +sender+ " saying:  "+message,"blue");

	if(contains_text(to_lower_case(message), "ode"))  //  This is a great example of a single shot of 1 buff
		{
  	chat_private(sender , "Casting 1 shot of \"Ode to Booze\"");
		cli_execute("cast ode to booze on " +sender);
		return; }

	if(contains_text(to_lower_case(message), "astral 10")) 	// You can change the number to anything you want, I just used 10 as an example.
		{
  	chat_private(sender , "Casting 10 shot of \"astral shell\"");
		cli_execute("cast 10 astral shell on " +sender);
		return; }

	if(contains_text(to_lower_case(sender), "YOURBOTNAME" ))    // Change YOURBOTNAME to the name of your bot.  Keep the "", or the script will fail.  This will keep the bot from buffing itself endlessly.
		{
		return;
		}
  	chat_private(sender , "I got your message... and I'll respond when I return.");	// If you are going to monitor the chat.  If not, feel free to change as you see fit.
	}}
 
Top