Code: Select all
sub GrabContainer(idContainer, tType, Quanty)
if UO.Count(tType,'0x0000')<=30 then
if UO.Count('0x0E21','0x0000') > 0 then
UO.FindType('0x0E21','0x0000','backpack')
UO.MoveItem('finditem','-1',idContainer)
wait(1000)
CheckLag()
end if
UO.FindType(tType,'0x0000',idContainer)
If UO.GetQuantity('finditem')>2 then
UO.Grab(Quanty,'finditem')
wait(1000)
CheckLag()
else
return 1
Endif
End If
return 0
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(50)
until UO.InJournal('backpack')
end sub
sub ToEat(idContainer)
UO.FindType('0x097B', '0x0000', idContainer)
if UO.FindCount() > 0 then
UO.MoveItem('finditem','20','backpack')
else
return
end if
repeat
CheckLag()
uo.UseType('0x097B')
while not uo.InJournal("can't") and not uo.InJournal('full') and not uo.InJournal('stuffed') and not uo.InJournal('hungry') and not uo.InJournal('satiated') and not UO.Dead()
wait(100)
wend
until uo.InJournal('too full') or UO.Dead() or uo.InJournal("can't")
UO.FindType('0x097B', '0x0000','backpack')
if UO.FindCount() > 0 then
UO.MoveItem('finditem','20',idContainer)
end if
end sub
sub Tailor()
VAR idContainer='0x40438A41'
UO.UseObject(idContainer)
UO.CancelMenu()
UO.UnSetReceivingContainer()
UO.AutoMenu('Cloth', 'Misc.')
UO.AutoMenu('Misc.', 'body')
while GrabContainer(idContainer,'0x175D','200')==0
CheckLag()
uo.waittargettype('0x175D')
UO.UseType('0x0F9D')
while NOT UO.InJournal("You put") AND NOT UO.InJournal("fail")
wait(200)
wend
while UO.Count('0x1541','0x0000') > 0
uo.waittargettype('0x1541','0x0000')
uo.findtype('0x1541','0x0000','backpack')
while NOT UO.InJournal("You put")
wait(1000)
wend
CheckLag()
if uo.findcount()>0 then
uo.MoveItem('finditem','-1',0x404B1341)
wait(500)
end if
uo.findtype('0x1541','0x0000','backpack')
wait(200)
wend
CheckLag()
wait(2000)
wend
wend
end sub