Soltar exori quando tiver determinados montros na tela

Const
MonstersNames = ['Vampire','Crypt Shambler']
NumberOfMonsters = 4
MinHealth = 800
MinMana = 150

function CountMonstersBesideYou:Integer;
begin
Result := 0;
UpdateWorld;
for i := 0 to creatures.Count -1 do
begin
if i >= Creatures.Count then break
for x := -1 to 1 do
begin
if x >= 2 then break
for y := -1 to 1 do
begin
if y > 1 then break;
if Creatures.Creature.NPC then
if (Creatures.Creature.x = Self.X +x) and (Creatures.Creature.y = Self.y + y) then
begin
for G := low(MonstersNames) to high(MonstersNames) do
begin
if Creatures.Creature.Name = MonstersNames[G] then
Result := Result + 1;
end;
end;
end;
end;
end;
end;

while not terminated do
begin
UpdateWorld;
if CountMonstersBesideYou >= NumberOfMonsters then
if Self.Mana >= MinMana then
if Self.Health > MinHealth then
Self.Say('exori');
sleep(100);
end;

0 comentários | COMENTE AQUI!!! :

Postar um comentário

Digite aqui seu comentário...

© Copyright 2009-2013 - Tibia Dash - Direitos Reservados.
Proibida a cópia total ou parcial deste site.
Tibia é propriedade da CipSoft GmbH . Mais em Termos e Condições .