• logo_cipsoft
    Nowe serwery zostały otwarte 27 Paź 2025:
    Idyllia (Optional PvP) Hostera (Open PvP) us_logo Dracobra (Open PvP)

- TibiaBot NG Skrypt do NG, poszukuj?

Status
Zamknięty.
Emanko. Poszukuj? skryptu kt?ry b?dzie wypowiada? ofensywne zakl?cie np. exori gran. na atakowana posta? maj?c? mniej ni? ile? tam hp, lub po prostu na redzie. Czyli jest war, ziomek w trapie, dostaje combo, zostaje na redzie, a bot uderza z exori gran, wiecie o co biega? Chyba jest to realne wed?ug mnie :p czekam na odpowied?, dzi?ki.

_/
 

Our partners and their custom servers:

Odp: Skrypt do NG, poszukuj?

Prosze. Tam gdzie pisze monster's name wpisz nick goscia ktorego chcesz bic ponizec xx procent hp.

Kod:
const
MonsterName = ['<nick gostka>','Nightmare']// Add the monsters here 
Attack_Spell = 'exori gran' // Change the name of the spell here
Min_Mana = 350 // If your mana is lower than this you will not cast the spell
Min_Monster_HP = 0  // If the monster is lower than this % of health it will not cast the spell
Max_Monster_HP = 99 //If the monster is higher than this % of health it will not cast the spell
Range = 1 //The spell will not cast if the monster is farther away than this

var
   x: Integer;
   Creature:TCreature;

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; 

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;

function IsCreatureAttackable(c: TCreature): boolean;
begin
   UpdateWorld;
   Result := False;
   if (c.Z = self.Z) and (abs(c.X-self.X) <= Range) and (abs(c.Y-self.Y) <= Range) and (c.outfit<>0) and (c.Health >= Min_Monster_HP) and (c.Health <= Max_Monster_HP) then  
     begin
     Result := True;
     end;
end; 

while not Terminated do
begin
  UpdateWorld;
  Creature := GetCreatureByID(Self.Attacking); 
  if (Self.Mana >= Min_Mana) and (Creature <> nil) then 
  for i := low(monstername) to high(monstername) do
    begin
      if (MonsterName[i] = Creature.Name) and (IsCreatureAttackable(Creature)) then 
          begin
          Self.Say(Attack_Spell);
          sleep(2000);
          end;
    end;       
    sleep(100);
end;
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry Bottom