
Нужно добавить в Object types "tdagger", в Objects "dagger" (тот даггер которым вы хотите пользоваться в первую очередь)
Code: Select all
sub dagger()
var allfound=0,myfound=0,dagger,tdagger,othdagger
dagger='dagger'
tdagger='tdagger'
repeat
uo.findtype(tdagger,-1,2)
if allfound==0 then
allfound=uo.findcount('finditem')
endif
if (uo.findcount('finditem')>0) then
if (uo.getserial('finditem')==uo.getserial(dagger)) then
allfound=allfound-1
myfound=1
uo.useobject('finditem')
uo.ignore('finditem')
else
uo.print('Found dagger '+uo.getserial('finditem'))
othdagger=uo.getserial('finditem')
uo.ignore('finditem')
endif
else
if myfound==1 then
uo.print('My dag, '+str(allfound)+' other')
else
uo.print('Not found, '+str(allfound)+' other')
if allfound>0 then
uo.print('Using last found')
uo.useobject(othdagger)
endif
endif
endif
until uo.findcount('finditem')==0
uo.ignorereset()
endsub
Если кому не в лом - прокомментируйте