Пожалуйста помогите
Posted: 2004-06-25 18:56:03
проблема такая немешает химию как я понял он не находит что мешять
и вот что пишет при проверке
Automenu added.Waiting for choise
0:[What sort] => [Explosion 5S]
No item found
а вот и сам скрипт
VAR Reg='0x0F8Ñ'
VAR Keg='0x1940'
VAR Potion='0x0F0D'
VAR MyBag='0x40FBDF34'
VAR RecCont='0x4002B8C0'
VAR ResCont='0x40BECD05'
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' 'Explosion (5 S'")
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
и вот что пишет при проверке
Automenu added.Waiting for choise
0:[What sort] => [Explosion 5S]
No item found
а вот и сам скрипт
VAR Reg='0x0F8Ñ'
VAR Keg='0x1940'
VAR Potion='0x0F0D'
VAR MyBag='0x40FBDF34'
VAR RecCont='0x4002B8C0'
VAR ResCont='0x40BECD05'
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' 'Explosion (5 S'")
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