以SS为例
/script local n,s,k,j,d,f={"Abomi","Sarge","Immol"},{"腐蚀术","痛苦诅咒","献祭"};for k=1,3 do f=nil;for j=1,16 do d=UnitDebuff("target",j);if d and strfind(d,n[k]) then f=1;break;end;end;if not f then CastSpellByName(s[k]);break;end;end;
类似这样的一键DOT宏在有SS队友的情况下会被干扰,因为API没有办法判断目标的DOT是否来自于你
所以战场,RAID情境下,此类宏的使用价值极低。
但是还是有办法让此类DEBUFF判断宏在有同职业队友情况下生效的
方法就是通过DOT计时插件联合判断
由于插件的DOT计时启用(Chronometer为例),是以角色使用法术的记录来确定(目标抵抗与否也会进行判断)
所以根据UnitDebuff或者IsBuffActive等API先判断目标是否含有DEBUFF,再判断插件是否启用DOT计时,就能相对完美的解决同职业队友干扰的问题
我的实现方法是调用Chronometer插件的API进行判断(集成在IsBuffActive插件里,有兴趣的自行下载)
pan
baidu
com/
s
/
1_
7dxOBdH1on
-
FYDM2fK8-g ![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
:w94o
增强版DEBUFF判断宏示例
/script local n,s,k,j,d,f={"AbominationExplosion","Requi","Sarge","LifeDrain"},{"腐蚀术","生命虹吸","痛苦诅咒","吸取生命"};for k=1,4 do f=nil;if IsChronometerActive(n[k],UnitName("target")) and IsBuffActive(s[k],"target") then f=1;end;if not f then if UnitClassification("target")~= "normal" then CastSpellByName(s[k]);break;elseif UnitHealth("target") < 20 and (k==2 or k==3) then CastSpellByName(s[4]);break;else CastSpellByName(s[k]);break;end;end;end;
重点:IsChronometerActive(n[k],UnitName("target")) and IsBuffActive(s[k],"target")
记得IsChronometerActive 第一个参数是{"AbominationExplosion","Requi","Sarge","LifeDrain"}之类的DEBUFF ID
/script local n,s,k,j,d,f={"Abomi","Sarge","Immol"},{"腐蚀术","痛苦诅咒","献祭"};for k=1,3 do f=nil;for j=1,16 do d=UnitDebuff("target",j);if d and strfind(d,n[k]) then f=1;break;end;end;if not f then CastSpellByName(s[k]);break;end;end;
类似这样的一键DOT宏在有SS队友的情况下会被干扰,因为API没有办法判断目标的DOT是否来自于你
所以战场,RAID情境下,此类宏的使用价值极低。
但是还是有办法让此类DEBUFF判断宏在有同职业队友情况下生效的
方法就是通过DOT计时插件联合判断
由于插件的DOT计时启用(Chronometer为例),是以角色使用法术的记录来确定(目标抵抗与否也会进行判断)
所以根据UnitDebuff或者IsBuffActive等API先判断目标是否含有DEBUFF,再判断插件是否启用DOT计时,就能相对完美的解决同职业队友干扰的问题
我的实现方法是调用Chronometer插件的API进行判断(集成在IsBuffActive插件里,有兴趣的自行下载)
pan
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
![](https://tb2.bdstatic.com/tb/editor/images/face/i_f01.png?t=20140803)
增强版DEBUFF判断宏示例
/script local n,s,k,j,d,f={"AbominationExplosion","Requi","Sarge","LifeDrain"},{"腐蚀术","生命虹吸","痛苦诅咒","吸取生命"};for k=1,4 do f=nil;if IsChronometerActive(n[k],UnitName("target")) and IsBuffActive(s[k],"target") then f=1;end;if not f then if UnitClassification("target")~= "normal" then CastSpellByName(s[k]);break;elseif UnitHealth("target") < 20 and (k==2 or k==3) then CastSpellByName(s[4]);break;else CastSpellByName(s[k]);break;end;end;end;
重点:IsChronometerActive(n[k],UnitName("target")) and IsBuffActive(s[k],"target")
记得IsChronometerActive 第一个参数是{"AbominationExplosion","Requi","Sarge","LifeDrain"}之类的DEBUFF ID