VAR Reg='0x0F88'
VAR Keg='0x1940'
VAR Potion='0x0F0A'
VAR MyBag='0x40FBDF34'
VAR RecCont='0x4002B8C0'
VAR ResCont='0x4002A79D'
VAR KegCont='0x40BECD05'
Sub Main()
VAR y
While NOT UO.Dead()
UO.Print('Find Reg')
CheckLag()
UO.FindType(Reg,'-1','my')
If UO.GetQuantity('finditem') < 50 Then
Load()
EndIf
UO.Print('Find Potion')
CheckLag()
UO.FindType(Potion,'-1','-1')
y = UO.FindCount('finditem')
UO.Print('Potion is '+str(y)+'')
If UO.FindCount('finditem') > 50 Then
Takekeg()
Fill()
EndIf
Wait(1000)
Eat()
CheckLag()
Alch()
Wend
End Sub
Sub Load()
CheckLag()
UO.UnSetReceivingContainer()
UO.FindType (Reg,'-1',ResCont)
UO.Grab('100','finditem')
Wait(1000)
End Sub
Sub Unload()
CheckLag()
UO.SetReceivingContainer(RecCont)
UO.FindType(Keg,'-1','my')
UO.Grab('0','finditem')
UO.Exec('Terminate Unload')
End Sub
Sub Eat()
UO.UseType('0x097B')
wait (100)
UO.Useskill('Spirit Speak')
wait (1000)
End Sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
Repeat
Wait(100)
Until UO.InJournal('backpack')
End Sub
Sub Alch()
UO.Exec("automenu 'What sort' 'Greater Poison (4 N'")
Wait(1000)
UO.DeleteJournal()
UO.UseType(Reg)
While NOT (UO.InJournal("toss the failed") or UO.InJournal("You put") or UO.InJournal("pack"))
Wait(1000)
Wend
End Sub
Sub Fill()
UO.WaitTargetType(Potion)
UO.UseType(Keg)
Wait (2000)
CheckLag()
UO.WaitTargetObject(MyBag)
UO.UseType (keg)
Wait (3000)
Unload()
End Sub
sub TakeKeg()
UO.Print('Take keg')
CheckLag()
UO.UnSetReceivingContainer()
UO.FindType(Keg,'-1',KegCont)
UO.Grab('1','finditem')
Wait (1000)
End Sub
раньше работало нормально а потом чтото стало нетак
