Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
REFFF
szukamy tego samego ;D
Ostatnio zmieniony przez Nefra Xani : 14-02-2009, 10:49
Ostatnio zmieniony przez Master Dziadek : 14-02-2009, 21:36
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;
Ostatnio zmieniony przez felek159 : 16-02-2009, 19:00
Const
//Enter the settings for when to change to DEFENSIVE//
MonsterName = 'nazwa potwora'
weapon1_ID = xxxx
//Enter the settings for when to change to OFFENSIVE back//
Weapon2_ID = xxxx
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 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;
function GetCreatureByName(Name: string): 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].Name = Name then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;
while not terminated do
begin
UpdateWorld;
Creature := GetCreatureByName(MonsterName);
if Creature <> nil then
if Creature.Z = Self.Z then
begin
A := 0;
Self.Defensive;
Weapon := GetItemFromOpenBackpack(Weapon1_ID);
if Self.RightHand.ID <> Weapon1_ID then
if Weapon = nil then
self.DisplayText('Weapon1 wasnt found in open backpack!');
else Weapon.MoveToBody(Self.RightHand,0);
A := 1;
end;
else
begin
Self.Offensive;
if Self.RightHand.ID <> Weapon2_ID then
begin
Weapon := GetItemFromOpenBackpack(Weapon2_ID);
if Weapon <> nil then
Weapon.MoveToBody(Self.RightHand,0);
else Self.DisplayText('Weapon2 wasnt found in opened backpack!');
end;
end;
sleep(600);
end;
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;
Ostatnio zmieniony przez Poducha : 17-02-2009, 21:18
while not terminated do
begin
UpdateWorld;
for i := 0 to Self.Containers.Count - 1 do
begin
if terminated then break;
for g := 0 to Self.Containers.Container[i].Count - 1 do
begin
if terminated then break;
if Self.Containers.Container[i].Item[g].Amount = 100 then
if (Self.Containers.Container[i].Item[g].ID = 3031) or (Self.Containers.Container[i].Item[g].ID = 3035) then
Self.Containers.Container[i].Item[g].Use;
sleep(10);
end;
sleep(10);
end;
sleep(500);
end;
procedure StackItems;
var
T: array of integer;
x, y, z: integer;
Temp: integer;
begin
T := VarArrayCreate([0, 19] , 3);
Temp := -1;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
for z := 0 to Self.Containers.Container[x].Count - 1 do
begin
T[z] := Self.Containers.Container[x].Item[z].ID;
end;
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].Properties.Pilable then
begin
if Self.Containers.Container[x].Item[y].Amount < 100 then
begin
for z := y + 1 to Self.Containers.Container[x].Count - 1 do
begin
if T[z] = Self.Containers.Container[x].Item[y].ID then
begin
if Self.Containers.Container[x].Item[z].Amount < 100 then
begin
Self.Containers.Container[x].Item[y].movetocontainer(Self.Containers.Container[x], z, 0);
end;
end;
end;
end;
end;
end;
end;
end;
begin
while not Terminated do
begin
UpdateWorld;
StackItems;
Sleep(1000);
end;
end;
Ostatnio zmieniony przez Gray : 17-02-2009, 21:13
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki