New version up - not revving the version # until I hear back that it's working OK though.
special_items[$item["boris's key lime pie"]] = true;
special_items[$item["jarlsberg's key lime pie"]] = true;
special_items[$item["sneaky pete's key lime pie"]] = true;
int special_prices(item it, int startprice)
{
//These are unpriceable, so return a small number (that isn't reserved)
if (it == $item["steel margarita"] && (item_amount(it) > 0))
return 2;
if (it == $item["steel lasagna"] && (item_amount(it) > 0))
return 2;
if (it == $item["steel-scented air freshener"] && (item_amount(it) > 0))
return 2;
int price1 = 0;
int price2 = 0;
// special pricing rules for key lime pies
boolean JKEY = (item_amount($item[jarlsberg's key]) > 0);
boolean BKEY = (item_amount($item[boris's key]) > 0);
boolean SPKEY = (item_amount($item[sneaky pete's key]) > 0);
boolean itsa_pie = false;
if (it == $item["jarlsberg's key lime pie"] && (JKEY || (item_amount(it) > 0)))
itsa_pie = true;
else if (it == $item["boris's key lime pie"] && (BKEY || (item_amount(it) > 0)))
itsa_pie = true;
else if (it == $item["sneaky pete's key lime pie"] && (SPKEY || (item_amount(it) > 0)))
itsa_pie = true;
if (itsa_pie)
{
price1 = mall_price($item["lime"]);
price2 = mall_price($item["pie crust"]);
if ((price1 <= 1) || (price2 <= 1))
return 0;
else
verbose("price of " + it + " is " + (price1 + price2));
return (price1 + price2);
}
//Special pricing rules for TPS drinks
boolean TPS = false;
TPS = (item_amount($item["tiny plastic sword"]) > 0);
boolean checked = false;
if (it == $item["bodyslam"] && (TPS || (item_amount(it) > 0)))
{
price1 = mall_price($item["bottle of tequila"]);
price2 = mall_price($item["lime"]);
checked = true;
}
if (it == $item["cherry bomb"] && (TPS || (item_amount(it) > 0)))
{
price1 = mall_price($item["bottle of whiskey"]);
price2 = mall_price($item["cherry"]);
checked = true;
}
if (it == $item["dirty martini"] && (TPS || (item_amount(it) > 0)))
{
price1 = mall_price($item["bottle of gin"]);
price2 = mall_price($item["jumbo olive"]);
checked = true;
}
if (it == $item["grogtini"] && (TPS || (item_amount(it) > 0)))
{
price1 = mall_price($item["bottle of rum"]);
price2 = mall_price($item["lime"]);
checked = true;
}
if (it == $item["sangria del diablo"] && (TPS || (item_amount(it) > 0)))
{
price1 = mall_price($item["boxed wine"]);
price2 = mall_price($item["cherry"]);
checked = true;
}
if (it == $item["vesper"] && (TPS || (item_amount(it) > 0)))
{
price1 = mall_price($item["bottle of vodka"]);
price2 = mall_price($item["jumbo olive"]);
checked = true;
}
if (checked)
{
if ((price1 <= 1) || (price2 <= 1))
return 0;
int bar = 0;
// if (!have_bartender())
// {
// bar = mall_price($item["bartender-in-the-box"]);
// }
return (price1 + (price2 * 2) + bar);
}
return startprice;
}
boolean special_purchases(item it)
{
boolean special = false;
if (it == $item[bodyslam])
{
get_on_budget(2, $item[lime], mall_price($item[lime]) * PRICE_FLEXIBILITY);
get_on_budget(1, $item[bottle of tequila], mall_price($item[bottle of tequila]) * PRICE_FLEXIBILITY);
create(1, $item[bodyslam]);
special = true;
}
else if (it == $item[cherry bomb])
{
get_on_budget(2, $item[cherry], mall_price($item[cherry]) * PRICE_FLEXIBILITY);
get_on_budget(1, $item[bottle of whiskey], mall_price($item[bottle of whiskey]) * PRICE_FLEXIBILITY);
create(1, $item[cherry bomb]);
special = true;
}
else if (it == $item[dirty martini])
{
get_on_budget(2, $item[jumbo olive], mall_price($item[jumbo olive]) * PRICE_FLEXIBILITY);
get_on_budget(1, $item[bottle of gin], mall_price($item[bottle of gin]) * PRICE_FLEXIBILITY);
create(1, $item[dirty martini]);
special = true;
}
else if (it == $item[grogtini])
{
get_on_budget(2, $item[lime], mall_price($item[lime]) * PRICE_FLEXIBILITY);
get_on_budget(1, $item[bottle of rum], mall_price($item[bottle of rum]) * PRICE_FLEXIBILITY);
create(1, $item[grogtini]);
special = true;
}
else if (it == $item[sangria del diablo])
{
get_on_budget(2, $item[cherry], mall_price($item[cherry]) * PRICE_FLEXIBILITY);
get_on_budget(1, $item[boxed wine], mall_price($item[boxed wine]) * PRICE_FLEXIBILITY);
create(1, $item[sangria del diablo]);
special = true;
}
else if (it == $item[vesper])
{
get_on_budget(2, $item[jumbo olive], mall_price($item[jumbo olive]) * PRICE_FLEXIBILITY);
get_on_budget(1, $item[bottle of vodka], mall_price($item[bottle of vodka]) * PRICE_FLEXIBILITY);
create(1, $item[vesper]);
special = true;
}
else if (it == $item[jarlsberg's key lime pie] || it == $item[boris's key lime pie] || it == $item[sneaky pete's key lime pie])
{
get_on_budget(1, $item[pie crust], mall_price($item[pie crust]) * PRICE_FLEXIBILITY);
get_on_budget(1, $item[lime], mall_price($item[lime]) * PRICE_FLEXIBILITY);
create(1, it);
special = true;
}
return special;
}
New version up - not revving the version # until I hear back that it's working OK though.
int VALUE_OF_ADVENTURE = to_int(get_property("valueOfAdventure"));
int VALUE_OF_ADVENTURE = to_int(vars["eatdrink_valueOfAdventure"]);
It retrieves the property, "valueOfAdventure", which is a (relatively new) standard Mafia setting.
Bazaaretw - try the attached version. It lets you exclude items, including wet stew by default.
It retrieves the property, "valueOfAdventure", which is a (relatively new) standard Mafia setting.
Has anyone else been having trouble with this ever since EatDrink switched over to using it? It's set as 500 by default. I open my prefs file and change it to 1000. As soon as I run EatDrink, it's reset back to 500 again in the file. I can't figure out why.
You edit the mafia preference file while mafia is open? That won't work. What you want to do is type "set valueOfAdventure=X", replacing X with 1000 in this case. Or you could edit the preference file while mafia is closed.
hey on mine it says
"undifed reference to function 'modifier_eval'(zlib.ash, line 67)"
what is this and explain how to fix it in an easy to understand way im kinda new
thanks an could you give me a step by step on how to edit it so it will look for the most adventure and not care about stat gain that is really making it make bad decitions for me to meat farm thanks in advance
eatdrink_valueOfNonPrimeStat 2
eatdrink_valueOfPrimeStat 10
eatdrink_valueOfNonPrimeStat 0
eatdrink_valueOfPrimeStat 0