WBE焦点跟随并自动攻击焦点目标的代码
在玩一命模式或者双号辅助的情况下,起了2个号自动跟随大号焦点 并且 辅助攻击抄袭了2个大佬的代码 并且修改了下
测试完美运行
代码中使用的是暗牧,可自行换成其他职业辅助也可以
WBE明文代码:
local Tbl = BeeUnitBuffList("target")
local buff = BeeUnitBuffList("player")
local focus = "focus"
local focuscombat = BeeUnitAffectingCombat(focus)
local attacking = BeeUnitAffectingCombat()
BeeRun("/console Sound_EnableSFX 0 ")
--是否是团队
if GetNumRaidMembers()>0 then
grouptype="raid"
else
grouptype="party"
end
--跟随焦点
if UnitName("focus") and ((BeeRange("focus")<=30 and BeeRange("focus")>=10) or not BeeUnitIsFollow()) then
FollowUnit("focus");
return
end
--自动攻击焦点目标
if BeeRange(focus) < 30 and focuscombat and not attacking then
if UnitExists("focustarget") then
RunMacroText("/target focustarget\n/attack")
end
end
BeeRun("/console Sound_EnableSFX 1 ") --至此开启技能提示音
--下面是小号牧师跟随大号辅助攻击的代码 请大佬斧正
--治疗焦点目标
--给大号战士上buff
if UnitExists("focus")==1 and BeeRange("focus")<=40 and not UnitIsDeadOrGhost("focus") andBeeUnitBuff("真言术:韧","focus")<=1and BeeIsRun("真言术:韧","focus")
thenBeeRun("真言术:韧","focus");
return;
end
--给自己上buff
if BeePlayerBuffTime("真言术:韧")<0 then
BeeRun("/cast 真言术:韧","Player");
return;
end
--给大号加血
if UnitExists("focus")==1 and BeeRange("focus")<=40 and not UnitIsDeadOrGhost("focus") and BeeUnitBuff("次级治疗术","focus")<1 and BeeUnitHealth("focus","%")<=85 and BeeIsRun("次级治疗术","focus")
thenBeeRun("次级治疗术","focus");
return;
end
--给自己加血
if BeeUnitHealth("player","%")<=85 and BeeIsRun("次级治疗术","focus") and not BeeUnitCastSpellName("player")
thenBeeRun("次级治疗术","Player");
return;
end
--辅助大号打怪
if BeeUnitUnitIsPlayer(0) and BeeUnitMana("player","%")>40 and BeeSpellCoolDown("惩击")==0 and BeeIsRun("/cast 惩击") then
BeeRun("/cast 惩击")
return;
end
多谢分享
页:
[1]