Yoko
http://forum.yoko.com.ua/

uo.count
http://forum.yoko.com.ua/viewtopic.php?f=20&t=15059
Page 1 of 1

Author:  Ghormoon [ 2009-08-29 00:13:24 ]
Post subject:  uo.count

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

Author:  Successful [ 2009-08-29 02:10:20 ]
Post subject: 

uo.count() search only in backpack

viewtopic.php?t=14670&highlight=getquantity

Author:  Ghormoon [ 2009-08-29 07:38:16 ]
Post subject: 

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?

Author:  Nmy [ 2009-08-29 11:30:17 ]
Post subject: 

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

Author:  Ghormoon [ 2009-08-29 13:34:43 ]
Post subject: 

yes, i understood this from the link (on second attempt :D) 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 :)

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/