помогите пожалуйста добавить в этот скрипт проверку в случае появления ПК пить инвизку и реколиться.
Code:
sub Hlopok()
var i, bankid = "0x40408E15", runebank = "0x412CD9E3", hlopok = "0x0C4F", waittime = 5000, posx, posy, timer, find, LogsQty=75, xlopok=0x0DF9
uo.set("finddistance", "20")
var MaxVes = 630
Dim Rune[17]
Rune[0] = 5
Rune[1] = "0x401C3FB9"
Rune[2] = "0x401C3FB9"
Rune[3] = "0x401C3FB9"
Rune[4] = "0x401C3FB7"
Rune[5] = "0x401C3FB7"
Rune[6] = "0x401C3FB7"
Rune[7] = "0x41185F36"
Rune[8] = "0x41185F36"
Rune[9] = "0x41185F36"
Rune[10] = "0x4013A158"
Rune[11] = "0x4013A158"
Rune[12] = "0x4013A159"
Rune[13] = "0x4013A159"
Rune[14] = "0x40B9E854"
Rune[15] = "0x40B9E854"
while not uo.dead()
for i = 1 to 50
if uo.mana < 12 then
while uo.mana < 12
uo.useskill('Meditation')
wait(5000)
wend
endif
posx = uo.getx()
posy = uo.gety()
repeat
uo.deletejournal()
uo.cast("Recall", Rune[i]) ; ID руны в загон
repeat
wait(150)
until uo.getx() <> posx or uo.gety() <> posy or uo.injournal("fizzles")
until uo.getx() <> posx or uo.gety() <> posy
repeat
uo.findtype(hlopok, "-1", "ground")
if uo.findcount() then
if uo.getdistance("finditem") > 1 then
posx = uo.getx("finditem")
posy = uo.gety("finditem")
Walker(posx, posy, 1)
end if
uo.useobject("finditem")
wait(150)
end if
until not uo.findcount() or UO.Weight > MaxVes
posx = uo.getx()
posy = uo.gety()
repeat
if uo.mana < 12 then
while uo.mana < 12
uo.useskill('Meditation')
wait(5000)
wend
endif
uo.deletejournal()
uo.cast("Recall", runebank) ; ID руны в банк
repeat
wait(150)
until uo.getx() <> posx or uo.gety() <> posy or uo.injournal("fizzles")
until uo.getx() <> posx or uo.gety() <> posy
wait(500)
uo.findtype(0x0DF9, "-1", "backpack")
if uo.findcount() then
uo.moveitem("finditem", "-1", bankid)
end if
; Время ожидания респа хлопка
next
wait(waittime)
wend
end sub