но там нет ошибки! че за нах такой?
Code:
sub main()
var incont='0x45624AB1'
dim maxi[2]
maxi[0]=30
maxi[1]=300
dim items[5]
items[0]='0x0DF9' #cotton
items[1]='0x0FA0' #spool of threads
items[2]='0x0F95' #bolts of cloth
items[3]='0x40FFFA11' #прялка
items[4]='0x4A772217" #моталка
while not uo.dead()
if uo.count (items[0]) < maxi[0] then
pick(items[0],uo.count(items[0])-maxi[0],incont)
end if
while uo.count (items[0]) > 0
uo.exec ("waittargetobject " + items[3])
uo.exec("usetype " + items[0])
wait(1000)
wend
wait(2000)
while uo.count (items[1]) > 0
uo.exec ("waittargetobject " + items[4])
uo.exec ("usetype " + items[1])
wait (500)
wend
wait (2000)
while uo.count (items[2]) > 0
uo.findtype( items[2], -1, incont)
uo.moveitem ('finditem' , -1, incont)
wait (2000)
wend
wend
end sub
sub pick(obj, amount, cont)
uo.findtype (obj, -1, cont)
uo.grab (STR(amount),'finditem')
end sub