GetHP
Returns the current HP (hit points / life) of the mobile with ObjID.
If the mobile’s HP and MaxHP are both 0 and it is alive, Stealth automatically requests updated stats from the server.
Returns 0 if the object does not exist or the character is disconnected.
Возвращает текущие HP (очки здоровья) мобайла с ObjID.
Если HP и MaxHP мобайла равны 0 и он жив, Stealth автоматически запрашивает обновлённую статистику с сервера.
Возвращает 0, если объект не существует или персонаж не подключён.
function GetHP(ObjID: Cardinal): Integer;
Parameters:
- ObjID — ID of the mobile.
def GetHP(ObjID: int) -> int: ...
begin
while GetHP(Self) < 50 do
begin
WaitTargetSelf;
UseObject(bandage_id);
Wait(3000);
end;
end.
while GetHP(Self()) < 50:
WaitTargetSelf()
UseObject(bandage_id)
Wait(3000)