Icy Peak - Pastafresco based on Heffed's

pastafresco

New member
This is Heffed's script with some modifications to calculate ave and total meat gains in several categories (farming with +meat effects, w/o +meat, and combined those two as well as gains from bounty hunter). I also added the use of a certain new +meat item.

Note that as there is no support for it in Mafia yet, some of the scripted material is not possible yet and thus is "//"d out. I made changes so that the new item would still be used, but the script does not check if you already have the effect yet.

Warning: Attached script is *****SPOILERIFIC******
 

pastafresco

New member
That script had some minor errors (typos and such)

so here's the working one...

[Edit] There seem to be some problems with this script. I'm not sure what they are though... You'll have to rework the script, which may or may not be a lot of work.[/Edit]
 

Heffed

Member
I wrote the script before the new lab items.

If you want to use the nasal spray, I just added this yesterday. It's basically just a modification of Xylpher's sample restoration script, to use nasal spray instead of restores.

-This isn't updated in the script in the repository, because I'm running CVS builds which are more current. This might not work in the release version.-

Code:
void use_nasal( int adv_amount)
{
if( item_amount( $item[Knob Goblin nasal spray]) < adv_amount)
{
buy( adv_amount - item_amount( $item[Knob Goblin nasal spray]), $item[Knob Goblin nasal spray]);
}
use( adv_amount, $item[Knob Goblin nasal spray]);
}

void knob_nasal()
{
add_item_condition( 1, $item[Knob Goblin elite helm]);
add_item_condition( 1, $item[Knob Goblin elite pants]);
add_item_condition( 1, $item[Knob Goblin elite polearm]);
cli_execute( "conditions check");
while( have_effect( $effect[wasabi sinuses]) < my_adventures())
{
int nasal_touse;
int adv_amount;
nasal_touse = my_adventures() - have_effect( $effect[wasabi sinuses]);
adv_amount = nasal_touse / 10;
if( adv_amount == 0)
{
break;
}
use_nasal( adv_amount);
}
}

Then you call knob_nasal() from your main. It calculates how many adventures of wasabi sinuses you have, (if any) and buys enough to (almost) last the number of adventures you have for the day. If you want it to overshoot, remove:
Code:
if( adv_amount == 0)
{
break;
}

It also checks to see if you have the elite guard uniform, because you need to equip that to shop at the lab. In my script I have it call knob_nasal() before it puts on my meat hunting outfit. That way it changes out of the elite guard outfit.
 

macman104

Member
Yea, just to echo what heffed said, the current PUBLIC release of mafia does not support nasal spray and the other items from the knob store, but I'm pretty sure it will in the next release.
 
Top