Code: Select all
//v1.2
const BANDAGE_FINISHED_MSG =
"You finish applying the bandages|" +
"You heal what little damage your patient had|" +
"The bleeding wounds have healed, you are no longer bleeding|" +
"That being is not damaged!|" +
"You cannot heal|" +
"You have failed to cure|" +
"You apply the bandages";
const BANDAGE_TIMEOUT = Math.floor(
Math.abs((11 - Player.Dex() / 20) * 20 * 1000) + 500
);
const SCRIPT_DELAY = "250";
function AutoBandage() {
while (true) {
if (
(Player.Hits() < Player.MaxHits() || Player.Poisoned()) &&
!Player.Dead() &&
!Player.Hidden()
) {
Orion.ClearJournal(BANDAGE_FINISHED_MSG);
Orion.Say("[bandself");
Orion.WaitJournal(
BANDAGE_FINISHED_MSG,
0,
Orion.Now() + BANDAGE_TIMEOUT
);
}
Orion.Wait(SCRIPT_DELAY);
}
}
Update: Fixed cpu fan issue / usage.