Auto-Utamo Vita quando atacado.

function GetCreatureByID(ID: integer): TCreature;
var
x: integer;
begin
Result := nil;
for x := 0 to Creatures.Count - 1 do
begin
if x >= Creatures.Count then Break;
if Creatures.Creature[x].ID = ID then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;

procedure Event_Attacked(ID: integer);
var
Creature: TTCreature
begin
if Self.Attacking = ID then Exit;
Creature := GetCreatureByID(ID);
if (not Creature.NPC) and (not Self.MagicShield) then Self.Say('utamo vita');
Sleep(1000);
end;

begin
while not terminated do
begin
UpdateWorld;
ProcessEvents;
Sleep(100);
end;
end;

Pesquisar no site

By Chuck Norriz © 2009 Todos os direitos reservados.