Manda MSG para todos na VIP caso for atacado.

var
Finished:boolean;

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

procedure Event_Attacked(ID: integer);
var
AttackingCreature: TCreature;
begin
UpdateWorld;
AttackingCreature := GetCreatureByID(ID);
if not AttackingCreature.NPC then
begin
for i := 0 to VipList.Count - 1 do
begin
if VipList.Vip[i].Online then
Self.PrivateMessage(VipList.Vip[i].Name,'help, ' + AttackingCreature.Name + ' is attacking me!');
Sleep(2000);
end;
Finished := true;
end;
end;

begin
Finished := false;
while (not Terminated) and (not finished) do
begin
UpdateWorld;
ProcessEvents;
Sleep(100);
end;
end;

 

Pesquisar no site

By Chuck Norriz © 2009 Todos os direitos reservados.