魔兽世界判断目标是否被变羊的宏
时间: 2023-08-01 15:15:11 浏览: 282
以下是判断目标是否被变羊的宏:
```
#showtooltip
/cast [@mouseover,harm,nodead][@target,harm,nodead]变形术
/stopmacro [noharm]
/run local c={"UnitAffectingCombat","UnitCanAssist","UnitCanAttack","UnitExists","UnitIsCharmed","UnitIsConnected","UnitIsDead","UnitIsDeadOrGhost","UnitIsEnemy","UnitIsFriend","UnitIsGhost","UnitIsPlayer","UnitIsPVP","UnitIsUnit","UnitPlayerControlled","UnitReaction"}local d,e,f,g,h,i,j,k,l,m,n,o,p=UnitName("target")if not n then return end;for q,r in ipairs(c)do l=UnitIsAffected(r,"target");if l then f=true break end end;if f then g=UnitIsDeadOrGhost("target")h=UnitIsCharmed("target")i=UnitIsPlayer("target")j=UnitIsUnit("target","player")k=UnitIsFriend("player","target")m=UnitIsPVP("target")o=UnitReaction("player","target")end;if f and not g and not h and not i and not j and not k and not m and not o then SendChatMessage(UnitName("target").."被变羊了!","SAY")else SendChatMessage("无法变羊该目标!","SAY")end
```
这个宏可以在魔兽世界中检测你的目标是否被变羊,并通过聊天频道向其他玩家发送相关信息。
阅读全文