< 魔兽世界百科 >
您尚未注册/登录
搜索帮助
搜索提示已开启 输入搜索关键词时将自动出现其他玩家的同类搜索词 开启搜索提示 搜索关键词时仍按普通搜索提交框方式输入 什么是智能搜索提示
职业技能 (1199)专业技能 (423)
武器 (2209)防具 (15620)药品 (0)任务道具 (1677)材料 (0)其它 (10399)
商人NPC (981)任务NPC (952)怪物 (7220)其他NPC (10639)
1-10级11-20级21-30级31-40级41-50级50级以上
全部地图 (10091)
WOW动态 (267)WOW学院 (778)职业研究 (27159)副本心得 (1319)天赋交流 (559)任务攻略 (1885)专业技能心得 (740)战场PVP (803)宏与插件交流 (222)
游戏百科 > 魔兽世界 > WOW手册 > 宏与插件交流 > 盗贼 > 百科资料
资源苗 基于游戏百科共建计划 - 了解 | 加入
在魔兽世界中已有97,734项百科条目,如果你有任何可以分享的请
我正在用的宏,尤其是自动切换武器的
好东西!投票支持(10)
匿名投票,确认投票给dailytoy
资料版本 1.0,更新时间:2005年8月19日 来源地址

作者:李承彧

首先把我的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中的技能名字(等级)符合你现在的技能和等级。


暂时没有补充内容 您可以第一个补充内容


引用百科资源:多种方式引用本页 | 浏览引用了本页的网站/网页(705)
关闭
百科引用链使您能方便地在其他网页插入本资源的引用链接,让优秀的百科资源通过引用链对更多玩家造成帮助。
越多的玩家通过您的引用链访问百科将为您带来更多的百科威望!

引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:

论坛形式的传播:

关闭
本页有下列读者,字体越大、颜色越深的玩家阅读本页的次数越多。
*如果您的玩家名称未刊载于此,因为只有百科成员才能记录阅读体验。
在魔兽世界中已有97,734项百科条目,如果你有任何可以分享的请

本页由 dailytoy 创建,希望能用你我的开放思维帮助下得到不断完善。
共有 2 条评论 浏览全部评论
2005年11月9日,由百科玩家 61.191.140.* 发表评论:

不行,我试过了,UseItemByName 游戏不认识
2005年11月8日,由百科玩家 61.157.80.* 发表评论:
谢谢发帖的大哥
匿名发表,您可以马上注册/登录成为百科玩家后用属于自己个性名称发表。

《我正在用的宏,尤其是自动切换武器的》的任何感想和见解请发于此。

热门资料推荐
请和我们一起建造全球最大的人工游戏百科
在本目录提交一笔资料 - 我们的计划 - 成为目录编辑
搜游的搜索内容将在 游戏百科共建计划 的基础上不断完善与加强。
当前目录下还没有目录编辑负责管理。
 

想把自己的网站也加上搜索功能?来这里获得免费的魔兽世界搜索条

搜游大全 - 免责声明 - 投放广告 - 商务合作

© 2005 - 2007 搜友游戏百科 SOUYO.com