W linijce list ['TU!'] Wpisujemy na jakie moby ma używać exori hur

Czar można zmienić na inny

Kod:
Const
List = ['Dragon', 'Dragon Lord'];
Spell = 'Exori Hur';

function TestMonster(Crea: TCreature): boolean;
begin
Result := false;

for z := Low(List) to High(List) do
begin
if AnsiLowerCase(Crea.Name) = AnsiLowerCase(List[z]) then
Result := 'true';
end;
end;

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
updateworld;
if Self.Attacking <> nil then
begin
creature := GetCreatureByID(self.attacking);
if creature <> nil then
begin
updateworld;
if (abs(creature.x - self.x) <= 3) and (abs(creature.y - self.y) <= 3) then
if (TestMonster(creature)) then
begin
if Self.Attacking > 0 then
self.say(Spell);
sleep(2000);
end;
end;
sleep(200);
end;
end;


Linki sponsorowane