risenjihad
New member
Basically thread title. I set up a buffbot, and for MP restoratives I want it to eat a jumbo dr. lucifer and then use a scroll of drastic healing for MP restoratives.
boolean use_scroll() {
if (item_amount($item[scroll of drastic healing]) < 1 ) {
buy( 1, $item[scroll of drastic healing] );
}
if( use(1, $item[scroll of drastic healing]) ) {return true;}
else return false;
}
boolean use_Lucifer() {
if (item_amount($item[Jumbo Dr. Lucifer]) < 1 ) {
buy( 1, $item[Jumbo Dr. Lucifer] );
}
if( eat(1, $item[Jumbo Dr. Lucifer]) ) {return true;}
else return false;
}
boolean main(string type, int amount) {
if ( type == "HP" ) {
if(!use_scroll()){
abort("Problem occurred while trying to use a Scroll of drastic healing");
}
}
if ( type == "MP" ) {
if (my_fullness() == fullness_limit()) {
abort("You cannot use any more Jumbo Dr. Lucifer");
// print("You cannot use any more Jumbo Dr. Lucifer","red");
// print("Switching to the Universal Recovery Script","blue");
// set_property("recoveryScript","Universal_recovery");
// restore_mp(amount);
}
if (my_hp() < my_maxhp() ) {
if(!use_scroll()){
abort("Problem occurred while trying to use a Scroll of drastic healing");
}
}
if(!use_Lucifer()){
abort("Problem occurred while trying to eat a Jumbo Dr. Lucifer");
}
}
return true;
}
set recoveryScript=LuciferRecovery
abort("You cannot use any more Jumbo Dr. Lucifer");
// print("You cannot use any more Jumbo Dr. Lucifer","red");
// print("Switching to the Universal Recovery Script","blue");
// set_property("recoveryScript","Universal_recovery");
// restore_mp(amount);
// abort("You cannot use any more Jumbo Dr. Lucifer");
print("You cannot use any more Jumbo Dr. Lucifer","red");
print("Switching to the Universal Recovery Script","blue");
set_property("recoveryScript","Universal_recovery");
restore_mp(amount);
if (my_hp() < my_maxhp() )
float limit = 0.5
if (my_hp() < limit*my_maxhp() )
boolean use_Lucifer() {
if (item_amount($item[Jumbo Dr. Lucifer]) < 1 ) {
buy( 1, $item[Jumbo Dr. Lucifer] );
}
int full = my_fullness();
eat(1, $item[Jumbo Dr. Lucifer]);
if( my_fullness() != full ) {return true;}
else { print("Fulness not accounted for!"); return false; }
}