помогите с боукрафтом плизз!
Posted: 2006-06-15 18:45:55
нашел скрипт Ердреда - вроде все добавил, но при лаге скрипт повисает и ничего не делает -(( можете добавить чтото?
sub bowcraft2()
VAR Sunduk = '0x4000AC7D' ; Сериал сундука
VAR Shafts = '0x1BD4' ; Тип шафтов
VAR Feather = '0x1BD1' ; Тип перьев
VAR Arrows = '0x1BFB' ; Тип стрел
VAR Kolvo = 1 ; Брать шафтов для одного крафта
VAR k = 0, j
UO.CancelMenu()
UO.AutoMenu ('Select arrow type', 'crossbow bolt' )
While TRUE
If UO.Count( Shafts ) == 0 Then
UO.FindType( Shafts, -1, Sunduk )
If UO.FindCount() == 0 Then
UO.Print("Shafts not found, script terminated")
return
Endif
UO.Grab( Str( Kolvo ), 'finditem' )
wait(500)
while UO.Count( Shafts ) < Kolvo
wait(100)
wend
CheckLag()
Endif
If UO.Count( Feather ) == 0 Then
UO.FindType( Feather, -1, Sunduk )
If UO.FindCount() == 0 Then
UO.Print("Feather not found, script terminated")
return
Endif
UO.Grab( Str( Kolvo ), 'finditem' )
wait(500)
while UO.Count( Feather ) < Kolvo
wait(100)
wend
CheckLag()
Endif
UO.DeleteJournal()
UO.UseType( Shafts )
k = 0
while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 50 )
k = k + 1
wait(300)
wend
If UO.Count( Arrows ) > 0 then
UO.FindType( Arrows, -1, -1 )
UO.MoveItem( 'finditem', 0, Sunduk )
wait(500)
while UO.Count( Arrows ) > 0
wait(100)
wend
UO.Print( 'Arrows moved' )
Endif
Wend
end sub
#####################################################################
Sub CheckLag()
DeleteJournal( 'backpack' )
UO.Click( 'backpack' )
repeat
wait(100)
until UO.InJournal( 'backpack' )
return
end sub
#####################################################################
Sub DeleteJournal( string1 )
VAR nom = UO.InJournal( string1 )
If nom > 0 Then
UO.SetJournalLine( Nom - 1, 'string replaced' )
DeleteJournal( string1 )
Endif
endsub
#############################################################
sub bowcraft2()
VAR Sunduk = '0x4000AC7D' ; Сериал сундука
VAR Shafts = '0x1BD4' ; Тип шафтов
VAR Feather = '0x1BD1' ; Тип перьев
VAR Arrows = '0x1BFB' ; Тип стрел
VAR Kolvo = 1 ; Брать шафтов для одного крафта
VAR k = 0, j
UO.CancelMenu()
UO.AutoMenu ('Select arrow type', 'crossbow bolt' )
While TRUE
If UO.Count( Shafts ) == 0 Then
UO.FindType( Shafts, -1, Sunduk )
If UO.FindCount() == 0 Then
UO.Print("Shafts not found, script terminated")
return
Endif
UO.Grab( Str( Kolvo ), 'finditem' )
wait(500)
while UO.Count( Shafts ) < Kolvo
wait(100)
wend
CheckLag()
Endif
If UO.Count( Feather ) == 0 Then
UO.FindType( Feather, -1, Sunduk )
If UO.FindCount() == 0 Then
UO.Print("Feather not found, script terminated")
return
Endif
UO.Grab( Str( Kolvo ), 'finditem' )
wait(500)
while UO.Count( Feather ) < Kolvo
wait(100)
wend
CheckLag()
Endif
UO.DeleteJournal()
UO.UseType( Shafts )
k = 0
while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 50 )
k = k + 1
wait(300)
wend
If UO.Count( Arrows ) > 0 then
UO.FindType( Arrows, -1, -1 )
UO.MoveItem( 'finditem', 0, Sunduk )
wait(500)
while UO.Count( Arrows ) > 0
wait(100)
wend
UO.Print( 'Arrows moved' )
Endif
Wend
end sub
#####################################################################
Sub CheckLag()
DeleteJournal( 'backpack' )
UO.Click( 'backpack' )
repeat
wait(100)
until UO.InJournal( 'backpack' )
return
end sub
#####################################################################
Sub DeleteJournal( string1 )
VAR nom = UO.InJournal( string1 )
If nom > 0 Then
UO.SetJournalLine( Nom - 1, 'string replaced' )
DeleteJournal( string1 )
Endif
endsub
#############################################################