Page 1 of 1
Loop through all items in a container
Posted: 2007-06-25 06:42:55
by Evil Pigeon
Say i have a chest full of items of different types, is there a way i can loop through all items in the container? This would be useful if say i had lots of magic items, I could id each one without explicitly knowing the type. For lots of items that are the same type, this is easy with UO.FindType() and UO.Ignore()
Posted: 2007-06-25 10:27:40
by Evil Pigeon
it's ok i found out how to do it, you just specify 0 for the type, for example:
sub main()
var item
UO.AddObject('container')
While UO.Targeting()
Wait(500)
Wend
UO.Findtype(0, 0, 'container')
item = UO.GetSerial('finditem')
UO.Print(item)
end sub
Posted: 2007-06-28 09:35:12
by Mihail
it is more right use
Code: Select all
uo.findtype(-1,-1,"0x00000") ; 0x000000 - ID of container