Script to buy buffs

twistedmage

New member
Hey guys, i'm very new to this, but at the start of my script i have a little section to grab a couple of buffs from buffbots. However i have noticed that the amount of meat lost is higher than it should be. For example with this little bit of script:

void main()
{
cli_execute( "send 3 meat to Dreadwing"); //polka
cli_execute( "send 4 meat to Dreadwing"); //phat loot
}

I run it and end up losing 225 meat or something.

This seems totally bizarre to me since i get the buffs i wanted, so only the correct amount has been sent to the buffbot obviously.

What is happening to the rest of my meat, where is it being sent to, and most importantly, why? :-\
 

Nightmist

Member
Mafia doesn't allow the scripted purchase of philanthropic buffs, it will auto-convert to the next closest non-philanthropic price of that buff. Holatuwol (Heh man I think thats right? "Hero Of Legend And The Ultimate Warrior Of Light"? Radio interview love.) explains a bit in his radio interview... which I won't be making summaries of since I might get something completely wrong but I'll answer the other questions.

"What is happening to the rest of my meat"
Sent to the buffbot

"Where"
The buffbot

"Why"
*Hopes Holatuwol answer this later*



Edit: Okay, macman104 already posted but seeings as I already typed it up... (Post count addage >>)
 

holatuwol

Developer
Nightmist answered your first two questions and left the third question to me.

At the current time, I see no good reason for people to ask for philanthropic buffs in a script, other than laziness. If you'd like to present a good reason why I'm wrong, I'm willing to listen. However, the idea that scripters do the "send X meat," where X corresponds to a philanthropic buff, all out of laziness is the main reason "why".

As for an elaboration on that particular why, it's because I think that allowing for sending philanthropic requests via scripts weren't intended to rapidly drain buffbot resources, but unfortunately, they are. Buffbot resource reserve depletion isn't so alarming they'll go bankrupt tomorrow, but it's a growing problem, and scripted buffbot farmers who are always requesting philanthropic buffs out of laziness to change prices in their scripts certainly aren't helping.

In v10.5 (which hasn't been released yet) KoLmafia will automatically reject the "send" request for a philanthropic buff in order to give players a chance to figure out their motivations for using the "send" to request philanthropic buffs. If you're in KoLmafia's intended audience, I've added a new command "csend" to the upcoming release which stands for "convertible send" which explicitly asks KoLmafia to convert your request to the closest non-philanthropic equivalent.
 

izchak

Member
How exactly does this "csend" command work?
Specifically, how can we request a buffing of a given non-free buff?
Do we just request a free buff price with csend, and rely upon mafia to convert it to the appropriate non-free buff amount?
To pick an arbitary example, say I want to request a buffing of Ode from testudinata. The price for a 'free' buff is 1 meat, and the price for the same non-free buff is 59.
Would I just go "csend 1 meat to testudinata", and rely upon mafia to convert that to 59 (or whatever the appropriate amount is, should the price change in future)?

Furthermore, on a related note, is there any way to check if a given player/buffbot is online?
 

holatuwol

Developer
Yes on what csend will do -- it's not guaranteed to work, but it will make a best effort. No on whether or not you can check if a buffbot is online via script.
 
Top