Troca gold para platinum em OT server.

procedure StackItems;
var
T: array of integer;
x, y, z: integer;
Temp: integer;
begin
UpdateWorld;
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;

while not Terminated do
begin
UpdateWorld;
StackItems;
for x := 0 to Self.Containers.Count - 1 do
begin
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if Self.Containers.Container[x].Item[y].ID = 3031 then // ID do GOLD
begin
if Self.Containers.Container[x].Item[y].Amount = 100 then
begin
Self.Containers.Container[x].Item[y].Use;
Break;
end;
end;
end;
end;
Sleep(1000);
end;

Pesquisar no site

By Chuck Norriz © 2009 Todos os direitos reservados.