Code:
sub delta(n1, n2)
var t=0
t=n1-n2
if t < 0 then
return -t
end if
return t
end sub
sub isMax(n1, n2)
if n2 > n1 then
return 1
end if
return 0
end sub
sub krest()
var f=0
f=isMax(delta(uo.GetX(), uo.GetX('laststatus')),delta(uo.GetY(), uo.GetY('laststatus')))
StoneField()
while f == isMax(delta(uo.GetX(), uo.GetX('laststatus')),delta(uo.GetY(), uo.GetY('laststatus')))
wait(100)
wend
StoneField()
end sub
Sub StoneField()
var Scroll='input type of your scroll'
if uo.waiting() then
uo.canceltarget()
end if
uo.FindType(Scroll,'-1','backpack')
if uo.FindCount() then
uo.waittargettile(0,uo.getX('laststatus'),uo.getY('laststatus'),uo.getZ('laststatus'))
uo.UseObject('finditem')
uo.Print('Scroll!')
else
uo.waittargettile(0,uo.getX('laststatus'),uo.getY('laststatus'),uo.getZ('laststatus'))
uo.Cast('Wall')
uo.Print('Spell!!!')
end if
end sub