Page 1 of 1

problem detecting target present or not

Posted: 2005-08-15 11:58:21
by Redneck
i made this script to send money during champions using the bag of sending.
My problem is when the bag of sending runs out of charges.
How can i detect this? when the bag is out of charges, using it doesn't shows up the target, so how can i detect this?

Code: Select all

sub checkweight()
var weightmax=uo.str*3.5 # real max is 40+(uo.str*3.5)
if UO.weight >= weightmax then
      uo.print('MAX weight reached, sending money')
      uo.findtype('POF','-1','backpack')
      uo.waittargetobject('finditem')
      uo.useobject('bagsending')
endif
endsub