int get_price(item it, float max_age) {
return ((historical_age(it) > max_age)? mall_price(it) : historical_price(it));
}
boolean get_item(item it) {
string satisfy_with_mall;
boolean item_gotten = false;
satisfy_with_mall = get_property("autoSatisfyWithMall");
set_property("autoSatisfyWithMall", "false");
if (have_equipped(it)) {
item_gotten = true;
} else if (retrieve_item(1, it)) {
item_gotten = true;
} else if (get_price(it, 0.5) < to_int(get_property("autoBuyPriceLimit"))) {
if (buy (1, it, get_price(it, 0.5)*1.2) > 0) {
item_gotten = true;
}
}
set_property("autoSatisfyWithMall", satisfy_with_mall);
return item_gotten;
}
boolean main() {
item[13] priority_of_fam_eq;
item chosen_item;
boolean found = false;
if (my_familiar() == $familiar[Li'l Xenomorph]) { // '
chosen_item = $item[tiny top hat and cane];
found = get_item(chosen_item);
}
if (!found) {
if (item_amount($item[snow suit]) > 0 && to_int(get_property("_snowSuitCount")) < 3) {
chosen_item = $item[snow suit];
} else {
priority_of_fam_eq[0] = $item[Mayflower bouquet];
priority_of_fam_eq[1] = $item[flaming familiar doppelgänger];
priority_of_fam_eq[2] = $item[miniature gravy-covered maypole];
priority_of_fam_eq[3] = $item[ittah bittah hookah];
priority_of_fam_eq[4] = $item[astral pet sweater];
priority_of_fam_eq[5] = $item[moveable feast];
priority_of_fam_eq[6] = $item[little box of fireworks];
priority_of_fam_eq[7] = $item[plastic pumpkin bucket];
priority_of_fam_eq[8] = $item[Li'l Businessman Kit]; // '
priority_of_fam_eq[9] = familiar_equipment(my_familiar());
priority_of_fam_eq[10] = $item[lucky Tam O'Shanter]; // '
priority_of_fam_eq[11] = $item[lucky Tam O'Shatner]; // '
priority_of_fam_eq[12] = $item[lead necklace];
for i from 0 to 11 {
chosen_item = priority_of_fam_eq[i];
if (get_item(chosen_item)) {
break;
}
}
}
}
if (chosen_item == $item[none]) {
return false;
} else {
return equip($slot[familiar], chosen_item);
}
}
Comments