我写了个跟随宏
if BeeCastSpellFast() then return;end
if UnitName("focus") and ((BeeRange("focus")<=25 and BeeRange("focus")>=10) or not BeeUnitIsFollow()) then
FollowUnit("focus");
end
还有一个攻击宏的目标的代码。,,,,不知道对不对
--自动攻击焦点目标
if not IsMounted("player") then
BeeRun("/target [harm][@focustarget,harm]");
return true;
end
local focus = "focus"
local focuscombat = BeeUnitAffectingCombat(focus)
local attacking = BeeUnitAffectingCombat()
if 干饭 or 喝水 or 坐骑 or 施法中 or 光荣牺牲 then
return true;
end
if BeeRange(focus) < 35
and focuscombat
and not attacking then
if UnitExists("focustarget")
and UnitIsEnemy("focustarget") then
RunMacroText("/target focustarget\n/attack")
end
end
大佬,,看看我这个写的,,总是跟随,不停止,而且攻击方向和距离都不对,稍微方向不对,或者远一点就攻击不到,什么问题啊?
local focus = "focus"
local focuscombat = BeeUnitAffectingCombat(focus)
local attacking = BeeUnitAffectingCombat()
if BeePlayerBuffTime("喝水")>0 or BeePlayerBuffTime("进食")>0 or BeePlayerBuffTime("召唤军马")>0 then
return true;
end
if BeeCastSpellFast() then return;end
if UnitName("focus") and ((BeeRange("focus")<=30 and BeeRange("focus")>=20 or not BeeUnitIsFollow())) then
FollowUnit("focus");
end
if BeeRange(focus) < 35
and focuscombat
and not attacking then
if UnitExists("focustarget")
and UnitIsEnemy("focustarget") then
RunMacroText("/target focustarget\n/attack")
end
end