boolean safecheck(string monstername) {
if (do_not_safe_check)
return true;
cli_execute("mood execute");
cli_execute("mcd 10");
if (my_path() == "Class Act II: A Class For Pigs" && !have_equipped($item[UV-resistant compass]) && weapon_hands(equipped_item($slot[weapon])) == 1)
cli_execute("maximize +moxie, -ML, +offhand");
if (have_equipped($item[buoybottoms]) )
cli_execute("maximize +moxie, -ML, +pants");
//First Check -- Check offhand
if (monster_attack(to_monster(monstername))+10 > my_buffedstat(my_primestat())) {
if ( !have_equipped($item[UV-resistant compass]) && weapon_hands(equipped_item($slot[weapon])) == 1)
cli_execute("maximize +moxie, -ML, +offhand");
}
//Second Check
if (monster_attack(to_monster(monstername))+10 > my_buffedstat(my_primestat())) {
cli_execute("maximize +moxie, -ML, +shirt");
}
//Third Check
if (monster_attack(to_monster(monstername))+10 > my_buffedstat(my_primestat())) {
if (!have_equipped(to_item(default_shirt))) {
if (have_equipped($item[metal band t-shirt])) {
cli_execute("unequip metal band t-shirt");
cli_execute("mcd 10");
}
else if (have_equipped($item[cane-mail shirt])) {
cli_execute("unequip cane-mail shirt");
cli_execute("mcd 10");
}
}
else cli_execute("mcd 0");
}
//Fourth Check
if (monster_attack(to_monster(monstername))+10 > my_buffedstat(my_primestat())) {
if (have_equipped(to_item(default_ml_acc1))) {
if ( equipped_item($slot[acc1]) == to_item(default_ml_acc1) )
cli_execute("maximize +moxie, -ML, +acc1");
else if (equipped_item($slot[acc2]) == to_item(default_ml_acc1))
cli_execute("maximize +moxie, -ML, +acc2");
else if (equipped_item($slot[acc3]) == to_item(default_ml_acc1))
cli_execute("maximize +moxie, -ML, +acc3");
}
cli_execute("mcd 10");
}
//Fifth Check
if (monster_attack(to_monster(monstername))+10 > my_buffedstat(my_primestat())) {
if (have_equipped(to_item(default_ml_acc2))) {
if (equipped_item($slot[acc1]) == to_item(default_ml_acc2))
cli_execute("maximize +moxie, -ML, +acc1");
else if (equipped_item($slot[acc2]) == to_item(default_ml_acc2))
cli_execute("maximize +moxie, -ML, +acc2");
else if (equipped_item($slot[acc3]) == to_item(default_ml_acc2))
cli_execute("maximize +moxie, -ML, +acc3");
}
}
//Sixth Check
if (monster_attack(to_monster(monstername))+10 > my_buffedstat(my_primestat()))
cli_execute("mcd 0");
//Final Check
if (monster_attack(to_monster(monstername))+10 > my_buffedstat(my_primestat())) {
if (do_not_abort_on_safe_check_fail)
print("You need more Moxie for this area but we will attempt it anyway since you have aborting off.", "red");
else
abort("You need more Moxie for this area. Figure it out please.");
}
return true;
}