sábado, 4 de junho de 2011

Ataca X runa em X bicho - TibiaBOT NG


const
delay = 1
MonsterName = 'Lizard Snakecharmer' // Name of the monster need to be attacked
MinHP = 0 // If you have less hp than this it wont attack
MonsterHP = 0 // Attack monster if more than X hp
RuneID = 3155 // RuneID - (SD - 3155, EXPLO - ????, HMM - ????, AVA - ????, icicle - ????)
function GetCreatureByName(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
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;

procedure Attack(Name:string);
var
Player:TCreature;
x:integer;
begin
updateworld;
Monster :=GetCreatureByName(Name);
if monster <> nil then
if Self.Health>MinHp then
begin
Self.Containers.UseItemWithCreature(RuneID, Monster);
updateworld;
end
end;

while not terminated do
begin
Yes := false;
UpdateWorld;
for i := 0 to creatures.Count - 1 do
begin
if creatures.Creature[i].Z = Self.Z then
If Creatures.Creature[i].Name = MonsterName then
begin
Yes := true;
repeat
Attack(MonsterName);
Sleep(Delay * 1000);
UpdateWorld;
for g := 0 to creatures.Count -1 do
begin
if creatures.Creature[i].Z = Self.Z then
If Creatures.Creature[i].Name = MonsterName then
Yes := True else Yes := false; else yes := false;
end;
until Yes = false;
end;
sleep(100);
end;
Sleep(100);
end;

Nenhum comentário:

Postar um comentário