Code: Select all
-- When we are resting, wait until we are back at full health or start attacking when attacked.
elseif self._IsResting then
if Framework:FindTarget( true, Player:GetPosition()) ~= nil then
self._IsResting = false;
else
-- Check the resting state and toggle rest when we have finished moving.
if not Player:IsResting() and not Player:IsMoving() then
PlayerInput:Ability( "Toggle Rest" );
return false;
end
-- Nothing seems to be wrong so wait until we are back at full health and mana.
if Player:GetHealth() == 100 and Player:GetManaCurrent() == Player:GetManaMaximum() and Player:GetFlightTime() == 100 then
self._IsResting = false;
return false;
end
end