Page 1 of 1

COUNT items in a corpose

Posted: 2004-11-03 20:48:38
by creaturez
I was trying to count how many Bows were in a corpose but with

number=UO.FindType('robe',-1,'corpose')

i get the number of the nearest corposes only.

What's the right function?

grazie
ciaociao andre

Posted: 2004-11-03 20:50:07
by drcrazy
Maybe uo.GetQuantity ??

Posted: 2004-11-03 21:04:37
by creaturez
thanks drcrasy

Posted: 2004-11-03 23:00:16
by AGRS

Code: Select all

UO.IgnoreReset()
Repeat
  UO.FindType(Type, Color, Cont)
  If UO.FindCount()>0 Then
    DoSomeThingWithObject('finditem')
    UO.Ignore('finditem')
  EndIf
Until UO.FindCount()<2
UO.IgnoreReset()

Posted: 2004-11-04 10:30:25
by Yoko
AGRS wrote:

Code: Select all

UO.IgnoreReset()
Repeat
  UO.FindType(Type, Color, Cont)
  If UO.FindCount()>0 Then
    DoSomeThingWithObject('finditem')
    UO.Ignore('finditem')
  EndIf
Until UO.FindCount()<2
UO.IgnoreReset()


i mostly use a bit different variant

Code: Select all

UO.IgnoreReset()
  UO.FindType(Type, Color, Cont)
  while UO.FindCount()
    DoSomeThingWithObject('finditem')
    UO.Ignore('finditem')
    UO.FindType(Type, Color, Cont)
  wend
UO.IgnoreReset()

but of course it's kind of personal taste

Posted: 2004-11-04 11:01:32
by drcrazy
creaturez wrote:thanks drcrasy


U welcome