Code: sub BlackSmithing()
var Sunduk=0x404425AB #Where are ingots and empty bags var Sunduk2=0x40C42AC9 #Where to put bags with 50 daggers var ingot=0x1BEF #Type of ingot. var dagger=0x0F51 #Type of item wich was created var bag=0x0E76 #Type of a bag where to put created items var food=0x097B #Type of food var msg1='Вы положили' #Msg 'You put' var msg2='не' #Msg 'You fail'
var i,k var container
repeat uo.UseObject(Sunduk) wait(500) uo.UseObject(Sunduk2) wait(500) uo.FIndType(bag,'-1',Sunduk) if uo.FindCount() then uo.moveitem('finditem') container=uo.GetSerial('finditem') wait(250) end if
i=0 repeat uo.FindType(ingot,'-1','backpack') if not uo.FindCount() || uo.GetQuantity('finditem')<50 then uo.FindType(ingot,'-1',Sunduk) if uo.FindCount() && uo.GetQuantity('finditem') > 100 then uo.moveitem('finditem','200') wait(1000) end if end if uo.DeleteJournal() k=0 uo.WaitTargetType(ingot) uo.WaitMenu('Black','Weapon','Weapon','Fenc','Fenc','Dagger') uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand'))) wait(500) repeat wait(100) k=k+1 until uo.InJournal(msg1) || uo.InJournal(msg2) || k>100 if uo.InJournal(msg1) then uo.FindType(dagger,'-1','backpack') if uo.FindCount() then uo.moveitem('finditem','all',container) wait(1000) end if uo.Click(container) wait(250) if uo.InJournal('50') then uo.moveitem(container,'all',Sunduk2) wait(1000) end if end if until uo.InJournal('50') uo.FindType(food,'-1',Sunduk) if uo.FindCount() then uo.moveitem('finditem','20','backpack') wait(1000) uo.DeleteJournal() repeat uo.UseObject('finditem') wait(500) until uo.InJournal('simply') uo.FindType(food,'-1','backpack') if uo.FindCount() then uo.moveitem('finditem','all',Sunduk) wait(1000) end if end if until uo.Dead() end sub
|