Как
Code:
var temp = 0
UO.Set('quiet','1')
uo.exec('set finddistance 25')
Ignores()
DIM Chars[2]
Chars[0] = '0x0190' ## - Тип male.
Chars[1] = '0x0191' ## - Тип female.
uo.findtype(Chars[0], '-1', '1')
maleplayernum = uo.findcount()
uo.findtype(Chars[1], '-1', '1')
femaleplayernum = uo.findcount()
allplayernum = maleplayernum + femaleplayernum
for a = 0 to 1 ## - Перебираем типы male/female.
uo.findtype(Chars[a], '-1', '1')
if allplayernum == 1 then
if UO.GetMaxHP('finditem') < 200 then ; проверка на хп, чтобы отсеивало вендоров.
UO.AddObject('MainTarget','finditem')
endif
else
if uo.findcount() > 0 then
temp = uo.findcount()
for i=0 to uo.findcount()
uo.findtype(Chars[a], '-1', '1')
UO.GetStatus('finditem')
if UO.GetMaxHP('finditem') < 200 then
lastplayernum = lastplayernum + 1
if lastplayernum < 5 then
UO.AddObject('AddTarget'+str(lastplayernum), 'finditem')
else
i = temp
endif
if lastplayernum == 1 then
UO.AddObject('MainTarget','finditem')
endif
UO.Ignore('finditem', 'on')
endif
next
endif
endif
next
UO.Set('quiet','0')
UO.Print("MainTarget: "+UO.GetName('MainTarget'))
UO.Click('MainTarget')
UO.IgnoreReset()
end sub
Как в таком контесте кода сделать так, чтобы
Code:
MainTarget
присаиваивалось значение
Code:
lasttarget
( для каста ) ?