Если плавишь с пака то вот так:
var sund = '0x40B08251' можно сменить на var sund = 'ground' тогда будет брать с земли.
GET(ore, '0x0000', sund, 2, 2) ; вместо 0x0000 вставляешь нужный цвет либо -1 тогда плавить будет любую. Последняя цифра 2 - сколько забирать руды для плавки.
Code:
var ItemM, timemove
sub Smelt()
var sund = '0x40B08251'
var forge = '0x1996'
VAR Ing = '0x1BEF'
VAR ore = '0x19B9'
VAR ore2 = '0x19BA'
VAR ore3 = '0x19B8'
uo.Set('finddistance', 3)
while 1
GET(ore, '0x0000', sund, 2, 2)
UO.DeleteJournal()
If UO.Count( ore ) Then
uo.waittargettype(ore)
endif
If UO.Count( ore2 ) Then
uo.waittargettype(ore2)
endif
If UO.Count( ore3 ) Then
uo.waittargettype(ore3)
endif
UO.UseFromGround(forge)
while not UO.InJournal('smelt|put|is consumed|fire is not|see the target')
wait(100)
wend
PUT(Ing, sund)
wend
end sub
Sub GET(item, col, cont, min, max)
If UO.Count( item, col ) < min Then
UO.FindType( item, col, cont )
if UO.FindCount() > 0 Then
itemM=UO.GetSerial('finditem')
timemove=UO.Timer()
while UO.ContainerOf( UO.GetSerial('finditem') )==cont && timemove+20>UO.Timer()
uo.moveitem('finditem', max, 'backpack')
wait(100)
wend
else
UO.CancelMenu()
MyTerminate()
endif
Endif
end sub
Sub PUT(item, cont)
while UO.Count( item ) > 0
UO.FindType( item, -1, -1 )
itemM=UO.GetSerial('finditem')
timemove=UO.Timer()
UO.MoveItem( 'finditem', 0, cont )
while UO.ContainerOf(itemM)=='my' && timemove+20>UO.Timer()
wait(100)
wend
wend
end sub
Sub MyTerminate()
UO.Set('quiet','1')
UO.CancelMenu()
UO.IgnoreReset()
UO.Set('quiet','0')
UO.Exec('terminate all')
end sub