Prywatne Forum Teamu NDK
Skrypty do NG Bota:
Re Atack
Admin napisał:
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;
Anty Para
const
minMana = 160; //Change minimum mana
while not Terminated do
begin
UpdateWorld;
if Self.Mana > minMana then
begin
if Self.Slowed then
Self.Say('exura gran');
Sleep(10);
end;
end;
Zmiana Stone Skin Amulet/Might ring
var
RingID: integer;
AmuletID: integer;
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;
begin
RingID := 3048; //item number of ring to wear or 0 to ignore rings
AmuletID := 3081; //item number of amulet to wear or 0 to ignore amulet
while not Terminated do
begin
UpdateWorld;
if RingID <> 0 then
begin
if Self.Ring.ID = 0 then
begin
Ring := GetItemFromOpenBackpack(RingID);
if Ring <> nil then
begin
Ring.MoveToBody(Self.Ring, 0);
end;
end;
end;
UpdateWorld;
if AmuletID <> 0 then
begin
if Self.Amulet.ID = 0 then
begin
Amulet := GetItemFromOpenBackpack(AmuletID);
if Amulet <> nil then
begin
Amulet.MoveToBody(Self.Amulet, 0);
end;
end;
end;
Sleep(1);
end;
end;
Offline