Приветствуем вас на форуме проекта WoW Circle. Если вы читаете это, значит не зарегистрировались у нас. Для того, чтобы получить доступ к расширенным возможностям нашего форума нажмите сюда и пройди регистрацию, которая не займет у вас много времени. После регистрации будут доступны новые, более расширенные, возможности.
Аддон на кд противников

Упомянутые в теме пользователи:

Страница 1 из 2 12 ПоследняяПоследняя
Показано с 1 по 12 из 22
  1. #1
    Ветеран форума Аватар для LinxFree
    Регистрация
    16.06.2013
    Сообщений
    990
    Поблагодарил(а)
    146
    Получено благодарностей: 133 (сообщений: 98).
    Репутация: 175

    Аддон на кд противников

    Как изменить IB чтобы иконки располагались не квадратом как брёвна, а полумесяцем?
    ну за исключением верхних двух
    Типо такого.

    PHP код:
    [SPOILER]InterruptBarDB InterruptBarDB or { scale 1hidden falselock false, }
    local abilities = {}
    local order
    local band 
    bit.band

    local spellids 
    = {[36554] = 10, [6552] = 10, [2139] = 24, [19647] = 24, [1766] = 10, [47528] = 10, [10308] = 90, [10890] = 23, [51514] = 90, [49916] = 120, [34490] = 60, [15487] = 240, [31935] = 20, [19503] = 30, [72] = 12, [20066] = 30}
    for 
    spellid,time in pairs(spellids) do
        
    local name,_,spellicon GetSpellInfo(spellid)    
        
    abilities[name] = { icon spelliconduration time }
    end

    -----------------------------------------------------
    -- 
    Edit this table to change the order
    -----------------------------------------------------
    -- 
    36554 SHStep--
    -- 
    6552  Pummel
    -- 2139  Counterspell
    -- 19647 Spell Lock
    -- 16979 Feral Charge 
    -- 1766  Kick
    -- 47528 Mind Freeze
    -- 10308 Stan--
    -- 
    10890 Psychic Scream
    -- 51514 Hex --
    -- 
    49916 Strangulate
    -- 34490 Salo Hunt--
    -- 
    15487 Salo Priest--
    -- 
    31935 Tarelka--
    -- 
    19503 Scatter Shot
    -- 72    Shield Bash
    -- 20066 --SapPal 
    -----------------------------------------------------

    local order = {47528722139196471766365541030834490515141089049916319351548719503655220066}

    -----------------------------------------------------
    -----------------------------------------------------

    for 
    k,v in ipairs(order) do order[k] = GetSpellInfo(vend

    local frame
    local bar

    local GetTime 
    GetTime
    local ipairs 
    ipairs
    local pairs 
    pairs
    local select 
    select
    local floor 
    floor
    local band 
    bit.band
    local GetSpellInfo 
    GetSpellInfo

    local GROUP_UNITS 
    bit.bor(0x000000100x00000400)

    local activetimers = {}

    local size 0
    local 
    function getsize()
        
    size 0
        
    for k in pairs(activetimers) do
            
    size size 1
        end
    end

    local 
    function InterruptBar_AddIcons()
        
    local x = -45
        local y 
    0
        
    --local curAbility 0
        
    for curAbility,ability in ipairs(order) do
            
    local btn CreateFrame("Frame",nil,bar)
            
    btn:SetWidth(30)
            
    btn:SetHeight(30)
            
    btn:SetPoint("CENTER",bar,"CENTER",x,y)
            
    btn:SetFrameStrata("LOW")
            
            
    local cd CreateFrame("Cooldown",nil,btn)
            
    cd.noomnicc true
            cd
    .noCooldownCount true
            cd
    :SetAllPoints(true)
            
    cd:SetFrameStrata("MEDIUM")
            
    cd:Hide()
            
            
    local texture btn:CreateTexture(nil,"BACKGROUND")
            
    texture:SetAllPoints(true)
            
    texture:SetTexture(abilities[ability].icon)
            
    texture:SetTexCoord(0.07,0.9,0.07,0.90)
        
            
    local text cd:CreateFontString(nil,"ARTWORK")
            
    text:SetFont(STANDARD_TEXT_FONT,18,"OUTLINE")
            
    text:SetTextColor(1,1,0,1)
            
    text:SetPoint("LEFT",btn,"LEFT",2,0)
            
            
    btn.texture texture
            btn
    .text text
            btn
    .duration abilities[ability].duration
            btn
    .cd cd
            
            bar
    [ability] = btn

            
    --
            --    
    Originally curAbility AbilityCount 2
            
    --    Which was counted early on when adding 
            
    --      The abilities to a table
            
    --    
            --      
    This method ensures we only use the number of
            
    --    Abilities that are going to be displayed
            
    --      Given in the order table.
            --
            if 
    curAbility #(order) / 2 then
                
    30
            
    else
                if 
    curAbility #(order) / 2 then
                    
    30
                
    else
                    
    30
                    x 
    = -45
                end
            end
        end
    end

    local 
    function InterruptBar_SavePosition()
        
    local point_relativePointxOfsyOfs bar:GetPoint()
        if 
    not InterruptBarDB.Position then 
            InterruptBarDB
    .Position = {}
        
    end
        InterruptBarDB
    .Position.point point
        InterruptBarDB
    .Position.relativePoint relativePoint
        InterruptBarDB
    .Position.xOfs xOfs
        InterruptBarDB
    .Position.yOfs yOfs
    end

    local 
    function InterruptBar_LoadPosition()
        if 
    InterruptBarDB.Position then
            bar
    :SetPoint(InterruptBarDB.Position.point,UIParent,InterruptBarDB.Position.relativePoint,InterruptBarDB.Position.xOfs,InterruptBarDB.Position.yOfs)
        else
            
    bar:SetPoint("CENTER"UIParent"CENTER")
        
    end
    end

    local 
    function InterruptBar_UpdateBar()
        
    bar:SetScale(InterruptBarDB.scale)
        if 
    InterruptBarDB.hidden then
            
    for _,v in ipairs(order) do bar[v]:Hide() end
        
    else
            for 
    _,v in ipairs(order) do bar[v]:Show() end
        end
        
    if InterruptBarDB.lock then
            bar
    :EnableMouse(false)
        else
            
    bar:EnableMouse(true)
        
    end
    end

    local 
    function InterruptBar_CreateBar()
        
    bar CreateFrame("Frame"nilUIParent)
        
    bar:SetMovable(true)
        
    bar:SetWidth(120)
        
    bar:SetHeight(30)
        
    bar:SetClampedToScreen(true
        
    bar:SetScript("OnMouseDown",function(self,button) if button == "LeftButton" then self:StartMoving() end end)
        
    bar:SetScript("OnMouseUp",function(self,button) if button == "LeftButton" then self:StopMovingOrSizing() InterruptBar_SavePosition() end end)
        
    bar:Show()
        
        
    InterruptBar_AddIcons()
        
    InterruptBar_UpdateBar()
        
    InterruptBar_LoadPosition()
    end

    local 
    function InterruptBar_UpdateText(text,cooldown)
        if 
    cooldown 10 then 
            
    if cooldown <= 0.5 then
                text
    :SetText("")
            else
                
    text:SetFormattedText(" %d",cooldown)
            
    end
        
    else
            
    text:SetFormattedText("%d",cooldown)
        
    end
        
    if cooldown 6 then 
            text
    :SetTextColor(1,0,0,1)
        else 
            
    text:SetTextColor(1,1,0,1
        
    end
    end

    local 
    function InterruptBar_StopAbility(ref,ability)
        if 
    InterruptBarDB.hidden then ref:Hide() end
        
    if activetimers[abilitythen activetimers[ability] = nil end
        ref
    .text:SetText("")
        
    ref.cd:Hide()
    end

    local time 
    0
    local 
    function InterruptBar_OnUpdate(selfelapsed)
        
    time time elapsed
        
    if time 0.25 then
            getsize
    ()
            for 
    ability,ref in pairs(activetimers) do
                
    ref.cooldown ref.start ref.duration GetTime()
                if 
    ref.cooldown <= 0 then
                    InterruptBar_StopAbility
    (ref,ability)
                else 
                    
    InterruptBar_UpdateText(ref.text,floor(ref.cooldown+0.5))
                
    end
            end
            
    if size == 0 then frame:SetScript("OnUpdate",nilend
            time 
    time 0.25
        end
    end

    local 
    function InterruptBar_StartTimer(ref,ability)
        if 
    InterruptBarDB.hidden then
            ref
    :Show()
        
    end
        
    if not activetimers[abilitythen
            local duration
            activetimers
    [ability] = ref
            ref
    .cd:Show()
            
    ref.cd:SetCooldown(GetTime()-0.40,ref.duration)
            
    ref.start GetTime()
            
    InterruptBar_UpdateText(ref.text,ref.duration)
        
    end
        frame
    :SetScript("OnUpdate",InterruptBar_OnUpdate)
    end

    local 
    function InterruptBar_COMBAT_LOG_EVENT_UNFILTERED(...)
        
    local spellIDabilityuseSecondDuration
        
    return function(_eventtype_srcNamesrcFlags_dstNamedstFlagsid)
            if (
    band(srcFlags0x00000040) == 0x00000040 and eventtype == "SPELL_CAST_SUCCESS"then 
                spellID 
    id
            
    else
                return
            
    end
            useSecondDuration 
    false
            
    if spellID == 49376 then spellID 16979useSecondDuration true end -- Feral Charge Cat -> Feral Charge Bear
            ability 
    GetSpellInfo(spellID)
            if 
    abilities[abilitythen            
                
    if useSecondDuration and spellID == 16979 then
                    bar
    [ability].duration 30
                
    elseif spellID == 16979 then
                    bar
    [ability].duration 15
                end
                InterruptBar_StartTimer
    (bar[ability],ability)
            
    end
        end
    end

    InterruptBar_COMBAT_LOG_EVENT_UNFILTERED 
    InterruptBar_COMBAT_LOG_EVENT_UNFILTERED()

    local function InterruptBar_ResetAllTimers()
        for 
    _,ability in ipairs(order) do
            
    InterruptBar_StopAbility(bar[ability])
        
    end
        active 
    0
    end

    local 
    function InterruptBar_PLAYER_ENTERING_WORLD(self)
        
    InterruptBar_ResetAllTimers()
    end

    local 
    function InterruptBar_Reset()
        
    InterruptBarDB = { scale 1hidden falselock false }
        
    InterruptBar_UpdateBar()
        
    InterruptBar_LoadPosition()
    end

    local 
    function InterruptBar_Test()
        for 
    _,ability in ipairs(order) do
            
    InterruptBar_StartTimer(bar[ability],ability)
        
    end
    end

    local cmdfuncs 
    = {
        
    scale = function(vInterruptBarDB.scale vInterruptBar_UpdateBar() end,
        
    hidden = function() InterruptBarDB.hidden not InterruptBarDB.hiddenInterruptBar_UpdateBar() end,
        
    lock = function() InterruptBarDB.lock not InterruptBarDB.lockInterruptBar_UpdateBar() end,
        
    reset = function() InterruptBar_Reset() end,
        
    test = function() InterruptBar_Test() end,
    }

    local cmdtbl = {}
    function 
    InterruptBar_Command(cmd)
        for 
    k in ipairs(cmdtbl) do
            
    cmdtbl[k] = nil
        end
        
    for v in gmatch(cmd"[^ ]+") do
          
    tinsert(cmdtblv)
      
    end
      local cb 
    cmdfuncs[cmdtbl[1]] 
      if 
    cb then
          local s 
    tonumber(cmdtbl[2])
          
    cb(s)
      else
          
    ChatFrame1:AddMessage("InterruptBar Options | /ib <option>",0,1,0)      
          
    ChatFrame1:AddMessage("-- scale <number> | value: " .. InterruptBarDB.scale,0,1,0)
          
    ChatFrame1:AddMessage("-- hidden (toggle) | value: " .. tostring(InterruptBarDB.hidden),0,1,0)
          
    ChatFrame1:AddMessage("-- lock (toggle) | value: " .. tostring(InterruptBarDB.lock),0,1,0)
          
    ChatFrame1:AddMessage("-- test (execute)",0,1,0)
          
    ChatFrame1:AddMessage("-- reset (execute)",0,1,0)
      
    end
    end

    local 
    function InterruptBar_OnLoad(self)
        
    self:RegisterEvent("PLAYER_ENTERING_WORLD")
        
    self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
        if 
    not InterruptBarDB.scale then InterruptBarDB.scale 1 end
        
    if not InterruptBarDB.hidden then InterruptBarDB.hidden false end
        
    if not InterruptBarDB.lock then InterruptBarDB.lock false end
        InterruptBar_CreateBar
    ()
        
        
    SlashCmdList["InterruptBar"] = InterruptBar_Command
        SLASH_InterruptBar1 
    "/ib"
        
        
    ChatFrame1:AddMessage("Interrupt Bar by Kollektiv. Type /ib for options.",0,1,0)
    end

    local eventhandler 
    = {
        [
    "VARIABLES_LOADED"] = function(selfInterruptBar_OnLoad(selfend,
        [
    "PLAYER_ENTERING_WORLD"] = function(selfInterruptBar_PLAYER_ENTERING_WORLD(selfend,
        [
    "COMBAT_LOG_EVENT_UNFILTERED"] = function(self,...) InterruptBar_COMBAT_LOG_EVENT_UNFILTERED(...) end,
    }

    local function InterruptBar_OnEvent(self,event,...)
        
    eventhandler[event](self,...)
    end

    frame 
    CreateFrame("Frame",nil,UIParent)
    frame:SetScript("OnEvent",InterruptBar_OnEvent)
    frame:RegisterEvent("VARIABLES_LOADED")[/SPOILER
    Но вижу код там координаты какие-то, какие именно надо исправлять?
    Че-то я так понял эту функцию тоже надо дублировать?
    PHP код:
    local function InterruptBar_AddIcons()
        
    local x = -45
        local y 

    причем не 1 раз

    где-то тут надо изменить?
    PHP код:
    if curAbility #(order) / 2 then
                
    30
            
    else
                if 
    curAbility #(order) / 2 then
                    
    30
                
    else
                    
    30
                    x 
    = -45
                end
            end 
    Голова заболела.

    Может есть возможность сделать его на отдельных панелях и передвигать MoveAnithing например?
    Последний раз редактировалось LinxFree; 27.08.2019 в 20:51. Причина: Как подвинуть то?
    "Одержать сто побед в ста битвах — это не вершина воинского искусства. Повергнуть врага без сражения — вот вершина."

  2. #2
    Новичок Аватар для Sumon Dogs
    Регистрация
    24.07.2019
    Сообщений
    9
    Поблагодарил(а)
    0
    Получено благодарностей: 4 (сообщений: 2).
    Репутация: 4
    Тринькеты через sArena или гладиус и интеррапт бар(настроенный) , а так вряд ли комбат лог фикс мешает работать icicle, мб что то другое

  3. #3
    Новичок
    Регистрация
    21.07.2019
    Сообщений
    1
    Поблагодарил(а)
    0
    Получено благодарностей: 0 (сообщений: 0).
    Репутация: 0
    Icicle у меня прекрасно работает и в аутдоре и на кроссе хотя тоже стоит Combatlogfix. Так что ищи проблему или поставь интеррапт бар и настрой под себя

  4. #4
    Ветеран форума Аватар для LinxFree
    Регистрация
    16.06.2013
    Сообщений
    990
    Поблагодарил(а)
    146
    Получено благодарностей: 133 (сообщений: 98).
    Репутация: 175
    Цитата Сообщение от Onionx Посмотреть сообщение
    Icicle у меня прекрасно работает и в аутдоре и на кроссе хотя тоже стоит Combatlogfix. Так что ищи проблему или поставь интеррапт бар и настрой под себя
    ---fxd---
    Последний раз редактировалось LinxFree; 01.08.2019 в 07:31.
    "Одержать сто побед в ста битвах — это не вершина воинского искусства. Повергнуть врага без сражения — вот вершина."

  5. #5
    Ветеран форума Аватар для LinxFree
    Регистрация
    16.06.2013
    Сообщений
    990
    Поблагодарил(а)
    146
    Получено благодарностей: 133 (сообщений: 98).
    Репутация: 175
    Цитата Сообщение от LinxFree Посмотреть сообщение
    Icicle не работает
    ---UPD---
    (Из-за Aloft) Есть ли способ их подружить?
    Или есть замена Aloft нормальная?
    Последний раз редактировалось LinxFree; 01.08.2019 в 07:35.
    "Одержать сто побед в ста битвах — это не вершина воинского искусства. Повергнуть врага без сражения — вот вершина."

  6. #6
    Местный Аватар для STEROID88
    Регистрация
    03.10.2012
    Сообщений
    37
    Поблагодарил(а)
    8
    Получено благодарностей: 0 (сообщений: 0).
    Репутация: 0
    DreamPlates попробуй, настраивается в файлике
    Учитесь радоваться без алкоголя, мечтать без наркотиков, общаться без интернета, нервничать без сигареты и аренить без гладиуса.
    Самохил - это как онанизм, только никакого удовольствия, и ты на всех зол, что тебе приходится этим заниматься.

  7. #7
    Новичок
    Регистрация
    05.08.2019
    Сообщений
    14
    Поблагодарил(а)
    0
    Получено благодарностей: 1 (сообщений: 1).
    Репутация: 1
    Icicle как помнится мне сделан был для более поздних патчей и умельцы его переделали под 3.3.5, но Icicle без Combatlogfix и OmniCC у меня не работает например. На данный момент у меня стоит PlateBuffs+Icicle и все работает отлично, вот ссылка установи посмотри все ровно должно работать
    https://yadi.sk/d/KnVJahvEbLqzyA
    Последний раз редактировалось magemage; 05.08.2019 в 23:39.

  8. #8
    Эксперт Аватар для Воображение
    Регистрация
    24.02.2018
    Сообщений
    633
    Поблагодарил(а)
    361
    Получено благодарностей: 192 (сообщений: 136).
    Репутация: 859
    Natur Enemy CastBar можешь пробнуть.

  9. #9
    Ветеран форума Аватар для LinxFree
    Регистрация
    16.06.2013
    Сообщений
    990
    Поблагодарил(а)
    146
    Получено благодарностей: 133 (сообщений: 98).
    Репутация: 175
    Цитата Сообщение от magemage Посмотреть сообщение
    На данный момент у меня стоит PlateBuffs+Icicle и все работает отлично, вот ссылка установи посмотри все ровно должно работать
    https://yadi.sk/d/KnVJahvEbLqzyA
    С Aloft не работает. ТАм такие же плейты, только уже настроенные. Опять настраивать чтоли.

    Аппп


    кто может такое сделать?
    Последний раз редактировалось LinxFree; 06.08.2019 в 23:27.
    "Одержать сто побед в ста битвах — это не вершина воинского искусства. Повергнуть врага без сражения — вот вершина."

  10. #10
    Новичок
    Регистрация
    22.08.2015
    Сообщений
    21
    Поблагодарил(а)
    0
    Получено благодарностей: 0 (сообщений: 0).
    Репутация: 0
    Цитата Сообщение от LinxFree Посмотреть сообщение
    Какой?
    Icicle не работает
    ---UPD---
    (Из-за PlateBuffs или Aloft) Есть ли способ их подружить?
    Afflicted не работает без CLF, короче он и остальные аддоны такого типа по всей видимости тоже от комбатлога зависимы.
    Gladius_CD не перетаскиваются в нужное место и не настраиваются занимая полэкрана бесполезными кд

    Что-то еще может быть?
    =========================

    Встречный вопрос:
    Как изменить IB чтобы иконки располагались не квадратом как брёвна, а полумесяцем?
    ну за исключением верхних двух
    Типо такого.

    PHP код:
    [SPOILER]InterruptBarDB InterruptBarDB or { scale 1hidden falselock false, }
    local abilities = {}
    local order
    local band 
    bit.band

    local spellids 
    = {[36554] = 10, [6552] = 10, [2139] = 24, [19647] = 24, [1766] = 10, [47528] = 10, [10308] = 90, [10890] = 23, [51514] = 90, [49916] = 120, [34490] = 60, [15487] = 240, [31935] = 20, [19503] = 30, [72] = 12, [20066] = 30}
    for 
    spellid,time in pairs(spellids) do
        
    local name,_,spellicon GetSpellInfo(spellid)    
        
    abilities[name] = { icon spelliconduration time }
    end

    -----------------------------------------------------
    -- 
    Edit this table to change the order
    -----------------------------------------------------
    -- 
    36554 SHStep--
    -- 
    6552  Pummel
    -- 2139  Counterspell
    -- 19647 Spell Lock
    -- 16979 Feral Charge 
    -- 1766  Kick
    -- 47528 Mind Freeze
    -- 10308 Stan--
    -- 
    10890 Psychic Scream
    -- 51514 Hex --
    -- 
    49916 Strangulate
    -- 34490 Salo Hunt--
    -- 
    15487 Salo Priest--
    -- 
    31935 Tarelka--
    -- 
    19503 Scatter Shot
    -- 72    Shield Bash
    -- 20066 --SapPal 
    -----------------------------------------------------

    local order = {47528722139196471766365541030834490515141089049916319351548719503655220066}

    -----------------------------------------------------
    -----------------------------------------------------

    for 
    k,v in ipairs(order) do order[k] = GetSpellInfo(vend

    local frame
    local bar

    local GetTime 
    GetTime
    local ipairs 
    ipairs
    local pairs 
    pairs
    local select 
    select
    local floor 
    floor
    local band 
    bit.band
    local GetSpellInfo 
    GetSpellInfo

    local GROUP_UNITS 
    bit.bor(0x000000100x00000400)

    local activetimers = {}

    local size 0
    local 
    function getsize()
        
    size 0
        
    for k in pairs(activetimers) do
            
    size size 1
        end
    end

    local 
    function InterruptBar_AddIcons()
        
    local x = -45
        local y 
    0
        
    --local curAbility 0
        
    for curAbility,ability in ipairs(order) do
            
    local btn CreateFrame("Frame",nil,bar)
            
    btn:SetWidth(30)
            
    btn:SetHeight(30)
            
    btn:SetPoint("CENTER",bar,"CENTER",x,y)
            
    btn:SetFrameStrata("LOW")
            
            
    local cd CreateFrame("Cooldown",nil,btn)
            
    cd.noomnicc true
            cd
    .noCooldownCount true
            cd
    :SetAllPoints(true)
            
    cd:SetFrameStrata("MEDIUM")
            
    cd:Hide()
            
            
    local texture btn:CreateTexture(nil,"BACKGROUND")
            
    texture:SetAllPoints(true)
            
    texture:SetTexture(abilities[ability].icon)
            
    texture:SetTexCoord(0.07,0.9,0.07,0.90)
        
            
    local text cd:CreateFontString(nil,"ARTWORK")
            
    text:SetFont(STANDARD_TEXT_FONT,18,"OUTLINE")
            
    text:SetTextColor(1,1,0,1)
            
    text:SetPoint("LEFT",btn,"LEFT",2,0)
            
            
    btn.texture texture
            btn
    .text text
            btn
    .duration abilities[ability].duration
            btn
    .cd cd
            
            bar
    [ability] = btn

            
    --
            --    
    Originally curAbility AbilityCount 2
            
    --    Which was counted early on when adding 
            
    --      The abilities to a table
            
    --    
            --      
    This method ensures we only use the number of
            
    --    Abilities that are going to be displayed
            
    --      Given in the order table.
            --
            if 
    curAbility #(order) / 2 then
                
    30
            
    else
                if 
    curAbility #(order) / 2 then
                    
    30
                
    else
                    
    30
                    x 
    = -45
                end
            end
        end
    end

    local 
    function InterruptBar_SavePosition()
        
    local point_relativePointxOfsyOfs bar:GetPoint()
        if 
    not InterruptBarDB.Position then 
            InterruptBarDB
    .Position = {}
        
    end
        InterruptBarDB
    .Position.point point
        InterruptBarDB
    .Position.relativePoint relativePoint
        InterruptBarDB
    .Position.xOfs xOfs
        InterruptBarDB
    .Position.yOfs yOfs
    end

    local 
    function InterruptBar_LoadPosition()
        if 
    InterruptBarDB.Position then
            bar
    :SetPoint(InterruptBarDB.Position.point,UIParent,InterruptBarDB.Position.relativePoint,InterruptBarDB.Position.xOfs,InterruptBarDB.Position.yOfs)
        else
            
    bar:SetPoint("CENTER"UIParent"CENTER")
        
    end
    end

    local 
    function InterruptBar_UpdateBar()
        
    bar:SetScale(InterruptBarDB.scale)
        if 
    InterruptBarDB.hidden then
            
    for _,v in ipairs(order) do bar[v]:Hide() end
        
    else
            for 
    _,v in ipairs(order) do bar[v]:Show() end
        end
        
    if InterruptBarDB.lock then
            bar
    :EnableMouse(false)
        else
            
    bar:EnableMouse(true)
        
    end
    end

    local 
    function InterruptBar_CreateBar()
        
    bar CreateFrame("Frame"nilUIParent)
        
    bar:SetMovable(true)
        
    bar:SetWidth(120)
        
    bar:SetHeight(30)
        
    bar:SetClampedToScreen(true
        
    bar:SetScript("OnMouseDown",function(self,button) if button == "LeftButton" then self:StartMoving() end end)
        
    bar:SetScript("OnMouseUp",function(self,button) if button == "LeftButton" then self:StopMovingOrSizing() InterruptBar_SavePosition() end end)
        
    bar:Show()
        
        
    InterruptBar_AddIcons()
        
    InterruptBar_UpdateBar()
        
    InterruptBar_LoadPosition()
    end

    local 
    function InterruptBar_UpdateText(text,cooldown)
        if 
    cooldown 10 then 
            
    if cooldown <= 0.5 then
                text
    :SetText("")
            else
                
    text:SetFormattedText(" %d",cooldown)
            
    end
        
    else
            
    text:SetFormattedText("%d",cooldown)
        
    end
        
    if cooldown 6 then 
            text
    :SetTextColor(1,0,0,1)
        else 
            
    text:SetTextColor(1,1,0,1
        
    end
    end

    local 
    function InterruptBar_StopAbility(ref,ability)
        if 
    InterruptBarDB.hidden then ref:Hide() end
        
    if activetimers[abilitythen activetimers[ability] = nil end
        ref
    .text:SetText("")
        
    ref.cd:Hide()
    end

    local time 
    0
    local 
    function InterruptBar_OnUpdate(selfelapsed)
        
    time time elapsed
        
    if time 0.25 then
            getsize
    ()
            for 
    ability,ref in pairs(activetimers) do
                
    ref.cooldown ref.start ref.duration GetTime()
                if 
    ref.cooldown <= 0 then
                    InterruptBar_StopAbility
    (ref,ability)
                else 
                    
    InterruptBar_UpdateText(ref.text,floor(ref.cooldown+0.5))
                
    end
            end
            
    if size == 0 then frame:SetScript("OnUpdate",nilend
            time 
    time 0.25
        end
    end

    local 
    function InterruptBar_StartTimer(ref,ability)
        if 
    InterruptBarDB.hidden then
            ref
    :Show()
        
    end
        
    if not activetimers[abilitythen
            local duration
            activetimers
    [ability] = ref
            ref
    .cd:Show()
            
    ref.cd:SetCooldown(GetTime()-0.40,ref.duration)
            
    ref.start GetTime()
            
    InterruptBar_UpdateText(ref.text,ref.duration)
        
    end
        frame
    :SetScript("OnUpdate",InterruptBar_OnUpdate)
    end

    local 
    function InterruptBar_COMBAT_LOG_EVENT_UNFILTERED(...)
        
    local spellIDabilityuseSecondDuration
        
    return function(_eventtype_srcNamesrcFlags_dstNamedstFlagsid)
            if (
    band(srcFlags0x00000040) == 0x00000040 and eventtype == "SPELL_CAST_SUCCESS"then 
                spellID 
    id
            
    else
                return
            
    end
            useSecondDuration 
    false
            
    if spellID == 49376 then spellID 16979useSecondDuration true end -- Feral Charge Cat -> Feral Charge Bear
            ability 
    GetSpellInfo(spellID)
            if 
    abilities[abilitythen            
                
    if useSecondDuration and spellID == 16979 then
                    bar
    [ability].duration 30
                
    elseif spellID == 16979 then
                    bar
    [ability].duration 15
                end
                InterruptBar_StartTimer
    (bar[ability],ability)
            
    end
        end
    end

    InterruptBar_COMBAT_LOG_EVENT_UNFILTERED 
    InterruptBar_COMBAT_LOG_EVENT_UNFILTERED()

    local function InterruptBar_ResetAllTimers()
        for 
    _,ability in ipairs(order) do
            
    InterruptBar_StopAbility(bar[ability])
        
    end
        active 
    0
    end

    local 
    function InterruptBar_PLAYER_ENTERING_WORLD(self)
        
    InterruptBar_ResetAllTimers()
    end

    local 
    function InterruptBar_Reset()
        
    InterruptBarDB = { scale 1hidden falselock false }
        
    InterruptBar_UpdateBar()
        
    InterruptBar_LoadPosition()
    end

    local 
    function InterruptBar_Test()
        for 
    _,ability in ipairs(order) do
            
    InterruptBar_StartTimer(bar[ability],ability)
        
    end
    end

    local cmdfuncs 
    = {
        
    scale = function(vInterruptBarDB.scale vInterruptBar_UpdateBar() end,
        
    hidden = function() InterruptBarDB.hidden not InterruptBarDB.hiddenInterruptBar_UpdateBar() end,
        
    lock = function() InterruptBarDB.lock not InterruptBarDB.lockInterruptBar_UpdateBar() end,
        
    reset = function() InterruptBar_Reset() end,
        
    test = function() InterruptBar_Test() end,
    }

    local cmdtbl = {}
    function 
    InterruptBar_Command(cmd)
        for 
    k in ipairs(cmdtbl) do
            
    cmdtbl[k] = nil
        end
        
    for v in gmatch(cmd"[^ ]+") do
          
    tinsert(cmdtblv)
      
    end
      local cb 
    cmdfuncs[cmdtbl[1]] 
      if 
    cb then
          local s 
    tonumber(cmdtbl[2])
          
    cb(s)
      else
          
    ChatFrame1:AddMessage("InterruptBar Options | /ib <option>",0,1,0)      
          
    ChatFrame1:AddMessage("-- scale <number> | value: " .. InterruptBarDB.scale,0,1,0)
          
    ChatFrame1:AddMessage("-- hidden (toggle) | value: " .. tostring(InterruptBarDB.hidden),0,1,0)
          
    ChatFrame1:AddMessage("-- lock (toggle) | value: " .. tostring(InterruptBarDB.lock),0,1,0)
          
    ChatFrame1:AddMessage("-- test (execute)",0,1,0)
          
    ChatFrame1:AddMessage("-- reset (execute)",0,1,0)
      
    end
    end

    local 
    function InterruptBar_OnLoad(self)
        
    self:RegisterEvent("PLAYER_ENTERING_WORLD")
        
    self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
        if 
    not InterruptBarDB.scale then InterruptBarDB.scale 1 end
        
    if not InterruptBarDB.hidden then InterruptBarDB.hidden false end
        
    if not InterruptBarDB.lock then InterruptBarDB.lock false end
        InterruptBar_CreateBar
    ()
        
        
    SlashCmdList["InterruptBar"] = InterruptBar_Command
        SLASH_InterruptBar1 
    "/ib"
        
        
    ChatFrame1:AddMessage("Interrupt Bar by Kollektiv. Type /ib for options.",0,1,0)
    end

    local eventhandler 
    = {
        [
    "VARIABLES_LOADED"] = function(selfInterruptBar_OnLoad(selfend,
        [
    "PLAYER_ENTERING_WORLD"] = function(selfInterruptBar_PLAYER_ENTERING_WORLD(selfend,
        [
    "COMBAT_LOG_EVENT_UNFILTERED"] = function(self,...) InterruptBar_COMBAT_LOG_EVENT_UNFILTERED(...) end,
    }

    local function InterruptBar_OnEvent(self,event,...)
        
    eventhandler[event](self,...)
    end

    frame 
    CreateFrame("Frame",nil,UIParent)
    frame:SetScript("OnEvent",InterruptBar_OnEvent)
    frame:RegisterEvent("VARIABLES_LOADED")[/SPOILER
    Но вижу код там координаты какие-то, какие именно надо исправлять?
    Че-то я так понял эту функцию тоже надо дублировать?
    PHP код:
    local function InterruptBar_AddIcons()
        
    local x = -45
        local y 

    причем не 1 раз

    где-то тут надо изменить?
    PHP код:
    if curAbility #(order) / 2 then
                
    30
            
    else
                if 
    curAbility #(order) / 2 then
                    
    30
                
    else
                    
    30
                    x 
    = -45
                end
            end 
    Голова заболела.

    Может есть возможность сделать его на отдельных панелях и передвигать MoveAnithing например?
    Подскажи что за интерфейся у тебя ?)

  11. #11
    Ветеран форума Аватар для LinxFree
    Регистрация
    16.06.2013
    Сообщений
    990
    Поблагодарил(а)
    146
    Получено благодарностей: 133 (сообщений: 98).
    Репутация: 175
    Цитата Сообщение от 4evi Посмотреть сообщение
    Подскажи что за интерфейся у тебя ?)
    Это не мой, в душе не чаю

    - - - Updated - - -

    Цитата Сообщение от Воображение Посмотреть сообщение
    Natur Enemy CastBar можешь пробнуть.
    Это как холивар между AMD и Intel, однажды сев на одно другим уже пользоваться не будут, я хочу хотя бы одно до ума довести.
    "Одержать сто побед в ста битвах — это не вершина воинского искусства. Повергнуть врага без сражения — вот вершина."

  12. #12
    Наш человек Аватар для Vasja_1
    Регистрация
    19.11.2015
    Сообщений
    890
    Поблагодарил(а)
    72
    Получено благодарностей: 94 (сообщений: 78).
    Репутация: 865
    Из Juked сделал подобное на 18 строк






    разметкой и добавлением в пустые клетки несуществующих спелов на 3.3.5 в Spell.lua
    PHP код:
    spell_table = {
    --
    Interrupts and Silences
    {spellID=96231time=15prio=true},--1
    {spellID=96231time=25prio=false},--2
    {spellID=47528time=10prio=true},--3Mind Freeze *
    {
    spellID=96231time=19prio=true},----4
    {spellID=96231time=60prio=false},--5
    {spellID=96231time=15prio=true},--6
    {spellID=96231time=15prio=true},--7
    {spellID=96231time=12prio=true},--8
    {spellID=96231time=24prio=true},--9
    {spellID=96231time=25prio=true},--10
    {spellID=96231time=24prio=true},--11
    {spellID=96231time=15prio=true},--12
    {spellID=72,    time=12prio=true},--13Shield Bash *
    {
    spellID=96231time=45prio=false},--14
    {spellID=96231time=30prio=false},--15
    {spellID=96231time=24prio=true},--16
    ....
    }
    и т.д
    топорно конечно, но суть ясна
    полная версия здесь
    Последний раз редактировалось Vasja_1; 28.08.2019 в 17:55.

  13. 1 пользователь сказал cпасибо Vasja_1 за это полезное сообщение:

    Jud (16.09.2019)

Страница 1 из 2 12 ПоследняяПоследняя

Похожие темы

  1. Ответов: 3
    Последнее сообщение: 03.02.2019, 08:39
  2. Адон показывающий кд противников
    от Reeplex в разделе Аддоны
    Ответов: 1
    Последнее сообщение: 22.10.2013, 18:01
  3. Ответов: 7
    Последнее сообщение: 04.04.2012, 16:18
  4. Аддон для отслеживания кд противников
    от Forrgit в разделе Корзина
    Ответов: 14
    Последнее сообщение: 17.02.2012, 14:44

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •