Forum www.elfngboot.fora.pl Strona Główna
 Strona glówna  •  FAQ  •  Szukaj  •  Użytkownicy  •  Grupy  •  Galerie  •  Rejestracja  •   Profil  •  Zaloguj się, by sprawdzić wiadomości  •  Zaloguj 
Robienie Runek przed Domkiem 
Napisz nowy temat   Odpowiedz do tematu    Forum www.elfngboot.fora.pl Strona Główna -> Bot NG / Skrypty
Zobacz poprzedni temat :: Zobacz następny temat  
Autor
Wiadomość
jabol123
Administrator



Dołączył: 05 Mar 2009
Posty: 26
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Czw 21:16, 05 Mar 2009  

Gdy gracz na ekranie lub nas atakuje skrypt wchodzi do domku.. Gdy gracz sobie pójdzie wychodzi i dalej robi runki.

Kod:

var
 X1: Integer;
 Y1: Integer;
 X2: Integer;
 Y2: Integer;
 Player: TSelf;
 HP: Integer;
 stay: Boolean;
 
 
 //Made for TibiaBot NG by LordofWar.
 //Created by Forge, copyright 2006-2007.
 //Usage, stand on the square that it will run to if attacked or if it see someone,
 //then execute the script.
 
procedure Event_Attacked(ID: integer);
begin
  UpdateWorld;
  Player.MoveTo(X1, Y1, Player.Z);
  stay := true;
  UpdateWorld;
end;


function Event_HP(hitpoint: integer): boolean;
var
 Player: TSelf;
begin
 result := false;
 if(Player.health < Player.MaximumHealth) then begin
   result := True;
   stay := True;
 end;
end;
 
function GetCreature: byte;
var
  x: integer;
begin
  updateworld;
  result := 0;
  for x := 0 to Creatures.Count - 1 do
  begin
    if Creatures.Creature[x].NPC = false then
    if(Creatures.Creature[x].Name <> self.Name) then begin
     if(Creatures.Creature[x].Z = Self.Z) then begin
      result := 1;
      exit;
     end;
    end;
  end;
end;


begin
  UpdateWorld;
  self.whisper('[5 sec] Goto the place you want to go if someone enter screen or attack you!');
  Sleep(5000);
  X1 := Player.X;
  Y1 := Player.Y;
  self.whisper('[4 sec] Good, now move to the place where you want to stand.');
  Sleep(4000);
  UpdateWorld;
  X2 := Player.X;
  Y2 := Player.Y;
  self.whisper('[0 sec] Great! Now we start it ;)');
  stay := false;
  while not Terminated do
  begin
    if event_hp(HP) = true then begin
      Player.MoveTo(X1, Y1, Player.Z);
    end;
    if GetCreature = 1 then begin
     Self.MoveTo(X1, Y1, Self.Z);
     Sleep(2000);
     exit;
    end;
   
   if GetCreature = 0 then begin
    Self.MoveTo(X2, Y2, Self.Z);
   end;
   
   sleep(500);
   
  end;
end;


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum www.elfngboot.fora.pl Strona Główna -> Bot NG / Skrypty Wszystkie czasy w strefie EET (Europa)
Strona 1 z 1
   
 
Opcje 
Zezwolenia Opcje
Kto jest na Forum Możesz pisać nowe tematy
Możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Kto jest na Forum
 
Jumpbox
Kto jest na Forum
Skocz do:  


fora.pl - załóż własne forum dyskusyjne za darmo
Theme FrayCan created by spleen & Download
Powered by phpBB © 2001, 2005 phpBB Group
Regulamin