Yoko

All sides of Injection
It is currently 2025-10-18 01:42:33

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: uo.count
PostPosted: 2009-08-29 00:13:24 
Offline

Joined: 2009-08-29 00:10:09
Posts: 3
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


Top
   
 Post subject:
PostPosted: 2009-08-29 02:10:20 
Offline

Joined: 2008-12-13 00:00:15
Posts: 174
uo.count() search only in backpack

viewtopic.php?t=14670&highlight=getquantity


Top
   
 Post subject:
PostPosted: 2009-08-29 07:38:16 
Offline

Joined: 2009-08-29 00:10:09
Posts: 3
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?


Top
   
 Post subject:
PostPosted: 2009-08-29 11:30:17 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
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

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2009-08-29 13:34:43 
Offline

Joined: 2009-08-29 00:10:09
Posts: 3
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 :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited