Loop through all items in a container

Ask for help

Moderators: Murderator+, Murderator

Post Reply
Evil Pigeon
Posts: 2
Joined: 2004-07-13 07:43:11

Loop through all items in a container

Post 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()
Evil Pigeon
Posts: 2
Joined: 2004-07-13 07:43:11

Post 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
Mihail
Expert!
Posts: 548
Joined: 2005-05-20 20:30:10
Contact:

Post by Mihail »

it is more right use

Code: Select all

uo.findtype(-1,-1,"0x00000") ; 0x000000 - ID of container
Post Reply