Подкорректируйте скрипт на обработку хлопка плиз
Posted: 2005-09-13 13:39:56
скрипт должен просить указать прялку, сундук - из которого брать хлопок и в который складывать нитки, на практики же скрипт просто берет по 20 хлопка из сундука и перетаскивает в пак независимо от всего остального..
Code: Select all
sub cotton()
uo.print('#Select Spinning Wheel')
uo.exec('addobject SpinningWheel')
while uo.targeting()
wait(100)
wend
uo.print('#Select Container(with cotton)')
uo.exec('addobject Cont')
while uo.targeting()
wait(100)
wend
repeat
uo.findtype('0x0DF9',-1,'my') #ищем хлопок в паке
if uo.findcount() and uo.getquantity()>1 then
uo.waittargetobject('SpinningWheel')
uo.usetype('finditem')
wait(150)
else
wait(1000)
uo.findtype('0x0DF9',-1,'Cont')
uo.unsetreceivingcontainer()
wait(1000)
uo.grab('20','finditem')
wait(1500)
uo.print('20 cotton')
end if
uo.findtype('0x0FA0',-1,'my') #ищем нитки в паке
if uo.findcount() and uo.getquantity()>95 then
uo.setreceivingcontainer('Cont')
wait(1000)
uo.grab('0','finditem')
wait(1500)
uo.print('clear(spool)')
uo.unsetreceivingcontainer()
end if
until uo.dead()
end sub