What's new

Skrypty do NGBot

Status
Not open for further replies.

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
var
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;
2.Small stones z bp do lewej reki

Const
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;
3.Auto obs. knife, automatycznie zdziera skore z monstera
const
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;
4.Wyrzucanie pustych viali

const
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;
Btw.Skrypty nie sa moje, niektore tak, szukalem w internecie, potem dodam wiecej bo jest juz dosc pozno ;)
@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:

TomcioSky

Active User
Joined
Apr 4, 2008
Messages
92
Reaction score
4
Odp: Skrypty do NGBot

Te? mam par?, ale nie s? moje.
Wszystkie znalezione na

Hold Atack = polega na tym, ?e np. masz zaznaczonego GS's i jak wchodzisz do g?ry to bot dalej ma tego GS'a zaznaczonego ;)

Code:
var  
LockID:integer;  

function GetCreatureByID(ID: integer): TCreature;  
var  
  x: integer;  
begin  
  Result := nil;  
  for x := 0 to Creatures.Count - 1 do  
  begin  
    if x >= Creatures.Count then Break;  
    if Creatures.Creature[x].ID = ID then  
    begin  
      Result := Creatures.Creature[x];  
      Exit;  
    end;  
  end;  
end;  

begin  
updateworld;  
while self.attacking=0 do  
begin  
sleep(200);  
updateworld;  
end;  
LockID:=self.attacking;  
while not terminated do  
   begin  
   updateworld;  
   ProcessEvents;  
   if ((self.attacking)<>(LockID)) and ((self.attacking)<>(0))  then  
   LockID:=Self.Attacking;
   If Self.Attacking=0 then
   begin
    Creature:=GetCreatureByID(LockID); 
     If Creature<>nil then Creature.Attacking:=true;
      end;
      
   sleep(100);  
   end;  
end;

Anti paralyze skrypt ;)

Code:
const
minMana = 30;

while not Terminated do
begin
  UpdateWorld;
  if Self.Mana > minMana then
  begin
    if Self.Slowed then
    Self.Say('exura');
    end;
    Sleep(300);
  end;

Powtarzam skrypty nie s? moje, a je?li chcecie wi?cej pisa? na pw, postaram si? poszuka?. Mam jeszcze skrypta na otwieranie drzwi jak go znajd? to wrzuc? p??niej.

@EDIT

Ok znalaz?em ;p
Skrypt na otwieranie drzwi
Code:
Const   
  KeyID = 0000   
  X = 1111   
  Y = 2222   
  Z = 3333   



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 OpenDoor(X,Y,Z:integer);   
begin   
  UpdateWorld;   
  repeat   
    Tile := GetTileFromXYZ(X,Y,Z);   
    if Tile.Item[1].properties.locked    
      then Self.Containers.UseItemWithGround(KeyID,X,Y,Z);   
      else if not Tile.Item[1].properties.Walkable    
              then Tile.Item[1].Use;   
    sleep(1500);   
    UpdateWorld   
  until (terminated) or (Tile.Item[1].Walkable);   
end;
 
Last edited:

dymer1111

Advanced User
Joined
Jan 6, 2009
Messages
183
Reaction score
16
Odp: Skrypty do NGBot

a skrypt na otwieranie drzwi na rl dzia?a?xD
 

Sasuki

Banned
Joined
Mar 12, 2009
Messages
196
Reaction score
12
Odp: Skrypty do NGBot

Ja tam preferuj? Blackd ale ng te? mam na 2 kompach :D i na 1 przydaje mi si? do wara.
 

Sasqaczas

Active User
Joined
Jan 20, 2009
Messages
53
Reaction score
0
Odp: Skrypty do NGBot

owszem black proxy jest praktycznie najlepszym botem lecz nie da sie go scrakowa? ;]
fajne scripty napewno mi si? przydadz? ;) a i ja zapraszam na moj temacik scripty do ng ;)
 
Last edited:

remail

New User
Joined
Mar 10, 2009
Messages
0
Reaction score
0
Odp: Skrypty do NGBot

Elo, ja pisze z takim problemem ze latam sobie po scaabach na ank i moje pytanie wi?ze sie z tym czy istnieje skrypt na to zeby moj har nie chodzil po poisonach. Jesli macie cos takiego porosze o wstawke bede bardzo wdzieczny. Dziekoje i pozdrawiam
 
Status
Not open for further replies.
Top