Page 1 of 1

uo.gettype('object')

Posted: 2009-03-14 10:46:14
by xinxilas
Is there any comand that i can getthe type of an object?? to use like that:

sub massm()
uo.exec('set quiet 0')
uo.print('Choose the container where are the itens:')
uo.exec('set quiet 1')
UO.AddObject('CONTAINER1')
While UO.Targeting()
Wait(100)
Wend
uo.exec('set quiet 0')
uo.print('Choose the container to put the itens:')
uo.exec('set quiet 1')
UO.AddObject('CONTAINER2')
While UO.Targeting()
Wait(100)
Wend
uo.exec('set quiet 0')
uo.print('Choose the item type:')
uo.exec('set quiet 1')
UO.AddObject('ITEM')
While UO.Targeting()
Wait(100)
Wend
uo.exec('set quiet 0')
while uo.count( STR( uo.gettype('ITEM') ) ) >= 1
UO.FindType(STR( uo.gettype('ITEM') ),'-1','CONTAINER1')
uo.moveitem('finditem', '0', 'CONTAINER2')
wait(1600)
wend
end sub

Or another solution for that...
An way to choose via target the item type that will be moved

Posted: 2009-03-14 10:48:37
by Destruction
uo.getgraphic()

Code: Select all

while uo.count( uo.getgraphic('ITEM') ) >= 1

Code: Select all

UO.FindType(uo.getgraphic('ITEM'),'-1','CONTAINER1')

Posted: 2009-03-14 11:15:34
by xinxilas
Is there any way to get his countainer id?

like: uo.getcontainer('ITEM')

Cuz if exists an way to do that i can remove this:

Code: Select all

uo.exec('set quiet 0') 
uo.print('Choose the container where are the itens:')
uo.exec('set quiet 1')
UO.AddObject('CONTAINER1')
While UO.Targeting()
Wait(100)
Wend


and thank you again :)

EDIT:

How can i count how much item types are in some container?

Posted: 2009-03-14 13:15:36
by Destruction
containerOf