验证了网络上流传魔兽世界dly的几个宏,绝对可用,给大家参考
2007-01-22 22:27
344 查看
国内2.0久久不发布,无聊中学习了些魔兽宏的编写。将网上流传的dly宏整理了一下,验证可用后,贴出来供广大玩家参考。
由于wow自带的宏有256字数限制,我使用了supermacro进行了扩展,使其支持7000字的超大宏,这样就可以编写自己的个性宏。
下面是一些编写宏的公共函数,将其添加到supermacro的lua区即可。
--施放魔法,检查魔法值
--锁敌
function TE()
if UnitName("target") == nil or UnitIsDead("target") then
TargetNearestEnemy()
elseif UnitIsFriend("player","target") then
if UnitCanAssist("player","target") then
AssistUnit("target")
else
TargetNearestEnemy()
end
end
end
function C(s,m)
if m==nil or UnitMana("player")>=m then
CastSpellByName(s)
end
end
--检查目标的减益魔法
function BU(s,p)
if p==nil then
p="target"
end
for i=1,16 do
f=UnitDebuff(p,i)
--SendChatMessage(f)
if f then
if string.find(f,s) then
return true
end
else
return false
end
end
return false
end
--检查目标的增益魔法
function B(s,p)
if p==nil then
p="target"
end
for i=1,16 do
f=UnitBuff(p,i)
--SendChatMessage(f)
if f then
if strfind(f,s) then
return true
end
else
return false
end
end
return false
end
--检查能量点
function CP(s,m,e)
if GetComboPoints()>=e and UnitMana("player")>=m then
CastSpellByName(s)
end
end
--精灵之火
function FA()
if not BU("Faerie") then
C("精灵之火")
end
end
--猛虎之怒
function TG()
if not B("猛虎之怒","player") then
C("猛虎之怒",30)
end
end
接下来的是一些实用宏,将他们也添加到lua的公共代码区即可。
--根据目标的等级释放野性印记
function yexing()
l={1,10,20,30,40,50,60}
t=UnitLevel("target")
for j=7,1,-1 do
if (t>=l[j]-10) then
CastSpellByName("野性印记(等级 "..j..")")
break
end
end
end
--根据目标的等级释放荆棘
function jingji()
l={6,14,24,34,44,54}
t=UnitLevel("target")
for j=6,1,-1 do
if (t>=l[j]-10) then
CastSpellByName("荆棘术(等级 "..j..")")
break
end
end
end
--判断玩家身上的已有buff决定释放哪种buff
function buff()
--野性印记
if B("Regeneration") == false then
yexing()
--荆棘光环
elseif B("Thorns") == false then
jingji()
end
end
--释放愤怒之前判断目标是否有减益魔法,没有则释放之
function fenlu()
if not BU("StarFall") then
C("月火术(等级 10)")
elseif not BU("FaerieFire") then
C("精灵之火(等级 4)")
else
C("愤怒(等级 8)")
end
end
--给目标上dot
function dot()
if BU("StarFall") == false then
C("月火术(等级 10)")
elseif BU("FaerieFire") == false then
C("精灵之火(等级 4)")
--elseif BU("虫群") == false then
--C("虫群")
end
end
--猫形态攻击
function catAttack()
TE()
CP("凶猛撕咬",35,5)
if not BU("GhoulFrenzy") then
CP("撕扯",30,4)
end
if not BU("Disembowel") then
C("扫击",40)
end
--C("畏缩",60)
C("爪击",45)
TG()
if(not PlayerFrame.inCombat) then
C("攻击")
end
end
--猫形态背刺
function beici()
TE()
if B("Ambush","player") then
C("毁灭",60)
else
C("撕碎",60)
end
end
--猫形态偷袭
function touxi()
TE()
if B("Ambush","player") then
C("突袭",50)
else
C("撕碎",60)
end
end
--熊形态攻击
function bearAttack()
TE()
if not BU("Physical") then
C("低吼")
end
if not BU("Demoralizing") then
C("挫志咆哮",10)
end
C("槌击",10)
if(not PlayerFrame.inCombat) then
C("攻击")
end
end
使用方法,新建一个宏,调用相应的函数即可
例如:
创建一个给目标上dot的宏,只用新建一个宏,添加如下代码:
/script dot()
关于宏的编制,大家有什么好的想法可以讨论下。献丑了,呵呵。
附件中有supermacro,解压后添加到addons下就可以了。里面没有可执行文件,怕有木马的朋友可以自己去信任的网站下载这个插件。 (不好意思,不会添加附件
)
由于wow自带的宏有256字数限制,我使用了supermacro进行了扩展,使其支持7000字的超大宏,这样就可以编写自己的个性宏。
下面是一些编写宏的公共函数,将其添加到supermacro的lua区即可。
--施放魔法,检查魔法值
--锁敌
function TE()
if UnitName("target") == nil or UnitIsDead("target") then
TargetNearestEnemy()
elseif UnitIsFriend("player","target") then
if UnitCanAssist("player","target") then
AssistUnit("target")
else
TargetNearestEnemy()
end
end
end
function C(s,m)
if m==nil or UnitMana("player")>=m then
CastSpellByName(s)
end
end
--检查目标的减益魔法
function BU(s,p)
if p==nil then
p="target"
end
for i=1,16 do
f=UnitDebuff(p,i)
--SendChatMessage(f)
if f then
if string.find(f,s) then
return true
end
else
return false
end
end
return false
end
--检查目标的增益魔法
function B(s,p)
if p==nil then
p="target"
end
for i=1,16 do
f=UnitBuff(p,i)
--SendChatMessage(f)
if f then
if strfind(f,s) then
return true
end
else
return false
end
end
return false
end
--检查能量点
function CP(s,m,e)
if GetComboPoints()>=e and UnitMana("player")>=m then
CastSpellByName(s)
end
end
--精灵之火
function FA()
if not BU("Faerie") then
C("精灵之火")
end
end
--猛虎之怒
function TG()
if not B("猛虎之怒","player") then
C("猛虎之怒",30)
end
end
接下来的是一些实用宏,将他们也添加到lua的公共代码区即可。
--根据目标的等级释放野性印记
function yexing()
l={1,10,20,30,40,50,60}
t=UnitLevel("target")
for j=7,1,-1 do
if (t>=l[j]-10) then
CastSpellByName("野性印记(等级 "..j..")")
break
end
end
end
--根据目标的等级释放荆棘
function jingji()
l={6,14,24,34,44,54}
t=UnitLevel("target")
for j=6,1,-1 do
if (t>=l[j]-10) then
CastSpellByName("荆棘术(等级 "..j..")")
break
end
end
end
--判断玩家身上的已有buff决定释放哪种buff
function buff()
--野性印记
if B("Regeneration") == false then
yexing()
--荆棘光环
elseif B("Thorns") == false then
jingji()
end
end
--释放愤怒之前判断目标是否有减益魔法,没有则释放之
function fenlu()
if not BU("StarFall") then
C("月火术(等级 10)")
elseif not BU("FaerieFire") then
C("精灵之火(等级 4)")
else
C("愤怒(等级 8)")
end
end
--给目标上dot
function dot()
if BU("StarFall") == false then
C("月火术(等级 10)")
elseif BU("FaerieFire") == false then
C("精灵之火(等级 4)")
--elseif BU("虫群") == false then
--C("虫群")
end
end
--猫形态攻击
function catAttack()
TE()
CP("凶猛撕咬",35,5)
if not BU("GhoulFrenzy") then
CP("撕扯",30,4)
end
if not BU("Disembowel") then
C("扫击",40)
end
--C("畏缩",60)
C("爪击",45)
TG()
if(not PlayerFrame.inCombat) then
C("攻击")
end
end
--猫形态背刺
function beici()
TE()
if B("Ambush","player") then
C("毁灭",60)
else
C("撕碎",60)
end
end
--猫形态偷袭
function touxi()
TE()
if B("Ambush","player") then
C("突袭",50)
else
C("撕碎",60)
end
end
--熊形态攻击
function bearAttack()
TE()
if not BU("Physical") then
C("低吼")
end
if not BU("Demoralizing") then
C("挫志咆哮",10)
end
C("槌击",10)
if(not PlayerFrame.inCombat) then
C("攻击")
end
end
使用方法,新建一个宏,调用相应的函数即可
例如:
创建一个给目标上dot的宏,只用新建一个宏,添加如下代码:
/script dot()
关于宏的编制,大家有什么好的想法可以讨论下。献丑了,呵呵。
附件中有supermacro,解压后添加到addons下就可以了。里面没有可执行文件,怕有木马的朋友可以自己去信任的网站下载这个插件。 (不好意思,不会添加附件
)
相关文章推荐
- 这篇文章主要为大家详细介绍了jQuery密码强度验证控件使用详解的相关资料,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
- C# ASP.NET 开源网上商城、外贸产品网上展示的几个效果图 -- 仅供大家参考
- 写给刚入门的兄弟们,我常用的几个字段命名参考,大家都这么命名,我们写程序就更规范了
- 几个简单网络爬虫的例子--还没验证
- 验证码识别参考,qq验证码识别的一个源代码,现在已不可用,但是可以作为参考
- [原创]绝对能够测试你的C语言功力的几个问题 - 参考答案
- 分享一个链接,MS官方的解释:关于网络上流传的通过修改组策略“解除XP/WIN7系统默认限制20%的网速”来提高网速的问题。希望大家不要被误导。
- 整理一些网络上的PCA算法,供大家参考
- Java读取网络数据(新浪网址)InputStream的数据流操作实录笔记(一) 分享出来供大家参考!
- C# ASP.NET 开源网上商城、外贸产品网上展示的几个效果图 -- 仅供大家参考
- 写给刚入门的兄弟们,我常用的几个字段命名参考,大家都这么命名,我们写程序就更规范了
- Android-验证网络是否可用
- 写给刚入门的兄弟们,我常用的几个字段命名参考,大家都这么命名,我们写程序就更规范了
- android-验证网络是否可用
- 几个好东西,大家看看,绝对够劲!哈哈!
- 网络编程 学习参考的几个链接
- Java、Android中的回调(callBack)我写的一个网络回调大家可以参考参考
- 找到几个翻译网络标准相关的网站,大家有空可以去参与一下
- 开源网上商城、外贸产品网上展示的几个效果图 C# ASP.NET -- 仅供大家参考
- 网络上流传的几个博客推广方法