What's new

- TibiaBot NG Skrypt na otwieranie i takie tam

Status
Not open for further replies.

robert891

Active User
Joined
Apr 21, 2009
Messages
121
Reaction score
0
Witam mam tibia bot ng i nie otwiera potworkow idk. potrzebuje skrypta by otwieral to co zabija. nie otwiera chyba bo to ots dragon ball
Drugi skrypt ma polegac na uzyciu id 3200 co 30s
#3 ma polegac na uzyciu innego id jako heal
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
co tu moze nie kminic?


////////// Cave Hunting //////////
Const

Loot_Items = [0000]
Loot = 1

//////////////////////////////////



Var
Looting: Boolean



Function GetTileFromXYZ(X, Y, Z: integer): TTile;
begin
Result := nil;
if abs((Self.X - 7) - X) > 14 then Exit;
if abs((Self.Y - 5) - Y) > 11 then Exit;
if Self.Z <> Z then Exit;
Result := Screen.Tile[abs((Self.X - 7) - X), abs((Self.Y - 5) - Y)];
end;

Procedure Event_ItemCreated(ID, X, Y, Z: integer);
Var
i: Integer
Tile: TTile;
begin
if not Loot then Exit;
Tile := GetTileFromXYZ(X, Y, Z);
for i := 0 to Tile.Count-1 do
begin
if i >= Tile.Count then Break;
if Tile.Item.ID = ID then
begin
if Tile.Item.Properties.Container then Tile.Item.OpenInNewWindow;
Exit;
end;
end;
end;


Procedure Event_ContainerOpened(Index, ID: integer; Name: String);
begin
if not Loot then Exit;
Looting := True;
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;


Procedure EatFood;
Const
FoodList = [3595,3577,3578,3579,3582,3583,3584,3600,3584,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3598,3599,3601
,3602,3607,3725]
Var
i: Integer
begin
for i := Low(FoodList) to High(FoodList) do
begin
Food := GetItemFromOpenBackpack(FoodList, Self.Containers.Count);
if Food <> nil then
begin
Food.Use;
break;
end;
end;
end;

function OpenBags: Boolean;
var
x: integer;
y: integer;
begin
Result := False;
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 = 2853 then
begin
Self.Containers.Container[x].Item[y].Open;
Result := True;
end;
end;
end;
end;

Function SortLoot: Boolean;
var
Item: TItem
begin
Result := False
for x := Low(Loot_Items) to High(Loot_Items) do
begin
if x > High(Loot_Items) then break;
Item := GetItemFromOpenBackpack(Loot_Items[x], x);
If Item <> nil then
begin
Item.MoveToContainer(Self.Containers.Container[X], 0, 0);
Result := True;
Exit;
end;
end;
end;


begin
Looting := False
while not Terminated do
begin
ProcessEvents;
UpdateWorld;

if Looting then
begin
Looting := SortLoot;
if not Looting then
begin
EatFood;
if OpenBags then Looting := SortLoot;
end;
end;

Sleep(100);
end;
end;
 
Status
Not open for further replies.
Top