Autor Wiadomość
jabol123
PostWysłany: Czw 21:10, 05 Mar 2009    Temat postu: Użyj "utamo vita" gdy zaatakuje pk

Scypt przydatny w każdej sytuacji na świecie pvp ; ) pk nas zaatakuje nastepuje automatyczne użycie

Kod:

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;

Powered by phpBB © 2001, 2005 phpBB Group