qq999 发表于 2025-4-19 15:35:35

求教大佬 我写的 这个DK魔法罩 血量到80 不使用 什么情况

if BeeIsRun("反魔法护罩")   and not IsMounted("player")   and not UnitIsDeadOrGhost("player")   and UnitAffectingCombat("player")    and not UnitBuff("player", GetSpellInfo(48707)) -- 精确检测护罩BUFF    and GetTime() - (ams_cd or 0) > 45 -- 冷却系统(实际CD 60秒,留15秒缓冲)then    -- 血量智能检测系统    local currentHealth = UnitHealth("player")/UnitHealthMax("player")*100    local healthThreshold = 80 -- 自定义阈值      -- 智能施法判断(包含防抖机制)    if currentHealth <= healthThreshold         and not (UnitGetIncomingHeals("player") and UnitGetIncomingHeals("player") > 0) -- 排除治疗在读    then      ams_cd = GetTime()      BeeRun("反魔法护罩")      -- 可选调试输出      print("|cff00ff00|r 当前血量:"..string.format("%.1f%%", currentHealth))    endend

lbabey 发表于 2025-4-19 17:01:06

AI 写的?
if BeeUnitHealth("player","%")<=80 and BeeIsRun("反魔法护罩") then
    BeeRun("反魔法护罩")
end

qq999 发表于 2025-4-20 11:27:56

lbabey 发表于 2025-4-19 05:01 PM
AI 写的?
if BeeUnitHealth("player","%")

大佬 就是大佬一眼就看出问题关键   出自哪里都知道 佩服

qq999 发表于 2025-4-20 12:40:00

lbabey 发表于 2025-4-19 05:01 PM
AI 写的?
if BeeUnitHealth("player","%")

大佬你写的 用不了 呢   血量 掉到70了 还不开魔法罩    求教   

lbabey 发表于 2025-4-20 16:06:18

单独 测试 这个 能开的话
那就是优先级的问题
加个return再试试
然后把这放到前面去{:5_247:}

qq999 发表于 2025-4-21 15:46:35

lbabey 发表于 2025-4-20 04:06 PM
单独 测试 这个 能开的话
那就是优先级的问题
加个return再试试


好的谢谢了.....................

xinnifqy 发表于 4 天前

开不了不是符文能量不够么
页: [1]
查看完整版本: 求教大佬 我写的 这个DK魔法罩 血量到80 不使用 什么情况