Scripts do tibia bot ng

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

Scripts do tibia bot ng

Mensagem por Faial em Sex Jan 15, 2010 8:31 am

HEALTH POTION :

const
minHealth = 80 // Change this to when you want it to heal.

while not terminated do
begin
UpdateWorld;
if Self.Health < minHealth then
Self.Containers.UseItemWithSelf(266); // Change this to the HEALTH potion's ID. 239 is Great. 236 is Strong.
Sleep(1000);
end;

--------------------------------------------------------- ------------------------------------------------------------
RECARREGAR SPEARS (NA MÃO DIREITA)(ANTES DISSO COLOQUE PARA PEGAR SPEARS DO BIXO)
Ex:VALKIRIES, TROLLS , ETC...

const
WeaponID = 3282 // 3282 = Morning Star
SpearID = 3277 // 3277 = Spear, 1781 = Small Stone
SpearOz = 20 // Spear = 20, Small Stone = 3
SpearAmount = 1 // How many must have before switching back to spear

Procedure PickUpSpears(Spears: TItem);
begin
if (Self.Capacity <= (Spears.Amount * SpearOz)) then
begin
if (Self.Capacity/SpearOz) > 1 then
Spears.MoveToContainer(Self.Containers.Container[0], 0, Int(Self.Capacity/SpearOz));
end else Spears.MoveToContainer(Self.Containers.Container[0], 0, 0);
Sleep(500);
end;

Function GetItemFromOpenBackpack(ID, Index: integer): TItem;
var
x: integer;
y: integer;
begin
Result := nil;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
if x = Index then Continue;
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if y >= Self.Containers.Container[x].Count then Break;
if Self.Containers.Container[x].Item[y].ID = ID then
begin
Result := Self.Containers.Container[x].Item[y];
Exit;
end;
end;
end;
end;


function CountItemAmountFromOpenBackpack(ID: integer): integer;
var
x: integer;
y: integer;
begin
Result := 0;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
for y := 0 to Self.Containers.Container[x].Count - 1 do begin
if y >= Self.Containers.Container[x].Count then Break;
if Self.Containers.Container[x].Item[y].ID = ID then begin
Result := Result + Self.Containers.Container[x].Item[y].Amount;
end;
end;
end;
end;


while not terminated do
begin
UpdateWorld;
Weapon := GetItemFromOpenBackpack(WeaponID, Self.Containers.Count);
if Weapon <> nil then Weapon.MoveToBody(Self.Arrow, 0);
Spear := GetItemFromOpenBackpack(SpearID, 0);
if Spear <> nil then Spear.MoveToContainer(Self.Containers.Container[0], 0, 0);
if (Self.RightHand.ID = SpearID) then
begin
if (Self.RightHand.Amount < 90) then
begin
Spear := GetItemFromOpenBackpack(SpearID, Self.Containers.Count);
if Spear <> nil then Spear.MoveToBody(Self.RightHand, 0);
end;
end else begin
SpearCount := CountItemAmountFromOpenBackpack(SpearID);
if SpearCount >= SpearAmount then
begin
Self.RightHand.MoveToBody(Self.Arrow, 0);
Sleep(500);
Spear := GetItemFromOpenBackpack(SpearID, Self.Containers.Count);
if Spear <> nil then Spear.MoveToBody(Self.RightHand, 0);
end else if Self.RightHand.ID = 0 then Self.Arrow.MoveToBody(Self.RightHand, 0);
end;
Sleep(500);
end;
------------------------------------------------------------- --------------------------------------------------
TREINAR COM SLIMES: (DÊ FOLLOW NO VERDADEIRO E EXECUTE O SCRIPT)

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;
--------------------------------------------------------------------------- ---------------------------------------
ELE AUTOMATICAMENTE TIRA SEUS SCREENSHOTS QUANDO VC UPA LEVEL, SKILL E MAGIC LEVEL
SALVANDO NA PASTA : "Meu Computador\Disco Local"

var
Level: integer;
MLevel: integer;
Axe: integer
Fishing: integer
Shielding: integer
begin
UpdateWorld;
Level := Self.Level;
MLevel := Self.Skills.Magic.Level;
Axe := Self.Skills.Axe.Level;
Fishing := Self.Skills.Fishing.Level;
Shielding := Self.Skills.Shielding.Level;
while not Terminated do
begin
UpdateWorld;
if Level <> Self.Level then
begin
Level := Self.Level;
ScreenShot('c:\level' + IntToStr(Level) + '.bmp');
Level := Self.Level;
end;
if MLevel <> Self.Skills.Magic.Level then
begin
MLevel := Self.Skills.Magic.Level;
ScreenShot('c:\Mlevel' + IntToStr(MLevel) + '.bmp');
MLevel := Self.Skills.Magic.Level;
end;
if Axe <> Self.Skills.Axe.Level then
begin
Axe := Self.Skills.Axe.Level;
ScreenShot('c:\Axe' + IntToStr(Axe) + '.bmp');
Axe := Self.Skills.Axe.Level;
end;
if Fishing <> Self.Skills.Fishing.Level then
begin
Fishing := Self.Skills.Fishing.Level;
ScreenShot('c:\Fishing' + IntToStr(Fishing) + '.bmp');
Fishing := Self.Skills.Fishing.Level;
end;
if Shielding <> Self.Skills.Shielding.Level then
begin
Shielding := Self.Skills.Shielding.Level;
ScreenShot('c:\Shielding' + IntToStr(Shielding) + '.bmp');
Shielding := Self.Skills.Shielding.Level;
end;
Sleep(1000);
end;
end;

--------------------------------------------------------------------- ------------------------------------------
MANA POTION :

Const
MinMana = 20 // min Mana
NumberOfVialsToDrink = 1 // how many mana potions to drink
IDPotion = 268 // ID of Potion
Delay = 1 // in seconds

while not terminated do
begin
UpdateWorld;
if Self.Mana <= MinMana then
begin
for i := 1 to NumberOfVialsToDrink do
begin
if (i >= NumberOfVialsToDrink + 1) or (terminated = true) then break;
Self.Containers.UseItemWithSelf(IDPotion);
Sleep(Delay*1);
end;
end;
Sleep(500);
end;
------------------------------------------------------------------------ ---------------------------------------
NOVOS :

MONK TREINER (Tpw , ele para de ataca o monk quando estiver na red , vc escolhe)

Const
StopAt=50;//para de atacar qn tiver com 50% de vida
AttackAt=60;// ataca monk/player com mais de 50% de Life
TrainName=['Monk','FrinedName1','FriendName2'];//vc pode alterar caso nao seja em mundo pvp
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;

------------------------- ------------------------------------------------------------------------------------------
USA OBSIDIAN KNIFE OU WOODEN STAKE

const
obsidian_knife = 5908; //id da obsidian ou woden stak
skin_body = [4011, 4047, 4052, 4057]; //id dor corpos

function searchIntArray(id:integer): boolean;
var
i: integer;
begin
result := false;
for i := low(skin_body) to high(skin_body) do begin
if skin_body = id then result := true;
end;
end;

function GetItemFromOpenBackpack(ID: integer): TItem;
var
y: integer;
begin
Result := nil;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if y >= Self.Containers.Container[x].Count then Break;
if Self.Containers.Container[x].Item[y].ID = ID then
begin
Result := Self.Containers.Container[x].Item[y];
Exit;
end;
end;
end;
end;
------ -------------------------------------------------------------------------------------------- -----------
FAZER ENCHANTED SPEARS:

const
SpearID = 3277 ;//make sure its the right id of regular spear.
ManaNeed= 650;
SpellName='Exeta Con';
procedure CastSpell(Spell: string);
begin
UpdateWorld;
for x := 0 to Self.Containers.Count - 1 do
begin
for y := 0 to Self.Containers.Container[x].Count-1 do
begin
if Self.Containers.Container[x].Item[y].ID = SpearID then
begin
repeat
Self.Containers.Container[x].Item[y].MoveToBody(Self.RightHand, 1);
Sleep(1000);
UpdateWorld;
until Self.RightHand.ID = SpearID;
Self.Say(Spell);
repeat
Sleep(1000);
UpdateWorld;
until Self.RightHand.ID <> SpearID;
Self.RightHand.MoveToContainer(Self.Containers.Container[x], y, 0);
Exit;
end;
end;
end;
end;
procedure StackItems;
var
T: array of integer;
x, y, z: integer;
Temp: integer;
begin
T := VarArrayCreate([0, 19] , 3);
Temp := -1;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
for z := 0 to Self.Containers.Container[x].Count - 1 do
begin
T[z] := Self.Containers.Container[x].Item[z].ID;
end;
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if y >= Self.Containers.Container[x].Count then Break;
if Self.Containers.Container[x].Item[y].Properties.Pilable then
begin
if Self.Containers.Container[x].Item[y].Amount < 100 then
begin
for z := y + 1 to Self.Containers.Container[x].Count - 1 do
begin
if T[z] = Self.Containers.Container[x].Item[y].ID then
begin
if Self.Containers.Container[x].Item[z].Amount < 100 then
begin
Self.Containers.Container[x].Item[y].movetocontainer(Self.Containers.Container[x], z, 0);
end;
end;
end;
end;
end;
end;
end;
end;

begin
while not terminated do
begin
updateworld;
StackItems;
If (self.Mana>=ManaNeed) then
begin
repeat
Self.RightHand.MoveToBody(Self.Arrow,0);
sleep(1000);
updateworld;
until(Self.RightHand.ID=0);
CastSpell(SpellName);
sleep(1000);
updateworld;
Self.Arrow.MoveToBody(Self.RightHand,0);
end;
sleep(1000);
end;
end;
--------------------------------------------------------- ------------------------------------------------------------

Faial
Admin

Mensagens : 175
Pontos : 392
Data de inscrição : 06/01/2010
Idade : 23
Localização : Baln.camboriu

Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo

- Tópicos similares

 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum