procedure OnMoveEvent(Attacker: TL2Live; var BreakMove: Boolean);
begin
  while (Engine.Status <> lsOnline) do Delay(500);  // waiting until we come back    
  if (User.Dead) then begin    // if the char is dead
    Print('Died!');
    // cause actions to be done when dying
  end;    
  if (Attacker <> nil) then begin    // if we are attacked
    Print('We are attacked while running');
    // fighting off
  end;
end;

begin
  Delay(-1);
end.