Odd error . . .

For some reason this final portion of my farming script . . .

Code:
cli_execute ("shrug cantata");
cli_execute ("csend 23 meat to IocaineBot");
Wait (60);
cli_execute ("eatdrink");
	
	//Rollover outfit
	cli_execute("maxadv");

Seems to be causing me to try to adventure. After sending the message to IocaineBot the input windows for eatdrink pop up but my CLI starts printing:

Validating adventure sequence...
No location selected.
Validating adventure sequence...
No location selected.
Validating adventure sequence...
No location selected.
Validating adventure sequence...
No location selected.
Validating adventure sequence...
No location selected.

It successfully drinks my nightcap but then boots me out of the script before putting on my rollover outfit.

The cli call after eatdrink calls the following script . . .

Code:
cli_execute ("fold cheese diaper");
cli_execute ("maximize adventures");
cli_execute ("wang");

Is it just jamming up on the cli_executes since I updated to 8769? Would adding a few wait commands possibly help?
 
I am not sure but may i see the full script? it may be something before that that is causing that...

Note i am not the best scripter here yet :p but i am rather good at debuggin.
 
I am not sure but may i see the full script? it may be something before that that is causing that...

Note i am not the best scripter here yet :p but i am rather good at debuggin.

This is a hacked up version of a script Icon315 posted under the title "ArtemisFarming". Some parts of it contain things that probably aren't useful to my farming that are artifacts of other functions I've removed but since they don't cost me any meat I haven't removed them.

Code:
script "Farm.ash";
notify "Icon315";

import <zlib.ash>
cli_execute ("acquire 1 filthy knitted dread sack");
int i_a(string name) {
	item i = to_item(name);
	int a = item_amount(i) + closet_amount(i) + storage_amount(i) + display_amount(i);
	return a;
}

//Gain Stuff
	print ("");
	print ("...visiting the Hippy Store...", "green");
	visit_url("store.php?whichstore=h");


//Arena Buff
if (get_property("sidequestArenaCompleted") == "fratboy") 
	cli_execute("concert wink");
if (get_property("demonSummoned") == "false") 
	cli_execute("summon "+get_property("demonName2"));
if (user_confirm("do MadTeaParty?")) 
    cli_execute("call hatter.ash meat");

//Rage gland
cli_execute ("cast vent");

	// --- F R I A R   B L E S S I N G --- //
	
if (contains_text(visit_url("questlog.php?which=2"),"cleansed the taint"))
   visit_url("friars.php?action=buffs&bro=2&pwd=");

// bro=1 : Brother Flying Burrito	(+food drops)
// bro=2 : Brother Corsican			(+fam. exp)
// bro=3 : Brother Smothers			(+booze drops)


//SUMMON 
//Summon Ak'gyxoth
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
string SummonDrinks()
{    
    if( item_amount($item[scroll of ancient forbidden unspeakable evil]) >=1 &&
        item_amount($item[thin black candle])>=3 &&
        my_level()>10 &&
        item_amount($item[your father's macguffin diary]) >=1 &&
        visit_url("manor.php").contains_text("sm8b.gif") &&
        visit_url("manor3.php").contains_text("chamber.gif") )
    {
        if (get_property("demonSummoned")=="true")
        {    
            print("You've already summoned a demon today!","blue");
            return "";
        }
        else
        if(user_confirm("Summon Ak'gyxoth?"))
        {
            cli_execute("summon Ak'gyxoth");
            print("Summoned Ak'gyxoth!","blue");
            //visit_url("manor3.php?place=chamber&demonname=Ak'gyxoth&action=summon");    
            return "You Summoned Ak'gyxoth! <br />";
        }
    }
    return "";
	
}

/*
######################################
CLAN STUFF
######################################
*/
		// THIS WILL VISIT THE LOOKING GLASS
visit_url("clan_viplounge.php?action=lookingglass");
	//VISIT CRIMBO TREE AND REPORT ON STATUS IF IT ISN'T GIVING GIFTS RIGHT NOW.
matcher days = create_matcher("(There(.+) (tomorrow|in (\\d) days).)", 
   visit_url("clan_viplounge.php?action=crimbotree"));
if(days.find()) 
	print(days.group(1));
	
	//RUMPUS
		print ("");
	print ("Processing Clan Rumpus stuff...", "blue");
	print ("");

	print ("");
	print ("...accessing Potted Meat Tree...", "green");
	visit_url("clan_rumpus.php?action=click&spot=9&furni=3");


	//Mr Klaw
	print ("");
	print ("...accessing Mr. Klaw Skill Crane Game...", "green");
	visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
	visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
	visit_url("clan_rumpus.php?action=click&spot=3&furni=3");


	// FINALLY THE BALLPIT
//cli_execute("ballpit");

int FoodLeft = fullness_limit() - my_fullness();
int DrunkLeft = inebriety_limit() - my_inebriety();
int SpleenLeft = spleen_limit() - my_spleen_use();

//Use Milk of Magnesium
if (item_amount ($item[milk of magnesium]) >= 2 )
use (2, $item[milk of magnesium] );
else {
if (!user_confirm("Not enough MoMs want to buy "+(1 - item_amount ($item[milk of magnesium]))+" @ "+((1 - item_amount ($item[milk of magnesium])) * mall_price($item[milk of magnesium]) )+"" ))
{
("CHEAP!");
}
use (2, $item[milk of magnesium] );
}


cli_execute ("csend 4 meat to NotBot");
cli_execute ("equip tuxedo");
cli_execute ("eatdrink");
cli_execute ("shrug ode");
cli_execute ("csend 1200 meat to IocaineBot");
wait (60);

	cli_execute ("fold Cheese eye");
        restore_hp(my_maxhp());
	cli_execute ("maximize meat + equip cheese eye");
	adventure(my_adventures(), $location[giant castle]);
	
 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);
		
boolean smash_today() {
    switch {
	
	  case  is_online ("smashbot"):
		print ("sending stuff to smashbot");
        cli_execute ("send * wolf mask, * rave whistle, * giant needle, * disturbing fanfic, * twinkly powder, * twinkly nuggets, * sleaze powder, * sleaze nuggets to smashbot || wads");
	return true;
	
	case  is_online("wadbot"):
		print ("sending stuff to wadbot");
		cli_execute ("send * wolf mask, * rave whistle, * giant needle, * disturbing fanfic, * twinkly powder, * twinkly nuggets, * sleaze powder, * sleaze nuggets to smashbot || wads");
		return true;

		}
    print("Skipping this no smashers on", "red");
    return false;
}  


void main()
{
	smash_today();
}
  use( item_amount($item[Warm Subject gift certificate]) , $item[Warm Subject gift certificate] );
cli_execute ("shrug cantata");
cli_execute ("csend 23 meat to IocaineBot");
Wait (60);
cli_execute ("eatdrink");
	
	//Rollover outfit
	cli_execute("maxadv");

It calls the newest update of eatdrink.ash once at the beginning to eat, drink, spleen as much as I can without over drinking then calls it again at the end to drink my nightcap. It sends meat to a buff bot to acquire Ode (changing the bot soon, for some reason Notbot's philanthropic buffs are down), then shrugs ode after drinking so I can get a meat farming buff pack that includes Polka, Fat Loot, and Cantata of confrontation. Then before the second call of eatdrink.ash it shrugs Cantata and buys another shot of ode from a different bot. (hence all the buying shrugging and buying again)

I also realized tonight that it hadn't executed the portion of the script that sends loot off to smashbot or wadbot to pulverise but it DID execute the command to use my warm subject gift certificates that comes after that command as well as the rest of the script until it mysteriously tries to adventure. Both sections of the script that failed today had previously run just fine under older versions of Mafia.
 
Last edited:

Winterbay

Active member
I don't think that sending meat to philantropic bots work within a script. I'm not sure if that is part of the problem, but that is one possibility.
 

Grotfang

Developer
redwulf... that script of yours is hard to wade through. You have functions that aren't called and variables that aren't used. It's hard to work out where things are going wrong.

I've edited your script to remove the functionless code (and the comments) and pack things into functions. If you could try this and see if you get the same error, it might be easier to isolate the problem. The function should be the same.

Code:
int i_a(string name) {
	item i = to_item(name);
	int a = item_amount(i) + closet_amount(i) + storage_amount(i) + display_amount(i);
	return a;
}

void initial_buffs()
{
	print ("");
	print ("...visiting the Hippy Store...", "green");
	visit_url("store.php?whichstore=h");
	if (get_property("sidequestArenaCompleted") == "fratboy") 
		cli_execute("concert wink");
	if (get_property("demonSummoned") == "false") 
		cli_execute("summon "+get_property("demonName2"));
	if (user_confirm("do MadTeaParty?")) 
		cli_execute("call hatter.ash meat");
	cli_execute ("cast vent");
	if (contains_text(visit_url("questlog.php?which=2"),"cleansed the taint"))
		visit_url("friars.php?action=buffs&bro=2&pwd=");
		// bro=1 : Brother Flying Burrito	(+food drops)
		// bro=2 : Brother Corsican			(+fam. exp)
		// bro=3 : Brother Smothers			(+booze drops)
	visit_url("clan_viplounge.php?action=lookingglass");
	matcher days = create_matcher("(There(.+) (tomorrow|in (\\d) days).)", 
	visit_url("clan_viplounge.php?action=crimbotree"));
	if(days.find()) 
		print(days.group(1));
	print ("");
	print ("Processing Clan Rumpus stuff...", "blue");
	print ("");
	print ("...accessing Potted Meat Tree...", "green");
	visit_url("clan_rumpus.php?action=click&spot=9&furni=3");
	print ("");
	print ("...accessing Mr. Klaw Skill Crane Game...", "green");
	visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
	visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
	visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
	// cli_execute( "ballpit" );
}

void buff_up()
{
	if (item_amount ($item[milk of magnesium]) >= 2 )
		use (2, $item[milk of magnesium] );
	else
	{
		if (user_confirm("Not enough MoMs want to buy "+(1 - item_amount ($item[milk of magnesium]))+" @ "+((1 - item_amount ($item[milk of magnesium])) * mall_price($item[milk of magnesium]) )+"" ))
		{
			use (2, $item[milk of magnesium] );
		}
	}
	cli_execute ("csend 4 meat to NotBot");
	cli_execute ("equip tuxedo");
	wait (60);
}

boolean smash_today()
{
	switch 
	{
		case  is_online ("smashbot"):
			print ("sending stuff to smashbot");
			cli_execute ("send * wolf mask, * rave whistle, * giant needle, * disturbing fanfic, * twinkly powder, * twinkly nuggets, * sleaze powder, * sleaze nuggets to smashbot || wads");
			return true;

		case  is_online("wadbot"):
			print ("sending stuff to wadbot");
			cli_execute ("send * wolf mask, * rave whistle, * giant needle, * disturbing fanfic, * twinkly powder, * twinkly nuggets, * sleaze powder, * sleaze nuggets to smashbot || wads");
			return true;
	}
	print("Skipping this no smashers on", "red");
	return false;
}  

void dump_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);
	use( item_amount($item[Warm Subject gift certificate]) , $item[Warm Subject gift certificate] );
	smash_today();
	cli_execute ("shrug cantata");
}

void main()
{
	cli_execute ("acquire 1 filthy knitted dread sack");
	initial_buffs();
	buff_up();
	cli_execute ("eatdrink");
	cli_execute ("shrug ode");
	cli_execute ("csend 1200 meat to IocaineBot");
	cli_execute ("fold Cheese eye");
	restore_hp(my_maxhp());
	cli_execute ("maximize meat + equip cheese eye");
	adventure(my_adventures(), $location[giant castle]);
	dump_items();
	cli_execute ("csend 23 meat to IocaineBot");
	Wait (60);
	cli_execute ("eatdrink");
	cli_execute("maxadv");
}
 
Last edited:
redwulf... that script of yours is hard to wade through. You have functions that aren't called and variables that aren't used. It's hard to work out where things are going wrong.

And some of that may be a function of parts I removed and compensated for improperly, although there were some oddities I saw in the script before I started hacking parts out and putting new parts in (like donning a tuxedo shirt and then drinking specific drinks - that did not gain adventures from the shirt - instead of calling eatdrink.ash). But I'm going to try to run it in the same version of Mafia so I can see if it still gives the error. Thanks.

Edit: Already seeing a small problem with this version. It buys ode from notbot, then tries to buy my OTHER buffs (which include three AT songs) before executing eatdrink and shrugging ode. Seems to be running faster than I'm used to, a function of the cleaned up code?
 
Last edited:

Grotfang

Developer
Edit: Already seeing a small problem with this version. It buys ode from notbot, then tries to buy my OTHER buffs (which include three AT songs) before executing eatdrink and shrugging ode.

You're right. I do apologise. I have edited to redress that (must have missed it when I was shuffling things around -- sorry).
 
You're right. I do apologise. I have edited to redress that (must have missed it when I was shuffling things around -- sorry).

Other than that and apparently sending my smashables to smashbot despite him being offline (which I can live with as long as he's not having an extended offline period) it worked great and didn't pop up that error. Thanks.
 
Top