LUACN论坛

 找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
热搜: YJWOW MagicStone BoL
查看: 121|回复: 5

[函数] 有大神帮忙改下吗

[复制链接]
发表于 2025-4-11 10:36:07 | 显示全部楼层 |阅读模式
[color=rgba(0, 0, 0, 0.9)]这是惩戒骑先使用复仇圣印保持当前目标复仇圣印的5buff层,然后使用命令圣印,在当前目标复仇圣印BUFF时间不足2秒时自动切回复仇圣印,当前目标复仇圣印保buff5层自动切回命令圣印的脚本,哪里错了有有大神帮忙改下吗?
[Lua] 纯文本查看 复制代码
local isCombat = BeeIsCombat()
if not isCombat then return end
local vengeanceStacks = BeeTargetDeBuffCount("复仇圣印") or 0  -- 获取目标Debuff层数
local vengeanceTime = BeeTargetDeBuffTime("复仇圣印") or 0    -- 获取目标Debuff剩余时间
local currentSeal = BeePlayerBuffTime("复仇圣印") and 1 or
                   (BeePlayerBuffTime("命令圣印") and 2 or 0)
if currentSeal == 2 then -- 当前使用命令圣印
    if vengeanceStacks <5 and vengeanceTime <2 then
        if BeeIsRun("复仇圣印") then
            BeeRun("复仇圣印")
        end
    end
elseif currentSeal == 1 then -- 当前使用复仇圣印
    if vengeanceStacks >=5 and vengeanceTime >5 then
        if BeeIsRun("命令圣印") then
            BeeRun("命令圣印")
        end
    end
else -- 无圣印时默认开启复仇
    if BeeIsRun("复仇圣印") then
        BeeRun("复仇圣印")
    end
end
if vengeanceStacks >=4 and vengeanceTime <3 and currentSeal ~=1 then
    if BeeIsRun("复仇圣印") then
        BeeRun("复仇圣印")
    end
end


回复

使用道具 举报

发表于 2025-4-12 14:24:21 | 显示全部楼层
没仔细看, 目标身上的debuff  应该不叫 复仇圣印  吧?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-4-12 15:13:23 | 显示全部楼层
zhudi23 发表于 2025-4-12 02:24 PM
没仔细看, 目标身上的debuff  应该不叫 复仇圣印  吧?

我改了也不行,试了好多次了
回复 支持 反对

使用道具 举报

发表于 2025-4-12 15:15:04 | 显示全部楼层
复制到deepseek上去优化一下不应该差不多可以了吗
回复 支持 反对

使用道具 举报

发表于 2025-4-13 12:28:29 | 显示全部楼层
基础认识不行  拿AI硬写  更难找到毛病了
回复 支持 反对

使用道具 举报

发表于 2025-4-13 13:59:21 | 显示全部楼层
本帖最后由 zhudi23 于 2025-4-13 02:02 PM 编辑

local vengeanceStacks = BeeTargetDeBuffCount("血之腐蚀")   -- 获取目标Debuff层数
local vengeanceTime = BeeTargetDeBuffTime("血之腐蚀")    -- 获取目标Debuff剩余时间
local currentSeal = BeePlayerBuffTime("腐蚀圣印")>0 and 1 or
(BeePlayerBuffTime("命令圣印")>0 and 2 or 0)


if currentSeal == 2 then -- 当前使用腐蚀圣印
    if  vengeanceTime <2 then
        if BeeGCD() then
            BeeRun("腐蚀圣印")
        end
    end
elseif currentSeal == 1 then -- 当前使用命令圣印
    if vengeanceStacks >=5 and vengeanceTime >5 then
        if BeeGCD() then
            BeeRun("命令圣印")
        end
    end
else -- 无圣印时默认开启腐蚀
    if BeeGCD() then
        BeeRun("腐蚀圣印")
    end
end
只是修改了一下 问题,诚如版主大佬所说, 希望继续学习,继续优化 祝好运!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-1 08:10 PM , Processed in 0.060923 second(s), 24 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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