Code: Select all
sub magery()
var cont='0x4055B219'
var bottle='0x0F0E'
var cbottle='0x09DF'
uo.useobject(cont)
wait(1000)
uo.useobject('backpack')
wait(1000)
while not uo.dead()
while uo.mana>=10
loot()
uo.cast('Magic Arrow','self')
wait(1550)
checklag()
wend
uo.findtype(bottle,cbottle,'backpack')
uo.useobject('finditem')
wait(500)
wend
endsub
Sub loot()
var NS='0x0F88'
var BB='0x0F7A'
var bottle='0x0F0E'
var cbottle='0x09DF'
var cregs='200'
var cbot='50'
var cont='0x4055B219'
uo.findtype(NS,'-1','backpack')
if not uo.findcount() then
uo.findtype(NS,'-1',cont)
uo.moveitem('finditem',cregs,'backpack')
wait(1000)
endif
uo.findtype(BB,'-1','backpack')
if not uo.findcount() then
uo.findtype(BB,'-1',cont)
uo.moveitem('finditem',cregs,'backpack')
wait(1000)
endif
uo.findtype(bottle,cbottle,'backpack')
if not uo.findcount() then
uo.findtype(bottle,cbottle,cont)
uo.moveitem('finditem',cbot,'backpack')
wait(1000)
uo.findtype(bottle,'0x0000','backpack')
uo.moveitem('finditem','all',cont)
wait(1000)
endif
endsub
Sub checklag()
uo.click('backpack')
repeat
wait(50)
until uo.injournal("backpack")
uo.deletejournal()
end sub