sub Inscript()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 4','Recall')
UO.AutoMenu('Spell Circles','Fourth Circle')
#Здесь вбей ИД сундука, из которго брать реги, бланки, и туда же будут складываться готовые реколы.
var Container='0x40222FA9'
var exit=0
repeat
#Лепим свитки
while UO.Count('0x0E34','0x0000')>0 and exit<>1
UO.DeleteJournal()
UO.UseType('0x0E34','0x0000')
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You fail")
wait(500)
wend
#Если кончаются реги пополняем запас из сундука
if UO.Count(0x0F86)==0 then
CheckLag()
UO.FindType('0x0F86','0x0000',Container)
If UO.GetQuantity('finditem')>0 Then
UO.MoveItem('finditem','200','backpack')
Else
exit=1
endif
endif
if UO.Count(0x0F7A)==0 then
CheckLag()
UO.FindType('0x0F7A','0x0000',Container)
If UO.GetQuantity('finditem')>0 Then
UO.MoveItem('finditem','200','backpack')
Else
exit=1
endif
endif
if UO.Count(0x0F7B)==0 then
CheckLag()
UO.FindType('0x0F7B','0x0000',Container)
If UO.GetQuantity('finditem')>0 Then
UO.MoveItem('finditem','200','backpack')
Else
exit=1
endif
endif
wend
CheckLag()
#Складываем готовые свитки в сундук
UO.FindType('0x1F4C')
while not UO.GetQuantity('finditem')==0
UO.MoveItem('finditem','0',Container)
wait(1000)
UO.FindType('0x1F4C')
wend
#Достаём бланки из сундука
UO.FindType('0x0E34','0x0000',Container)
If UO.GetQuantity('finditem')>0 Then
UO.MoveItem('finditem','200','backpack')
endif
wait(1000)
until UO.GetQuantity('finditem')==0
UO.CancelMenu()
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('backpack')
end sub