const
////////// Potion Healing //////////
Minimum_Potion_Health = 700
Health_Potion_ID = 236
////////////////////////////////////
////////// Spell Healing //////////
Minimum_Spell_Health = 980
Healing_Spell = 'exura'
Mana_Needed = 20
Restore_Mana_At = 90
Mana_Potion_ID = 268
////////////////////////////////////
while not Terminated do
begin
UpdateWorld;
if (Self.Health < Minimum_Potion_Health) then Self.Containers.UseItemWithSelf(Health_Potion_ID);
if (Self.Health < Minimum_Spell_Health) and (Self.Mana >= Mana_Needed) then
begin
Self.Say(Healing_Spell);
Sleep(1000);
end;
else if (Self.Mana < Restore_Mana_At) and (Self.Health > Minimum_Potion_Health) then
begin
Self.Containers.UseItemWithSelf(Mana_Potion_ID);
Sleep(1000);
end;
Sleep(100);
end;