Spear da Backpack para Mão

Voltamos com mais algumas script's de TibiaBot NG


Const
SmallStoneID = 3277
BackupWeaponID = 1781

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;

begin
while not Terminated do
begin
UpdateWorld;
if Self.LeftHand.ID <> SmallStoneID then
begin
Weapon := GetItemFromOpenBackpack(SmallStoneID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
else
begin
if Self.LeftHand.ID <> BackupWeaponID then
begin
Weapon := GetItemFromOpenBackpack(BackupWeaponID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
end;
Self.DisplayText('Spears not found')
end;
end;
Sleep(500);
end;
end;

Reações:

0 comentários: