-- $Id: quest_scorp.lua,v 1.3 2009-04-15 08:22:42 vadim_b Exp $ -- Интеллект квестового скорпиона scorp_enrage = {0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1} scorp_bite = {0.95, 0.9, 0.85, 0.8, 0.75, 0.7, 0.65, 0.6, 0.55, 0.5, 0.45, 0.4, 0.35, 0.3, 0.25, 0.2, 0.15, 0.1, 0.05} s_summon_time = nil function bot_qscorp() if s_summon_time == nil then s_summon_time = my.stime + 900 end if my.status ~= FS_PS_ACTIVE then -- если наш статус неактивный, ничего не делаем return end -- Признаки ударов local bite = 0 -- Призыв скорпионов local bot = PERS(my.persPtr) if (s_summon_time <= my.stime) then for _=1,10 do aux.useEffect({artId = 2286}) -- призываем скорпионов end s_summon_time = my.stime + 900 end -- Удар жалом if #scorp_bite > 0 and scorp_bite[1] >= bot.hp/bot.hpMax then aux.useEffect({artId = 2285}) -- используем баф на крит aux.useEffect({artId = 2300}, my.oppPtr) -- вешаем дот от яда ATTACK(math.random(3)) -- бьем критом table.remove(scorp_bite, 1) bite = 1 end -- Озверение if bite == 0 and #scorp_enrage > 0 and scorp_enrage[1] >= bot.hp/bot.hpMax then aux.useEffect({artId = 2284}) -- используем озверение table.remove(scorp_enrage, 1) end if bite == 0 then ATTACK(math.random(3)) end end