IsPoisoned
Returns True if the specified мобайл is poisoned, False otherwise.
ObjID — ID of the мобайл to check.
The detection method depends on the client protocol version: for Stygian Abyss (SA) packets, the dedicated poison field is used; for older protocols, the poison/flying mobile flag is checked.
Returns False if the object does not exist or the character is disconnected.
To check the player’s own poison state, use Poisoned.
Возвращает True, если указанный мобайл отравлен, иначе False.
ObjID — ID мобайла для проверки.
Метод определения зависит от версии протокола клиента: для пакетов Stygian Abyss (SA) используется выделенное поле яда; для старых протоколов — проверяется мобайл-флаг poison/flying.
Возвращает False, если объект не существует или персонаж не подключён.
Для проверки состояния отравления собственного персонажа используйте Poisoned.
function IsPoisoned(ObjID: Cardinal): Boolean;
def IsPoisoned(ObjID: int) -> bool: ...
begin
if IsPoisoned(Self) then
begin
AddToSystemJournal('Poisoned! Attempting cure...');
Cast('Cure');
WaitForTarget(5000);
TargetToObject(Self);
end;
end.
if IsPoisoned(Self()):
AddToSystemJournal('Poisoned! Attempting cure...')
Cast('Cure')
WaitForTarget(5000)
TargetToObject(Self())