Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var amount = 25 ;кол-во материала для изготовления 1 вещи (maksimalno)
- var material = '0x1bdd'
- var tool = '0x1035'
- var k = 0
- var jn
- var returnn
- sub main()
- while not uo.dead()
- uo.DeleteJournal()
- if uo.Count(material) > amount then
- CheckLag()
- cancelMT()
- uo.waitmenu('Choose a category.','Misc','Choose an item','Recall Rune')
- uo.waittargettype(material)
- wait(500)
- uo.usetype(tool)
- wait(500)
- k=0
- while NOT UO.InJournal('You make') and NOT UO.InJournal('You create') AND NOT UO.InJournal('fail') AND NOT UO.InJournal('destroy') AND ( k < 30 )
- k = k + 1
- CheckLag()
- wait(500)
- wend
- wait(1000)
- eat() ;kushaem esli nado
- else
- CheckLag()
- cancelMT()
- grabim:
- returnn = findGroundMaterial('0x1bdd')
- if returnn==1 then
- uo.unsetreceivingcontainer()
- uo.grab(1000,'finditem')
- wait(1000)
- else
- repeat
- UO.Say('Material konchilsya, podloji')
- wait(10000)
- until returnn<>1
- goto grabim
- endif
- endif
- wend
- end sub
- sub findGroundMaterial(obj)
- uo.set('finddistance',2)
- uo.findtype(obj,-1,'ground')
- if uo.FindCount() then
- return 1
- else
- return 0
- end if
- end sub
- Sub cancelMT()
- uo.cancelmenu()
- wait(200)
- if uo.Waiting() then
- uo.Canceltarget()
- wait(500)
- end if
- end sub
- Sub eat()
- if UO.Count('0x097b')>0 then
- UO.usetype ('0x097b')
- wait(500)
- end if
- if UO.Count('0x09f2')>0 then
- UO.usetype ('0x09f2')
- Wait(500)
- end if
- if UO.Count('0x09f2')==0 and UO.Count('0x097b')==0 then
- UO.Print('Еда закончилась')
- end if
- end sub
- Sub CheckLag()
- repeat
- UO.Click('backpack')
- until backpack()==1
- end sub
- Sub backpack()
- var n
- for n=0 to 100
- if uo.injournal('Backpack') then
- jn = uo.injournal('Backpack')
- uo.SetJournalLine(jn,'')
- return 1
- else
- wait(500)
- endif
- if uo.injournal('backpack') then
- jn = uo.injournal('backpack')
- uo.SetJournalLine(jn,'')
- return 1
- else
- wait(500)
- endif
- ws()
- next
- return 0
- endsub
- Sub ws()
- if uo.journal(0)=='Saving World State' then
- repeat
- wait(1000)
- until uo.journal(0)<>'Saving World State complete.'
- endif
- endsub
- Sub dropItem(obj)
- if uo.Waiting() then
- uo.Canceltarget()
- wait(500)
- end if
- if uo.Count(obj) then
- uo.waittargettype(obj)
- wait(500)
- uo.say('.drop')
- wait(500)
- endif
- endsub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement