Facebook
From Ungracious Cassowary, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 209
  1.          Const
  2.   Ring_ID = 3049
  3.  
  4. function GetItemFromOpenBackpack(ID: integer): TItem;
  5. var
  6.   y: integer;
  7. begin
  8.   Result := nil;
  9.   for x := 0 to Self.Containers.Count - 1 do
  10.   begin
  11.     if x >= Self.Containers.Count then Break;
  12.     for y := 0 to Self.Containers.Container[x].Count - 1 do
  13.     begin
  14.       if y >= Self.Containers.Container[x].Count then Break;
  15.       if Self.Containers.Container[x].Item[y].ID = ID then
  16.       begin
  17.         Result := Self.Containers.Container[x].Item[y];
  18.         Exit;
  19.       end;
  20.     end;
  21.   end;
  22. end;
  23.  
  24. while not terminated do
  25. begin
  26.   UpdateWorld;
  27.   if Self.Ring.ID = 0 then
  28.   begin
  29.     Ring := GetItemFromOpenBackpack(Ring_ID);
  30.     if Ring <> nil then
  31.     Ring.MoveToBody(Self.Ring,0);
  32.     else Self.Displaytext('The wanted ring wasnt found in backpack!');
  33.   end;
  34.   sleep(100);
  35. end;