Personal Farming Script Help

Sputnik1

Member
Lately I started having a problem with Mafia aborting during my farm script and I can't figure out why.

Request 251 of 251 (Beanstalk: Giant's Castle) in progress...

[124238] Giant's Castle
Encounter: Alphabet Giant
Strategy: C:\Users\AustinCPC\Desktop\KoL Shit\ccs\cheffy.ccs [default]
Round 0: cheffy wins initiative!
Round 1: cheffy uses the facsimile dictionary!
Round 2: cheffy uses the facsimile dictionary!
Round 3: cheffy uses the facsimile dictionary!
Round 4: cheffy uses the facsimile dictionary!
Round 5: cheffy uses the facsimile dictionary!
Round 6: cheffy uses the facsimile dictionary!
You gain 51 Meat
Round 7: cheffy attacks!
You gain 796 Meat
You acquire an item: heavy D
You acquire an item: original G
You gain 13 Muscleboundness
You gain 24 Mysteriousness
You gain 6 Cheek

Putting on monster bait...
You may only equip one of those at a time.
Putting on Hodgman's lucky sock...
You may only equip one of those at a time.

It aborts after this happens where it finishes adventuring in the Castle. I don't know why it would be trying to see if it was wearing those items after adventuring as it was already wearing that from a previous outfit call for the outfit "Meat". The debug log wont open for me or be uploaded to the forums, so I will attempt again tomorrow to see if I can get it to write a new log. I've also posted my automated script, its mostly in cli execute, so it will probably get a little annoying to look at. Any help will be appreciated.

Code:
//Cheffy Automated Script

import <eatdrink1.ash>;

//Declare Meat Amount in Closet
int start_meat = my_closet_meat(); 

//Cheffy Breakfast
cli_execute("if meat > 0; closet put * meat");
cli_execute("outfit Meat");
cli_execute("familiar hobo monkey");
use_familiar($familiar[hobo monkey]);
visit_url("inv_use.php?&pwd&which=2&whichitem=4135 ");
cli_execute("closet take 200000 meat");
cli_execute("if twinkly wad > 15; use 15 twinkly wad");
eatdrink(fullness_limit(),inebriety_limit(), spleen_limit(), false,1000,0,0,0,false);
cli_execute("uneffect ode");
cli_execute("uneffect On the Trail");
cli_execute("csend 422 meat to kolabuff");
cli_execute("csend 19 meat to IocaineBot");
cli_execute("concert Elvish");
cli_execute("friars booze");
cli_execute("summon Drinks");
cli_execute("cast Vent Rage Gland");
cli_execute("call VIPPool.ash 1");
cli_execute("call VIPPool.ash 1");
cli_execute("call VIPPool.ash 1");
cli_execute("CheffyHoboAT.txt");
cli_execute("nuns");
cli_execute("if meat > 0; closet put * meat");

//Declare Initial Amount of Adventures after Breakfast
int startadv = my_adventures();

//Cheffy Meat Adventuring
cli_execute("ccs cheffy");
cli_execute("puttyfarm.ash");
cli_execute("adventure 15 farm");
cli_execute("uneffect On the Trail");
cli_execute("ccs cheffy");
cli_execute("adventure * castle");

//Cheffy End of Run Control
cli_execute("status refresh");
cli_execute("shrug cantata");
cli_execute("csend 1 meat to kolabuff");
cli_execute("csend 1 meat to Testudinata");
cli_execute("csend 3 meat to Testudinata");
cli_execute("csend 4 meat to Testudinata");
cli_execute("csend 5 meat to Testudinata");
cli_execute("csend 8 meat to Testudinata");
cli_execute("csend 9 meat to Testudinata");
cli_execute("csend 12 meat to Testudinata");
cli_execute("csend 270 meat to Testudinata");
cli_execute("csend 140 meat to Testudinata");
cli_execute("wait 60");
cli_execute("status refresh");
eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true,1000,0,0,0,false);
cli_execute("cast * love");
cli_execute("Nuns");
cli_execute("cast * love");
cli_execute("Nuns");
cli_execute("cast * love");
cli_execute("outfit rollover");

//Cheffy Daily Item Handling
cli_execute("refresh inventory");
cli_execute("if duct tape > 4; create duct tape wallet; use duct tape wallet");
cli_execute("if awful poetry journal > 1; autosell * awful poetry journal");
cli_execute("if Angry Farmer candy > 1; autosell * Angry Farmer candy");
cli_execute("if chaos butterfly > 1; autosell * chaos butterfly");
cli_execute("if furry fur > 1; autosell * furry fur");
cli_execute("if heavy D > 1; autosell * heavy D");
cli_execute("if original G > 1; autosell * original G");
cli_execute("if Mick's IcyVapoHotness Rub > 1; autosell * Mick's IcyVapoHotness Rub");
cli_execute("if plot hole > 1; autosell * plot hole");
cli_execute("if probability potion > 1; autosell * probability potion");
cli_execute("if procrastination potion > 1; autosell * procrastination potion");
cli_execute("if thin black candle > 1; autosell * thin black candle");
cli_execute("if Warm Subject gift certificate > 1; use * Warm Subject gift certificate");
cli_execute("if giant needle > 1; send * giant needle to wadbot || wads");
cli_execute("if wolf mask > 1; send * wolf mask to wadbot || wads");
cli_execute("if disturbing fanfic > 1; send * disturbing fanfic to wadbot || wads");
cli_execute("if twinkly nugget > 5; send * twinkly nugget to wadbot || wads");
cli_execute("if twinkly powder > 5; send * twinkly powder to wadbot || wads");
cli_execute("if love song of smoldering passion > 1; mallsell * love song of smoldering passion");
cli_execute("if love song of icy revenge*> 1; mallsell * love song of icy revenge");
cli_execute("if love song of disturbing obsession > 1; mallsell * love song of disturbing obsession");
cli_execute("if love song of vague ambiguity > 1; mallsell * love song of vague ambiguity");
cli_execute("if love song of naughty innuendo > 1; mallsell * love song of naughty innuendo");
cli_execute("if love song of sugary cuteness > 1; mallsell * love song of sugary cuteness");
cli_execute("if scratch 'n' sniff dragon sticker > 1; mallsell * scratch 'n' sniff dragon sticker");
cli_execute("if scratch 'n' sniff wrestler sticker > 1; mallsell * scratch 'n' sniff wrestler sticker");
cli_execute("if scratch 'n' sniff rock band sticker > 1; mallsell * scratch 'n' sniff rock band sticker");
cli_execute("if scratch 'n' sniff UPC sticker > 1; mallsell * scratch 'n' sniff UPC sticker");
cli_execute("if scratch 'n' sniff apple sticker > 1; mallsell * scratch 'n' sniff apple sticker");
cli_execute("if scratch 'n' sniff unicorn sticker > 1; mallsell * scratch 'n' sniff unicorn sticker");
cli_execute("if a little sump'm sump'm > 1; mallsell * a little sump'm sump'm");
cli_execute("if calle de miel > 1; mallsell * calle de miel");
cli_execute("if ducha de oro > 1; mallsell * ducha de oro");
cli_execute("if fuzzbump > 1; mallsell * fuzzbump");
cli_execute("if horizontal tango > 1; mallsell * horizontal tango");
cli_execute("if ocean motion > 1; mallsell * ocean motion");
cli_execute("if perpendicular hula > 1; mallsell * perpendicular hula");
cli_execute("if pink pony > 1; mallsell * pink pony");
cli_execute("if rockin' wagon > 1; mallsell * rockin' wagon");
cli_execute("if roll in the hay > 1; mallsell * roll in the hay");
cli_execute("if slap and tickle > 1; mallsell * slap and tickle");
cli_execute("if slip 'n' slide > 1; mallsell * slip 'n' slide");
cli_execute("if little paper umbrella > 1; mallsell * little paper umbrella");
cli_execute("if coconut shell > 1; mallsell * coconut shell");
cli_execute("if magical ice cubes > 1; mallsell * magical ice cubes");
cli_execute("if dry noodles > 1; mallsell * dry noodles");
cli_execute("if fetid feather > 1; mallsell * fetid feather");
cli_execute("if flaming feather > 1; mallsell * flaming feather");
cli_execute("if flirtatious feather > 1; mallsell * flirtatious feather");
cli_execute("if frozen feather > 1; mallsell * frozen feather");
cli_execute("if frightful feather > 1; mallsell * frightful feather");
cli_execute("if disassembled clover > 1; mallsell * disassembled clover");
cli_execute("undercut");
cli_execute("if twinkly wad > 30; closet put -30 twinkly wad");

//Cheffy End of Run Meat Deposit
cli_execute("closet put * meat");

//Cheffy Session Log Print
logprint("Meat gained: " + (my_closet_meat() - start_meat));
logprint("Adventures Used: " + startadv);
logprint("Meat Per Adventure: " + ((my_closet_meat() - start_meat) / startadv));
logprint("Meat in Closet: " + my_closet_meat());

//Cheffy Logout
cli_execute('exit');
 

Sputnik1

Member
well something happened today, and the problem didnt show up, hmm dont know what it was, I'll see if it ever shows up again
 

slyz

Developer
For your next script int CLIash, this works :
Code:
cli_execute
("

<CLI code>

");

This will save you some pasting.
 

Bale

Minion
LOL! Yeah, that's highly recommended. Also, I recommend learning ash since it hurts me to see you using if statements in CLI.
 

Bale

Minion
In case you do decide to learn ash, I think that the following might be instructive to you. Consider it a gift.

Code:
foreach it in $items[awful poetry journal, Angry Farmer candy, chaos butterfly, furry fur, heavy D, original G , 
	Mick's IcyVapoHotness Rub, plot hole, probability potion, procrastination potion, thin black candle]
		if(item_amount(it) > 0) autosell(item_amount(it), it);

foreach it in $items[love song of smoldering passion, love song of icy revenge, love song of disturbing obsession, love song of vague ambiguity, love song of naughty innuendo, love song of sugary cuteness, 
	scratch 'n' sniff dragon sticker, scratch 'n' sniff wrestler sticker, scratch 'n' sniff rock band sticker, scratch 'n' sniff UPC sticker, scratch 'n' sniff apple sticker, scratch 'n' sniff unicorn sticker,
	little sump'm sump'm, calle de miel, ducha de oro, fuzzbump, horizontal tango , ocean motion, perpendicular hula, pink pony, rockin' wagon, roll in the hay, slap and tickle, slip 'n' slide, 
	little paper umbrella, coconut shell, magical ice cubes, dry noodles, 
	fetid feather, flaming feather, flirtatious feather, frozen feather, frightful feather, 
	disassembled clover]
		if(item_amount(it) > 0) put_shop(0, 0, it);
 

Heffed

Member
Also, in the interest of server hits, the batch_open() and batch_close() commands are useful.

batch_open();
all the stuff I want to sell, stash, etc...
batch_close();

This way instead of individual server hits per item, KoLmafia will send them in groups of 11 where applicable.
 

Bale

Minion
Somehow I wanted to spare him that additional layer of complication, but yeah, it's a good thing to do.
 

Sputnik1

Member
you guys are awesome

Code:
//Cheffy Automated Script

import <eatdrink1.ash>;

//Declare Meat Amount in Closet
int start_meat = my_closet_meat(); 

//Cheffy Breakfast

cli_execute("
if meat > 0; closet put * meat
outfit Meat
familiar hobo monkey
closet take 200000 meat
if twinkly wad > 15; use 15 twinkly wad
");

eatdrink(fullness_limit(),inebriety_limit(), spleen_limit(), false,1000,0,0,0,false);

cli_execute("
uneffect ode
uneffect On the Trail
csend 422 meat to kolabuff
csend 19 meat to IocaineBot
concert Elvish
friars booze
summon Drinks
cast Vent Rage Gland
call VIPPool.ash 1
call VIPPool.ash 1
call VIPPool.ash 1
#CheffyHoboAT.txt
nuns
if meat > 0; closet put * meat
");

//Declare Initial Amount of Adventures after Breakfast
int startadv = my_adventures();

//Cheffy Meat Adventuring

cli_execute("
ccs cheffy
puttyfarm.ash
adventure 15 farm
uneffect On the Trail
ccs cheffy
adventure * castle
");

//Cheffy End of Run Control

cli_execute("
status refresh
shrug cantata
csend 1 meat to kolabuff
csend 1 meat to Testudinata
csend 3 meat to Testudinata
csend 4 meat to Testudinata
csend 5 meat to Testudinata
csend 8 meat to Testudinata
csend 9 meat to Testudinata
csend 12 meat to Testudinata
csend 270 meat to Testudinata
csend 140 meat to Testudinata
wait 60
status refresh
");

eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true,1000,0,0,0,false);

cli_execute("
cast * love
Nuns
cast * love
Nuns
cast * love
outfit rollover
");

//Cheffy Daily Item Handling

cli_execute("refresh inventory");
cli_execute("if duct tape > 4; create duct tape wallet; use duct tape wallet");
cli_execute("if Warm Subject gift certificate > 1; use * Warm Subject gift certificate");
batch_open():
foreach it in $items[awful poetry journal, Angry Farmer candy, chaos butterfly, furry fur, heavy D, 

original G, Mick's IcyVapoHotness Rub, plot hole, probability potion, procrastination potion, thin 

black candle]
		if(item_amount(it) > 0) autosell(item_amount(it), it);

cli_execute("
if giant needle > 1; send * giant needle to wadbot || wads
if wolf mask > 1; send * wolf mask to wadbot || wads
if disturbing fanfic > 1; send * disturbing fanfic to wadbot || wads
if twinkly nugget > 5; send * twinkly nugget to wadbot || wads
if twinkly powder > 5; send * twinkly powder to wadbot || wads
");

foreach it in $items[love song of smoldering passion, love song of icy revenge, love song of disturbing 

obsession, love song of vague ambiguity, love song of naughty innuendo, love song of sugary cuteness, 

scratch 'n' sniff dragon sticker, scratch 'n' sniff wrestler sticker, scratch 'n' sniff rock band 

sticker, scratch 'n' sniff UPC sticker, scratch 'n' sniff apple sticker, scratch 'n' sniff unicorn 

sticker, little sump'm sump'm, calle de miel, ducha de oro, fuzzbump, horizontal tango , ocean motion, 

perpendicular hula, pink pony, rockin' wagon, roll in the hay, slap and tickle, slip 'n' slide, little 

paper umbrella, coconut shell, magical ice cubes, dry noodles, fetid feather, flaming feather, 

flirtatious feather, frozen feather, frightful feather, 
disassembled clover, scrumptious reagent]
		if(item_amount(it) > 0) put_shop(0, 0, it);
batch_close();
cli_execute("
undercut
if twinkly wad > 30; closet put -30 twinkly wad
closet put * meat
");

//Cheffy Session Log Print
logprint("Meat gained: " + (my_closet_meat() - start_meat));
logprint("Adventures Used: " + startadv);
logprint("Meat Per Adventure: " + ((my_closet_meat() - start_meat) / startadv));
logprint("Meat in Closet: " + my_closet_meat());

//Cheffy Logout
cli_execute('exit');
 
Last edited:

Sputnik1

Member
hey I have a quick question, i was wondering how I could have the code call a buff bot depending on how many adventures of a buff I have.

if The Ballad of Richie Thingfinder < 300 advs
csend X meat
wait 360
 

Bale

Minion
Code:
if(have_effect($effect[The Ballad of Richie Thingfinder]) < 300) 
	cli_execute("csend X meat to this_guy_that_sends_thingfinder");
wait(360);

As you see, we adore the chance to show off and teach a little. Please ask if you don't understand what we write and we'll try to explain. After all, there's no point unless you can adapt these lessons to other purposes. :)
 

Sputnik1

Member
for some reason mafia says there is something wrong with this

Code:
cli_execute
("
if meat  0; closet put * meat;
outfit Meat;
familiar hobo monkey;
closet take 200000 meat;
if twinkly wad  15; use 15 twinkly wad;
");

it says that there's no closing " in the line containing ("
i thought this should work
 

Bale

Minion
I personally never do that, but I can tell you that this will work.

Code:
cli_execute {
	if meat > 0; closet put * meat;
	outfit Meat;
	familiar hobo monkey;
	closet take 200000 meat;
	if twinkly wad > 15; use 15 twinkly wad;
}

Though I'd rather do it in ash...
 
Last edited:

Sputnik1

Member
I'd love to eliminate more of my cli but I don't know where to look for the commands like switching familiars and outfits in ash

Updated Code
Its starting to look quite nice and its working quite nicely and its a thousand times faster
Code:
//////////Cheffy Automated Script//////////

import eatdrink1.ash;

//////////Declare Meat Amount in Closet//////////
int start_meat = my_closet_meat(); 

//////////Cheffy Breakfast//////////

cli_execute {
if meat  0; closet put * meat;
outfit Meat;
familiar hobo monkey;
closet take 200000 meat;
if twinkly wad > 15; use 15 twinkly wad;
}
if(have_effect($effect[Ode to Booze]) < 1) 
  cli_execute { csend 1 meat to kolabuff; csend 1 meat to Testudinata; }

eatdrink(fullness_limit(),inebriety_limit(), spleen_limit(), false,1000,0,0,0,false);

cli_execute {
uneffect ode;
uneffect On the Trail;
}

if(have_effect($effect[Carlweather's Cantata of Confrontation]) < 300) 
	cli_execute("csend 19 meat to IocaineBot; csend 22 meat to kolabuff");
	
if(have_effect($effect[The Ballad of Richie Thingfinder]) < 300) 
    repeat
   {
    cli_execute("csend 2504 meat to Buffer of the seal clubbers");      
    wait(60);
    cli_execute("effects refresh");}
		until (have_effect($effect[The Ballad of Richie Thingfinder]) > 300); 
			
if(have_effect($effect[Chorale of Companionship]) < 300) 
  rrepeat
   {
    cli_execute("csend 2501 meat to Buffer of the seal clubbers");      
    wait(60);
    cli_execute("effects refresh");}
		until (have_effect($effect[Chorale of Companionship]) > 300); 
  
if(have_effect($effect[Jalapeño Saucesphere]) < 300) 
  cli_execute { csend 3 meat to Testudinata; csend 4 meat to IocaineBot; }
  
if(have_effect($effect[Jabañero Saucesphere]) < 300) 
  cli_execute { csend 12 meat to IocaineBot; }
  
if(have_effect($effect[Astral Shell]) < 300) 
  cli_execute { csend 4 meat to Testudinata; csend 10 meat to IocaineBot; }
  
if(have_effect($effect[Ghostly Shell]) < 300)
  cli_execute { csend 6 meat to IocaineBot; }
  
if(have_effect($effect[Elemental Saucesphere]) < 300) 
  cli_execute { csend 5 meat to Testudinata; csend 11 meat to IocaineBot; }
  
if(have_effect($effect[Empathy of the Newt]) < 300) 
  cli_execute { csend 8 meat to Testudinata; csend 15 meat to IocaineBot; }
  
if(have_effect($effect[Tenacity of the Snapper]) < 300) 
  cli_execute { csend 9 meat to Testudinata; csend 8 meat to IocaineBot; }
 
if(have_effect($effect[Reptilian Fortitude]) < 300) 
  cli_execute { csend 13 meat to IocaineBot; }
  
if(have_effect($effect[Scarysauce]) < 300) 
  cli_execute { csend 12 meat to Testudinata; csend 16 meat to kolabuff; }
  
cli_execute {
concert Elvish;
friars booze;
summon Drinks;
cast Vent Rage Gland;
call VIPPool.ash 1;
call VIPPool.ash 1;
call VIPPool.ash 1;
nuns;
if meat > 0; closet put * meat;
}

//////////Declare Initial Amount of Adventures after Breakfast//////////
int startadv = my_adventures();

//////////Cheffy Meat Adventuring//////////

cli_execute {
ccs cheffy;
puttyfarm.ash;
adventure 15 farm;
uneffect On the Trail;
ccs cheffy;
adventure * castle;
}

//////////Cheffy End of Run Control//////////

cli_execute {
status refresh;
shrug cantata;
}
if(have_effect($effect[Ode to Booze]) < 1) 
  cli_execute { csend 1 meat to kolabuff; csend 1 meat to Testudinata; }
  
if(have_effect($effect[Jalapeño Saucesphere]) < 300) 
  cli_execute { csend 3 meat to Testudinata; csend 4 meat to IocaineBot; }
  
if(have_effect($effect[Jabañero Saucesphere]) < 300) 
  cli_execute { csend 12 meat to IocaineBot; }
  
if(have_effect($effect[Astral Shell]) < 300) 
  cli_execute { csend 4 meat to Testudinata; csend 10 meat to IocaineBot; }
  
if(have_effect($effect[Ghostly Shell]) < 300)
  cli_execute { csend 6 meat to IocaineBot; }
  
if(have_effect($effect[Elemental Saucesphere]) < 300) 
  cli_execute { csend 5 meat to Testudinata; csend 11 meat to IocaineBot; }
  
if(have_effect($effect[Empathy of the Newt]) < 300) 
  cli_execute { csend 8 meat to Testudinata; csend 15 meat to IocaineBot; }
  
if(have_effect($effect[Tenacity of the Snapper]) < 300) 
  cli_execute { csend 9 meat to Testudinata; csend 8 meat to IocaineBot; }
 
if(have_effect($effect[Reptilian Fortitude]) < 300) 
  cli_execute { csend 13 meat to IocaineBot; }
  
if(have_effect($effect[Scarysauce]) < 300) 
  cli_execute { csend 12 meat to Testudinata; csend 16 meat to kolabuff; }

cli_execute {   
wait 60;
status refresh;
}

eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true,1000,0,0,0,false);

cli_execute {
cast * love;
Nuns;
cast * love;
Nuns;
cast * love;
outfit rollover;
}

//////////Cheffy Daily Item Handling//////////

cli_execute {
refresh inventory;
if duct tape > 4; create duct tape wallet; use duct tape wallet;
if Warm Subject gift certificate > 1; use * Warm Subject gift certificate;
}
batch_open();
foreach it in $items[awful poetry journal, Angry Farmer candy, chaos butterfly, furry fur, heavy D, original G, Mick's IcyVapoHotness Rub, plot hole, probability potion, procrastination potion, thin black candle]
		if(item_amount(it) > 0) autosell(item_amount(it), it);

cli_execute {
if giant needle > 1; send * giant needle to wadbot || wads;
if wolf mask > 1; send * wolf mask to wadbot || wads;
if disturbing fanfic > 1; send * disturbing fanfic to wadbot || wads;
if twinkly nugget > 5; send * twinkly nugget to wadbot || wads;
if twinkly powder > 5; send * twinkly powder to wadbot || wads;
}

foreach it in $items[love song of smoldering passion, love song of icy revenge, love song of disturbing obsession, love song of vague ambiguity, love song of naughty innuendo, love song of sugary cuteness, scratch 'n' sniff dragon sticker, scratch 'n' sniff wrestler sticker, scratch 'n' sniff rock band sticker, scratch 'n' sniff UPC sticker, scratch 'n' sniff apple sticker, scratch 'n' sniff unicorn sticker, little sump'm sump'm, calle de miel, ducha de oro, fuzzbump, horizontal tango , ocean motion, perpendicular hula, pink pony, rockin' wagon, roll in the hay, slap and tickle, slip 'n' slide, little paper umbrella, coconut shell, magical ice cubes, dry noodles, fetid feather, flaming feather, flirtatious feather, frozen feather, frightful feather, disassembled clover, scrumptious reagent]
		if(item_amount(it) > 0) put_shop(0, 0, it);
batch_close();

cli_execute {
undercut;
if twinkly wad > 30; closet put -30 twinkly wad;
closet put * meat;
}

//////////Cheffy Session Log Print//////////
logprint("Meat gained: " + (my_closet_meat() - start_meat));
logprint("Adventures Used: " + startadv);
logprint("Meat Per Adventure: " + ((my_closet_meat() - start_meat) / startadv));
logprint("Meat in Closet: " + my_closet_meat());

//////////Cheffy Logout//////////
cli_execute('exit');
 
Last edited:

Sputnik1

Member
wtf, it came back again,

Request 251 of 251 (Beanstalk: Giant's Castle) in progress...

[124727] Giant's Castle
Encounter: What are the Odds?
You acquire an item: plot hole
You acquire an item: chaos butterfly

Putting on monster bait...
You may only equip one of those at a time.
Putting on Hodgman's lucky sock...
You may only equip one of those at a time.
 

Bale

Minion
I'd love to eliminate more of my cli but I don't know where to look for the commands like switching familiars and outfits in ash
That question is easy to answer. If you look at the top of this page, you'll see a link to a wiki. (It's right between FAQ and Community.) That wiki contains a lot of information about ash.

Also, kolMafia has a command that lists its commands.

Try these in the CLI:
ashref outfit
ashref familiar

You'll see lists of relevant commands.
 

Sputnik1

Member
Now I'm currently trying to figure out how to change my cli messaging codes to ash

This one comes up saying "the message didnt send for some reason"
Code:
import <zlib.ash>
if(have_effect($effect[Ode to Booze]) < 1) 
  kmail("kolabuff", "", 1);

This one, Mafia isnt recognizing my inputs into kmail
Code:
import <zlib.ash>;

foreach it in $items[twinkly nugget] 
  if(item_amount(it) > 0) 
  kmail("wadbot", "wads", 0, item_amount(it) it);


Here's my most up to date script
Code:
//////////Cheffy Automated Script//////////

import eatdrink1.ash;

//////////Place Rollover Meat and Declare Amount in Closet//////////
if (my_meat() > 0)
  cli_execute { closet put * meat; 
      }
int start_meat = my_closet_meat();

//////////Grab Meat for Breakfast//////////
cli_execute { closet take 200000 meat; 
  }

//////////Acquire Ode to Booze from Buff Bots//////////
if(have_effect($effect[Ode to Booze]) < 1) 
  cli_execute { csend 1 meat to kolabuff; csend 1 meat to Testudinata; 
    }

//////////Daily Food, Booze, and Remaining Spleen Consumption//////////
foreach it in $items[twinkly wad] 
    if(item_amount(it) > 15) use( 15, it); 
    
eatdrink(fullness_limit(),inebriety_limit(), spleen_limit(), false,1000,0,0,0,false);

//////////Gearing Up//////////

cli_execute { 
  equipt -fill[meat drop];
  }

//////////Shrug Unnecessary Buffs for Farming//////////
cli_execute { uneffect ode; uneffect On the Trail;
  }

//////////Visit Clan Pool Table, 30 Turns of Billiards Belligerance//////////
visit_url("clan_viplounge.php?preaction=poolgame&stance=1&pwd");
visit_url("clan_viplounge.php?preaction=poolgame&stance=1&pwd");
visit_url("clan_viplounge.php?preaction=poolgame&stance=1&pwd");

//////////Visit Post War Island Arena, 20 Turns of Winklered//////////
visit_url("postwarisland.php?action=concert&pwd&option=2");

//////////Visit Friars, 20 Turns of Brother Smothers's Blessing "Booze"//////////
visit_url("friars.php?action=buffs&bro=3&pwd=");

//////////Acquire Optimum AT, Sauceror, and TT Buffs from Buff Bots//////////
if(have_effect($effect[Carlweather's Cantata of Confrontation]) < 300) 
	cli_execute { csend 19 meat to IocaineBot; csend 22 meat to kolabuff;
    }
	
if(have_effect($effect[The Ballad of Richie Thingfinder]) < 300) 
    repeat
   {
    cli_execute("csend 2504 meat to Buffer of the seal clubbers");      
    wait(60);
    cli_execute("effects refresh");}
		until (have_effect($effect[The Ballad of Richie Thingfinder]) > 300); 
			
if(have_effect($effect[Chorale of Companionship]) < 300) 
  repeat
   {
    cli_execute("csend 2501 meat to Buffer of the seal clubbers");      
    wait(60);
    cli_execute("effects refresh");}
		until (have_effect($effect[Chorale of Companionship]) > 300); 
  
if(have_effect($effect[Jalapeño Saucesphere]) < 300) 
  cli_execute { csend 3 meat to Testudinata; csend 4 meat to IocaineBot; 
    }
  
if(have_effect($effect[Jabañero Saucesphere]) < 300) 
  cli_execute { csend 12 meat to IocaineBot; 
    }
  
if(have_effect($effect[Astral Shell]) < 300) 
  cli_execute { csend 4 meat to Testudinata; csend 10 meat to IocaineBot;
    }
  
if(have_effect($effect[Ghostly Shell]) < 300)
  cli_execute { csend 6 meat to IocaineBot; 
    }
  
if(have_effect($effect[Elemental Saucesphere]) < 300) 
  cli_execute { csend 5 meat to Testudinata; csend 11 meat to IocaineBot; 
    }
  
if(have_effect($effect[Empathy]) < 300) 
  cli_execute { csend 8 meat to Testudinata; csend 15 meat to IocaineBot; 
    }
  
if(have_effect($effect[Tenacity of the Snapper]) < 300) 
  cli_execute { csend 9 meat to Testudinata; csend 8 meat to IocaineBot; 
    }
 
if(have_effect($effect[Reptilian Fortitude]) < 300) 
  cli_execute { csend 13 meat to IocaineBot;
    }
  
if(have_effect($effect[Scarysauce]) < 300) 
  cli_execute { csend 12 meat to Testudinata; csend 16 meat to kolabuff; 
    }
  
cli_execute {
summon Drinks; cast Vent Rage Gland; nuns;
}

//////////Send Remaining Meat to Closet//////////
if (my_meat() > 0)
  cli_execute { closet put * meat; 
      }
      
//////////Declare Initial Amount of Adventures after Breakfast//////////
int startadv = my_adventures();

//////////Cheffy Meat Adventuring//////////
cli_execute {
  ccs cheffy; puttyfarm.ash; adventure 15 farm; uneffect On the Trail; ccs cheffy;   
    adventure * castle;
    }

//////////Acquire Optimum AT, Sauceror, and TT Buffs from Buff Bots #2//////////
cli_execute {
  status refresh; shrug cantata;
    }
    
if(have_effect($effect[Ode to Booze]) < 1) 
  cli_execute { csend 1 meat to kolabuff; csend 1 meat to Testudinata; 
    }
  
if(have_effect($effect[Jalapeño Saucesphere]) < 300) 
  cli_execute { csend 3 meat to Testudinata; csend 4 meat to IocaineBot; 
    }
  
if(have_effect($effect[Jabañero Saucesphere]) < 300) 
  cli_execute { csend 12 meat to IocaineBot; 
    }
  
if(have_effect($effect[Astral Shell]) < 300) 
  cli_execute { csend 4 meat to Testudinata; csend 10 meat to IocaineBot; 
    }
  
if(have_effect($effect[Ghostly Shell]) < 300)
  cli_execute { csend 6 meat to IocaineBot; 
    }
  
if(have_effect($effect[Elemental Saucesphere]) < 300) 
  cli_execute { csend 5 meat to Testudinata; csend 11 meat to IocaineBot; 
    }
  
if(have_effect($effect[Empathy]) < 300) 
  cli_execute { csend 8 meat to Testudinata; csend 15 meat to IocaineBot; 
    }
  
if(have_effect($effect[Tenacity of the Snapper]) < 300) 
  cli_execute { csend 9 meat to Testudinata; csend 8 meat to IocaineBot; 
    }
 
if(have_effect($effect[Reptilian Fortitude]) < 300) 
  cli_execute { csend 13 meat to IocaineBot; 
    }
  
if(have_effect($effect[Scarysauce]) < 300) 
  cli_execute { csend 12 meat to Testudinata; csend 16 meat to kolabuff; 
    }

cli_execute {   
  wait 60; status refresh;
    }

eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true,1000,0,0,0,false);

cli_execute {
  cast * love; Nuns; cast * love; Nuns; cast * love;
    }
cli_execute { 
  equipt -fill[adventures];
  } 

//////////Cheffy Daily Item Handling//////////
cli_execute {
refresh inventory;
}
batch_open();

//////////Create and Use Duct Tape Wallets//////////
foreach it in $items[duct tape] 
  if(item_amount(it) > 4) 
  repeat
    create(1, $item[duct tape wallet]); 
    until (item_amount(it) < 4);

//////////Use All Warm Subject Gift Certificates//////////
foreach it in $items[Warm Subject gift certificate] 
  if(item_amount(it) > 1) use(item_amount(it), it); 

//////////Autosell Castle Items//////////
foreach it in $items[awful poetry journal, Angry Farmer candy, chaos butterfly, furry fur, heavy D, original G, Mick's IcyVapoHotness Rub, plot hole, probability potion, procrastination potion, thin black candle]
		if(item_amount(it) > 0) autosell(item_amount(it), it);

//////////Send Items to Wadbot to Smash//////////
cli_execute {
if giant needle > 1; send * giant needle to wadbot || wads;
if wolf mask > 1; send * wolf mask to wadbot || wads;
if disturbing fanfic > 1; send * disturbing fanfic to wadbot || wads;
if twinkly nugget > 5; send * twinkly nugget to wadbot || wads;
if twinkly powder > 5; send * twinkly powder to wadbot || wads;
}

//////////Mallsell Skill and Other Misc Items//////////
foreach it in $items[love song of smoldering passion, love song of icy revenge, love song of disturbing obsession, love song of vague ambiguity, love song of naughty innuendo, love song of sugary cuteness, scratch 'n' sniff dragon sticker, scratch 'n' sniff wrestler sticker, scratch 'n' sniff rock band sticker, scratch 'n' sniff UPC sticker, scratch 'n' sniff apple sticker, scratch 'n' sniff unicorn sticker, little sump'm sump'm, calle de miel, ducha de oro, fuzzbump, horizontal tango , ocean motion, perpendicular hula, pink pony, rockin' wagon, roll in the hay, slap and tickle, slip 'n' slide, little paper umbrella, coconut shell, magical ice cubes, dry noodles, fetid feather, flaming feather, flirtatious feather, frozen feather, frightful feather, disassembled clover, scrumptious reagent]
		if(item_amount(it) > 0) put_shop(0, 0, it);
batch_close();

//////////Undercut Mall Prices/////////
cli_execute { undercut;
    }

//////////Place Remaining Meat in Closet//////////
if (my_meat() > 0)
  cli_execute { closet put * meat; 
      }

//////////Run Summary Report//////////
cli_execute { summary;
  }

//////////Cheffy Session Log Print//////////
logprint("Meat gained: " + (my_closet_meat() - start_meat));
logprint("Adventures Used: " + startadv);
logprint("Meat Per Adventure: " + ((my_closet_meat() - start_meat) / startadv));
logprint("Meat in Closet: " + my_closet_meat());

//////////Cheffy Logout//////////
cli_execute('exit');
 
Last edited:

Bale

Minion
This one, Mafia isnt recognizing my inputs into kmail
Code:
import <zlib.ash>;

foreach it in $items[twinkly nugget] 
  if(item_amount(it) > 0) 
  kmail("wadbot", "wads", 0, item_amount(it) it);

That's because you have the wrong data type for the last argument. It is expecting a map of items (possibly as many as 11 items) and their quantities. Also, the whole foreach loop isn't necessary for that since there's only a single item being tested there. Try it like this:

Code:
import <zlib.ash>;

if(item_amount($item[twinkly nugget]) > 0) {
  int[item] goodies
  goodies [$item[twinkly nugget]] = item_amount($item[twinkly nugget]);
  kmail("wadbot", "wads", 0, goodies);
}
 

Bale

Minion
Ah. Well in that case, if they're all going to wadbot, you'd want to make each of them as a new entry in goodies. Then send the whole map of goodies to wadbot.
 

Sputnik1

Member
Yep, this seems to work

Code:
import <zlib.ash>;

foreach it in $items[twinkly nugget, giant needle, wolf mask, disturbing fanfic, twinkly powder, cold powder, hot powder, sleaze powder, spooky powder, stench powder, cold nugget, hot nugget, sleaze nugget, spooky nugget, stench nugget] 
if(item_amount(it) > 0) {
  int[item] goodies;
  goodies [it] = item_amount(it);
  kmail("wadbot", "wads", 0, goodies);
}

Now if I can only figure out the meat send one
 
Top