Alert When No Bag or Backpack on Screen
Const
  BagID = 1
  AlertFrom = 'C:/Windows/Media/Notify.wav' //must be wav file.

Function IsItemOnScreen(ID:integer):boolean;
begin
  Result := false;
  for x := 0 to 14 do
  begin
    if x > 14 then break;
    for y := 0 to 10 do
    begin
      if y > 10 then break;
      for i := 0 to Screen.Tile[x,y].count - 1 do
      begin
        if i >= Screen.Tile[X,Y].Coutn then break;
        if Screen.Tile[x,y].Item[i].ID = ID then
        begin
          Result := true;
          exit;
        end;
      end;
    end;
  end;
end;

while not terminated do
begin
  UpdateWorld;
  if not IsItemOnScreen(BagID) then
  PlaySound(AlertFrom);
  sleep(400);
end;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License