Code:
sub main()
var idSunduk='...'
UO.CancelMenu()
UO.AutoMenu('Legwear','long pants')
UO.AutoMenu('Cloth','Legwear')
while UO.Count('0x175D')>10
UO.DeleteJournal()
UO.WaitTargetType('0x175D')
UO.UseType('0x0F9D')
while NOT UO.InJournal("You put") AND NOT UO.InJournal("Tailoring failed")
wait(50)
wend
UO.WaitTargetType('0x1539')
UO.UseType('0x0F9E')
wait(2000)
UO.FindType('XxXXXX','-1','backpack')
if UO.GetQuntity('finditem') > 0 then
UO.MoveItem('finditem','-1',idSunduk)
end if
wend
UO.CancelMenu()
end sub