Semi Rares

In the script I am using (CLI) is there any way to have Mafia stop adventuring at one place, and switch to the place where a semi rare is, get that, and switch back to the first location, or is just in .ash scripts.

I have included the script I am using.
Code:
csend 1 meat to Testudinata
friars booze
Use 1 Milk of Magnesium
eat 4 pear tart
eat 2 fortune cookie
eat 1 handful of nuts and berries
drink 9 dusty bottle of Zinfandel
drink 1 shot of blackberry schnapps
outfit Meat Farming 2
familiar leprechaun
adventure * The Castle in the Clouds in the Sky
outfit extra adventures
csend 11 meat to Testudinata
drink 1 dusty bottle of Zinfandel
 

Bale

Minion
Yes, it is possible.

Put something like this in your script directory and use:
set counterScript = cookie.ash
 

Bale

Minion
After you've set your counterscript it will ALWAYS be called whenever a counter hits 0. You will then return to regular aventuring.

I don't know what semi-rares you want, so that way only an example.
 

ki77bot

Member
Hmmm, for effective farming you may want to consider some better drinks than the dusty bottle stuff. There is lots of cheap booze out there...

Also, there is no need to eat 2 fortune cookies, as the script will check any fortune cookie counter...

Cheers,
ki77bot.
 
Last edited:
*slaps head* Thanks both of you!
ki, I get around 7 to 9 adventures per bottle for around 150 meat, I'll check to see if I can get cheaper booze then that, but I doubt it.
 

ki77bot

Member
Hmmm, seems you guys are right.

I was thinking about White Lightning, but forgot about the malus on item drops, which isn't really great for farming xD.

Well, it all depends on the skills and equipment you have acquired. If you had Torso Awaregness you'd be able to drink rockin' wagons, giving you more adventures and more profit (even if those are more expensive).

Cheers,
ki77bot.
 

snowette

New member
A question about the counter.ash script. Will it affect my other account which is ascending and wish to get other semi-rares?
 

Bale

Minion
set counterScript is a per/character setting. It will only effect the character that sets it. If you want it to effect more than 1 character, they must each be set separately.
 

ki77bot

Member
Is there a way to check IF there is valid fortune cookie counter active?

As I am playing on different computers I sometimes forget to copy all *_prefs.txt and when opening Mafia can get a fortune cookie counter of -208 or so (just meaning that I didn't play my last turns on that particular computer).

The idea behind it is this:

I am using a breakfast script which eats up to 13/15 fullness (normally I have Liver of Steel), leaving space for two fortune cookies (which is for my diet enough). BUT it can happen, that I already reached fullness 15 but need to eat another cookie. In that case this check-function should see if I had a valid counter active and if not eat one fortune cookie.

Cheers,
ki77bot.
 

mredge73

Member
I wrote this one the other day for that exact reason:

to automatically eat:
print_html(CheckFortune(true));

to be prompted to eat:
print_html(CheckFortune(false));

Code:
//checks to see if you have your fortune counter running
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
string CheckFortune(boolean autoeat)
{	
	string outstring="";
	string RelayCounters=get_property("relayCounters");
	int [int] FortuneCounter;
	int count=1;
	int Counters=0;
	matcher FortuneFinder=create_matcher("(\\d+):Fortune Cookie", RelayCounters);
	
	//get how many turns left until counter(s) expires
	while (FortuneFinder.find())
	{
		FortuneCounter [count] = FortuneFinder.group( 1 ).to_int() -my_turncount();
		count=count+1;
	}
	Counters=count(FortuneCounter);
	
	//Debug:
	//print (get_property("relayCounters"),"red");
	//print(get_property("relayCounters").to_int(),"red");
	//print(Counters,"red");
	
	switch
	{
		case Counters==1 && FortuneCounter[1]>0:
			outstring=outstring+"<B><FONT color=#365f91>Your Next SemiRare occurs in <FONT color=#00b0f0>"+FortuneCounter[1]+"</FONT> turns. <br /></B></FONT>";
			break;
	
		case Counters==2 && FortuneCounter[2]>0:
			outstring=outstring+"<B><FONT color=#365f91>You have two SemiRare counters active:<br /></B></FONT>";
			outstring=outstring+"<B><FONT color=#365f91>Your Next SemiRare occurs in <FONT color=#00b0f0>"+FortuneCounter[2]+"</FONT> turns. <br /></B></FONT>";
			outstring=outstring+"<B><FONT color=#365f91>Your Next SemiRare occurs in <FONT color=#00b0f0>"+FortuneCounter[1]+"</FONT> turns. <br /></B></FONT>";
			break;
			
		case Counters==3 && FortuneCounter[3]>0:
			outstring=outstring+"<B><FONT color=#365f91>You have three SemiRare counters active:<br /></B></FONT>";
			outstring=outstring+"<B><FONT color=#365f91>Your Next SemiRare occurs in <FONT color=#00b0f0>"+FortuneCounter[3]+"</FONT> turns. <br /></B></FONT>";
			outstring=outstring+"<B><FONT color=#365f91>Your Next SemiRare occurs in <FONT color=#00b0f0>"+FortuneCounter[2]+"</FONT> turns. <br /></B></FONT>";
			outstring=outstring+"<B><FONT color=#365f91>Your Next SemiRare occurs in <FONT color=#00b0f0>"+FortuneCounter[1]+"</FONT> turns. <br /></B></FONT>";
			break;
		
		case my_fullness() != fullness_limit() && my_meat()>40 && autoeat:
			eat(1, $item[fortune cookie]);
			outstring=CheckFortune(true);
			break;
			
		case my_fullness() != fullness_limit() && my_meat()>40 && user_confirm("Do you want to eat a Fortune Cookie?"):
			eat(1, $item[fortune cookie]);
			outstring=CheckFortune(false);
			break;
				
		case my_fullness() == fullness_limit():
			outstring="<B><FONT color=#ff0000>You need to eat a Fortune Cookie but you are too full :(<br /></Font></B>";
			break;
		
		default:outstring="<B><FONT color=#ff0000>You need to eat a Fortune Cookie! <br /></Font></B>";
	}
		
	return outstring;
}
 

ki77bot

Member
Wow, that'll take some time for me to understand that script...

Thanks a lot for sharing... :)

Cheers,
ki77bot.
 
Top