Page 1 of 1
uo.count
Posted: 2009-08-29 00:13:24
by Ghormoon
Hello, I've got problem with uo.count, I can't fond how to search in some particular bag
i tried uo.count(type, bag) and uo.count(type, color, bag), but it still doesn't help
and less important thing:
Is it possible to temporarily change color of object? (like client does when you attack, but i need to have more colors on more object at time)
thanks in advance, Ghor
Posted: 2009-08-29 02:10:20
by Successful
Posted: 2009-08-29 07:38:16
by Ghormoon
I'm getting "Unknown graphics type" error on uo.count('finditem') (if there's sollution in russian, I'm not capable of reading it)
and that version with getquantity is not the right one for items without quantity, am I right?
Edit: my fault, it works
BTW and that thing with colors is possible or not?
Posted: 2009-08-29 11:30:17
by Nmy
Uo.count counts your items in your backpack and also in all bags you have.
uo.count('0x0000') type or
uo.count('0x0000','0x0000') type and color
If you want to count in particular bag you should use findtype('type','color','bag') and use uo.getquantaty('finditem') if you have many items, then you should use while operator
var count=0
uo.findtype('type','color','bag')
while uo.findcount()
count=count+uo.getquantaty('finditem')
uo.findtype('type','color','bag')
wend
this should work
Posted: 2009-08-29 13:34:43
by Ghormoon
yes, i understood this from the link (on second attempt

) and it works
I've got it bit different, simplified, so it count up to 1, but I only need to know if the item is is maing bag more times (find, move, ingore, count again) but i had problem when it was in sub-bag, this was only solution
