jabol123 |
Wysłany: Czw 21:14, 05 Mar 2009 Temat postu: Wyrzucanie Pustych Viali |
|
Wyrzucanie Pustych Viali
Kod: |
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;
|
|
|