• 01-04.05.2026 - DOUBLE EXP / SKILL EVENT!

- TibiaBot NG [NG] Skrypt na zak?adanie small stone.

Status
Zamknięty.

Leyr

Active User
Zarejestrowany
Dołączył
Lipiec 1, 2010
Posty
106
Liczba reakcji
9
Witam.
Poszukuje skryptu na zak?adanie small stone. Chodzi mi o to, ?e jak boce na goblinach i lootnie small stone to posta? zak?ada je.
 
Odp: [NG] Skrypt na zak?adanie small stone.

PHP:
Const
  NumberOfMonsters = 3 /// Number of monsters to change weapon
  StrongWeapon = 3324 /// ID of your strong weapon
  WearWeapon = 3304 /// ID of your skill weapon

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;


function CountMonstersBesideYou:Integer;
begin
  Result := 0;
  UpdateWorld;
  for i := 0 to creatures.Count -1 do
  begin
    if i >= Creatures.Count then break
    for x := -1 to 1 do
    begin
      if x >= 2 then break
      for y := -1 to 1 do
      begin
        if y > 1 then break;
        if Creatures.Creature[i].NPC then
        if (Creatures.Creature[i].x = Self.X +x) and (Creatures.Creature[i].y = Self.y + y) and (Creatures.Creature[i].Z = Self.Z) then
        Result := Result + 1;
      end;
    end;
  end;
end;

while not terminated do
begin
  UpdateWorld;
  if CountMonstersBesideYou >= NumberOfMonsters then
   begin
    if Self.RightHand.ID  <> StrongWeapon then
    begin
      Boots := GetItemFromOpenBackpack(StrongWeapon);
      if Boots <> nil then
      Boots.MoveToBody(Self.RightHand,0);
      else Self.Displaytext('Strong Weapon werent found in open backpack!');
    end;
  end;
  if CountMonstersBesideYou < NumberOfMonsters then
  begin
    if Self.RightHand.ID <> WearWeapon then
    begin
      Boots := GetItemFromOpenBackpack(WearWeapon);
      if Boots <> nil then
      Boots.MoveToBody(Self.RightHand,0);
      else Self.Displaytext('Wear Weapon werent found in open backpack!');
    end;
  end;
  End;


Kod:
NumberOfMonsters = 3 /// Number of monsters to change weapon
DO ILU POTWOR?W ATAKUJ?CYCH NAS BOT B?DZIE U?YWA? S?ABSZEJ BRONI

Kod:
StrongWeapon = 3324 /// ID lepszej broni.

Kod:
WearWeapon = 3304 /// ID s?abszej broni.

Troch? oszukamy bota, zr?b tak. Tam gdzie masz id lepszej broni wklej small stone, tam gdzie masz id s?abszej broni zr?b to samo. A tam do ilu potwor?w to zr?b do 1.
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry