jan162
Active User
- Dołączył
- Czerwiec 25, 2008
- Posty
- 54
- Liczba reakcji
- 0
Jak ustawic na Ring of Healing (id: 3100) z backpacka (id:2854)
Const
Ring_ID = 3049
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;
while not terminated do
begin
UpdateWorld;
if Self.Ring.ID = 0 then
begin
Ring := GetItemFromOpenBackpack(Ring_ID);
if Ring <> nil then
Ring.MoveToBody(Self.Ring,0);
else Self.Displaytext('The wanted ring wasnt found in backpack!');
end;
sleep(100);
end;