Personal Farming Script Help

Bale

Minion
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);
}

I believe that a kmail can only have 11 items total, so that will only work if you don't have all of those present at the same time. Also, it would be better to bump the definition of goodies up a level, outside of the if statement.

Edit: Just took a look at zlib and it seems it handles splitting the kmail in case you have more than 11 items, however it will send different text. Instead of "wads", the second message will say 'Here are your remaining items that would not fit in the previous message.' I suspect that is not ideal so you'd best split it yourself.
 
Last edited:

zarqon

Well-known member
I think I've run across a few cases now where it would be better to duplicate the original message rather than give the "Here are remaining items" message. I think I'll change that for the next ZLib release.

For the meat-sending issue, I'm not sure but there may be some issue with trying to send an empty string. Try sending it with a non-empty message and post your results.
 

Sputnik1

Member
Well what I have for messaging wadbot works fine, I just have a new question

what is the command for refreshing the inventory in ash
ive got my script set up so it will wait until i get twinkly wads back but the problem is
using refresh_status doesnt refresh the inventory, so the script loops indefinitely because the amount of wads never changes

Code:
//////////Place Meat and Twinkly Wads in Closet//////////
if(item_amount($item[twinkly wad]) <= 15)
  repeat {wait(5); refresh_status();}
    until (item_amount($item[twinkly wad]) >= 30);
if (my_meat() > 0)
  put_closet(my_meat());
if(item_amount($item[twinkly wad]) > 30)
  put_closet(item_amount($item[twinkly wad])-30, $item[twinkly wad]);


and I thank you guys for pushing me to switch to ash, I definitely in love with it, makes things a thousand times easier and logical
 
Last edited:

Bale

Minion
To return to the original question for a moment...
Lately I started having a problem with Mafia aborting during my farm script and I can't figure out why.
Code:
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.

This is probably the same bug that Veracity just fixed today in revision 7811.
 

Sputnik1

Member
moving on with my script, I wanted to add to my script a counter which would change a variable in my prefs which would allow my script to be rerun in case something aborted for some reason

for each important group of commands, I wanted to set it up like the code below where the script would check the variable in prefs and if it matched it would run the following code and then modify the variable once it finished

the code below however never registers and just runs the code that I leave out of dailycounter groups

any help would be awesome

Code:
int numcount = 0;
if(get_property("dailycounter") == 0)
  {if (my_meat() > 0 && get_property("dailycounter") == 0)
    {put_closet(my_meat());
     int meatinitial = my_closet_meat();
     take_closet(200000);}
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;
   print("Done");}
 

Bale

Minion
get_property() returns a string, not an integer. That's your problem. You want if(get_property("dailycounter").to_int() == 0)

Actually, you probably want to use if(get_property("_dailycounter") == ""). It is best to use an underline in front of your property's name because then mafia will automatically reset it every day.

Also, int meatinitial = my_closet_meat(); is defined inside an if statement, so it cannot be used outside of that if statement.
 
Last edited:

Sputnik1

Member
for some odd reason its still avoiding those sections

Code:
  if(my_meat() > 0 && get_property("_dailycounter").to_int() == 0)
     put_closet(my_meat());
     int meatinitial = my_closet_meat();
     take_closet(200000);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;
 

Bale

Minion
Just thought I'd mention that in your code, "dailycounter" is not the same thing as "_dailycounter". Also, you've got an indented section without any curly brackets around it that clearly wants those brackets. Anyway, I don't know what your problem is, but it might help if you posted more of your code so we can figure it out in context. The problem might be something you're not even showing us.
 

Sputnik1

Member
Yeah i went and changed the prefs from dailycounter=0 to _dailycounter=0
is this not correct?

here's the entire code, hopefully you wont be too confused

Code:
//////////Cheffy Automated Script//////////

import eatdrink1.ash;
import zlib.ash
import puttyfarm.ash
int val = to_int(get_property("valueOfAdventure"));//Recalling valueOfAdventure
int numcount = 0;
int botsc = 0;//Initial Casts of Hobo AT BUffs
int numbrt = have_effect($effect[The Ballad of Richie Thingfinder]); 
int numcc = have_effect($effect[Chorale of Companionship]); 
int castsbrt = (((300 - numbrt)/20) + 1);//Number of Casts of BRT by Buffer to get 300 turns
int castscc = (((300 - numcc)/20) + 1);//Number of Casts of CC by Buffer to get 300 turns
int waittime = 45;//Time to wait for Buffer's Buffs

//////////Breakfast Meat Commands//////////
  if(my_meat() > 0 && get_property("_dailycounter").to_int() == 0)
     {put_closet(my_meat());}
    int meatinitial = my_closet_meat();
    take_closet(200000);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;

//////////Acquire Ode to Booze from Buff Bots//////////
if(my_inebriety() < 19 && have_effect($effect[Ode to Booze]) < 1 && get_property("_dailycounter").to_int() == 1) 
  {cli_execute ("csend 1 meat to kolabuff; csend 1 meat to Testudinata");
    repeat {wait(5); refresh_status();}
    until (have_effect($effect[Ode to Booze]) > 1);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}

//////////Daily Food, Booze, and Remaining Spleen Consumption//////////
foreach it in $items[cold wad, hot wad, spooky wad, sleaze wad]
  if(item_amount(it) > 0 && my_spleen_use() < 15 && get_property("_dailycounter").to_int() == 2) 
    {repeat { use(1, it);}
      until (item_amount(it) == 0 || my_spleen_use() == 15);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
foreach it in $items[cold wad, hot wad, spooky wad, sleaze wad]
  if(item_amount(it) == 0 && my_spleen_use() < 15 && get_property("_dailycounter").to_int() == 3)
    {repeat { use(1, $item[twinkly wad]);}
      until (my_spleen_use() == 15);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
if(my_inebriety() < 19 && get_property("_dailycounter").to_int() == 4)    
  {eatdrink(fullness_limit(),inebriety_limit(), spleen_limit(), false,val,0,0,0,false);    
    cli_execute ("uneffect ode");
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
  
//////////Gearing Up for Daily Adventuring//////////
if(get_property("_dailycounter").to_int() == 5)
  {cli_execute ("maximize meat drop");
   cli_execute ("familiar stocking mimic");
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}

//////////Shrug Unnecessary Buffs for Farming//////////
if(get_property("_dailycounter").to_int() == 6)
  {cli_execute ("shrug On the Trail");
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}

//////////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=");

//////////Summon Demon for 30 Turns of Preternatural Greed//////////
if(!to_boolean(get_property("demonSummoned")) && get_property("demonName2") != "") cli_execute("summon 2");

//////////Acquire Optimum AT, Sauceror, and TT Buffs from Buff Bots//////////
if(have_effect($effect[Carlweather's Cantata of Confrontation]) < 300 && get_property("_dailycounter").to_int() == 7) 
	cli_execute ("csend 19 meat to IocaineBot; csend 22 meat to kolabuff");
	
if(have_effect($effect[The Ballad of Richie Thingfinder]) < 300 && have_effect($effect[Chorale of Companionship]) < 300 && get_property("_dailycounter").to_int() == 7)
  {while (castsbrt > 0)
    {cli_execute("csend 2504 meat to Buffer of the seal clubbers");  
      castsbrt = castsbrt - 1;}

  while (castscc > 0)
    {cli_execute("csend 2501 meat to Buffer of the seal clubbers");  
      castscc = castscc - 1;}

  wait(3*waittime);
  refresh_status();}
  
if(get_property("_dailycounter").to_int() == 7)
  {if(have_effect($effect[The Ballad of Richie Thingfinder]) < 300) 
      repeat
    {cli_execute("csend 2504 meat to Buffer of the seal clubbers");      
      wait(waittime);
      refresh_status();}
      until (have_effect($effect[The Ballad of Richie Thingfinder]) > 300); 
		
  if(have_effect($effect[Chorale of Companionship]) < 300 && get_property("_dailycounter").to_int() == 7) 
      repeat
    {cli_execute("csend 2501 meat to Buffer of the seal clubbers");      
      wait(waittime);
      refresh_status();}
      until (have_effect($effect[Chorale of Companionship]) > 300);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
  
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");

use_skill(1, $skill[Vent Rage Gland]);

if (my_mp() <= 20)
  {cli_execute ("Nuns"); refresh_status();}

//////////Send Remaining Meat to Closet//////////
if (my_meat() > 0 && get_property("_dailycounter").to_int() == 8)
  {put_closet(my_meat());
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
   
//////////Declare Initial Amount of Adventures after Breakfast//////////
int startadv = my_adventures();
  
//////////Cheffy Adventuring//////////
if(get_property("_dailycounter").to_int() == 9) 
   {cli_execute ("ccs cheffy");
    puttyfarm();
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
if(get_property("_dailycounter").to_int() == 10) 
    {cli_execute ("ccs cheffy");
    adventure(15, $location[McMillicancuddy's Farm]);
    cli_execute ("uneffect On the Trail; ccs cheffy");
    adventure(my_adventures(), $location[Giant's Castle]);
    set_property("dailycounter", numcount + 1);
    numcount = numcount + 1;}

//////////Acquire Optimum AT, Sauceror, and TT Buffs from Buff Bots #2//////////
if(get_property("_dailycounter").to_int() == 11)
  {refresh_status();
   cli_execute ("shrug cantata");
    
  if(have_effect($effect[Ode to Booze]) < 1) 
   cli_execute ("csend 1 meat to kolabuff; csend 1 meat to Testudinata");
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
  
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");

refresh_status();

//////////Consumption for Rollover//////////
if(have_effect($effect[Ode to Booze]) < 1 && get_property("_dailycounter").to_int() == 12)
  {repeat {wait(5); refresh_status();}
    until (have_effect($effect[Ode to Booze]) > 1);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
if(my_inebriety() <= 19 && get_property("_dailycounter").to_int() == 13)
   {eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true,val,0,0,0,false);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}

//////////Casting Love Song and Finishing Visit to Nuns//////////
if(get_property("_dailycounter").to_int() == 14)
{if (my_mp() >= mp_cost($skill[love song]))
   repeat{use_skill($skill[love song]); refresh_status();}
   until (my_mp() <= mp_cost($skill[love song]));
 if (mp_cost($skill[love song]) <= 550)
   {cli_execute ("Nuns"); refresh_status();}
 if (my_mp() >= mp_cost($skill[love song]))
   repeat{use_skill($skill[love song]); refresh_status();}
   until (my_mp() <= mp_cost($skill[love song]));
 if (mp_cost($skill[love song]) <= 550)
   {cli_execute ("Nuns"); refresh_status();}
 if (my_mp() >= mp_cost($skill[love song]))
   repeat{use_skill($skill[love song]); refresh_status();}
   until (my_mp() <= mp_cost($skill[love song]));
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}  

//////////Gearing Up for Rollover//////////
if(get_property("_dailycounter").to_int() == 15) 
  {cli_execute ("maximize adv");
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}

//////////Cheffy Daily Item Handling//////////
refresh_status();

cli_execute("refresh inv");

batch_open();

//////////Use Stuffed Treasure Chests and Keys//////////
while(item_amount($item[stuffed treasure chest]) >= 1 && item_amount($item[stuffed key]) >= 1)
    {use(1, $item[stuffed treasure chest]);}
    
//////////Place Stuffed Items into DC//////////
for i from 1974 to 2018 
  if (item_amount(to_item(i)) > 0) put_display(item_amount(to_item(i)),to_item(i));
  if (item_amount($item[stuffed Meat]) > 0) put_display(item_amount($item[stuffed Meat]),$item[stuffed Meat]);
for i from 3951 to 3962 
  if (item_amount(to_item(i)) > 0) put_display(item_amount(to_item(i)),to_item(i));

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

//////////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//////////
foreach it in $items[giant needle, wolf mask, disturbing fanfic, rave whistle, titanium assault umbrella] 
if(item_amount(it) > 1) {
  int[item] goodies;
  goodies [it] = item_amount(it) - 1;
  kmail("wadbot", "wads", 0, goodies);
}

foreach it in $items[twinkly nugget, 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) >= 5) 
  repeat
  {int[item] goodies;
  goodies [it] = 5;
  kmail("wadbot", "wads", 0, goodies);}
  until ((item_amount(it)) <= 4);

//////////Mallsell Skill and Other Misc Items//////////
foreach it in $items[marzipan skull, Tasty Fun Good rice candy, Yummy Tummy bean, 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, fetid feather, flaming feather, flirtatious feather, frozen feather, frightful feather, disassembled clover]
		if(item_amount(it) > 0) put_shop(0, 0, it);
		
if(item_amount($item[scrumptious reagent]) > 0)
put_shop( 1080, 1, $item[scrumptious reagent] );		

if(item_amount($item[dry noodles]) > 0)
put_shop( 750, 1, $item[dry noodles] );		

if(item_amount($item[magical ice cubes]) > 0)
put_shop( 1050, 1, $item[magical ice cubes] );		

if(item_amount($item[coconut shell]) > 0)
put_shop( 930, 1, $item[coconut shell] );		

if(item_amount($item[little paper umbrella]) > 0)
put_shop( 850, 1, $item[little paper umbrella] );		

//////////Crimbo 2009 Advent//////////
foreach it in $items[candy kneecapping stick, candy knuckles, jawbruiser, licorice garrote]
    if(item_amount(it) > 0) put_closet(item_amount(it), it); 

batch_close();

//////////Undercut Mall Prices/////////
cli_execute ("undercut");

//////////Place Meat and Twinkly Wads in Closet//////////
if (my_meat() > 0 && get_property("_dailycounter").to_int() == 16)
  {put_closet(my_meat());
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}
if(item_amount($item[twinkly wad]) > 30 && get_property("_dailycounter").to_int() == 17)
  {put_closet(item_amount($item[twinkly wad])-30, $item[twinkly wad]);
   set_property("dailycounter", numcount + 1);
   numcount = numcount + 1;}

//////////Rollover Variable Set//////////
   int meatgain = to_int(my_closet_meat() - meatinitial);
   int advused = to_int(startadv);
   int meatper = to_int(meatgain / startadv);
   int meatcloset = to_int(my_closet_meat());
 if (val < meatper)
  {set_property("valueOfAdventure",meatper);}

//////////Cheffy Session Log Print//////////
   logprint("Meat gained: " + meatgain);
   logprint("Adventures Used: " + advused);
   logprint("Meat Per Adventure: " + meatper);
   logprint("Meat in Closet: " + meatcloset);

//////////Cheffy Logout//////////
if(get_property("_dailycounter").to_int() == 17)
  {cli_execute('exit');}
 

Bale

Minion
Yeah i went and changed the prefs from dailycounter=0 to _dailycounter=0
is this not correct?

That's fine. The problem is that you didn't do it everywhere.

You need to change it here:
Code:
set_property("dailycounter", numcount + 1);
numcount = numcount + 1;

Seeing as how that you changed every other instance of dailycounter, that is probably the problem now. It will never get any higher than 0.

Also... wouldn't that be simpler as:
Code:
numcount = numcount + 1;
set_property("_dailycounter", numcount);
There's just no reason to do the same addition more than once.

Other than that I'm not spotting any serious problem although your formatting drives me nuts.
 

Sputnik1

Member
Well I made your suggestions but im still getting the same problem, it just doesnt want to enter the if statements

and the formatting, well, it works for me, once i feel like ive made the most out of the script im going to start formatting to look like some of your guys'

Placing meat into closet...
Removing meat from closet...
_dailycounter => 1
Playing a pool game in clan VIP lounge
Playing a pool game in clan VIP lounge
Playing a pool game in clan VIP lounge
Refreshing closet...
Updating consumable items...
Updating miscellaneous items...
Refreshing stickers...
Requesting store inventory...
Store inventory request complete.
Requesting store inventory...
Store inventory request complete.
Repricing complete.


Code:
//////////Cheffy Automated Script//////////

import eatdrink1.ash;
import zlib.ash
import puttyfarm.ash
int val = to_int(get_property("valueOfAdventure"));//Recalling valueOfAdventure
int numcount = 0;
int botsc = 0;//Initial Casts of Hobo AT BUffs
int numbrt = have_effect($effect[The Ballad of Richie Thingfinder]); 
int numcc = have_effect($effect[Chorale of Companionship]); 
int castsbrt = (((300 - numbrt)/20) + 1);//Number of Casts of BRT by Buffer to get 300 turns
int castscc = (((300 - numcc)/20) + 1);//Number of Casts of CC by Buffer to get 300 turns
int waittime = 45;//Time to wait for Buffer's Buffs

//////////Breakfast Meat Commands//////////
  if(my_meat() > 0 && get_property("_dailycounter").to_int() == 0)
     {put_closet(my_meat());}
    int meatinitial = my_closet_meat();
    take_closet(200000);
    numcount = numcount + 1;
   set_property("_dailycounter", numcount );
   
//////////Acquire Ode to Booze from Buff Bots//////////
if(my_inebriety() < 19 && have_effect($effect[Ode to Booze]) < 1 && get_property("_dailycounter").to_int() == 1) 
  {cli_execute ("csend 1 meat to kolabuff; csend 1 meat to Testudinata");
    repeat {wait(5); refresh_status();}
    until (have_effect($effect[Ode to Booze]) > 1);
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}

//////////Daily Food, Booze, and Remaining Spleen Consumption//////////
foreach it in $items[cold wad, hot wad, spooky wad, sleaze wad]
  if(item_amount(it) > 0 && my_spleen_use() < 15 && get_property("_dailycounter").to_int() == 2) 
    {repeat { use(1, it);}
      until (item_amount(it) == 0 || my_spleen_use() == 15);
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
   
foreach it in $items[cold wad, hot wad, spooky wad, sleaze wad]
  if(item_amount(it) == 0 && my_spleen_use() < 15 && get_property("_dailycounter").to_int() == 3)
    {repeat { use(1, $item[twinkly wad]);}
      until (my_spleen_use() == 15);
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
   
if(my_inebriety() < 19 && get_property("_dailycounter").to_int() == 4)    
  {eatdrink(fullness_limit(),inebriety_limit(), spleen_limit(), false,val,0,0,0,false);    
    cli_execute ("uneffect ode");
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
  
//////////Gearing Up for Daily Adventuring//////////
if(get_property("_dailycounter").to_int() == 5)
  {cli_execute ("maximize meat drop");
   cli_execute ("familiar stocking mimic");
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}

//////////Shrug Unnecessary Buffs for Farming//////////
if(get_property("_dailycounter").to_int() == 6)
  {cli_execute ("shrug On the Trail");
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}

//////////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=");

//////////Summon Demon for 30 Turns of Preternatural Greed//////////
if(!to_boolean(get_property("demonSummoned")) && get_property("demonName2") != "") cli_execute("summon 2");

//////////Acquire Optimum AT, Sauceror, and TT Buffs from Buff Bots//////////
if(have_effect($effect[Carlweather's Cantata of Confrontation]) < 300 && get_property("_dailycounter").to_int() == 7) 
	cli_execute ("csend 19 meat to IocaineBot; csend 22 meat to kolabuff");
	
if(have_effect($effect[The Ballad of Richie Thingfinder]) < 300 && have_effect($effect[Chorale of Companionship]) < 300 && get_property("_dailycounter").to_int() == 7)
  {while (castsbrt > 0)
    {cli_execute("csend 2504 meat to Buffer of the seal clubbers");  
      castsbrt = castsbrt - 1;}

  while (castscc > 0)
    {cli_execute("csend 2501 meat to Buffer of the seal clubbers");  
      castscc = castscc - 1;}

  wait(3*waittime);
  refresh_status();}
  
if(get_property("_dailycounter").to_int() == 7)
  {if(have_effect($effect[The Ballad of Richie Thingfinder]) < 300) 
      repeat
    {cli_execute("csend 2504 meat to Buffer of the seal clubbers");      
      wait(waittime);
      refresh_status();}
      until (have_effect($effect[The Ballad of Richie Thingfinder]) > 300); 
		
  if(have_effect($effect[Chorale of Companionship]) < 300 && get_property("_dailycounter").to_int() == 7) 
      repeat
    {cli_execute("csend 2501 meat to Buffer of the seal clubbers");      
      wait(waittime);
      refresh_status();}
      until (have_effect($effect[Chorale of Companionship]) > 300);
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
  
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");

use_skill(1, $skill[Vent Rage Gland]);

if (my_mp() <= 20)
  {cli_execute ("Nuns"); refresh_status();}

//////////Send Remaining Meat to Closet//////////
if (my_meat() > 0 && get_property("_dailycounter").to_int() == 8)
  {put_closet(my_meat());
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
   
//////////Declare Initial Amount of Adventures after Breakfast//////////
int startadv = my_adventures();
  
//////////Cheffy Adventuring//////////
if(get_property("_dailycounter").to_int() == 9) 
   {cli_execute ("ccs cheffy");
    puttyfarm();
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
if(get_property("_dailycounter").to_int() == 10) 
    {cli_execute ("ccs cheffy");
    adventure(15, $location[McMillicancuddy's Farm]);
    cli_execute ("uneffect On the Trail; ccs cheffy");
    adventure(my_adventures(), $location[Giant's Castle]);
    numcount = numcount + 1;
    set_property("_dailycounter", numcount );}

//////////Acquire Optimum AT, Sauceror, and TT Buffs from Buff Bots #2//////////
if(get_property("_dailycounter").to_int() == 11)
  {refresh_status();
   cli_execute ("shrug cantata");
    
  if(have_effect($effect[Ode to Booze]) < 1) 
   cli_execute ("csend 1 meat to kolabuff; csend 1 meat to Testudinata");
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
  
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");

refresh_status();

//////////Consumption for Rollover//////////
if(have_effect($effect[Ode to Booze]) < 1 && get_property("_dailycounter").to_int() == 12)
  {repeat {wait(5); refresh_status();}
    until (have_effect($effect[Ode to Booze]) > 1);
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
if(my_inebriety() <= 19 && get_property("_dailycounter").to_int() == 13)
   {eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true,val,0,0,0,false);
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}

//////////Casting Love Song and Finishing Visit to Nuns//////////
if(get_property("_dailycounter").to_int() == 14)
{if (my_mp() >= mp_cost($skill[love song]))
   repeat{use_skill($skill[love song]); refresh_status();}
   until (my_mp() <= mp_cost($skill[love song]));
 if (mp_cost($skill[love song]) <= 550)
   {cli_execute ("Nuns"); refresh_status();}
 if (my_mp() >= mp_cost($skill[love song]))
   repeat{use_skill($skill[love song]); refresh_status();}
   until (my_mp() <= mp_cost($skill[love song]));
 if (mp_cost($skill[love song]) <= 550)
   {cli_execute ("Nuns"); refresh_status();}
 if (my_mp() >= mp_cost($skill[love song]))
   repeat{use_skill($skill[love song]); refresh_status();}
   until (my_mp() <= mp_cost($skill[love song]));
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}  

//////////Gearing Up for Rollover//////////
if(get_property("_dailycounter").to_int() == 15) 
  {cli_execute ("maximize adv");
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}

//////////Cheffy Daily Item Handling//////////
refresh_status();

cli_execute("refresh inv");

batch_open();

//////////Use Stuffed Treasure Chests and Keys//////////
while(item_amount($item[stuffed treasure chest]) >= 1 && item_amount($item[stuffed key]) >= 1)
    {use(1, $item[stuffed treasure chest]);}
    
//////////Place Stuffed Items into DC//////////
for i from 1974 to 2018 
  if (item_amount(to_item(i)) > 0) put_display(item_amount(to_item(i)),to_item(i));
  if (item_amount($item[stuffed Meat]) > 0) put_display(item_amount($item[stuffed Meat]),$item[stuffed Meat]);
for i from 3951 to 3962 
  if (item_amount(to_item(i)) > 0) put_display(item_amount(to_item(i)),to_item(i));

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

//////////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//////////
foreach it in $items[giant needle, wolf mask, disturbing fanfic, rave whistle, titanium assault umbrella] 
if(item_amount(it) > 1) {
  int[item] goodies;
  goodies [it] = item_amount(it) - 1;
  kmail("wadbot", "wads", 0, goodies);
}

foreach it in $items[twinkly nugget, 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) >= 5) 
  repeat
  {int[item] goodies;
  goodies [it] = 5;
  kmail("wadbot", "wads", 0, goodies);}
  until ((item_amount(it)) <= 4);

//////////Mallsell Skill and Other Misc Items//////////
foreach it in $items[marzipan skull, Tasty Fun Good rice candy, Yummy Tummy bean, 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, fetid feather, flaming feather, flirtatious feather, frozen feather, frightful feather, disassembled clover]
		if(item_amount(it) > 0) put_shop(0, 0, it);
		
if(item_amount($item[scrumptious reagent]) > 0)
put_shop( 1080, 1, $item[scrumptious reagent] );		

if(item_amount($item[dry noodles]) > 0)
put_shop( 750, 1, $item[dry noodles] );		

if(item_amount($item[magical ice cubes]) > 0)
put_shop( 1050, 1, $item[magical ice cubes] );		

if(item_amount($item[coconut shell]) > 0)
put_shop( 930, 1, $item[coconut shell] );		

if(item_amount($item[little paper umbrella]) > 0)
put_shop( 850, 1, $item[little paper umbrella] );		

//////////Crimbo 2009 Advent//////////
foreach it in $items[candy kneecapping stick, candy knuckles, jawbruiser, licorice garrote]
    if(item_amount(it) > 0) put_closet(item_amount(it), it); 

batch_close();

//////////Undercut Mall Prices/////////
cli_execute ("undercut");

//////////Place Meat and Twinkly Wads in Closet//////////
if (my_meat() > 0 && get_property("_dailycounter").to_int() == 16)
  {put_closet(my_meat());
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}
if(item_amount($item[twinkly wad]) > 30 && get_property("_dailycounter").to_int() == 17)
  {put_closet(item_amount($item[twinkly wad])-30, $item[twinkly wad]);
   numcount = numcount + 1;
   set_property("_dailycounter", numcount );}

//////////Rollover Variable Set//////////
   int meatgain = to_int(my_closet_meat() - meatinitial);
   int advused = to_int(startadv);
   int meatper = to_int(meatgain / startadv);
   int meatcloset = to_int(my_closet_meat());
 if (val < meatper)
  {set_property("valueOfAdventure",meatper);}

//////////Cheffy Session Log Print//////////
   logprint("Meat gained: " + meatgain);
   logprint("Adventures Used: " + advused);
   logprint("Meat Per Adventure: " + meatper);
   logprint("Meat in Closet: " + meatcloset);

//////////Cheffy Logout//////////
if(get_property("_dailycounter").to_int() == 17)
  {cli_execute('exit');}
 

Bale

Minion
I'm afraid I see too many ways for the code to fail. For instance, if you already have Ode to Booze active, then it will skip the _dailycounter == 1 section of the code. Then it won't increment _dailycounter to 2. You should consider what to do about that problem. There are other such instances for each section.
 

Sputnik1

Member
I shouldve noticed that Bale, it was late last night, im going to sit and mull over this to make sure that each section works

i noticed that a lot of the terms dont need to be under a dailycounter, so im going to rejigger it

otherwise if anyone can think of another way for this to work, throw out some ideas

EDIT: I've got everything working the way I want it, Thanks Bale for everything
 
Last edited:
Top