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

魔兽世界:盗贼常用宏

发布时间: [2005-6-14]  游民星空 http://www.gamersky.com
首先把我的macros-local.txt贴在这,这里包括我用的所有的宏,喜欢的话可以直接复制过去。
注意!“哦也哦也”是我的角色名,大家在用的时候一定要改成自己,不然就是密我了 - -
MACRO 1 "换武器" Ability_ThunderBolt.blp
/script UseContainerItem (0,2)
END
MACRO 2 "绷带" Spell_Nature_Rejuvenation.blp
/script UseItemByName("厚丝质绷带")
/script if ( SpellIsTargeting() ) then TargetUnit("player"); end
END
MACRO 3 "左手" Spell_Shadow_Fumble.blp
/script UseItemByName("速效毒药 III")
/script PickupInventoryItem (17)
END
MACRO 4 "宏" Spell_Nature_AstralRecal.blp
/macro
END
MACRO 5 "坐" Spell_Nature_Invisibilty.blp
/施放 影遁(种族特长)
/sit
END
MACRO 6 "交换" Ability_DualWield.blp
/script PickupInventoryItem (17)
/script PickupInventoryItem (16)
END
MACRO 7 "右手" Spell_Nature_UndyingStrength.blp
/script UseItemByName("速效毒药 III")
/script PickupInventoryItem (16)
END
MACRO 8 "测试" Ability_Defend.blp
/script SendChatMessage(link, "WHISPER", this.language, "哦也哦也");
/script   if link == GetInventoryItemLink("player", 16) then CastSpellByName("背刺(等级 5)") end
/script   if link == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if link == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if link == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script SendChatMessage(bag..slot, "WHISPER", this.language, "哦也哦也");
/script   if bag and slot then if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end
END
MACRO 9 "匕首" Ability_SteelMelee.blp
/script setglobal("dagger", GetInventoryItemLink("player", 16))
/script SendChatMessage("匕首"..dagger, "WHISPER", this.language, "哦也哦也");
END
MACRO 10 "剑" Ability_MeleeDamage.blp
/script setglobal("sword", GetInventoryItemLink("player", 16))
/script SendChatMessage("剑"..sword, "WHISPER", this.language, "哦也哦也");
END
MACRO 11 "背刺" Ability_BackStab.blp
/script   if dagger == GetInventoryItemLink("player", 16) then CastSpellByName("背刺(等级 5)") end
/script   if dagger == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if dagger == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if dagger == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script   if bag and slot then if bag == -1 and slot==16 then else if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end end
END
MACRO 12 "伏击" Ability_Rogue_Ambush.blp
/script   if dagger == GetInventoryItemLink("player", 16) then CastSpellByName("伏击(等级 4)") end
/script   if dagger == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if dagger == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if dagger == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script   if bag and slot then if bag == -1 and slot==16 then else if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end end
END
MACRO 13 "剔骨" Ability_Rogue_Eviscerate.blp
/script   if sword == GetInventoryItemLink("player", 16) then CastSpellByName("剔骨(等级 6)") end
/script   if sword == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if sword == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if sword == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script   if bag and slot then if bag == -1 and slot==16 then else if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end end
END
MACRO 14 "肾击" Ability_Rogue_KidneyShot.blp
/script   CastSpellByName("肾击(等级 1)")
/script   if sword == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if sword == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if sword == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script   if bag and slot then if bag == -1 and slot==16 then else if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end end
END
MACRO 15 "凿击" Ability_Gouge.blp
/script   if sword == GetInventoryItemLink("player", 16) then CastSpellByName("凿击(等级 3)") end
/script   if sword == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if sword == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if sword == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script   if bag and slot then if bag == -1 and slot==16 then else if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end end
END
MACRO 16 "邪恶攻击" Spell_Shadow_RitualOfSacrifice.blp
/script   if sword == GetInventoryItemLink("player", 16) then CastSpellByName("邪恶攻击(等级 6)") end
/script   if sword == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if sword == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if sword == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script   if bag and slot then if bag == -1 and slot==16 then else if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end end
END
MACRO 17 "偷袭" Ability_CheapShot.blp
/script   CastSpellByName("偷袭")
/script   if sword == GetInventoryItemLink("player", 16) then bag,slot=-1,16 end
/script   if sword == GetInventoryItemLink("player", 17) then bag,slot=-1,17 end
/script   for i=NUM_BAG_FRAMES,0,-1 do for j=GetContainerNumSlots(i),1,-1 do if sword == GetContainerItemLink(i,j) then bag,slot=i,j end end end
/script   if bag and slot then if bag == -1 and slot==16 then else if bag == -1 then   PickupInventoryItem(slot)   else     PickupContainerItem(bag,slot)   end PickupInventoryItem(16) end end
END


说明:
“坐下”、“绷带”名字就是功能,很简单,不多说了,还不知道怎么给自己打绷带不丢灯的可以copy我的“绷带”宏。
“左手”、“右手”功能是给武器上毒。
“宏”这个宏作用就是打开宏设置面板。“测试”这个宏是我测试用的,没用。
其他都是切换武器相关的宏,下面详细说。

我以前一直用“换武器”和“交换”,宏简短又实用,但是需要自己考虑手上是什么武器,考虑错了就手忙脚乱的。
后来用SkillWeaponSwap插件(可以在wowui网站上下载),设置非常非常的麻烦,而且不保证放剔骨时一定用剑……(这里用“剑”代表想用来剔骨的剑、锤子、拳套等)

所以参考SWS插件的思路,自己做了一套宏,代码比较长,但是写好之后用着确实方便。下面简单说下思路。

用匕首的技能:伏击、背刺
用剑的技能:邪恶攻击、剔骨、凿击
用技能后换剑(昏迷技,接下来要用一些普通攻击,所以换剑):偷袭、肾击

“剑”和“匕首”是用来记录武器的,每次上线都要用一下。
主手武器拿剑,然后运行“剑”这个宏,就记下了剑的信息,以后放对应技能时会找这把剑。
然后主手武器换成匕首,然后运行“匕首”这个宏。

其他与技能同名的宏,作用是,如果当前主手武器正确,就放相应的技能,如果不对,就搜索副手和所有背包,找到正确的武器换上,再按一次就能放技能了。偷袭和肾击是无论拿什么武器都放技能,然后武器换成剑。

其中几个函数的简单说明:
UseContainerItem(bag,slot)  使用bag号背包里slot号格子里的物品
UseItemByName(name)  使用背包里名为name的物品(与物品位置无关)
PickupInventoryItem(slot) 相当于用鼠标单击相应的装备栏,17号是副手,16号是主手
GetInventoryItemLink(slot) 取得slot号装备栏的物品的链接(就是说话时按shift点物品出来的那个东西)
CastSpellByName(name) 释放名为name的技能

使用时注意的问题:
1。关于什么时候需要运行“剑”和“匕首”这两个宏。每次上线时,因为上次保存的资料不在了;有更好的武器了;给武器附魔了,附魔前后会判断为不同的物品。
2。如果没有运行“剑”而运行“邪恶攻击”,会把现有的武器拿掉。这可以认为是bug,希望高人替我改正。
3。升级技能后需要修改相应技能的宏。必须使CastSpellByName中的技能名字(等级)符合你现在的技能和等级。
相关文章:
·魔兽世界:60级圣骑士坐骑任务说明
·魔兽世界:控制贼的连续眩晕打法
·魔兽世界:现实的眩晕型盗贼加点
·我的魔兽世界赚钱心得
·魔兽世界:石爪山脉部落任务整理
发表评论】 【我要投稿】 【魔兽论坛】 【离开这里

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

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