LUACN论坛

 找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
热搜: YJWOW MagicStone BoL
查看: 7459|回复: 1

血条仇恨变色代码存档

 关闭 [复制链接]
发表于 2018-7-10 22:05:04 | 显示全部楼层 |阅读模式
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:

--血条仇恨变色

hooksecurefunc("CompactUnitFrame_OnUpdate", function(frame)
   if C_NamePlate.GetNamePlateForUnit(frame.unit) ~= C_NamePlate.GetNamePlateForUnit("player") and not UnitIsPlayer(frame.unit) and not CompactUnitFrame_IsTapDenied(frame) then
    local threat = UnitThreatSituation("player", frame.unit) or 0
    local reaction = UnitReaction(frame.unit, "player")
    local name = UnitName(frame.unit)
    local A = UnitBuff(frame.unit,1)
    local B = UnitBuff(frame.unit,2)
    local C = UnitBuff(frame.unit,3)
     
    if name == "邪能炸药" then  --邪能炸药
      r, g, b = 0, 1, 0    
    elseif A == "戈霍恩共生体" or B == "戈霍恩共生体" or C == "戈霍恩共生体" then  --共生
      r, g, b = 0, 0, 1    
    elseif name == "戈霍恩之嗣" then  --共生小怪
      r, g, b = 1, 0, 1    
    elseif threat == 3 then
            r, g, b = 0.3, 0, 0.6   -- 仇恨是你 颜色
        elseif threat == 1 or threat == 2 then      
            r, g, b = 1, 0.5, 0    -- 高仇恨  颜色
    elseif UnitIsUnit(frame.displayedUnit, "target") then
      r, g, b = 0, 1, 1  -- 你的目标 颜色
    elseif reaction == 4 then
      r, g, b = 1, 1, 0    -- 中立怪 黄色
        else
      r, g, b = 1, 0, 0
        end
      frame.healthBar:SetStatusBarColor(r, g, b, 1)
   end
end)

--紫色 0.3, 0, 0.6
--蓝色 0, 0, 1
--橙色 1, 0.5, 0
--黄色 1, 1, 0
--红色 1, 0, 0
--绿色 0, 1, 0
--青色 0, 1, 1
--粉色 1, 0, 1



http://bbs.ngacn.cc/read.php?&tid=11477676
回复

使用道具 举报

发表于 2018-12-3 22:45:50 | 显示全部楼层
唉!累了啊!回帖,拿米,求加分!哈哈。。。痛恨邪恶
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

小黑屋|手机版|Archiver|LUACN论坛

GMT+8, 2024-3-29 05:59 AM , Processed in 0.044337 second(s), 16 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表