[怀旧服] [插件] 使用 Weakauras2 监控各角色 转换奥金锭、筛盐器、死灵化水、月布 CD 转自NGA,修改改良版

助手阿喜 Games来源:NGA1 2787字数 11108阅读37分1秒阅读模式

帖子来源

字符串修改自NGA 修改改良版

更新内容

新增了死灵化水加入CD监控列表文章源自助手阿喜-https://zsaxi.com/4395

效果图

[怀旧服] [插件] 使用 Weakauras2 监控各角色 转换奥金锭、筛盐器、死灵化水、月布 CD 转自NGA,修改改良版文章源自助手阿喜-https://zsaxi.com/4395

注意事项

1. 应该支持同帐号下的所有服务器角色,但我没帐号没测试过
2. 第一次使用,要点开你想要监控的专业技能,如果没有CD,需要使用CD后才会显示出来
3. 如果监控没显示,可以通过点开专业技能来触发 监控显示
4. 第一次导入后有我的数据,在聊天输入命令 清空数据文章源自助手阿喜-https://zsaxi.com/4395

/script WeakAurasSaved.displays["QDTradeSkillCooldown"]["_data_"] = {}

/script PickupSpell(17187)   把转换奥金拉倒动作条的宏
/script PickupSpell(17563)   把死灵化水拉倒动作条的宏

wa字符串

!nNXAVTT11)leWOkRYkswwYY1nfqrwoXUQsU(Ym)bVqjgYlTzdfVg8HRDRRaAxrNBh2RoShyn7tBDf5dzlzlindRy7pZKv6)IDUViPIOEz7amjbX79WZBEUN75EOwbnvnuxnKj9hmKeg4y7I1qnj0)1ddoG416WaBIRpC)aanB)dD0prfFmmzbdnKrOFaPlFUvORbf3EDYGpc7gCTEB1Rd)B8TSiED1duT7IZea)Lah5xhIHUtVoM6N43RZnakCiepgYxVs5LZNF8KCaj0ljnDjMm6Y2RdNYRxS8KOVRTByaovoWi86LNaX(ydIRzQedKLcDE4GqVipsgLfm7)NFyVolyE(V7z0l9p7ZOxg8nFPswQZilZ8YkuYSc5LGXyxZesjfFFG(9CWnYemEJWGe6gWmH8dZKiMr8615(zpQxhBGHhQB75t5xhts64l)gZyXOxVxNcPtc1m6mE3fJ(1gYQxlnZwyrbqOjtUkkPIgZG8W6oDBQdpQ8io0aGyJBxS(9Rg6P7J0p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Cxp9d1q7gnYG2pqElmP)wI9Fr2)lt)N1a0JXM8gL2CP85zsX0oXRT9yrZzBUYk5ZvSC5YRU6sfQSsjQIA3vpk6t0tvKC7drhrfVQrzxtDPVDyGRD1TDNDSJ6s7SHpp8udTuUcLYbk6r0yXLOMR2)7

自定义触发器代码

循环代码

function (event)
    local name = WA_ClassColorName("player");
    local level = UnitLevel("player");
    local realmName = GetRealmName();
    local localizedClass, englishClass, classIndex = UnitClass("player");
	    local skillTable = {
        ["炼金 :奥金 "] = 17187,
        ["裁缝 :月布 "] = 18560,
    };	
    function init()
        WeakAurasSaved.displays[aura_env.id]["_data_"] = WeakAurasSaved.displays[aura_env.id]["_data_"] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].level = level;
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].class = localizedClass;    
    end;
    
    function correct(startTime)
        local countDown = GetTime() -startTime
        if countDown < 0 then
            countDown = countDown + 4294080
        end;
        return countDown;
    end;
    
	
	    function refreshSkills()
        for skillKey, spellId in pairs(skillTable) do		
		if IsPlayerSpell(spellId) == true then
				     local start, duration, enabled = GetSpellCooldown(spellId)			
            if enabled == 1 and start > 0 and duration > 0 then
                local countDown = correct(start)
                WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration - countDown;
            end;		
		end
        end;
    end;	
    --******  
    function refreshItems()
        local count = GetItemCount(15846)
        if count and count > 0
        then
            startTime, duration, enable = GetItemCooldown(15846)
            local skillKey = "制皮 :筛盐 "
            local countDown = correct(startTime)
            WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration -(countDown);
        end;
        
   
        
    end;
    --******    
    init();
    if event == "TRADE_SKILL_SHOW" or event == "TRADE_SKILL_UPDATE" or event == "TRADE_SKILL_CLOSE" or event == "BAG_UPDATE_COOLDOWN" or event == "BAG_UPDATE"
    then
        refreshItems();
		refreshSkills();
    end;
    
    return true;
end;
循坏

循坏代码2

function (event)
    local name = WA_ClassColorName("player");
    local level = UnitLevel("player");
    local realmName = GetRealmName();
    local localizedClass, englishClass, classIndex = UnitClass("player");
	    local skillTable = {
        ["炼金 :奥金 "] = 17187,
        ["裁缝 :月布 "] = 18560,
    };	
	
		local ItemsTable = {
        ["制皮 :筛盐 "] = 15846,       
    };	
	
    function init()
        WeakAurasSaved.displays[aura_env.id]["_data_"] = WeakAurasSaved.displays[aura_env.id]["_data_"] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].level = level;
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].class = localizedClass;    
    end;
    
    function correct(startTime)
        local countDown = GetTime() -startTime
        if countDown < 0 then
            countDown = countDown + 4294080
        end;
        return countDown;
    end;
    
	
	    function refreshSkills()
        for skillKey, spellId in pairs(skillTable) do		
		if IsPlayerSpell(spellId) == true then
				     local start, duration, enabled = GetSpellCooldown(spellId)			
            if enabled == 1 and start > 0 and duration > 0 then
                local countDown = correct(start)
                WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration - countDown;
            end;		
		end
        end;
    end;	
    --******  
    function refreshItems()
	
        for skillKey, spellId in pairs(ItemsTable) do	
		local count = GetItemCount(spellId)		
		if count and count > 0 then
				     local startTime, duration, enabled = GetItemCooldown(spellId)			
            
                local countDown = correct(startTime)
                WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration - countDown;
          	
		end
        end;	
        
    end;
    --******    
    init();
    if event == "TRADE_SKILL_SHOW" or event == "TRADE_SKILL_UPDATE" or event == "TRADE_SKILL_CLOSE" or event == "BAG_UPDATE_COOLDOWN" or event == "BAG_UPDATE"
    then
        refreshItems();
		refreshSkills();
    end;
    
    return true;
end;

循环代码3【非大师级制皮不触发筛盐器过滤】

function (event)
    local name = WA_ClassColorName("player");
    local level = UnitLevel("player");
    local realmName = GetRealmName();
    local localizedClass, englishClass, classIndex = UnitClass("player");
    local skillTable = {
        ["炼金 :奥金 "] = 17187,
        ["炼金 :死水 "] = 17563,
        ["裁缝 :月布 "] = 18560,
    };    
    
    local ItemsTable = {
        ["制皮 :筛盐 "] = 15846,       
    };    
    
    function init()
        WeakAurasSaved.displays[aura_env.id]["_data_"] = WeakAurasSaved.displays[aura_env.id]["_data_"] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].level = level;
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].class = localizedClass;    
    end;
    
    function correct(startTime)
        local countDown = GetTime() -startTime
        if countDown < 0 then
            countDown = countDown + 4294080
        end;
        return countDown;
    end;
    
    
    function refreshSkills()
        for skillKey, spellId in pairs(skillTable) do        
            if IsPlayerSpell(spellId) == true then
                local start, duration, enabled = GetSpellCooldown(spellId)            
                if enabled == 1 and start > 0 and duration > 0 then
                    local countDown = correct(start)
                    WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration - countDown;
                end;        
            end
        end;
    end;    
    --******  
    function refreshItems()
        
        for skillKey, spellId in pairs(ItemsTable) do    
            local count = GetItemCount(spellId)        
            
            if spellid == 15846 then
                if IsPlayerSpell(10662) == true then                   
                    goto = true  
                else
                    goto = false
                end
            else
                goto = true    
            end
            
            
            if count and count > 0  and goto == true then
                local startTime, duration, enabled = GetItemCooldown(spellId)            
                local countDown = correct(startTime)
                WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration - countDown;             
            end           
        end;    
        
    end;
    --******    
    init();
    if event == "TRADE_SKILL_SHOW" or event == "TRADE_SKILL_UPDATE" or event == "TRADE_SKILL_CLOSE" or event == "BAG_UPDATE_COOLDOWN" or event == "BAG_UPDATE"
    then
        refreshItems();
        refreshSkills();
    end;
    
    return true;
end;

逐行代码

function (event)
    local name = WA_ClassColorName("player");
    local level = UnitLevel("player");
    local realmName = GetRealmName();
    local localizedClass, englishClass, classIndex = UnitClass("player");
	local Spellids ={17187,18560}
    function init()
        WeakAurasSaved.displays[aura_env.id]["_data_"] = WeakAurasSaved.displays[aura_env.id]["_data_"] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name] or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills = WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].skills or {}
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].level = level;
        WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name].class = localizedClass;    
    end;
    
    function correct(startTime)
        local countDown = GetTime() -startTime
        if countDown < 0 then
            countDown = countDown + 4294080
        end;
        return countDown;
    end;
    
    --******  
    function refreshItems()
        local count = GetItemCount(15846)
        if count and count > 0
        then
            startTime, duration, enable = GetItemCooldown(15846)
            local skillKey = "制皮 :筛盐 "
            local countDown = correct(startTime)
            WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration -(countDown);
        end;
        
        local aojin = IsPlayerSpell(17187)
        if aojin and aojin == true
        then
            startTime, duration, enable = GetSpellCooldown(17187)
            local skillKey = "炼金 :奥金 "
            local countDown = correct(startTime)
            WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration -(countDown);
        end;    
        
        local caifeng = IsPlayerSpell(18560)
        if caifeng and caifeng == true
        then
            startTime, duration, enable = GetSpellCooldown(18560)
            local skillKey = "裁缝 :月布 "
            local countDown = correct(startTime)
            WeakAurasSaved.displays[aura_env.id]["_data_"][realmName][name]["skills"][skillKey] = time() + duration -(countDown);
        end;         
        
    end;
    --******    
    init();
    if event == "TRADE_SKILL_SHOW" or event == "TRADE_SKILL_UPDATE" or event == "TRADE_SKILL_CLOSE" or event == "BAG_UPDATE_COOLDOWN" or event == "BAG_UPDATE"
    then
        refreshItems();
    end;
    
    return true;
end;

文章源自助手阿喜-https://zsaxi.com/4395文章源自助手阿喜-https://zsaxi.com/4395
  • 扫码入群
  • 加群获取附件资源,请查看教程说的资源名称查找。
  • weinxin
  • 支持打赏
  • 如果觉得本文对你有帮助,可以打赏任意金额已维持网站运行。
  • weinxin
Games最后更新:2020-10-15
助手阿喜
  • 版权声明 本文源自 NGA 整理 发表于 2020年2月8日 18:58:07
评论  1  访客  0  引用  1

    来自外部的引用