я так понимаю нужно добавить чтобы он ещё и по имени проверял UO.GetName
Code: Select all
var distance='10' # дистанция поиска мобов
var corpser=1 # 1-резать труп # 0-не резать труп
sub main()
var n, m, mob
var tweapon=uo.getserial(uo.objatlayer('Rhand'))
var tshield=uo.getserial(uo.objatlayer('Lhand'))
Dim npc[10]
npc[0]=1 # count
npc[1]='0x0038'
npc[2]=''
npc[3]=''
Dim loot[50]
loot[0]=3 # count
loot[1]='0x0F7E'
loot[2]='0x0E76'
loot[3]='0x0EED'
uo.set('finddistance',distance)
while 1
for n=1 to npc[0]
uo.findtype(npc[n],-1,'ground')
if uo.findcount() then
uo.useobject(tweapon)
uo.useobject(tshield)
wait(100)
mob=uo.getserial('finditem')
kill(mob)
uo.useobject('lastcorpse')
checklag()
wait(1000)
for m=1 to loot[0]
while uo.getquantity('<'+loot[m])
uo.moveitem('<'+loot[m])
wait(700)
wend
next
while uo.life<uo.str-20 and uo.count('0x0E21')
uo.bandageself()
wait(3500)
wend
if uo.count('0x0E20') then
uo.waittargettype('0x1008')
uo.usetype('0x0E20')
wait(1000)
endif
endif
next
wait(1000)
wend
endsub
sub kill(mob)
var n
checklag()
for n=0 to 100
uo.attack(mob)
if uo.getdistance(mob)>1 then
walkn(0,0,mob)
endif
if uo.injournal('Body of') then
if corpser==1 then
uo.waittargetobject('lastcorpse')
wait(100)
uo.usetype('0x0F51')
wait(500)
endif
return
endif
wait(1000)
next
endsub