这些都是曾经在BAIDU上找到的.
如果侵犯了作者的著作权........我还是先道歉好了...
-------------------------------------------
1楼2楼和4楼为通用宏的制作和基本原理
3楼为宏应用的高级部分说明
5楼为常用宏收集
PS:宏的问题不要问我啦~头疼...
----------------------------
终结宏教程 (转)
都是经常出现的问题
由于WOW 2.0即将来临,宏的写法也将发生巨大变化,由于CastSpellByName()和UseAction()两个核心函数的禁用,到时这里很多宏将需要新的写法,甚至失效.基础知识
1. 关于一键xx宏
公共CD是WOW中的基本法律,你平时要遵守,用宏仍然要遵守,所以那些需要按一下就能“变羊气定炎爆火冲冰锥”的可以离开了,我们无能为力,这里所说的一键xx是指:同一个宏,你每按一下做一个动作,同一个宏反复使用可以智能做出一系列反应,两次按键之间清自己留出公共CD时间
2. 动作条编号
下面的宏经常会要求你自己填某技能在动作条上的编号,这是因为技能/物品的冷却时间,射程等信息只能这样得到
动作条共有6个,每条包括12个按钮,共72个,通过菜单->界面设置 可以全部显示出来
图上动作条上红色数字是每条第一个按钮和最后一个按钮的编号
实际上暴雪提供了120个按钮,不过后面73-120不显示的,通过Flexbar等插件可以全部看到
3. 技能书编号
上边动作条编号大部分时间可以用技能在法术书中的编号代替,这样可以有效减少动作条的使用
但并不是都能代替,因为使用法术书中的编号只能得到技能的冷却信息,射程等其他信息无法得到
得到技能在法术书中编号请使用这个宏
技能名不要加等级,比如 多重射击
/script local s,i,n="你要查的技能名",1;while 1 do n=GetSpellName(i,"spell");if n then if strfind(n,s) then ChatFrame1:AddMessage(i);break;end;i=i+1;else break;end;end;
4. 物品在背包中的位置
现在使用背包中的物品必须指定物品所在包裹编号,以及物品在包裹中的格子序号:UseContainerItem(bag, slot)
bag就是包裹编号,slot就是包裹中格子序号,WOW 2.0中这种情况将得到改善
包裹编号请看上边的图,每个包裹最左上角编号是1,其余格子从左往右依次2 3 4...
公共部分
关于自身施法,包括给自己打绷带
自身施法已经被WOW整合,给自己打绷带也算自身施法
主菜单 -> 界面设置 -> 自动自身施法 上面打勾
首先是最常被问到的
饰品 + 强力buff + 技能 双开宏的写法
到处都是这种如何写双开宏的问题,无非就是一个强力buff如奥术强化,能量灌注;和一个护符一起开
后面再接一个秒人的技能,其实写法很简单,通用写法:
/施放 强力buff 比如奥术强化,能量灌注,血性狂暴等
/script SpellStopCasting();
/script UseInventoryItem(13); 13是指饰品1,14是饰品2
/script SpellStopCasting();
/施放 秒人技能
只要记住,其实护符也属于强力buff,使用强力buff,开护符都不会触发公共CD,所以才能最后跟一个大技能,
而这些buff,护符之所以能连续使用,是因为后面跟了个/script SpellStopCasting();注意,每句都要跟
例如
奥火法奥术强化 + 护符 + 炎爆
/施放 奥术强化
/script SpellStopCasting();
/script UseInventoryItem(13);
/script SpellStopCasting();
/施放 炎爆术
牧师能量灌注 + 心灵专注 + 护符 + 痛
/施放 能量灌注
/script SpellStopCasting();
/施放 心灵专注
/script SpellStopCasting();
/script UseInventoryItem(13);
/script SpellStopCasting();
/施放 暗言术:痛
格式很简单,每个buff/护符后面跟个/script SpellStopCasting(),看明白了吧?
以后再有问这种月经问题者,砍
附:各职业无公共CD技能表
法师:气定神闲,奥术强化,急速冷却,燃烧
牧师:心灵专注,能量灌注
术士:诅咒增幅,恶魔支配,恶魔牺牲
盗贼:冷血,闪避,急跑,消失
德鲁伊:自然迅捷,低吼,狂怒,猛虎之怒,急奔
猎人:威慑,急速射击
萨满祭司:元素掌握,自然迅捷
战士:破釜沉舟,横扫攻击,嘲讽,挑战怒吼,血性狂暴,盾牌格挡
圣骑士:神恩术,审判
* 各种 “下一次攻击附加xxx”的技能也没有公共CD,比如猎人猛禽,战士英勇打击,熊德捶击
自动射击,魔杖射击等也属于这种情况!
双饰品 + 强力buff + 技能
有些有钱人不止有一个饰品,而现在饰品不能双开,开了一个另一个也跟着进入CD,这就需要使用下边的双饰品宏
两个饰品同时佩戴,哪个CD好了用哪个
/script local c,s,x,u,p,d,e,_=CastSpellByName,SpellStopCasting,GetInventoryItemCooldown,UseInventoryItem,"player";c("奥术强化");s();_,d,e=x(p,13);if d<2 and e>0 then u(13);else _,d,e=x(p,14);if d<2 and e>0 then u(14);end;end;s();c("炎爆术");
其他职业技能,种族天赋等请自己替换,同样,再有问类似月经问题者,砍
铁皮手雷
点一下用手雷,再点一下取消并再用手雷,没瞄好可以重新瞄准
这个宏会停止自动攻击,铁皮手雷不需要放到特定格子,会自动搜索
/script local b,s,l;if PlayerFrame.inCombat then AttackTarget();end;SpellStopCasting();for b=0,4 do for s=1,18 do l=GetContainerItemLink(b,s);if l and strfind(l,"铁皮手雷") then UseContainerItem(b,s);break;end;end;end;
随机坐骑宏
把马放到最右边包里,从第一格开始往后放,你有几个坐骑就把上边红色数字改成几(不包括召唤的)
想放在其他地方的,参考上边基础知识自己修改,自动下坐骑的功能取消
/script UseContainerItem(0,random(你坐骑个数));
奸商叫卖宏
把你要叫买的东西放到最左边的包里,会把里边所有的东西在交易频道喊出来
喊话一行放的物品数目有限制的,所以每行只放了4个物品,分多次喊完
/2 出售以下物品,要的MM
/script local s,i,n,l="",1,0;while i<19 do l=GetContainerItemLink(4,i);if l then s=s.." "..l;n=n+1;if n>2 or i>17 then SendChatMessage(s,"CHANNEL",nil,2);s="";n=0;end;end;i=i+1;end;
切换动作条
在1,2两动作条间切换,数字可以自己改
/script if CURRENT_ACTIONBAR_PAGE==1 then CURRENT_ACTIONBAR_PAGE=2;else CURRENT_ACTIONBAR_PAGE=1;end;ChangeActionBarPage();
双采-切换雷达
/script local t=GetTrackingTexture();if t and strfind(t, "Flower") then CastSpellByName("寻找矿物");else CastSpellByName("寻找草药");end;
寻找精英怪
为了抓到断牙某些猎人会在荒芜蹲几天,阿拉西高地的纳兹加克王子会掉PK极品潮汐咒符,这个宏可以帮助你
/script local s="纳兹加克王子";TargetByName(s,1);if UnitName("target")==s then ChatFrame1:AddMessage("找到");end;
上边名字自己修改
要水宏 - 法师别打我……
如果对方是法师就说点好听的,如果按住Alt再用这个宏,还会同时发出交易,好像有点过分了……
/script if UnitClass("target")=="法师" then SendChatMessage("给点水好吗?谢谢");if IsAltKeyDown() then InitiateTrade("target");end;end;
团队部分
既然是团队部分,那就说明只有在团队下才能使用,不在团里的别跑来问我为什么不能用!
RL专用,给目标上团队标记
现在团长可以给目标上星星,三角等标记,但每次点右键很不方便,试试这个
/script SetRaidTarget("target",图标编号);
上边红色数字取值 0-8
0 = 取消图标
1 = 黄色四角星
2 = 桔黄色圆
3 = 紫色钻石
4 = 绿色三角形
5 = 白色月亮
6 = 蓝色方块
7 = 红色X
8 = 骷髅
这样可以做8个宏,快捷键分别设成Ctrl-F1 ... Ctrl-F8,这个随意,这样给团员分配目标
比如放逐,变羊,休眠等的时候能够事半功倍
而且后面有些宏需要标记作为依据,可以和这个宏搭配使用
所以,先给你的队员分配好每个人专管的数字吧!
自动锁定RL给自己分配的怪,放逐/变羊/休眠并报告,怎么处理随你便
这个宏配合上面的RL分配标记宏一起使用,首先你需要RL给你分配你专门照顾的目标的图标
具体对应关系看上边那个宏,假如是黄色四角星,就是1
把下边红色的数字换成RL给你分配的数字
术士版
/script local i,t;for i=1,GetNumRaidMembers() do t="raid"..i.."target";if GetRaidTargetIndex(t)==RL分给你的编号 then TargetUnit(t);CastSpellByName("放逐");SendChatMessage("%t放逐中","yell");break;end;end;
法师版
/script local i,t;for i=1,GetNumRaidMembers() do t="raid"..i.."target";if GetRaidTargetIndex(t)==RL分给你的编号 then TargetUnit(t);CastSpellByName("变形术");SendChatMessage("%t变羊中","yell");break;end;end;
德鲁伊版
/script local i,t;for i=1,GetNumRaidMembers() do t="raid"..i.."target";if GetRaidTargetIndex(t)==RL分给你的编号 then TargetUnit(t);CastSpellByName("休眠");SendChatMessage("%t催眠中","yell");break;end;end;
注意,这个宏不是每次都能奏效,因为它实际上是通过检查你队友目标是不是制定目标来实现的,
当包括团长的团队中没有任何人选中你的目标时你只能手动去选择了
密语团内所有指定职业 RL用比较好
一次M团队中所有指定职业,打Nef这种BOSS时应该很有用,注意别狂点,会刷屏……
指定职业,说话内容自己改
/script local i,p;for i=1,40 do p="raid"..i;if UnitClass(p)=="牧师" then SendChatMessage("停止治疗!!","whisper",nil,UnitName(p));end;end;
根据目标职业要buff
如果目标是法师就M他要智力,牧师要韧,小D要爪子
/script local x,c,i,s={["法师"]="智力",["牧师"]="韧",["德鲁伊"]="爪子"},UnitClass("target");for i,s in x do if i==c then SendChatMessage("给个"..s..",谢谢~","whisper",nil,UnitName("target"));end;end;
报告当前团队活着、死亡、掉线人数,还有boss血量宏
/script local c,o,d,i,n,a,b,_=0,0,0;for i=1,40 do n,_,_,_,_,_,_,a,b=GetRaidRosterInfo(i);if n then c=c+1;if a then o=o+1;end;if b then d=d+1;end;end;end;SendChatMessage("%t 还剩"..UnitHealth("target").."%,共"..c.."人,死亡"..d..",掉线"..c-o,"raid")
给目标所在小队加群体Buff,并报告,团队/小队均可
/法师版
/script local t,n,g,i,_;CastSpellByName("奥术光辉");if UnitInRaid("player") then t=UnitName("target");for i=1,40 do n,_,g=GetRaidRosterInfo(i);if t==n then SendChatMessage(g.." 队智力已加过","yell");break;end;end;end
/牧师版
/script local t,n,g,i,_;CastSpellByName("坚韧祷言");if UnitInRaid("player") then t=UnitName("target");for i=1,40 do n,_,g=GetRaidRosterInfo(i);if t==n then SendChatMessage(g.." 队韧已加过","yell");break;end;end;end
/德鲁伊版
/script local t,n,g,i,_;CastSpellByName("野性赐福");if UnitInRaid("player") then t=UnitName("target");for i=1,40 do n,_,g=GetRaidRosterInfo(i);if t==n then SendChatMessage(g.." 队爪子已加过","yell");break;end;end;end
团队中自动给血最少的人刷血宏
/script local p,h,i,j="raid",UnitHealth,1;for j=2,GetNumRaidMembers() do if h(p..i)>h(p..j) then i=j;end;end;p=p..i;if not UnitIsDead(p) and UnitIsVisible(p) then TargetUnit(p);CastSpellByName("快速治疗");TargetLastTarget();end;
快速治疗可以换成别的法术,看你什么职业了
团队复活宏
本宏对所有复活职业通用,但首先你要知道你的复活技能所在按钮的序号,看上边基础知识图
用你查到的复活所在的序号替换红色数字
/script local p,i,t="raid";for i=1,40 do t=p..i;if UnitIsDead(t) then TargetUnit(t);if IsActionInRange(你复活按钮编号) then UseAction(你复活按钮编号);SendChatMessage("我开始复活 %t",p);break;end;end;end;
一键驱散宏 - 256字节取代Decursive !!!
注意:
如果这个宏因为你和队友中间隔着柱子等障碍物而停止的话,请你走几步
宏只能帮你简化操作,不能帮你破坏游戏规则
牧师,德鲁伊,萨满祭司的提供了单独的 小队版 和 团队版,请注意版本,solo无效
法师和圣骑士的是团队/小队自适应版,solo无效
原因是法师,圣骑士只有一种解除魔法,而牧师,德鲁伊,萨满祭司有两种,限于256字节写不下了
===========================牧,德,萨 小队版========================
牧师版
/script local s,p,i,d,t,_={["Magic"]="驱散魔法",["Disease"]="驱除疾病"};for i=1,4 do p="party"..i;if CheckInteractDistance(p,4) then d,_,t=UnitDebuff(p,1,1);if d then TargetUnit(p);CastSpellByName(s[t]);TargetLastTarget();break;end;end;end
德鲁伊版
/script local s,p,i,d,t,_={["Poison"]="驱毒术",["Curse"]="解除诅咒"};for i=1,4 do p="party"..i;if CheckInteractDistance(p,4) then d,_,t=UnitDebuff(p,1,1);if d then TargetUnit(p);CastSpellByName(s[t]);TargetLastTarget();break;end;end;end
萨满祭司版
/script local s,p,i,d,t,_={["Poison"]="消毒术",["Disease"]="袪病术"};for i=1,4 do p="party"..i;if CheckInteractDistance(p,4) then d,_,t=UnitDebuff(p,1,1);if d then TargetUnit(p);CastSpellByName(s[t]);TargetLastTarget();break;end;end;end
===========================牧,德,萨 团队版========================
牧师版
/script local s,p,i,d,t,_={["Magic"]="驱散魔法",["Disease"]="驱除疾病"};for i=1,40 do p="raid"..i;if CheckInteractDistance(p,4) then d,_,t=UnitDebuff(p,1,1);if d then TargetUnit(p);CastSpellByName(s[t]);TargetLastTarget();break;end;end;end
德鲁伊版
/script local s,p,i,d,t,_={["Poison"]="驱毒术",["Curse"]="解除诅咒"};for i=1,40 do p="raid"..i;if CheckInteractDistance(p,4) then d,_,t=UnitDebuff(p,1,1);if d then TargetUnit(p);CastSpellByName(s[t]);TargetLastTarget();break;end;end;end
萨满祭司版
/script local s,p,i,d,t,_={["Poison"]="消毒术",["Disease"]="袪病术"};for i=1,40 do p="raid"..i;if CheckInteractDistance(p,4) then d,_,t=UnitDebuff(p,1,1);if d then TargetUnit(p);CastSpellByName(s[t]);TargetLastTarget();break;end;end;end
===========================法,骑 团队,小队自适应版===================
法师版
/script local n,p,t,i,d=4,"party";if UnitInRaid("player") then n=40;p="raid";end;for i=1,n do t=p..i;if UnitDebuff(t,1,1) and CheckInteractDistance(t,4) then TargetUnit(t);CastSpellByName("解除次级诅咒");TargetLastTarget();break;end;end;
圣骑士版
/script local n,p,t,i,d=4,"party";if UnitInRaid("player") then n=40;p="raid";end;for i=1,n do t=p..i;if UnitDebuff(t,1,1) and CheckInteractDistance(t,4) then TargetUnit(t);CastSpellByName("清洁术");TargetLastTarget();break;end;end;
团队自动补单体buff宏
说明:
自动搜索团队内没有相应单体buff(真言术:韧,奥术智慧,野性印记)的团队成员,
为其补上,掉线的,死亡的,不在射程的都会忽略掉。
牧师版 - 真言术:韧
/script local i,p;for i=1,40 do p="raid"..i;if CheckInteractDistance(p,4) and not UnitBuff(p,1,1) then TargetUnit(p);CastSpellByName("真言术:韧");TargetLastTarget();break;end;end;
牧师版 - 神圣之灵
/script local i,j,b,f,p;for i=1,40 do f=nil;p="raid"..i;if CheckInteractDistance(p,4) then for j=1,16 do b=UnitBuff(p,j);if b and strfind(b,"eSpir") then f=1;break;end;end;if not f then TargetUnit(p);CastSpellByName("神圣之灵");break;end;end;end;
法师版:
/script local i,p;for i=1,40 do p="raid"..i;if CheckInteractDistance(p,4) and not UnitBuff(p,1,1) then TargetUnit(p);CastSpellByName("奥术智慧");TargetLastTarget();break;end;end;
德鲁伊版:
/script local i,p;for i=1,40 do p="raid"..i;if CheckInteractDistance(p,4) and not UnitBuff(p,1,1) then TargetUnit(p);CastSpellByName("野性印记");TargetLastTarget();break;end;end;
圣骑士版 - 王者祝福
/script local i,j,b,f,p;for i=1,40 do f=nil;p="raid"..i;if CheckInteractDistance(p,4) then for j=1,16 do b=UnitBuff(p,j);if b and strfind(b,"fKing") then f=1;break;end;end;if not f then TargetUnit(p);CastSpellByName("王者祝福");break;end;end;end;
圣骑士版 - 拯救祝福
/script local i,j,b,f,p;for i=1,40 do f=nil;p="raid"..i;if CheckInteractDistance(p,4) then for j=1,16 do b=UnitBuff(p,j);if b and strfind(b,"fSalv") then f=1;break;end;end;if not f then TargetUnit(p);CastSpellByName("拯救祝福");break;end;end;end;
圣骑士版 - 光明祝福
/script local i,j,b,f,p;for i=1,40 do f=nil;p="raid"..i;if CheckInteractDistance(p,4) then for j=1,16 do b=UnitBuff(p,j);if b and strfind(b,"fHeal") then f=1;break;end;end;if not f then TargetUnit(p);CastSpellByName("光明祝福");break;end;end;end;
可能遇到的问题:
自动选中了目标,却超出射程。那就麻烦你走两步,宏只能方便你操作,不能改变游戏规则
战场部分
冰箱能用就冰箱,没冷却就急速冷却+冰箱:
把 寒冰屏障 放到一个你不用的按钮上,记下编号,编号看上边基础知识,
把红色字用你查到的编号代替
/script local c,i,b,f,d,_=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strsub(b,5)=="Frost" then f=1;break;end;end;if not f then _,d=GetActionCooldown(你冰箱编号);if d>2 then c("急速冷却");SpellStopCasting();end;c("寒冰屏障");end;
奥术强化+护符+炎爆术
护符放哪里无所谓,会自动开已经冷却的护符
/script local c,x,u,s,p,d,e,_=CastSpellByName,GetInventoryItemCooldown,UseInventoryItem,SpellStopCasting,"player";c("奥术强化);s();_,d,e=x(p,13);if d<2 and e then u(13);else _,d,e=x(p,14);if d<2 and e then u(14);end;end;s();c("炎爆术");
气定神闲+炎爆术/施放 气定神闲
/script SellStopCasting();
/施放 "炎爆术"
平时冰箭,出灵风8件效果就火球/script local c,i,b,f=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"Telep") then f=1;break;end;end;if f then c("火球术");else c("寒冰箭");end;
这类宏有个特点,平时用小技能,在特定buff出现后换大技能,比如这里冰箭就是小技能,火球就是大技能
既然分出了大小,那就知道可以怎么改了,火球术可以改成其他“大技能”,比如 炎爆术
冰箭可以换成其他“小技能”,比如 灼烧,都是中国字,别跟我说你不会
平时冰箭,出奥术专注效果就火球/script local c,i,b,f=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"ManaB") then f=1;break;end;end;if f then SpellStopCasting();c("火球术");else c("寒冰箭");end;
同上,火球术可以改成其他的,比如 炎爆术,奥术飞弹,冰箭可以改成 灼烧
平时冰箭,出奥术专注 或 出灵风8件效果就火球
奥术专注是下个法术免费,所以一旦出了特效,要马上取消当前法术,换大的,否则免费特效就被当前法术浪费了
而灵风8件是下个法术瞬发,当前正在引导的不受影响,所以不用取消当前的
由于256字节限制,要取消两个都取消,否则都不取消,那就是说必须都取消,这样灵风会损失当前引导的法术
这种损失就是半个冰箭或者半个灼烧,如果大家认为这种损失可以接受的话,就用这个合并版:
/script local c,i,j,b,f=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and (strfind(b,"ManaB") or strfind(b,"Telep")) then f=1;break;end;end;if f then SpellStopCasting();c("火球术");else c("灼烧");end;
灼烧叠5层就火球,否则继续灼烧
/script local c,i,d,n,f=CastSpellByName;for i=1,16 do d,n=UnitDebuff("target",i);if d and strfind(d,"SoulB") then f=1;break;end;end;if f and n==5 then c("火球术");else c("灼烧");end;
打贼奥爆宏
有目标就放最高级奥暴,没有目标就放1级奥暴
/script if UnitCanAttack("target","player") then CastSpellByName("魔爆术");else CastSpellByName("魔爆术(等级 1)");end;
自动补 冰甲术,奥术智慧,魔法抑制
缺啥补啥,闲着没事按按能强身健体,定国安邦……
/script local n,s,k,j,b,f={"tArm","lSen","hMag"},{"冰甲术","奥术智慧","魔法抑制"};for k=1,3 do f=nil;for j=1,16 do b=UnitBuff("player",j);if b and strfind(b,n[k]) then f=1;break;end;end;if not f then CastSpellByName(s[k]);break;end;end;
自动把被控制的队友变羊,小队,团队通用版
对于会控制玩家的BOSS很有用,比如哈卡,AQ神庙1
/script local n,p,i,t=4,"party";if UnitInRaid("player") then n=40;p="raid";end;for i=1,n do t=p..i;if UnitCanAttack("player",t) then TargetUnit(t);CastSpellByName("变形术");SendChatMessage("%t 被控制,我把他变羊了~",p);break;end;end;
随机变羊,猪,乌龟宏
/script local s,m,r={"",":龟",":猪"},{"%t变羊了","%t是乌龟","%t是猪"},random(3); CastSpellByName("变形术"..s[r]);SendChatMessage(m[r],"yell");
可以根据变的种类喊话,想喊什么自己改
火冲打图腾
/script local t,n,i,_={"根基","战栗","地缚","灼热","清毒",};for _,i in t do n=i.."图腾";TargetByName(n,1);end;CastSpellByName("火焰冲击(等级 1)");
法师自动制造各种魔法宝石
SuperMacro版,宏写不下
左边窗口:
/script ConjureManaStone();
右边窗口:
Code:
function ConjureManaStone()
local x,j,b,s,l,f={"红宝石","黄水晶","翡翠","玛瑙"},1;
while j<5 do
f=nil;
for b=0,4 do
for s=1,18 do
l=GetContainerItemLink(b,s);
if l and strfind(l,"法力"..x[j]) then
f=j;break;
end;
end;
if f then break;end;
end;
if f then j=j+1;
猎人
自动反击,猫鼬,猛禽宏
可以代替猛禽一击,能放的话会自动放反击,猫鼬
出了反击天赋的
在下边依次填上反击,猫鼬撕咬,猛禽一击 在动作条上的编号,查编号看上边基础知识
/script local b,s,j={反击编号,猫鼬编号,猛禽编号},{"反击","猫鼬撕咬","猛禽一击"};for j=1,3 do if IsUsableAction(b[j]) and GetActionCooldown(b[j])==0 then CastSpellByName(s[j]);break;end;end;
没出反击的
在下边依次填上猫鼬撕咬,猛禽一击 在动作条上的编号,查编号看上边基础知识
/script local b,s,j={猫鼬编号,猛禽编号},{"猫鼬撕咬","猛禽一击"};for j=1,2 do if IsUsableAction(b[j]) and GetActionCooldown(b[j])==0 then CastSpellByName(s[j]);break;end;end;
智能钉刺宏
牧师不会解毒,应该用蝰蛇,反倒是对德鲁伊要用蝰蛇1骗驱毒,到头来毒蛇无用?其实应该对所有怪都用毒蛇
功能介绍:按照下列规则放钉刺
战、贼:毒蝎
猎、法、术,萨,牧:蝰蛇
骑,德:蝰蛇1
NPC:毒蛇
/script local c,s,t=UnitClass("target"),"毒蛇钉刺",UnitPowerType("target");if UnitIsPlayer("target") then if t==0 then s="蝰蛇钉刺";if c=="圣骑士" or c=="德鲁伊" then s=s.."(等级 1)";end;else s="毒蝎钉刺";end;end;CastSpellByName(s);
打贼专用:标记 / 照明弹
有目标就标记,没有就放闪光弹
/script if UnitExists("target") then CastSpellByName("猎人印记");else CastSpellByName("照明弹");end;
雄鹰守护 + 猎人印记 + 宠物攻击
/script local c,i,b,f=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"RavenF") then f=1;break;end;end;if f then c("猎人印记");PetAttack();else c("雄鹰守护");end;
灵猴 猎豹切换
/script local c,i,b,f=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"Monk") then f=1;break;end;end;if f then c("猎豹守护");else c("灵猴守护");end;
灵猴 雄鹰切换
/script local c,i,b,f=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"Monk") then f=1;break;end;end;if f then c("雄鹰守护");else c("灵猴守护");end;
猎豹 雄鹰切换
/script local c,i,b,f=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"eTiger") then f=1;break;end;end;if f then c("雄鹰守护");else c("猎豹守护");end;
灵猴守护 + 威慑
威慑的编号看上边基础知识自己填
/script local c,i,b,f,s,d=CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"Monk") then f=1;break;end;end;if not f then c("灵猴守护");SpellStopCasting();end;s,d=GetActionCooldown(你威慑编号);if d<2 then c("威慑");end;
收宠 假死 陷阱
非战斗状态就放陷阱,否则假死,再按陷阱,注意,战斗中假死瞬间陷阱放不出来的,会提示你正在战斗中
所以战斗中需要狂按这个宏
这个宏WOW 2.0就用不着了
/script PetFollow();if UnitAffectingCombat("player") then CastSpellByName("假死"); else CastSpellByName("冰冻陷阱");end;
野兽护符 - 双多重宏
护符放饰品1上,把你多重射击换个地方,并查出编号,替换红色字,查编号看上边基础知识
/script local s,d;s,d=GetActionCooldown(你多重射击的编号);if d>2 then UseInventoryItem(13);SpellStopCasting();end;CastSpellByName("多重射击");
法术书版
/script local s,d;s,d=GetSpellCooldown(你多重射击的编号,"spell");if d>2 then UseInventoryItem(13);SpellStopCasting();end;CastSpellByName("多重射击");
这个宏可以目前替代多重了,但是马上WOW 2.0要来了,这个宏届时将失效,目前没有解决方案
宝宝打图腾
/script local t,n,i,_={"根基","战栗","地缚","灼热","清毒",};for _,i in t do n=i.."图腾";TargetByName(n,1);end;PetAttack();
宠物宏 - 智能召唤/复活/治疗
如果宠物存在,死的就复活,没死就++,宠物消失了的话就召唤,如果是尸体消失,请同时按住Alt键,
会强制使用复活,因为WOW消失了仍然认为是活的……
/script local p,s="pet","召唤";if UnitIsDead(p) then s="复活";elseif UnitExists(p) then s="治疗" elseif IsAltKeyDown() then s="复活";end;CastSpellByName(s.."宠物");
寻找稀有精英宠物
公共部分已经有了,不过鉴于猎人特殊性在专门写一个
/script local s="断牙";TargetByName(s,1);if UnitName("target")==s then ChatFrame1:AddMessage("找到");end;
上边名字自己修改
针对不同目标调整宠物技能自动施放情况
这个宏可以针对不同类型的目标调整宠物技能的自动施放,比如带蝙蝠面对近战应该打开尖啸,而面对法系就应该关掉
带会爪击的宠物打怪时应该关掉爪击开低吼,而遇到玩家需要关低吼开爪击,这个宏可以自动为你做到
/施放 猎人印记
/script local x,p,j,e,_={1,1,1},UnitPowerType("target");if UnitIsPlayer("target") then if p==0 then x={1,nil,nil,1};else x={1,nil,1};end;end;for j=4,7 do _,_,_,_,_,_,e=GetPetActionInfo(j);if x[j-3]~=e then TogglePetAction(j);end;end;
说明一下,红色的{1,1,1}对应NPC,蓝色的{1,nil,nil,1}对应有蓝职业,绿色的{1,nil,1}对应战,贼
四个1/nil对应宠物技能条4 5 6 7按钮,1代表开,nil代表关,最后一个是nil的话可以不写,
大家可以自己调整技能和对应职业的开关顺序,毕竟不同bb技能不用
下接↓
[
本帖最后由 邪恶的kristina 于 2007-3-2 04:19 编辑 ]