Joga tal runa em tal bixo

Const
IgnoreList = ['Sam','Hardek','Rat','Cave Rat','Skeleton'] // Add qnts quizer
MaxMonsters = 1 // qntidade de bixo para ele jogar a runa
RuneID =
3165

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;

while not terminated do
begin
A := 0;
UpdateWorld
For i := 0 to Creatures.Count -1 do
begin
if (i >= Creatures.Count) or (terminated) then break;
if (Creatures.Creature.NPC) and (Creatures.Creature.Z = Self.Z) then
begin
B := 0;
for g := Low(IgnoreList) To High(IgnoreList) do
begin
if AnsiLowerCase(Creatures.Creature.Name) = AnsiLowerCase(IgnoreList[g]) then
begin
B := 1;
break;
end;
sleep(10);
end;
if B = 0 then A := A + 1;
end;
Sleep(10);
end;
if A > MaxMonsters then
begin
UpdateWorld;
if Self.Attacking <> 0 then
Target := GetCreatureByID(Self.Attacking);
if Target <> nil then
Self.Containers.UseItemWithCreature(RuneID,Target);
Sleep(1000);
end;
Sleep(100);
end;

Search site

Scripts Tibia © 2008 Todos os direitos reservados.

Google.com.br , Google.com.pt, Dmoz.org , Esquillo.com , Classificados-brasil.com , cade.search.yahoo.com .