

sub Inscript()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 4','Recall')
UO.AutoMenu('Spell Circles','Fourth Circle')
var Container='0x4005E6A9'
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','400','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','400','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','400','backpack')
Else
exit=1
endif
endif
wend
CheckLag()
UO.FindType('0x1F4C')
while not UO.GetQuantity('finditem')==0
UO.MoveItem('finditem','0',Container)
wait(500)
UO.FindType('0x1F4C')
wend
UO.FindType('0x0E34','0x0000',Container)
If UO.GetQuantity('finditem')>0 Then
UO.MoveItem('finditem','250','backpack')
endif
wait(500)
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