|
|
本帖最后由 maygo 于 2023-11-30 12:55 AM 编辑
在玩魔兽公益服中,我们接触到了WBE魔蜂插件。总算是给手残党一个稳定的战斗输出方法。即使对职业输出循环不是很了解也能输出不错的DPS。而然大佬们在写wbe.lua的时候,参考的装备,装等,和饰品都不可能和我们一样!
不可避免的卡战斗,技能输出停顿,咔咔响。
今天简单的教大家如何使用魔蜂和修改各职业脚本文件
我们在lua论坛下载了lua代码后。导入WBE中 (教程中使用的是暗牧)
---------------------------------------------------------------------------------------------------------------
如图: 我们导入后启动,咔咔响个不停。运行不流畅
该如何修改呢?
点击 输出 查看代码
[Lua] 纯文本查看 复制代码 local Tbl = BeeUnitBuffList("target")
local buff = BeeUnitBuffList("player")
local bysc = "圣盾术,保护之手,寒冰屏障,威慑,消散,致盲,旋风,暗影斗篷,法术反射"
local NeedBreak = "愤怒,星火术,火球术,奥术冲击,奥术飞弹,闪电箭,生命吸取,恐惧,圣光术,快速治疗,强效治疗术,神圣新星,治疗之触,愈合,治疗波,滋养,苦修,变形术,寒冰箭,心灵震爆,混乱之箭,治疗链,烧尽,旋风,根须缠绕"
local bykj = "激怒,狂暴"
local xyqs = "圣盾术,保护之手,寒冰屏障"
--打断控制输出
if (BeeUnitHealth("target","%")<10 or BeeUnitHealth("player","%")<20 or (BeeTargetDeBuffTime("暗言术:痛")>0 and BeeTargetDeBuffTime("噬灵疫病")>0 and GetUnitSpeed("player")>0)) and BeeSpellCoolDown("暗言术:灭")==0 then
BeeRun("/cast 暗言术:灭");
return true;
end
if UnitExists("target")==1 and not UnitIsDeadOrGhost("target") and IsSpellInRange("暗言术:痛","target")==1 and not BeeStringFind(bysc,Tbl) and (BeeUnitHealth("target","%")>10 or BeeSpellCD("暗言术:灭")>0) then
if BeeUnitUnitIsPlayer(1) and BeeRange("target")<8 and not BeeStringFind(bykj,Tbl) then
if BeeSpellCD("心灵尖啸")>0 and BeeTargetDeBuffTime("心灵尖啸")<0 and BeeSpellCoolDown("心灵惊骇")==0 and BeeUnitHealth("player","%")<40 then
BeeRun("/cast 心灵惊骇")
end
if BeeSpellCoolDown("心灵尖啸")==0 and not BeeStringFind("恐惧",Tbl) then
BeeRun("/cast 心灵尖啸")
end
end
if BeeStringFind(NeedBreak,BeeUnitCastSpellName()) then
if BeeSpellCoolDown("沉默")==0 then
BeeRun("/cast 沉默","target");
return;
end
end
if BeeTargetDeBuffTime("噬灵疫病")<=1 and not BeeUnitCastSpellName("player") then
BeeRun("/cast 噬灵疫病","target")
return true;
end
if BeeTargetDeBuffTime("暗言术:痛")<=1 and not BeeUnitCastSpellName("player") then
BeeRun("/cast 暗言术:痛","target")
return true;
end
if BeeTargetDeBuffTime("吸血鬼之触")<2 and not BeeUnitCastSpellName("player") then
BeeRun("/cast 吸血鬼之触","target");
BeeUnitCastSpellDelay("吸血鬼之触",0.9);
return true;
end
if BeeTargetDeBuffTime("吸血鬼之触")>12 and BeeUnitCastSpellName("player")=="吸血鬼之触" then
BeeRun("/stopcasting");
return;
end
if BeeSpellCoolDown("心灵震爆")==0 and BeeTargetDeBuffTime("暗言术:痛")>0 and BeeTargetDeBuffTime("噬灵疫病")>0 and BeeTargetDeBuffTime("吸血鬼之触")>0 and not BeeUnitCastSpellName("player") then
BeeRun("/cast 心灵震爆")
return true;
end
if not BeeStringFind("精神鞭笞",Tbl) and BeeTargetDeBuffTime("暗言术:痛")>0 and BeeTargetDeBuffTime("噬灵疫病")>0 and BeeTargetDeBuffTime("吸血鬼之触")>0 and (BeeSpellCD("心灵震爆")>0 or BeeUnitHealth("target","%")<40) then
BeeRun("/cast 精神鞭笞","target")
return true;
end
end
我们分析一下
这个脚本首先对技能 BeeRun("/cast 暗言术:灭") 判断
条件是
[Lua] 纯文本查看 复制代码 if (BeeUnitHealth("target","%")<10 or BeeUnitHealth("player","%")<20 or (BeeTargetDeBuffTime("暗言术:痛")>0 and BeeTargetDeBuffTime("噬灵疫病")>0 and GetUnitSpeed("player")>0)) and BeeSpellCoolDown("暗言术:灭")==0
目标血量 <10 或者 自己血量<20 目标有暗言术:痛 ,噬灵疫病 debuff
而然在实际的团本中。暗牧是很少有条件释放 暗言术:灭 这个技能的。综合自己的习惯 我们考虑删除这行代码
继续看下面的代码
[Lua] 纯文本查看 复制代码 if BeeTargetDeBuffTime("噬灵疫病")<=1 and not BeeUnitCastSpellName("player") then
BeeRun("/cast 噬灵疫病","target")
return true;
end
目标 debuff 噬灵疫病 时间小于<=1 和 不在施法中 then
BeeRun("/cast 噬灵疫病","target")
这里如果不对条件进行限制 有可能造成卡顿,我们尝试来补充一下 如下:
[Lua] 纯文本查看 复制代码 if BeeUnitAffectingCombat("player") and UnitExists("target") and not UnitIsDeadOrGhost("target") and BeeRange("target")<=35 then
if BeeTargetDeBuffTime("噬灵疫病")<=1 and BeeIsRun("/cast 噬灵疫病") and not BeeUnitCastSpellName("player") then
BeeRun("/cast 噬灵疫病","target")
BeeUnitCastSpellDelay("噬灵疫病",0.3) return
end
首先加入战斗状态检测BeeUnitAffectingCombat("player") 和目标的状态检测 UnitExists("target") and not UnitIsDeadOrGhost("target")
目标的距离检测BeeRange("target")<=35
BeeTargetDeBuffTime("噬灵疫病")<=1 目标debuff时间检测
BeeIsRun("/cast 噬灵疫病") 是否可以施放技能
not BeeUnitCastSpellName("player") 不在施法读条中
BeeUnitCastSpellDelay("噬灵疫病",0.3) 施法成功后 停顿0.3秒 这里考虑到卡技能 延时一下更流畅
其他技能 我们依次添加条件限制
[Lua] 纯文本查看 复制代码 if BeeTargetDeBuffTime("暗言术:痛")<=1 and BeeIsRun("/cast 暗言术:痛") and not BeeUnitCastSpellName("player") then
BeeRun("/cast 暗言术:痛","target")
BeeUnitCastSpellDelay("暗言术:痛",0.5)
return
end
if BeeTargetDeBuffTime("吸血鬼之触")<2 and BeeIsRun("/cast 吸血鬼之触") and not BeeUnitCastSpellName("player") then
BeeRun("/cast 吸血鬼之触","target")
BeeUnitCastSpellDelay("吸血鬼之触",1.5)
return
end
if BeeSpellCoolDown("心灵震爆")==0 and BeeTargetDeBuffTime("暗言术:痛")>0 and BeeTargetDeBuffTime("噬灵疫病")>0 and BeeTargetDeBuffTime("吸血鬼之触")>0 and not BeeUnitCastSpellName("player") then
BeeRun("/cast 心灵震爆","target")
BeeUnitCastSpellDelay("心灵震爆",1.5)
return
end
最后 暗牧的填充技能 精神鞭笞 我们放在循环的最后面 这样前面的dot技能施法完成后 才会触发
[Lua] 纯文本查看 复制代码 if not BeeStringFind("精神鞭笞",Tbl) and BeeTargetDeBuffTime("暗言术:痛")>0 and BeeTargetDeBuffTime("噬灵疫病")>0 and BeeTargetDeBuffTime("吸血鬼之触")>0 and (BeeSpellCD("心灵震爆")>0 or BeeUnitHealth("target","%")<40) then
BeeRun("/cast 精神鞭笞","target")
return true;
这里我们也加入了限制条件进行修改 如下:
[Lua] 纯文本查看 复制代码 if BeeTargetDeBuffTime("噬灵疫病")>1 and BeeTargetDeBuffTime("吸血鬼之触")>1 and BeeTargetDeBuffTime("暗言术:痛")>1 and (BeeSpellCD("心灵震爆")>0 or BeeUnitHealth("target","%")<5) then
BeeRun("/cast 精神鞭笞","target")
BeeUnitCastSpellDelay("精神鞭笞",3); return;
end
目标有3dot后 心灵震爆CD冷却中 目标血量小于5%(考虑自己的装备和团队水平,自行修改也可以不用这个血量限制)
最后我们以防万一 可以添加一个全局条件 限制施法中不打断,更加流畅
--施法中暂停
[Lua] 纯文本查看 复制代码 if BeeUnitCastSpellName("player")=="精神鞭笞" then return;end
if BeeUnitCastSpellName("player")=="吸血鬼之触" then return;end
if BeeUnitCastSpellName("player")=="心灵震爆" then return;end
完成后如图:
[Lua] 纯文本查看 复制代码 local Tbl = BeeUnitBuffList("target")
local buff = BeeUnitBuffList("player")
--施法中暂停
if BeeUnitCastSpellName("player")=="精神鞭笞" then return;end
if BeeUnitCastSpellName("player")=="吸血鬼之触" then return;end
if BeeUnitCastSpellName("player")=="心灵震爆" then return;end
--战斗部分
if BeeUnitAffectingCombat("player") and UnitExists("target") and not UnitIsDeadOrGhost("target") and BeeRange("target")<=35 then
if BeeTargetDeBuffTime("噬灵疫病")<=1 and BeeIsRun("/cast 噬灵疫病") and not BeeUnitCastSpellName("player") then
BeeRun("/cast 噬灵疫病","target")
BeeUnitCastSpellDelay("噬灵疫病",0.3) return
end
if BeeTargetDeBuffTime("暗言术:痛")<=1 and BeeIsRun("/cast 暗言术:痛") and not BeeUnitCastSpellName("player") then
BeeRun("/cast 暗言术:痛","target")
BeeUnitCastSpellDelay("暗言术:痛",0.5)
return
end
if BeeTargetDeBuffTime("吸血鬼之触")<2 and BeeIsRun("/cast 吸血鬼之触") and not BeeUnitCastSpellName("player") then
BeeRun("/cast 吸血鬼之触","target")
BeeUnitCastSpellDelay("吸血鬼之触",1.5)
return
end
if BeeSpellCoolDown("心灵震爆")==0 and BeeTargetDeBuffTime("暗言术:痛")>0 and BeeTargetDeBuffTime("噬灵疫病")>0 and BeeTargetDeBuffTime("吸血鬼之触")>0 and not BeeUnitCastSpellName("player") then
BeeRun("/cast 心灵震爆","target")
BeeUnitCastSpellDelay("心灵震爆",1.5)
return
end
if BeeTargetDeBuffTime("噬灵疫病")>1 and BeeTargetDeBuffTime("吸血鬼之触")>1 and BeeTargetDeBuffTime("暗言术:痛")>1 and (BeeSpellCD("心灵震爆")>0 or BeeUnitHealth("target","%")<40) then
BeeRun("/cast 精神鞭笞","target")
BeeUnitCastSpellDelay("精神鞭笞",3); return;
end
end
教程中使用的暗牧输出代码
感谢大家 互相学习(申请勋章)
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?加入我们
x
|