не выставлены типы и прочее, ну и наверняка есть парочка ошибок.
Code:
sub smelt()
var id_container = '0x4022CF83', t_bag = '0x0E76', t_dagger = '0x0F51', id_forge = '0x402BC500', t_ingots = '0x1BEF', id_bag
uo.useobject(id_container)
while true
uo.findtype(t_bag, -1, id_container)
if uo.findcount() then
id_bag = uo.getserial('finditem')
uo.useobject(id_bag)
wait(500)
uo.findtype(t_dagger, -1, id_bag)
if uo.findcount() then
checklag()
uo.moveitem(id_bag, -1, 'backpack')
wait(1000)
repeat
uo.findtype(t_dagger, -1, id_bag)
if uo.findcount() then
uo.moveitem('finditem', -1, 'backpack')
uo.waittargetobject('finditem')
uo.useobject(id_forge)
wait(200)
endif
until not uo.findcount()
checklag()
uo.moveitem(id_bag, -1, id_container)
wait(1000)
uo.ignore(id_bag)
uo.findtype(t_ingots, -1, 'backpack')
if uo.findcount() then
uo.moveitem('finditem', -1, id_container)
wait(1000)
endif
else
uo.ignore(id_bag)
endif
else
return
endif
wend
endsub
Sub checklag()
var msg = 'ackpack'
deljournal(msg)
uo.click('backpack')
repeat
wait(100)
until uo.injournal(msg)
endsub
Sub deljournal(msg)
while uo.injournal(msg)
uo.setjournalline(uo.injournal(msg) - 1, '')
wend
endsub