Code: Select all
sub CheckingPlayers()
uo.setglobal('find', '0')
uo.ignore('self', 'on')
while uo.life > 0
while val(uo.getglobal('find')) == 1
wait(50)
wend
uo.setglobal('find', '1')
wait(200)
uo.set('finddistance', '14')
uo.findtype('0x0190', '-1', '1') #тип игрока мужского пола#
wait(200)
uo.setglobal('find', '0')
if uo.findcount() > 0 then
uo.usetype('0x0F08')
wait(100)
uo.exec('terminate Obkopka')
wait(500)
uo.exec('exec Teleportation')
wait(500)
return
else
wait(1000)
endif
while val(uo.getglobal('find')) == 1
wait(50)
wend
uo.setglobal('find', '1')
wait(200)
uo.set('finddistance', '14')
uo.findtype('0x0191', '-1', '1') #тип игрока женского пола#
wait(200)
uo.setglobal('find', '0')
if uo.findcount() > 0 then
uo.usetype('0x0F08')
wait(100)
uo.exec('terminate Obkopka')
wait(500)
uo.exec('exec Teleportation')
wait(500)
return
else
wait(1000)
endif
wend
end subCode: Select all
sub CheckingPlayers()
VAR a, b
uo.ignore('self', 'on')
DIM Chars[2]
Chars[0] = '0x0190' #тип игрока мужского пола#
Chars[1] = '0x0191' #тип игрока женского пола#
while not uo.dead()
for a = 0 to 1
if uo.injournal('GM|Admin|Seer|Counselor|Developer') then
uo.usetype('0x0F08')
wait(200)
uo.closeuo()
else
wait(50)
endif
b = 0
repeat
wait(100)
b = b + 1
until val(uo.getglobal('find')) == 0 or b > 15
uo.setglobal('find', '1')
wait(200)
uo.set('finddistance', '15')
uo.findtype(Chars[a], '-1', '1')
if uo.findcount() > 0 then
uo.setglobal('find', '0')
uo.usetype('0x0F08')
wait(200)
uo.exec('terminate Obkopka')
uo.exec('terminate ChengePlace')
uo.exec('exec Teleportation')
return
else
uo.setglobal('find', '0')
wait(500)
endif
next
wend
end subЕсть еще проблема с синхронизацией поиска:
в первом скрипте
Code: Select all
...
b = 0
repeat
wait(100)
b = b + 1
until val(uo.getglobal('find')) == 0 or b > 15
uo.setglobal('find', '1')
wait(200)
uo.set('finddistance', '15')
uo.findtype(Chars[a], '-1', '1')
if uo.findcount() > 0 then
uo.setglobal('find', '0')
...Code: Select all
...
e = 0
repeat
wait(50)
e = e + 1
until val(uo.getglobal('find')) == 0 or e > 30
uo.setglobal('find', '1')
wait(200)
uo.set('finddistance', '5')
uo.findtype('0x000E', '-1', '1') #тип элементаля#
if uo.findcount() > 0 then
uo.setglobal('find', '0')
...