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 
Monk Trainer 
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 20:49, 05 Mar 2009  

Skrypt atakuje tego Monka który ma więcej HP

Kod:

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;


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