Mostrando postagens com marcador Scripts - TibiaBOT NG. Mostrar todas as postagens
Mostrando postagens com marcador Scripts - TibiaBOT NG. Mostrar todas as postagens

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;

Script Para Atacar X Monstro Primeiro - TibiaBOT NG


Const
MonsterList = ['Blood Crab']

function GetCreatureByName: 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].Z = Self.Z then
for i := low(MonsterList) to high(monsterlist) do
if Creatures.Creature[x].Name = MonsterList[i] then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;

While not terminated do
begin
UpdateWorld;
C := GetCreatureByName;
if C <> nil then
if not self.attacking then
C.Attacking := true;
sleep(100);
end;

Auto Responder ( Resposta Automatica) - TibiaBOT NG


;Responding to H with a Greeting:
== 0 1 "\Ah" "Hi","Hello","yo","Hey","...Hi"
;Responding to Monster leave ect if they have not yet greeted us:
== 0 1 "mine|stop|leave|" "ok","kk","alright..."
;Respond to level 1 "give" statements:
== 0 1 "give|give loot|give gp|", "sorry,no","no,sorry","sorry,i need"
;We have said a Greeting and they are continuing to talk to us:
== 1 2 "mine|stop|leave" "certainly","kkkk","grrr"
;They have asked a question we respond. Q1:
== 1 2 "food plz|food|food pls|food|food?" "dont have any food","dont have","dont have"
;Q2:
== 1 2 "torch|torch plz|torch pls" "srry i dont have ","don't use, funner","not got, sorry"
;Q3:
== 1 2 "hunting?|No torch?" "ya","yeap","yeah","yup"
;Ignore and magic spell casting:
== 0 0 "utevo lux|exura|adori|exevo|Ina|exana|vis"
== 1 1 "utevo lux|exura|adori|exevo|Ina|exana|vis"
== 2 2 "utevo lux|exura|adori|exevo|Ina|exana|vis"
;Respond to level 2 Cheating Acusation:
== 2 3 "Cavebot|cheater|botter|noob|cheat" "im not using cheat , leave me alone..","leave me alone please","let me hunting in peace","go away"
;Respond to level 0&1&3 cheating acusations:
== 0 1 "Cavebot|cheater|botter|noob|cheat" "im not using any cheat ,jesus christ!..","go away and dont disturb me plz","dont piss me of , get off","go away batty"
== 1 2 "Cavebot|cheater|botter|noob|cheat" "go away","get off","stfu","go away damn"
== 3 2 "Cavebot|cheater|botter|noob|cheat" "piss of","shut up","stfu","go away batty"

Script para treinar com Slime


function Attacking: boolean;
begin
   UpdateWorld;
   for x := 0 to Creatures.Count - 1 do
   begin
      UpdateWorld;
      if Creatures.Creature[x].Attacking then
      begin
         Result := True;
         Exit;
      end;
   end;
   Result := False;
   Exit;
end;

function GetFollowedCreatureID: integer;
begin
   UpdateWorld;
   for x := 0 to Creatures.Count - 1 do
   begin
      UpdateWorld;
      if Creatures.Creature[x].Following then
      begin
         Result := Creatures.Creature[x].ID;
         Exit;
      end;
   end;
end;

var
   MotherSlime, X1, Y1: integer;
begin
   MotherSlime := GetFollowedCreatureID;
   while not Terminated do
   begin
      UpdateWorld;
      if not Attacking then
      begin
         UpdateWorld;
         for x := 0 to Creatures.Count - 1 do
         begin
            UpdateWorld;
            if Creatures.Creature[x].ID <> MotherSlime then
            begin
               if (Creatures.Creature[x].Name <> Self.Name) and Creatures.Creature[x].NPC then
               begin
                  UpdateWorld;
                  X1 := Creatures.Creature[x].X;
                  Y1 := Creatures.Creature[x].Y;
                  if (X1 - Self.X = 1) or (X1 - Self.X = 0) or (X1 - Self.X = -1) then
                  begin
                     UpdateWorld;
                     if (Y1 - Self.Y = 1) or (Y1 - Self.Y = 0) or (Y1 - Self.Y = -1) then
                     begin
                        Creatures.Creature[x].Attacking := true;
                        Break;
                     end;
                  end;
               end;
            end;
         end;
      end;
      Sleep(1000);
   end;
end;

Script monstro Anti-Bot


// Ignores anti-botter creatures based on time to kill
// @since Dec 14, 2008
// @author Pardall BR
// @colaboration Fal Dragonheart, cavalogrande

const
// Time in seconds to kill a creature. If it takes more than it, script will assume that creature as an anti-botter.
AverageTimeKill = 25;

// Play alarm in case of an anti-botter detected? 1 = yes / 0 = no
SoundAlarm = 1;
// Alarm Path
alertSound = 'c:\windows\media\notify.wav';

// Don't change this
IgnoreLimit = 250;

var
CreaturesIgnore: array of integer;
CreatureAttacking : integer;
CreatureAttackingBefore : integer;
TimeAttack, TimeStamp, TimeElapsed : integer;
y : integer;

// @credits http://forums.tibiab...ead.php?t=77814
function TimeNow:integer;
var
hours, minutes, seconds, miliseconds:integer;
begin
DecodeTime(Now, hours, minutes, seconds, miliseconds);
Result := hours * 60 * 60 * 1000 + minutes * 60 * 1000 + seconds * 1000 + miliseconds;
end;

procedure PlayAlarm;
begin
if SoundAlarm then
begin
if (Pos('.wav', alertSound) <> 0) then
begin
try
PlaySound(alertSound);
except
ShowMessage('Please enter a valid path for the sound file!');
end;
end;
end;
end;

// Check if player is attacking something, if yes return attacked creature id
function CheckAttacking: integer;
begin
UpdateWorld;
for x := 0 to Creatures.Count - 1 do
begin
UpdateWorld;
if Creatures.Creature[x].Attacking then
begin
if CreatureAttackingBefore > 0 and CreatureAttackingBefore <> Creatures.Creature[x].ID then
CreatureAttackingBefore := CreatureAttacking;

Result := Creatures.Creature[x].ID;
Exit;
end;
end;
Result := 0;
Exit;
end;

//Check if an ID is in ignore list
function CheckIgnored(ID : integer) : boolean;
var x : integer;
begin
if y >= 1 then
begin
for x := 0 to y-1 do
begin
if ID = CreaturesIgnore[x] then // ignored creature
begin
Result := true;
Exit;
end;
end;
end;
Result := false;
end;


// Add an ID to the ignore list
procedure IgnoreCreature(ID : integer);
begin
Self.DisplayText('IgnoreCreature #' + IntToStr(ID));
CreaturesIgnore[y] := ID;
y := y + 1;
if y > IgnoreLimit then y := 1;
end;

procedure StopAttack;
begin
for x := 0 to Creatures.Count - 1 do
begin
UpdateWorld;
if Creatures.Creature[x].Attacking then
begin
Creatures.Creature[x].Attacking := false;
Exit;
end;
end;
end;

// Check if the player has been attacked, then attack the attacker if it isn't a player
procedure Event_Attacked(ID: integer);
begin
if not CheckIgnored(ID) then
begin
for x := 0 to Creatures.Count - 1 do
begin
UpdateWorld;
if Creatures.Creature[x].ID = ID and
(not Creatures.Creature[x].WhiteSkull and not Creatures.Creature[x].RedSkull and not Creatures.Creature[x].YellowSkull) // ignore player attack (is there a better way?)
then
begin
TimeAttack := TimeNow;
Creatures.Creature[x].Attacking := True;
Exit;
end;
end;
end;
end;

begin
CreatureAttackingBefore := 0;
CreatureAttacking := 0;
y := 0;
CreaturesIgnore := VarArrayCreate([y, IgnoreLimit], $C);

UpdateWorld;
while not Terminated do
begin
UpdateWorld;

if not CheckAttacking then
begin
ProcessEvents;
CreatureAttacking := CheckAttacking;
end;

if CheckAttacking then
begin
TimeStamp := TimeNow;
TimeElapsed := TimeStamp - TimeAttack;

if CreatureAttacking = CreatureAttackingBefore and (TimeElapsed > (AverageTimeKill*1000)) then
begin
IgnoreCreature(CreatureAttacking);
StopAttack;
PlayAlarm;
end;

CreatureAttackingBefore := CreatureAttacking;
end;

sleep(500);
end;
end;

Auto Exori Con - TibiaBOT NG

const
Delay = 2000; //exaut para cada exori con 2 sec
MinimumManaToCast = 60; // mana que precisa para soltar exori con
MinimumMonsterHealth = 60; // Contado em Porcentagem se o monstro tiver 1k de lifer com 60 soltara exori com com 600 de life..
SpellRange = 3; // soltara 3 exori con

function GetCreatureByID(ID: integer): TCreature;
var
x: integer;
begin
Result := nil;
for x := 0 to Creatures.Count - 1 do
if Creatures.Creature[x].ID = ID then
Result := Creatures.Creature[x];
end;

var
Attacking : TCreature;
Range: Integer;
begin
while not Terminated do
begin
UpdateWorld;

Attacking:=GetCreatureByID(Self.Attacking);
if (Assigned(Attacking)) then
begin
Range := Round(Sqrt(Sqr(Self.X - Attacking.X) + Sqr(Self.Y - Attacking.Y)));
if (Range <= SpellRange) and (Attacking.Health >= MinimumMonsterHealth) and (Self.Mana >= MinimumManaToCast) then
Self.Say('exori con');
end;

Sleep(Delay);
end;
end;

Script para Reconectar apos Serve Save - TibiaBOT NG


const
Account = 'xxxxx';
Password = 'xxxxxxx';
World = 'mundo que vc joga';
Character = 'nome do char';
ServerIP = ''; //Se você joga no global não coloca nada
WaitingTime = '1200' //tempo de espera para logar 1200 = 20 minutos


var
i:integer;

procedure Login(Account: string; Password: string; Character: string; World: string; ServerIP: string);
var
x: integer;
begin
repeat
Self.logout(True)
Sleep(WaitingTime*1000)
Self.Login(Account, Password, Character, World, ServerIP);
Sleep(3000);
for x := 0 to 200 do
begin
UpdateWorld;
Sleep(100);
if Self.Connected then Break;
end;
until Self.Connected;
end;

begin
while not terminated do begin
UpdateWorld;
Sleep(10000);

If Self.Connected = False Then Begin
Login(Account, Password, Character, World, ServerIP);
Sleep(100);
UpdateWorld;

repeat
Self.Backpack.Use;
Sleep(1000);
UpdateWorld;
until Self.Containers.Count = 1;

For I := 0 to Self.Containers.Container[0].Count -1 Do
Begin
If Self.Containers.Container[0].Item[i].Properties.Container = True Then Begin
Self.Containers.Container[0].Item[i].OpenInNewWindow;
Sleep(500);
UpdateWorld;
End;
End;
end;
end;
end;

Script para usar Mana Potion - TibiaBOT NG


const
minMana =10;


while not Terminated do
begin
UpdateWorld;
if (Self.Mana < minMana) then
begin
Self.Containers.UseItemWithSelf(268);// SE VC QUER USAR OUTRA mana troque o id aki mana pequena
Sleep(1000);
end;
Sleep(100);
end;
IDS POTS:


Health potion [ID: 266]
Strong health potion [ID: 236]
Great health potion [ID: 239]
Ultimate Health Potion [ID: 7643]
Normal Mana Potion [ID: 268]
Strong Mana Potion [ID: 237]
Great Mana Potion [ID: 238]
Great spirit Potion [ID: 7642]  

Script para treinar com monk ou amigo - TibiaBOT NG


Const
StopAt=50;//para de atacar quando tiver com 50% de vida
AttackAt=90;// ataca monk/player com mais de 90% de Life
TrainName=['Monk','FrinedName1','FriendName2'];//voce pode alterar o nome da criatura ou do amigo
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.attacking0 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;

Script para atacar com magia ( Exori: Frigo, Mort. Vis ) - TibiaBOT NG


Const
List = ['Rotworm', 'Carrion Worm'];
Spell = 'Exori Frigo';
function TestMonster(Crea: TCreature): boolean;
begin
Result := false;
for z := Low(List) to High(List) do
begin
if AnsiLowerCase(Crea.Name) = AnsiLowerCase(List[z]) then
Result := 'true';
end;
end;
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;
while not terminated do
begin
updateworld;
if Self.Attacking nil then
begin
creature := GetCreatureByID(self.attacking);
if creature nil then
begin
updateworld;
if (abs(creature.x - self.x) <= 3) and (abs(creature.y - self.y) <= 3) then if (TestMonster(creature)) then begin if Self.Attacking > 0 then
self.say(Spell);
sleep(2000);
end;
end;
sleep(200);
end;
end;

Anti Paralize - TibiaBOT NG

Utani Hur:
while not Terminated do
begin
UpdateWorld;
if Self.Mana > minMana then
begin
if Self.Slowed then
Self.Say('utani hur');
end;
Sleep(300);
end;
Utani Gran Hur:
while not Terminated do
begin
UpdateWorld;
if Self.Mana > minMana then
begin
if Self.Slowed then
Self.Say('utani Gran hur');
end;
Sleep(300);
end;

Script para Não atacar Summons - TibiaBOT NG


Const
Name=['Dwarf Guard', 'Dwarf Soldier', 'Dwarf']; // nome dos monstros
SwitchAt=30; // the % of the current attacked monster

function GetPlace(st:string):integer;
var
x:integer;
begin
Result:=1000;
for x:=Low(Name) To High(Name) do
begin
if Name[x]=st then
Result:=x;
end;
end;

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 IsCreatureBesideYou(c: TCreature): boolean;
begin
UpdateWorld;
Result := False;
if (abs(c.X-self.X) <= 1) and (abs(c.Y-self.Y) <= 1) then begin if c.Z = self.Z then begin Result := True; end; end; end; var x:integer; b:boolean; begin while not terminated do begin b:=false; updateworld; If (Self.Attacking<>0) then
begin
Creature:=GetCreatureByID(Self.Attacking);
if Creature<>nil then
if SwitchAt= Creatures.Count then Break;
if Creatures.Creature[x].NPC then
if Creatures.Creature[x].z=self.z then
if Creatures.Creature[x].Name<>self.name then
if Creatures.Creature[x].Attacking = false then
if IsCreatureBesideYou(Creatures.Creature[x]) then
if GetPlace(Creature.Name)>GetPlace(Creatures.Creature[x].Name) then
begin
sleep(100);
updateworld;
Creatures.Creature[x].attacking:=true;
B:=true;
end;
end;
end;
end;
Sleep(100);
end;
end;

Auto Exori Con NGBot

const
Delay = 2000; //exaut para cada exori con 2 sec
MinimumManaToCast = 60; // mana que precisa para soltar exori con
MinimumMonsterHealth = 60; // Contado em Porcentagem se o monstro tiver 1k de lifer com 60 soltara exori com com 600 de life..
SpellRange = 3; // soltara 3 exori con

function GetCreatureByID(ID: integer): TCreature;
var
x: integer;
begin
Result := nil;
for x := 0 to Creatures.Count - 1 do
if Creatures.Creature[x].ID = ID then
Result := Creatures.Creature[x];
end;

var
Attacking : TCreature;
Range: Integer;
begin
while not Terminated do
begin
UpdateWorld;

Attacking:=GetCreatureByID(Self.Attacking);
if (Assigned(Attacking)) then
begin
Range := Round(Sqrt(Sqr(Self.X - Attacking.X) + Sqr(Self.Y - Attacking.Y)));
if (Range <= SpellRange) and (Attacking.Health >= MinimumMonsterHealth) and (Self.Mana >= MinimumManaToCast) then
Self.Say('exori con');
end;

Sleep(Delay);
end;
end;