_bagSending = 0
if Weight() <= MaxWeight(): # if we're at max weight or over
# find bags
if FindTypesArrayEx([0x0E76], [0xFFFF], [Backpack()], True):
_bags = GetFindedList()
for _bag in _bags:
# make sure they are bags of sending
if 'sending' in GetTooltip(_bag).split('|')[0]:
AddToSystemJournal("Found bag of sending...")
_bagSending = _bag
else:
AddToSystemJournal("No bags found...")
exit() # no bags at all found
# if we made it this far, we have our bag of sending, now look for gold
if FindTypeEx(0x0EED, 0xFFFF, Backpack(), True):
_gold = GetFoundList()
UseObject(_bagSending)
Wait(1500)
WaitTargetObject(_gold[0])
else:
AddToSystemJournal("Can't find gold...")