找回密码
 立即注册
搜索
查看: 434|回复: 1

[通用宏] WBE焦点跟随并自动攻击焦点目标的代码

[复制链接]

50

主题

6

回帖

164

积分

注册会员

积分
164
发表于 2025-1-12 09:56:48 | 显示全部楼层 |阅读模式
在玩一命模式或者双号辅助的情况下,起了2个号  自动跟随大号焦点 并且 辅助攻击
抄袭了2个大佬的代码 并且修改了下
测试完美运行


代码中使用的是暗牧,可自行换成其他职业辅助也可以
WBE明文代码:
  1. local Tbl = BeeUnitBuffList("target")
  2. local buff = BeeUnitBuffList("player")
  3. local focus = "focus"
  4. local focuscombat = BeeUnitAffectingCombat(focus)
  5. local attacking = BeeUnitAffectingCombat()
  6. BeeRun("/console Sound_EnableSFX 0 ")  
  7. --是否是团队
  8. if GetNumRaidMembers()>0 then
  9.     grouptype="raid"
  10. else
  11.     grouptype="party"
  12. end
  13. --跟随焦点
  14. if UnitName("focus") and ((BeeRange("focus")<=30 and BeeRange("focus")>=10) or not BeeUnitIsFollow()) then
  15.     FollowUnit("focus");
  16.     return
  17. end
  18. --自动攻击焦点目标
  19. if BeeRange(focus) < 30 and focuscombat and not attacking then
  20.     if UnitExists("focustarget") then
  21.         RunMacroText("/target focustarget\n/attack")
  22.     end
  23. end
  24. BeeRun("/console Sound_EnableSFX 1 ") --至此开启技能提示音
  25. --下面是小号牧师跟随大号辅助攻击的代码 请大佬斧正

  26. --治疗焦点目标
  27. --给大号战士上buff
  28.     if UnitExists("focus")==1 and BeeRange("focus")<=40 and not UnitIsDeadOrGhost("focus") and  BeeUnitBuff("真言术:韧","focus")<=1  and BeeIsRun("真言术:韧","focus")
  29.        then  BeeRun("真言术:韧","focus");
  30.        return;
  31.     end
  32. --给自己上buff
  33.     if BeePlayerBuffTime("真言术:韧")<0   then
  34.         BeeRun("/cast 真言术:韧","Player");
  35.         return;
  36.     end

  37. --给大号加血
  38.     if UnitExists("focus")==1 and BeeRange("focus")<=40 and not UnitIsDeadOrGhost("focus") and BeeUnitBuff("次级治疗术","focus")<1 and BeeUnitHealth("focus","%")<=85 and BeeIsRun("次级治疗术","focus")
  39.        then  BeeRun("次级治疗术","focus");
  40.        return;
  41.     end
  42. --给自己加血
  43.     if BeeUnitHealth("player","%")<=85 and BeeIsRun("次级治疗术","focus") and not BeeUnitCastSpellName("player")
  44.        then  BeeRun("次级治疗术","Player");
  45.        return;
  46.     end
  47. --辅助大号打怪
  48.     if BeeUnitUnitIsPlayer(0) and BeeUnitMana("player","%")>40 and BeeSpellCoolDown("惩击")==0 and BeeIsRun("/cast 惩击") then
  49.         BeeRun("/cast 惩击")
  50.         return;
  51.     end
复制代码


0

主题

58

回帖

124

积分

注册会员

积分
124
发表于 2025-6-13 01:32:04 | 显示全部楼层
多谢分享
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|138wow魔兽私服论坛

GMT+8, 2026-11-30 11:31 , Processed in 0.050624 second(s), 20 queries .

Powered by Discuz! X3.5 Designed by 138wow.com © 魔兽世界私服,魔兽世界私服论坛

© 2001-2025 Discuz! Team.