Code:
sub Magery2()
var LastTimer
VAR Sunduk='0x40075B93' ; ID sunduka.
while not uo.Dead()
uo.DeleteJournal()
CheckLag()
uo.FindType('0x0F7A',-1,'backpack')
if uo.GetQuantity('finditem')<5 then
uo.FindType('0x0F7A','0x0000','Sunduk')
wait(1000)
uo.Grab('500','finditem')
wait(1000)
end if
uo.FindType('0x0F88',-1,'backpack')
if uo.GetQuantity('finditem')<5 then
uo.FindType('0x0F88','0x0000','Sunduk')
wait(1000)
uo.Grab('500','finditem')
wait(1000)
end if
while uo.Mana>=20
uo.Cast('Magic Arrow','0x00091E56')
wait(4500)
wend
while uo.Mana<uo.INT
LastTimer=uo.Timer()
uo.UseSkill('Meditation')
repeat
wait(100)
until uo.InJournal("You are" or uo.InJournal("You lose" or uo.Timer()>LastTimer+200
uo.DeleteJournal()
wait(2000)
wend
wend
end sub
sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(500)
until uo.InJournal('backpack')
end sub