Re: Жрец
Добавлено: 07 сен 2019, 14:03
И вместо "or" наверное надо "and"? Что бы только из этого списка бафы диспелить?
эту способность лучше прожимать перед получением сильного урона. За ранее дц присты должны до получения урона прожать "Слово силы: Сияние"(2 раза) потом получить баф (Горести)от исповеди кого-то хильнув потом прожать проповедь и начать дамажить.
Код: Выделить всё
function DispellPriest(Unit)
local i = 1
local name, _, _, debuffType = UnitDebuff(Unit, i)
while name do
if ((debuffType == "Magic") or (debuffType == "Disease")) then return true end
i = i + 1;
name, _, _, debuffType = UnitDebuff(Unit, i)
end
return false
end
Talents = {{}, {}, {}, {}, {}, {}, {}}
local function GetTalents()
for tier=1,7 do
for value=1,3 do
Talents[tier][value] = (select(4, GetTalentInfo(tier, value, 1)))
end
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("PLAYER_TALENT_UPDATE")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_TALENT_UPDATE" then
GetTalents()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetTalents()
elseif event == "PLAYER_ENTERING_WORLD" then
GetTalents()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
Код: Выделить всё
function Dispell(Unit)
local i = 1
local name, _, _, debuffType = UnitDebuff(Unit, i)
while name do
if ((debuffType == "Magic") or (debuffType == "Disease")) then return true end
i = i + 1;
name, _, _, debuffType = UnitDebuff(Unit, i)
end
return false
end
Talents = {{}, {}, {}, {}, {}, {}, {}}
local function GetTalents()
for tier=1,7 do
for value=1,3 do
Talents[tier][value] = (select(4, GetTalentInfo(tier, value, 1)))
end
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("PLAYER_TALENT_UPDATE")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_TALENT_UPDATE" then
GetTalents()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetTalents()
elseif event == "PLAYER_ENTERING_WORLD" then
GetTalents()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
Код: Выделить всё
function BossCheck(target)
if UnitExists("boss1") then
return true
elseif UnitExists("boss2") then
return true
elseif UnitExists("boss3") then
return true
elseif UnitExists("boss4") then
return true
elseif UnitExists("boss5")then
return true
else return false
end
end
function Dispell(Unit)
local i = 1
local name, _, _, debuffType = UnitDebuff(Unit, i)
while name do
if ((debuffType == "Magic") or (debuffType == "Disease")) then return true end
i = i + 1;
name, _, _, debuffType = UnitDebuff(Unit, i)
end
return false
end
Код: Выделить всё
function BossCheck(target)
if UnitExists("boss1") then
return true
elseif UnitExists("boss2") then
return true
elseif UnitExists("boss3") then
return true
elseif UnitExists("boss4") then
return true
elseif UnitExists("boss5")then
return true
else return false
end
end
Talents = {{}, {}, {}, {}, {}, {}, {}}
local function GetTalents()
for tier=1,7 do
for value=1,3 do
Talents[tier][value] = (select(4, GetTalentInfo(tier, value, 1)))
end
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("PLAYER_TALENT_UPDATE")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_TALENT_UPDATE" then
GetTalents()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetTalents()
elseif event == "PLAYER_ENTERING_WORLD" then
GetTalents()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
Код: Выделить всё
function BossCheck()
if UnitExists("boss1") then
return true
elseif UnitExists("boss2") then
return true
elseif UnitExists("boss3") then
return true
elseif UnitExists("boss4") then
return true
elseif UnitExists("boss5")then
return true
else return false
end
end
Talents = {{}, {}, {}, {}, {}, {}, {}}
local function GetTalents()
for tier=1,7 do
for value=1,3 do
Talents[tier][value] = (select(4, GetTalentInfo(tier, value, 1)))
end
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("PLAYER_TALENT_UPDATE")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_TALENT_UPDATE" then
GetTalents()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetTalents()
elseif event == "PLAYER_ENTERING_WORLD" then
GetTalents()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)