处理 SSI 文件时出错
您的位置:游民星空 >> 魔兽世界 >> 综合经验 >> 正文

各职业的专用宏终结教程

发布时间: [2007-3-23]  游民星空 http://www.gamersky.com
 

      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技能不用


牧师

进入/取消暗影形态 并切换动作条
1是非暗影形态下的治疗魔法条,2是暗影形态下的攻击魔法条
进入/取消暗影形态,并在1,2两动作条间切换,数字可以自己改
/script local i,b,f,p;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"wform") then f=1;break;end;end;if f then p=1;else p=2;end;CastSpellByName("暗影形态");CURRENT_ACTIONBAR_PAGE=p;ChangeActionBarPage();

心灵尖啸 + 取消暗影形态
/施放 心灵尖啸
/script local i,b,f;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"wform") then CastSpellByName("暗影形态");break;end;end;

给自己能量灌注+心灵专注+护符+技能
具体最后跟什么技能自己考虑,因为心灵专注,所以这个技能是免费的,一般亡灵牧师都跟瘟疫了
护符放饰品1位置
/script local c,s,d,e,_=CastSpellByName,SpellStopCasting;c("能量灌注",1);s();c("心灵专注");s();_,d,e=GetInventoryItemCooldown("player",13);if d<2 and e>0 then UseInventoryItem(13);end;s();c("噬灵瘟疫");

自动补 韧,心灵之火,防护暗影
缺啥补啥,闲着没事按按能强身健体,定国安邦……
/script local n,s,k,j,b,f={"dFor","rFir","iSha"},{"真言术:韧","心灵之火","防护暗影"};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;

矮牧 反恐
/script local i,b,f;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"Excor") then f=1;break;end;end;if not f then CastSpellByName("防护恐惧结界");end;

PK驱散宏
优先驱散自己身上的Debuff,没有就对目标驱散
/script local t; if UnitDebuff("player",1,1) then t=1;end; CastSpellByName("驱散魔法",t);

术士

一键3DOT宏
点一下放一个,缺啥补啥,一直按吧
注意,这是solo宏,团队中如果有其他术士的话就不好用了,因为无法判断DOT是不是你放的,比如其他术士放了痛苦诅咒,
这个宏就不会再放痛苦诅咒,直到那个术士的痛苦诅咒消失
通用版
/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;

痛苦术士风筝版
/script local n,s,k,j,d,f={"Abomi","Requi","Sarge"},{"腐蚀术","生命虹吸","痛苦诅咒"};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;

献祭 + 宠物攻击
在使用前面一键3DOT宏之前我通常会使用这个宏作为起手,因为献祭有施法时间,这就跟猎人瞄准起手一样
/施放 献祭
/script PetAttack();

如果是痛苦术士,带小鬼而且作mana罐子的话用这个
/施放 献祭
/script if UnitCreatureFamily("pet")~="小鬼" then PetAttack();end;

RAID DOT宏
循环上DOT,如果使用间隔超过18秒则重新从第一个DOT开始放,以防止DOT序列没放完怪就死了
/普通版
/script local x,t={"痛苦诅咒","腐蚀术","献祭"},GetTime();DOTI=DOTI or 3;DOTT=DOTT or t;DOTI=DOTI+1;if DOTI>3 or t-DOTT>18 then DOTI=1;DOTT=t;end;CastSpellByName(x[DOTI]);

/痛苦术士版
/script local x,t={"生命虹吸","痛苦诅咒","腐蚀术","献祭"},GetTime();DOTI=DOTI or 4;DOTT=DOTT or t;DOTI=DOTI+1;if DOTI>4 or t-DOTT>18 then DOTI=1;DOTT=t;end;CastSpellByName(x[DOTI]);

这是模拟2.0中/castsequence的方式写的,但没有进入/脱离战斗重置序列和改变目标重置序列功能,
因为这需要做成插件了

到了2.0用这个就行了:
普通版
/castsequence reset=18/target/combat "生命虹吸","痛苦诅咒","腐蚀术","献祭"

痛苦术士版
/castsequence reset=18/target/combat "痛苦诅咒","腐蚀术","献祭"

RAID诅咒宏
如果目标没有元素诅咒就上元素,有元素没有暗影诅咒就上暗影诅咒,都有就上痛苦诅咒
raid中的术士们,为了名额,诅咒吧!
/script local n,s,k,j,d={"lTouc","fAchi"},{"元素","暗影","痛苦"},1;while k<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 f then k=k+1;else break;end;end;CastSpellByName(s[k].."诅咒");

增幅疲劳 / 增幅痛苦
把诅咒增幅放到动作条上,并查出编号,查编号看上边基础知识部分
增幅疲劳
/script local c,s,d=CastSpellByName,GetActionCooldown(增幅编号);if d<2 then c("诅咒增幅");SpellStopCasting();end;c("疲劳诅咒");

法术书版
/script local c,s,d=CastSpellByName,GetSpellCooldown(增幅编号,"spell");if d<2 then c("诅咒增幅");SpellStopCasting();end;c("疲劳诅咒");

增幅痛苦
/script local c,s,d=CastSpellByName,GetActionCooldown(增幅编号);if d<2 then c("诅咒增幅");SpellStopCasting();end;c("痛苦诅咒");

法术书版
/script local c,s,d=CastSpellByName,GetSpellCooldown(增幅编号,"spell");if d<2 then c("诅咒增幅");SpellStopCasting();end;c("痛苦诅咒");

其实这个宏也可以简写成
/施放 诅咒增幅
/script SpellStopCasting();
/施放 疲劳诅咒

/施放 诅咒增幅
/script SpellStopCasting();
/施放 痛苦诅咒

但写成上面/script的形势可以避免看到讨厌的“技能还没有准备好”的提示

智能契约分流宏 - 痛苦术士必备
=================为什么要分流=================
可能有人觉得只要契约就好,何必还要分流,我们有魔甲术,每5秒恢复15点hp,还有生命虹吸,吸血,
各位瘾君子每3秒吸个五六十应该不在话下吧,生命长满就不会再长了。所以只用契约的话会有大量的生命浪费,
实际上这些生命变成蓝的话数量相当惊人的,所以在尽量保证自己血量的前提下使用分流可以达到最大的转换效率
而不会出现安全问题,你会发现这才是真正的永动机
而且,最大的问题…… 分流恢复mana的速度比契约快多了>"<

==================================
原则:不让小鬼满蓝,不让自己满血
小鬼满mana当然先抽他的,当抽到70%时,如果你受伤小于200就分流一次,然后继续抽小鬼,
直到抽空或者你血又差200没满,为了最大化的利用嘛,
如果把小鬼抽空了你还没搞定,没办法,抽自己吧
各位如果在raid而且治疗比较关照你的话可以把受伤200安全线往下降,比如1000,
这样顶着恢复,回春,抽着小鬼,想OOM都难啊
我们唯一要做的就是……
练就一根坚韧而神经质的手指……
/script local s,h,m="生命分流";if UnitExists("pet") then h=UnitHealthMax("player")-UnitHealth("player");m=UnitMana("pet")/UnitManaMax("pet");if m>0.1 and h>200 or m>=0.7 then s="黑暗契约";end;end;CastSpellByName(s);

上边200是开始分流的安全线,0.7是停止虐待小鬼开始分流的比例,当然是自己满血情况下

计算了魔伤和强化生命分流天赋的分流宏
你魔伤和生命分流效率自己填
你分流效率:你强化生命分流的天赋,1点就换成1.1,2点换成1.2,没有加这个天赋就是1
注意,这个宏不会分到死,自杀的话单拉出来一个最高级的吧
/script local b,r,p,j,h={30,75,140,220,310,424},{0.38,0.68,0.8,0.8,0.8,0.8},"player";for j=6,1,-1 do h=b[j]+r[j]*你魔伤;if UnitHealth(p)>=h and UnitManaMax(p)-UnitMana(p)>=h*你分流效率 then CastSpellByName("生命分流(等级 "..j..")");break;end;end

死亡缠绕 + 恐惧
死亡缠绕 + 恐惧是术士最具杀伤力的连招,是术士反盘的基础,
能与之媲美的恐怕只有献祭 + 点燃了,什么?还有生命分流 + ****?

功能:如果死亡缠绕不在CD就放缠绕,如果CD中则施放恐惧术,连续使用就是 缠绕 + 恐惧
死亡缠绕的编号看图自己填
/script local s,d=GetActionCooldown(死亡缠绕编号);if d<2 then CastSpellByName("死亡缠绕");else CastSpellByName("恐惧术");end;

法术书版
/script local s,d=GetSpellCooldown(死亡缠绕编号,"spell");if d<2 then CastSpellByName("死亡缠绕");else CastSpellByName("恐惧术");end;

如果目标是恶魔或元素就放逐,否则恐惧
raid和跟术士PK时能省点事……
/script local t=UnitCreatureType("target");if t=="恶魔" or t=="元素生物" then CastSpellByName("放逐术");else CastSpellByName("恐惧术");end;

双法术石
法术石放饰品1,备用法术石放的位置自己填,看上边基础知识
/script local s,d,e=GetInventoryItemCooldown("player",17),if d<2 and e>0 then UseInventoryItem(13);UseContainerItem(备用法术石包号,你备用法术石格子号);end;

狗智能吞噬魔法
优先驱散自己身上的debuff,没有就驱散对方身上的buff
/script local i,d,s,t,_;for i=1,16 do d,_,t=UnitDebuff("player",i);if d and t=="Magic" then s=1;break;end;end;CastSpellByName('吞噬魔法',s);

瞬召虚空并牺牲宏 - 传说中的双胖子
功能:如果带的是虚空则牺牲,不是的话按第一下瞬召虚空,再按一下牺牲,之所以要按两下因为所谓瞬召实际还是有0.5秒时间,
当然如果你是非恶魔术士或者恶魔支配CD中,那瞬召就变成慢召了……
/script local c=CastSpellByName;if UnitCreatureFamily("pet")=="虚空行者" then c("牺牲");else c("恶魔支配");SpellStopCasting();c("召唤虚空行者");end;

宝宝打图腾
/script local t,n,i,_={"根基","战栗","地缚","灼热","清毒",};for _,i in t do n=i.."图腾";TargetByName(n,1);end;PetAttack();

拉人宏
1 小队/团队自适应版
/施放 召唤仪式
/script local s="party";if UnitInRaid("player") then s="raid";end;SendChatMessage("开始召唤>%t<,机票1G,女生半价,来点门啊",s);

2 黑体震撼版
/施放 召唤仪式
/y   █   ●███◣ █
/y   ██  █   █ ▉
/y   █   █   █ ▊
/y █████ █   █ ▋
/y █   █ █   █ ▌
/y █████ █   █ ▍
/y ●● ●● █  ◥█ ●

3 车夫自虐版
这个不是拉人的宏,而是一次寻问团队中所有和你不在同一区域的人,自动问他需不需要拉,好像有点自讨苦吃,自虐用的……
只要点一下,你会收到无数订单的……
/script local i,n,z,_;for i=1,GetNumRaidMembers() do n,_,_,_,_,_,z=GetRaidRosterInfo(i) if z~=GetZoneText() then SendChatMessage("要拉的MM报职业","whisper",nil,n);end;end

智能灵魂石
没有灵魂石就制造,有就给目标绑灵魂石,并在小队或团队中报告
把做好的灵魂石放在动作条上,查出编号,具体看上边基础知识
/script local s,i="party",灵魂石所在编号;if IsUsableAction(i) then if GetActionCooldown(i)==0 then UseAction(i);if UnitInRaid("player") then s="raid";end;SendChatMessage("%t 已被绑定",s);end;else CastSpellByName("制造特效灵魂石");end

盗贼

首先说明一下,宏无法判断是否在背后,所以做不出背后就背刺,否则就邪恶之类的宏,不要再问了
绷带不丢星,这其实就是自我施法,暴雪已经整合了这个功能,打开主菜单 -> 界面设置 -> 自动自我施法 打个勾就解决了

冷血 + 剔骨
如果目标是怪,连击点>=4才冷剔,否则普通剔骨;
如果目标是玩家,连击点>=3就冷剔,如果冷血未CD,才使用普通剔骨。
/script local p,f=GetComboPoints(),UnitIsPlayer("target");if f and p>2 or not f and p>3 then CastSpellByName("冷血");SpellStopCasting();end;
/施放 剔骨

剑刃乱舞 + 护符
/script 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(14);if d<2 and e>0 then u(14);end;end;

自动切割宏
平时用邪恶搌星 若无切割状态 只要有星 立即施放切割 若有 则继续 邪恶搌星 若能搌到5星时切割状态还在 则施放剔骨
/script local p,c,b,i,f=GetComboPoints(),CastSpellByName;for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"SliceDice") then f=1;break;end;end;if p>0 and not f then c("切割");elseif p==5 and f then c("剔骨");else c("邪恶攻击");end;

自动割裂宏
平时用邪恶搌星 若目标无割裂状态 只要有星 立即施放割裂 若有 则继续 邪恶搌星 若能搌到5星时割裂状态还在 则施放剔骨
/script local p,c,d,i,f=GetComboPoints(),CastSpellByName;for i=1,16 do d=UnitDebuff("target",i);if d and strfind(d,"Rupture") then f=1;break;end;end;if p>0 and not f then c("割裂");elseif p==5 and f then c("剔骨");else c("邪恶攻击");end;

偷袭起手,护符 + 背刺
/script local c,a,_=CastSpellByName;_,_,a=GetShapeshiftFormInfo(1);if a then c("偷袭");elseif UnitMana("player")>=60 then if GetInventoryItemCooldown("player",13)==0 then UseInventoryItem(13);SpellStopCasting();end;c("背刺");end;
护符放在饰品1上
如果在潜行状态,按第一下偷袭,再按就护符+背刺,不在潜行状态的话直接护符+背刺
自己掌握好距离和能量

邪恶还击宏
用 还击 在动作条上的序号替换下边红色字,查编号看上边基础知识
/script local s,d=GetActionCooldown(还击编号);if IsUsableAction(还击编号) and d<2 then CastSpellByName("还击");else CastSpellByName("邪恶攻击");end;

法术书版
/script local s,d=GetSpellCooldown(还击编号,"spell");if IsUsableAction(还击编号) and d<2 then CastSpellByName("还击");else CastSpellByName("邪恶攻击");end;

出血鬼魅宏
用 鬼魅攻击 在动作条上的序号替换下边红色字,查编号看上边基础知识
/script local c,s,d=CastSpellByName,GetActionCooldown(鬼魅编号);if d<2 then c("鬼魅攻击") else c("出血");end;

/script local c,s,d=CastSpellByName,Get(鬼魅编号);if d<2 then c("鬼魅攻击") else c("出血");end;

RAID专用: 平时邪恶攻击,目标转向自己就闪避
/script if UnitIsUnit("targettarget","player") then CastSpellByName("闪避");SpellStopCasting();end;CastSpellByName("邪恶攻击");

预备 + 消失
能消失就消失,消失冷却中就预备
消失编号参见上边基础知识
/script local c,s,d=CastSpellByName,GetActionCooldown(你消失编号);if d>2 then c("预备");SpellStopCasting();end;c("消失");

法术书版
/script local c,s,d=CastSpellByName,GetSpellCooldown(你消失编号,"spell");if d>2 then c("预备");SpellStopCasting();end;c("消失");

致盲 + 绷带
没满60级的或者在战场中的绷带名自己改
/施放 致盲
/script local b,s,l;for b=0,4 do for s=1,18 do l=GetContainerItemLink(b,s);if l and strfind(l,"厚符文布绷带") then UseContainerItem(b,s,1);break;end;end;end

1.12新潜行宏(不会因反复按而导致取消潜行)
/script local a,_;if not UnitAffectingCombat("player") then _,_,a=GetShapeshiftFormInfo(1);if not a then CastSpellByName("潜行");end;end;

暗夜精灵贼专用 - 潜行CD中使用影遁,连续按也不会取消影遁,潜行冷却完毕使用潜行,连续按不会取消潜行
连续按不取消影遁写不下了,去掉,但潜行中不取消潜行还可以,用时自己注意点
把潜行放动作条上,查出编号,替换下边红色字,查编号看上边基础知识
/script local c,s,d,a,_=CastSpellByName;_,_,a=GetShapeshiftFormInfo(1);if not a then s,d=Get(潜行编号);if d>2 then c("影遁");else c("潜行");end;end;

德鲁伊

RP的变形宏,其他形态则变回人形,人形则喊话并变成相应形态,反复按不会再变回人形

人形态下变熊,并喊“熊的力量!” 其他任何形态则变回人形
/script local c,s,i,a,_=CastShapeshiftForm;for i=1,6 do _,_,a=GetShapeshiftFormInfo(i);if a then s=i;break;end;end;if not s then SendChatMessage("熊的力量!","yell");c(1);elseif s~=1 then c(s);end;

人形态下变猫,并喊“豹的速度!” 其他任何形态则变回人形
/script local c,s,i,a,_=CastShapeshiftForm;for i=1,6 do _,_,a=GetShapeshiftFormInfo(i);if a then s=i;break;end;end;if not s then SendChatMessage("豹的速度!","yell");c(3);elseif s~=3 then c(s);end;

人形态下变风暴乌鸦,并喊“鹰的眼睛!” 其他任何形态则变回人形(资料片适用)
/script local c,s,i,a,_=CastShapeshiftForm;for i=1,6 do _,_,a=GetShapeshiftFormInfo(i);if a then s=i;break;end;end;if not s then SendChatMessage("鹰的眼睛!","yell");c(6);elseif s~=6 then c(s);end;

人形态下变鹌鹑/奶树,并喊“鹌鹑的可爱!” 其他任何形态则变回人形(鹌鹑/奶树自己根据天赋调整……)
/script local c,s,i,a,_=CastShapeshiftForm;for i=1,6 do _,_,a=GetShapeshiftFormInfo(i);if a then s=i;break;end;end;if not s then SendChatMessage("鹌鹑的可爱!","yell");c(5);elseif s~=5 then c(s);end;

海豹 台词征集中
/script local c,s,i,a,_=CastShapeshiftForm;for i=1,6 do _,_,a=GetShapeshiftFormInfo(i);if a then s=i;break;end;end;if not s then SendChatMessage("海豹,海豹……","yell");c(2);elseif s~=2 then c(s);end;

旅行 台词征集中
/script local c,s,i,a,_=CastShapeshiftForm;for i=1,6 do _,_,a=GetShapeshiftFormInfo(i);if a then s=i;break;end;end;if not s then SendChatMessage("旅行……","yell");c(4);elseif s~=4 c(s);end;

各种形态变回人形,包括资料片飞行形态
/script local i,a,_; for i=1,6 do _,_,a=GetShapeshiftFormInfo(i); if a then CastShapeshiftForm(i); break; end; end;

1.12猎豹形态新潜行宏(不会因反复按而导致取消潜行)
/script local i,b,f;if not UnitAffectingCombat("player") then for i=1,16 do b=UnitBuff("player",i);if b and strfind(b,"Ambu") then f=1;break;end;end;if not f then CastSpellByName("潜行");end;end;

一键 精灵之火 + 月火 + 虫群
有虫群的:
/script local n,s,k,j,d,f={"rFall","tSwar","eFire"},{"月火术","虫群","精灵之火"};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;

没有虫群的:
/script local n,s,k,j,d,f={"rFall","eFire"},{"月火术","精灵之火"};for k=1,2 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;

月火打图腾
/script local t,n,i,_={"根基","战栗","地缚","灼热","清毒",};for _,i in t do n=i.."图腾";TargetByName(n,1);end;CastSpellByName("月火术(等级 1)");

变熊 + 冲锋
/script local c,a,_=CastSpellByName;_,_,a=GetShapeshiftFormInfo(1);if a then c("野性冲锋");else c("巨熊形态");end;

重击 + 人形 + 加血
按第一下 重击 敌人,按第二下 如果敌人昏迷则回到人形,按第三下开始放治疗之触,想放别的可以改
优点是如果重击未击中,招架等敌人没晕的话不会变回人形,避免出现危险
由于变形无公共CD,狂按的话可以实现瞬间重击 + 人形效果 + 加血效果

/script local c,i,d,f,a,_=CastSpellByName;for i=1,16 do d=UnitDebuff("target",i);if d and strfind(d,"Bash") then f=1;break;end;end;if f then _,_,a=GetShapeshiftFormInfo(1);if a then c("巨熊形态");else c("治疗之触");end;else c("重击");end;

治疗之触可以改成其他法术

战士

MT 救命宏
首先吃糖
糖CD就使用生命宝石
如果在CD就使用破釜沉舟
如果也在CD就吃极效红
全部CD就盾墙

把 糖、生命宝石、破釜沉舟、极效红、盾墙 依次放到动作条上,记住,依次,参考上面的图,假设是编号从37-41
/script local i,s,d,e;for i=37,41 do s,d,e=GetActionCooldown(i);if d<2 and e>0 then UseAction(i);break;end;end;
用你查到的编号替换上边红色数字

MT 开怪宏 - 战斗 + 冲锋 + 防御 + 嘲讽,懒人MT必备!!
如果不在战斗中,防御姿态就切战斗姿态,战斗姿态的话就冲锋,
如果在战斗中,战斗姿态就切防御,防御姿态就嘲讽
貌似MT不用冲锋开怪…… orz
/script local c,f,a,b,_=CastSpellByName,GetShapeshiftFormInfo;_,_,a=f(1);_,_,b=f(2);if UnitAffectingCombat("player") then if a then c("防御姿态");elseif b then c("嘲讽");end;else if a then c("冲锋");elseif b then c("战斗姿态");end;end;

MT 狂暴之怒宏
功能:如果防御姿态,按一下切狂暴,如果狂暴姿态按一下狂暴之怒,如果狂暴姿态而且狂暴之怒CD中按一下切回防御
把狂暴之怒放到动作条上,查出编号,编号看上边基础知识:
/script local c,a,_=CastSpellByName;_,_,a=GetShapeshiftFormInfo(3);if a then if GetActionCooldown(狂暴之怒编号)==0 then c("狂暴之怒");else c("防御姿态");end;else c("狂暴姿态");end;
用你查到的编号替换上面红色数字

法术书版
/script local c,a,_=CastSpellByName;_,_,a=GetShapeshiftFormInfo(3);if a then if GetSpellCooldown(狂暴之怒编号,"spell")==0 then c("狂暴之怒");else c("防御姿态");end;else c("狂暴姿态");end;

非战斗就战斗姿态+冲锋,战斗中则狂暴+拦截
每次做一个动作,反复按吧
/script local c,a,b,_=CastSpellByName;_,_a=GetShapeshiftFormInfo(1);_,_,b=GetShapeshiftFormInfo(3);if UnitAffectingCombat("player") then if b then c("拦截");else c("狂暴姿态");end;elseif a then c("冲锋");else c("战斗姿态");end;

WOW 2.0版,每次做一个动作,反复按吧
/施放 [nocombat,nostance:1]战斗姿态;[nocombat,stance:1]冲锋;[combat,nostance:3]狂暴姿态;[combat,stance:3]拦截

挫志怒吼 + 雷霆一击 + 撕裂 + 致死打击
/script local n,s,k,j,d,f={"Cry","Clap","Gouge","."},{"挫志怒吼","雷霆一击","撕裂","致死打击"};for k=1,4 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

破胆怒吼 + 绷带
没满60级的或者在战场中的绷带名自己改
/施放 破胆怒吼
/script local b,s,l;for b=0,4 do for s=1,18 do l=GetContainerItemLink(b,s);if l and strfind(l,"厚符文布绷带") then UseContainerItem(b,s,1);break;end;end;

远程武器宏
自动判定当前远程武器类型而决定使用该种武器进行射击,弓,弩使用箭,枪械使用子弹
这个不会切换,所以弹药自己处理
/script local l,_=GetInventoryItemLink("player",18);_,_,l=strfind(l,"item:(%d+)");_,_,_,_,_,l=GetItemInfo(l);l=strsub(l,1,6);if l~="投掷" then l=l.."射击";end;CastSpellByName(l);

如果在防御姿态就用盾牌格挡,在狂暴姿态就用狂暴之怒,在战斗姿态就用惩戒痛击
/script local s,j,a,_={"惩戒痛击","盾牌格挡","狂暴之怒"};for j=1,3 do _,_,a=GetShapeshiftFormInfo(j);if a then CastSpellByName(s[j]);break;end;end;

圣骑士

自动换圣契
当然使用圣光闪现的时候 自动装备[神性圣契],当我使用驱散的时候 自动装备[优雅圣契]
把两个圣契一个装在身上,另一个放在右边第一个包的第一个格子里

第一个宏:放圣光闪,如果身上带的不是神性圣契就先换,再按放圣光闪现
/script local l=GetInventoryItemLink("player",17);if l and strfind(l,"神性") then CastSpellByName("圣光闪现");else UseContainerItem(0,1);end;

第二个宏:放清洁术,如果身上带的不是优雅圣契就先换,再按放清洁术
/script local l=GetInventoryItemLink("player",17);if l and strfind(l,"优雅") then CastSpellByName("清洁术");else UseContainerItem(0,1);end;

如果圣契放在包的其他位置,自己修改上边红色数字,修改方法看上边基础知识

打贼奉献宏
有目标就放最高级奉献,没有目标就放1级奉献
/script if UnitCanAttack("target","player") then CastSpellByName("奉献");else CastSpellByName("奉献(等级 1)");end;[attachment=2470] [attachment=2470]

 

 

魔兽各职业的基本的宏全在这里了,无私奉献下吧

相关文章:
·巫妖王之怒:宏及插件配置可储存在服务器
·分享:变羊和反制的终结喊话宏
发表评论】 【我要投稿】 【魔兽论坛】 【离开这里

发表评论: 查看所有评论 
昵称 *

魔兽图库
处理 SSI 文件时出错
处理 SSI 文件时出错
处理 SSI 文件时出错