Code
sub Torch()
var Logs='0x1BDD'
var Chest='0x4005A3A6'
var dagger='0x0F51'
var Torch='0x0F64'
var Exit=0, LastTimer, IDiz
while not uo.Dead()
ToHide()
Open(Chest)
uo.DeleteJournal()
uo.FindType(Logs,-1,'backpack')
if uo.GetQuantity('finditem')<1 then
uo.FindType(Logs,-1,Chest)
if uo.GetQuantity('finditem')==0 then
uo.Exec('terminate Torch')
end if
uo.Unsetreceivingcontainer()
wait(1000)
uo.Grab('50','finditem')
wait(1000)
end if
uo.findtype(Logs,-1,Chest)
uo.Print('Всего логов в сундуке: '+str(uo.Getquantity('finditem')))
uo.WaitTargetType(Logs)
CheckLag()
uo.UseType(dagger)
uo.WaitMenu('What do','Items','Items','torch')
uo.DeleteJournal()
while not uo.InJournal('You put') and not uo.InJournal('You fail to') and not uo.InJournal('Targeting')
wait(1000)
wend
if uo.InJournal('You fail to') and not uo.InJournal('Targeting') then
uo.WaitTargetType(Logs)
uo.UseType(dagger)
uo.WaitMenu('What do','Items','Items','torch')
uo.DeleteJournal()
while not uo.InJournal('You put') and not uo.InJournal('You fail to') and not uo.InJournal('Targeting')
wait(1000)
wend
end if
if uo.Count(Torch)>50 then
Drag(IDiz,Torch)
end if
wend
end sub
sub Open(Container)
uo.DeleteJournal()
uo.UseObject(Container)
repeat
wait(500)
until uo.InJournal('Contains')
end sub
sub ToHide()
while not uo.Hidden()
uo.Useskill('Hiding')
wait(4000)
wend
end sub
sub Drag(Chest,Torch)
CheckLag()
while uo.Count(Torch)>0
CheckLag()
uo.FindType(Torch,-1,'backpack')
wait(200)
uo.MoveItem('finditem','400',Chest)
wait(500)
wend
end sub
sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(200)
until uo.InJournal('backpack')
end sub