-- $Id: bot_Gargoyle.lua,v 1.7 2009-12-17 08:39:20 a.abolishin Exp $ --[[ AKEB (c) 26.06.2008 18:26 Горгулья Перед ударом с вероятностью 10% использует на себя абилку (2585) Перед ударом с вероятностью 10% использует на текущего противника абилку (2584) Скрипт: bot_Gargoyle.lua Управляющая функция: bot_Gargoyle --]] function bot_Gargoyle_r(A, C, R, h2l, pvp) if h2l then -- понижение противников local oppList = aux.getPersList(aux.oppTeamNum(), true, nil, false) if oppList then bot_CheckHiLevelPers(oppList, h2l, bot_HiLevel2LowLevel) end if pvp then -- и своих (для честного pvp) local myList = aux.getPersList(my.teamNum, true, true, false) if myList then bot_CheckHiLevelPers(myList, h2l, bot_HiLevel2LowLevel) end end end if my.status ~= FS_PS_ACTIVE then -- если наш статус неактивный, ничего не делаем return end local bot = PERS(my.persPtr) local G = bot.hp / bot.hpMax if G < C[1] then aux.useEffect({artId = A[1]}, nil, R[1]) end local status = 1 if G > C[2] then status = aux.useEffect({artId = A[2]}, my.oppPtr, R[2]) -- применяем абилку 2584 с 15% вероятностью end if status ~= 0 then ATTACK(math.random(2)+1) end end function bot_Gargoyle() local A = {2585, 2584} local C = {0.9, 0.0} local R = {0.1, 0.1} bot_Gargoyle_r(A, C, R) end function bot_Gargoyle_H2L_10() local A = {2585, 2584} local C = {0.9, 0.0} local R = {0.1, 0.1} bot_Gargoyle_r(A, C, R, 10) end function bot_Gargoyle_H2L_PVP_10() local A = {2585, 2584} local C = {0.9, 0.0} local R = {0.1, 0.1} bot_Gargoyle_r(A, C, R, 10, true) end