godisagay1103 发表于 2023-9-1 17:59:08

戒律无脑顶盾函数选择哪个?

本帖最后由 godisagay1103 于 2023-9-3 12:38 PM 编辑

抢盾函数一:
local dun= BeeGroupMinScript('BeeRange(unit)<=40 and BeeIsRun("真言术:盾",unit) and BeeUnitHealth(unit,"%")<=100 or BeeUnitBuff("真言术:盾",unit)<1 and BeeUnitBuff("虚弱灵魂",unit)<1 and BeeUnitBuff("真言术:盾",unit)<1 and UnitCanAssist("player",unit) and not UnitIsDeadOrGhost(unit)',"BeeUnitHealth(unit)",grouptype)
if dun and BeeIsRun("真言术:盾",dun)
then
    BeeRun("真言术:盾",dun);
    return
end


抢盾函数二:
local QTd = BeeGroupMinScript('BeeRange(unit)<=40 and BeeUnitHealth(unit,"%")<=100 and BeeUnitBuff("真言术:盾",unit)<=0 and BeeUnitBuff("虚弱灵魂",unit)<=0 and UnitCanAssist("player",unit) and not UnitIsDeadOrGhost(unit)',"BeeUnitHealth(unit)",grouptype)

if QTd and BeeIsRun("真言术:盾",QTd) then BeeRun("真言术:盾",QTd) return end

昨天打ICC碰到的另一个脚本牧抢盾 我现在有这两个抢盾的函数 但是都不能做到顶盾效果 我的高法伤的盾不能顶掉别人的无虚弱灵魂的低法伤盾
然后抢盾效率明显不如另外一个 有没有优化方案

贾维斯117 发表于 2023-9-1 21:45:04

同等情况下流程越少频率越快,执行速度越小频率越快。去掉不必要的判断再试试
local QTd = BeeGroupMinScript('BeeRange(unit)<=40 and BeeUnitBuff("虚弱灵魂",unit)<=0 and UnitCanAssist("player",unit) and not UnitIsDeadOrGhost(unit)',"BeeUnitHealth(unit)",grouptype)

if QTd then BeeRun("真言术:盾",QTd) return end

黑崎一护 发表于 2023-9-1 22:20:58

local TD= BeeGroupMinScript('BeeRange(unit)<=40 and BeeIsRun("真言术:盾",unit) and BeeUnitBuff("虚弱灵魂",unit)<1 and BeeUnitBuff("真言术:盾",unit)<1and UnitCanAssist("player",unit) and not UnitIsDeadOrGhost(unit)',"BeeUnitHealth(unit)",grouptype)
if TD and BeeIsRun("真言术:盾",TD)
then
    BeeRun("真言术:盾",TD)
    return;
end
40码内判断虚弱灵魂小于1秒的玩家自动 上盾

懒动行不行 发表于 2023-9-2 21:58:37

你的循环里有一些重复得语句,可以优化下。另外,既然是抢盾,那么不加盾的条件只有两个,一个是单位身上有虚弱灵魂,一个单位身上的盾不是你释放的。所以你你要把这两个条件反过来加入到你施放盾的逻辑里,而你现在的脚本只满足条件1,对于条件2你的写法仅仅是盾的持续时间少于1

懒动行不行 发表于 2023-9-2 22:02:07

抢盾一定要确认自己的法伤比其他牧师高,否则很容易循环卡死

godisagay1103 发表于 2023-9-3 15:50:31

懒动行不行 发表于 2023-9-2 10:02 PM
抢盾一定要确认自己的法伤比其他牧师高,否则很容易循环卡死

我确实是法强最高的盾 但是套盾时还是会显示 已有更强大的法术

懒动行不行 发表于 2023-9-3 16:33:42

godisagay1103 发表于 2023-9-3 03:50 PM
我确实是法强最高的盾 但是套盾时还是会显示 已有更强大的法术

有可能是之前的盾是在有BUFF触发,获得更多的法强情况下套的
页: [1]
查看完整版本: 戒律无脑顶盾函数选择哪个?