Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Attack

Attacks the mobile with the specified ObjID.

If the character is not in War mode, Stealth will automatically enable it before sending the attack command.

If ObjID is 0 or the object does not exist, the method does nothing.

Атакует мобайла с указанным ObjID.

Если персонаж не находится в режиме War, Stealth автоматически включит его перед отправкой команды атаки.

Если ObjID равен 0 или объект не существует, метод ничего не делает.

Pascal

procedure Attack(ObjID: Cardinal);

Parameters:

  • ObjID — ID of the mobile to attack.

Python

def Attack(ObjID: int) -> None: ...

Pascal Example

begin
  if WarTargetID <> Enemy then
    Attack(Enemy);
end.

Python Example

if WarTargetID() != enemy:
    Attack(enemy)

See Also

SetWarMode, WarTargetID, LastAttack