cli_execute("refresh status");
//familiar weight[itemname][effectname][duration][meat drop][item drop]
int[item][effect][int][int][int] butt;
//hardcoded list of all meat/item/fam weight potions and their durations and other stuff.
file_to_map("tcrs boa potions.txt",butt);
float[item] double_butt;
foreach first,second,third,fourth,fifth,sixth in butt{
//print(first+" "+second+" "+third+" "+fourth+" "+fifth+" "+sixth);
//compute half the profit from each potion to preserve mall supply.
//use 20 meat/lb as lower bound for boa profit and 5 meat/+item% for contribution from spice melanges.
double_butt[first] = (( (fifth * 5 + sixth * 20 ) * third ).to_float() / 2.0 - first.mall_price().to_float());
//print(first+": "+double_butt[first]);
cli_execute("refresh inventory");
if(!(first == $item[pirate pamphlet])){
cli_execute("try; acquire "+1000/third+" "+first);
}
else{
if(available_amount(first) < 100){
cli_execute("mallbuy 100 pirate pamphlet");
}
}
if(second.have_effect() < 1000 && (double_butt[first] > 0.0 || first == $item[yellow candy heart] || first == $item[giant breath mint]) ){
cli_execute("try; use "+max(((1000 - second.have_effect())/third),1)+" "+first);
cli_execute("refresh inventory");
}
}
Comments