What's new

- TibiaBot NG tibia bot ng potrzebuje skryptu

Status
Not open for further replies.

wacha121

User
Joined
Nov 8, 2009
Messages
37
Reaction score
0
witam potrzebowa? bym skryptu na ladowanie amunicji bo w bocie mi nie laduje bo jest zminione id power bolta bardzo dziekuje i oczekuje pomocy
 
T

Thomass

Guest
Odp: tibia bot ng potrzebuje skryptu

witam potrzebowa? bym skryptu na ladowanie amunicji bo w bocie mi nie laduje bo jest zminione id power bolta bardzo dziekuje i oczekuje pomocy

PHP:
Const
SmallID = 1781
SmallAmount = 100

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;
 
  SmallStone := GetItemFromOpenBackpack(SmallID, Self.Containers.Count);
    if SmallStone <> nil then SmallStone.MoveToContainer(Self.Containers.Container[0], 0, 0);
    if (Self.LeftHand.ID = SmallID) then
    begin
          if (Self.LeftHand.Amount < 90) then
    begin
      SmallStone := GetItemFromOpenBackpack(SmallID, Self.Containers.Count);
      if SmallStone <> nil then SmallStone.MoveToBody(Self.LeftHand, 0);
    end;
      end else begin
    SmallCount := CountItemAmountFromOpenBackpack(SmallID);
    if SmallCount >= SmallAmount then
    begin
      Self.LeftHand.MoveToBody(Self.Arrow, 0);
      Sleep(500);
      SmallStone := GetItemFromOpenBackpack(SmallID, Self.Containers.Count);
      if SmallStone <> nil then SmallStone.MoveToBody(Self.LeftHand, 0);
    end else if Self.LeftHand.ID = 0 then Self.Arrow.MoveToBody(Self.LeftHand, 0);
  end;

  Sleep(500);
end;

Tam gdzie SmallID = 1781 musisz wpisa? ID tego bolta i ?eby skrypt dzia?a? poprawnie musi by? otwarty bp z amunicj?.
 
Status
Not open for further replies.
Top