sub RegsCollect()
Var TrashID = '0x401B6FD3' # ID трэша
Var Sunduk = '0x40141D8E' # ID сундука для регов
Var MeshokType = '0x0E76' # тип мешка
Var MeshokID, I
Dim Reg[9]
Reg[1] = '0x0F7B' # BM
Reg[2] = '0x0F7A' # BP
Reg[3] = '0x0F84' # GA
Reg[4] = '0x0F85' # GI
Reg[5] = '0x0F86' # MR
Reg[6] = '0x0F88' # NS
Reg[7] = '0x0F8C' # SA
Reg[8] = '0x0F8D' # SS

UO.FindType(MeshokType, -1, 'backpack')
While UO.FindCount() > 0
MeshokID = UO.GetSerial('finditem')
UO.UseObject(MeshokID)
Wait (1000)
For I = 1 to 8
UO.FindType(Reg[I], -1, MeshokID)
While UO.FindCount() > 0
UO.MoveItem('finditem' , -1, Sunduk)
Wait (300)
CheckLag()
UO.FindType(Reg[I], -1, MeshokID)
WEnd
Next
UO.FindType(-1, -1, MeshokID)
If (UO.FindCount() == 0) Then
UO.WaittargetObject (MeshokID)
UO.UseObject(TrashID)
# UO.DropHere(MeshokID) #Не трешим, а бросаем под ноги
Wait (200)
CheckLag()
Else
UO.Ignore(MeshokID)
Wait (100)
EndIf
UO.FindType(MeshokType, -1, 'backpack')
WEnd
UO.Print("STOP COLLECT")
end sub

sub TakeMeshok()
var Otkuda = '0x40141D8E'
var MeshokType = '0x0E76'
UO.FindType(MeshokType, -1, Otkuda)
While UO.FindCount() > 0
UO.MoveItem('finditem' , -1, 'backpack')
Wait (300)
CheckLag()
If UO.Weight > (UO.Str * 4) Then
UO.Print('OverWeight!')
Wait(100)
Return
EndIf
UO.FindType(MeshokType, -1, Otkuda)
WEnd
UO.Print('Meshok not found')
endsub


Sub CheckLag()
DeleteJournal( 'ackpack' )
UO.Click( 'backpack' )
repeat
wait(100)
until UO.InJournal( 'ackpack' )
return
endsub
Sub DeleteJournal( string1 )
VAR nom = UO.InJournal( string1 )
If nom > 0 Then
UO.SetJournalLine( Nom - 1, 'string replaced' )
DeleteJournal( string1 )
Endif
endsub