Page 1 of 1

Checking corpses

Posted: 2005-07-08 04:14:27
by ozcaN
Could anyone help me make a script to check bags in corpses to make sure they have 1 item or greater. I was wonderin if it is possible. Casue im sick of lootin empty bags.

Posted: 2005-07-08 07:12:55
by Beyonder
The pnly way to do it is to trigger the line that appears after requesting the name of the bag. It is "Bag (# items)". So we'll just request the name and see if it is "0 items".

Code: Select all

sub IsEmptyBag(BagID)
  DeleteJournal('items)')
  UO.Click(BagID)
  while not UO.InJournal('items)')
    wait(100)
  wend
  if UO.InJournal('(0 items)') then
    return true
  else
    return false
  end if
end sub