Kozaq
Advanced User
- Joined
- May 24, 2008
- Messages
- 399
- Reaction score
- 40
A wiec tak dam kilka przydatnych skryptow do Bota Ng
1.Auto stone skine amulet, gdy tylko skonczy sie Ston to zaklada ci automatycznie nowy
@Edit
Gdy nie masz spearow Bot daje loga
@2xdown
Tak skrypt dziala na real
Pzdr.
Kozaq
//Przenosz? do odpowiedniego dzia?u.
1.Auto stone skine amulet, gdy tylko skonczy sie Ston to zaklada ci automatycznie nowy
2.Small stones z bp do lewej rekivar
Item: TItem;
function GetItemFromOpenBackpack(ID: 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;
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;
while not Terminated do
begin
UpdateWorld;
if Self.Amulet.ID = 0 then
begin
Item := GetItemFromOpenBackpack(3081);
if Item <> nil then
Item.MoveToBody(Self.Amulet, 0);
else
begin
Item := GetItemFromOpenBackpack(3057);
if Item <> nil then
Item.MoveToBody(Self.Amulet, 0);
end;
end;
Sleep(100);
end;
3.Auto obs. knife, automatycznie zdziera skore z monsteraConst
SmallID = 1781
SmallAmount = 5
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;
4.Wyrzucanie pustych vialiconst
obsidian_knife = 5908;
skin_body = [4011, 4047, 4052, 4057];
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;
function SkinBodies(id:integer): Boolean;
var
x, y: integer;
knife: TItem;
t: integer;
begin
UpdateWorld;
knife := GetItemFromOpenBackpack(obsidian_knife);
if knife = nil then
begin
Self.DisplayText('An Obsidian Knife could not be found, please open a container with it.');
exit;
end;
t := -1;
for x := -1 to 1 do begin
for y := -1 to 1 do begin
// if Screen.Tile[7+x, 5+y].Count >= 3 then begin
// t := -2
// end else t := -1;
if searchIntArray(Screen.Tile[7+x, 5+y].Item[Screen.Tile[7+x, 5+y].Count+t].ID) = true then begin
UpdateWorld;
knife := GetItemFromOpenBackpack(obsidian_knife);
if knife <> nil then begin
knife.UseWithGround(Self.X+X, Self.Y+Y, Self.Z);
Self.DisplayText('Attempted to skin a creature with the ID ' + IntToStr(Screen.Tile[7+x, 5+y].Item[Screen.Tile[7+x, 5+y].Count-1].ID) + '.');
Sleep(100);
UpdateWorld;
end;
end;
end;
end;
end;
begin
while not terminated do begin
UpdateWorld;
SkinBodies(skin_body);
Sleep(100);
end;
end;
Btw.Skrypty nie sa moje, niektore tak, szukalem w internecie, potem dodam wiecej bo jest juz dosc poznoconst
VialID = 283 //Type the ID of the vial you want to throw
function GetItemFromOpenBackpack(ItemID, ItemType: integer): TItem;
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 = ItemID then
begin
if Self.Containers.Container[x].Item[y].Amount = ItemType then
begin
Result := Self.Containers.Container[x].Item[y];
Exit;
end;
end;
end;
end;
end;
while not Terminated do
begin
UpdateWorld;
EmptyVial := GetItemFromOpenBackpack(VialID, 0);
if EmptyVial <> nil then
begin
EmptyVial.MoveToGround(Self.X, Self.Y, Self.Z, 1);
Sleep(300);
end;
Sleep(300);
end;
@Edit
Gdy nie masz spearow Bot daje loga
________________________________while not terminated do
begin
UpdateWorld;
if Self.RightHand.ID = 0 then
Self.Logout(true);
sleep(500);
end
@2xdown
Tak skrypt dziala na real
Pzdr.
Kozaq
//Przenosz? do odpowiedniego dzia?u.
Last edited by a moderator: