-- $Id: bot_bonedragon.lua,v 1.4 2009-04-15 08:22:23 vadim_b Exp $ -- Интеллект костяного дракона ressed = 0 dragon_hp = {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} checktime = nil function bot_bonedragon() -- Наложение дебафа страха на всех игроков у кого нет защиты -- local n = {} -- for _,persPtr in pairs(PERS_LIST(aux.oppTeamNum(),true)) do -- смотрим наличие антистраха на всех игроках local persList = {} persList = PERS_LIST(aux.oppTeamNum(),true) for _,persPtr in pairs(persList) do -- смотрим наличие антистраха на всех игроках if not PERS_ISBOT(persPtr) and (#aux.activeEffects(persPtr,{artId = 2256}) < 1) and (#aux.activeEffects(persPtr,{artId = 2272}) < 1) then -- на выбранном персонаже нет защиты aux.useEffect({artId = 2256}, persPtr) -- кидаем страх end end -- Воскрешаем умерших local dead = 0 for _,persPtr in pairs(PERS_LIST(aux.oppTeamNum(),false)) do -- ищем мертвых игроков if not PERS_ISBOT(persPtr) and PERS_LEVEL(persPtr) > 2 then -- если дохляк игрок dead = dead+1 end end if dead > ressed then aux.useEffect({artId = 2274}) -- Воскресить скелета ressed = ressed + 1 end if my.status ~= FS_PS_ACTIVE then -- если наш статус неактивный, ничего не делаем return end -- проверка необходимости отравить всех if checktime ~= nil and my.stime >= checktime then -- local t = {} -- for _,persPtr in pairs(PERS_LIST(aux.oppTeamNum(),true)) do -- смотрим наличие дебафа на любом из игроков for _,persPtr in pairs(persList) do -- смотрим наличие дебафа на любом из игроков if (#aux.activeEffects(persPtr,{artId = 2261}) > 0) then -- на выбранном персонаже есть дебафф aux.useEffect({artId = 2262}, persPtr) -- кидаем АоЕ травилку end end end -- Наложение дебафа болезни на случайных игроков local bot = PERS(my.persPtr) if #dragon_hp > 0 and dragon_hp[1] >= bot.hp/bot.hpMax then -- for _,persPtr in pairs(PERS_LIST(aux.oppTeamNum(),true)) do -- смотрим наличие антистраха на всех игроках for _,persPtr in pairs(persList) do -- смотрим наличие антистраха на всех игроках if (#aux.activeEffects(persPtr,{artId = 2261}) < 1) and (#aux.activeEffects(persPtr,{artId = 2262}) < 1) then -- на выбранном персонаже нет защиты aux.useEffect({artId = 2261}, persPtr) -- кидаем страх checktime = my.stime + 30 table.remove(dragon_hp, 1) ATTACK(math.random(3)) break end end table.remove(dragon_hp, 1) end ATTACK(math.random(3)) end