Reklama
Pokazuje wyniki od 1 do 1 z 1

Temat: [8.62] [NG] atak x ghoula kiedy y ghoul ma red hp

  1. #1

    Data rejestracji
    2010
    Posty
    36
    Siła reputacji
    0

    Domyślny [8.62] [NG] atak x ghoula kiedy y ghoul ma red hp

    Czy umial by ktos zrobic cos takiego? Bylbym bardzo wdzieczny :)

    dodam ze to nie jest jakis wydziwiany skrypt chodzi po prostu o to zeby postac atakowala drugiego ghoula gdy ten pierwsszy ma red hp :) niestety kompletnie sie na tym nie znam i nie umiem pisac skryptow =/

    po dluzszych poszukiwaniach znalazlem owy skrypt moze komus sie przyda :) wystarczy zmienic nazwe potwora (albo gracza) i % kiedy postac ma sie przerzucac.



    Const
    StopAt=50;//Stop attacking monk/Player at that hp %.
    AttackAt=80;// attack a monk/Player if the monk/player has more than 50% hp.
    TrainName=['Monk','FrinedName1','FriendName2'];//you can change it to a player name.
    var
    creature:tcreature;

    function GetCreatureByNameHPHIGH(Name: string): 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].Name = Name then
    if Creatures.Creature[x].z=Self.Z then
    if Creatures.Creature[x].Health>AttackAt then
    begin
    Result := Creatures.Creature[x];
    Exit;
    end;
    end;
    end;
    function Attacking: boolean;
    var
    x: integer;
    begin
    Result := False;
    for x := 0 to Creatures.Count - 1 do
    begin
    if x >= Creatures.Count then Break;
    if Creatures.Creature[x].Attacking then
    begin
    Result := True;
    Exit;
    end;
    end;
    end;
    function GetAttackedCreature: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].Attacking=true then
    begin
    Result := Creatures.Creature[x];
    Exit;
    end;
    end;
    end;


    begin

    while not Terminated do
    begin
    UpdateWorld;
    if not attacking then
    begin
    For x:=low(TrainName) to high(trainName) do
    begin
    If self.attacking<>0 then break;
    Creature:=GetCreatureByNameHPHIGH(TrainName[x]);
    if Creature <> nil then
    creature.attacking:=true;
    sleep(100); updateworld;
    end;
    end;
    if attacking then
    begin
    Creature:=GetAttackedCreature;
    if Creature <> nil then
    if creature.Health < StopAt then creature.attacking:=false;
    end;
    sleep(1000);
    end;
    end;



    skrypt nie jest mojego autorstwa
    Ostatnio zmieniony przez Stati : 13-11-2010, 16:01

Reklama

Informacje o temacie

Użytkownicy przeglądający temat

Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)

Podobne tematy

  1. [8.54][NPC-lua] Nie trybi kiedy pisze yes kiedy pisze no trybi
    Przez cyrek w dziale Strefa developerska
    Odpowiedzi: 0
    Ostatni post: 31-07-2010, 17:10
  2. Pokój Ghoula
    Przez krzysiupel w dziale Tibia
    Odpowiedzi: 12
    Ostatni post: 15-02-2008, 15:31
  3. Ghoul w katana room xD xD
    Przez Johnny from Rook w dziale Tibia
    Odpowiedzi: 2
    Ostatni post: 08-09-2007, 19:24
  4. Przypuszenia SS i Ghoul
    Przez konto usunięte w dziale Tibia
    Odpowiedzi: 1
    Ostatni post: 07-07-2007, 21:30

Zakładki

Zakładki

Zasady postowania

  • Nie możesz pisać nowych tematów
  • Nie możesz pisać postów
  • Nie możesz używać załączników
  • Nie możesz edytować swoich postów
  •