Code: Select all
sub pk()
var i, a
dim target[2]
target[1] = 0x0190
target[2] = 0x0191
uo.ignore('self')
uo.set('finddistance','8')
for i=1 to 2
uo.findtype('0x0190',-1,'ground')
a=uo.findcount()
uo.findtype('0x0191',-1,'ground')
a=a+uo.findcount()
uo.findtype(target[i],-1,'ground')
uo.print('a = '+str(a))
if a==0 then
uo.ignorereset()
uo.ignore('self')
uo.findtype(target[i],-1,'ground')
endif
while uo.findcount()>0 #4
if uo.GetNotoriety('finditem') == 6 then
uo.cast('Magic Arrow','finditem')
uo.print('Autoattack na ' + uo.getname('finditem'))
UO.Ignore('finditem')
goto end
endif
UO.Ignore('finditem')
uo.findtype(target[i],-1,'ground')
wend
next
uo.ignorereset()
uo.ignore('self')
end:
end sub