防骑用脚本实现不占GCD更换圣契与一些实用宏
利用脚本实现"战斗中无延迟不占用GCD"更换圣契 以及一些有用的宏
之前有很多文章介绍了在战斗中更换圣契的方法,但是并没有实现一个使用合理的方法.
本贴使用一个本地脚本命令实现0延迟,不占用GCD在战斗中更换圣契,希望对大家有所帮助。
TF 3.3版本不能同時存在2個圣契的BUFF,所以TF只能一個BUFF型圣契+增強型圣契,國服3.13可以存在多BUFF
一 介绍一下有关的理论:
1、技能触发GCD (这个大家都知道)
2、在战斗中更换武器(主手,副手,盾牌,圣契)触发GCD
3、在GCD过程中更换武器(主手,副手,盾牌,圣契),重置GCD。
更换武器很特殊,如果我们已经使用一个触发GCD的技能,在GCD刚触发的很短的时间内(比如0.002秒),
如果我们更换武器,那么相当于更换武器没有触发GCD!
也正式利用以上这个特殊的GCD我们可以实现战斗中更换圣契。
二 一些已有的更换圣契的宏和缺点:
1、傻瓜宏:
(宏1)
/cast 奉獻
/equip 崇聖護盾聖契
(宏2)
/cast 神聖之盾
/equip 再現聖契
(傻瓜宏)
以上2个宏防骑在奉獻后更换 崇聖護盾聖契 在神盾后更换 再現聖契 可以实现全程保持崇聖護盾聖契圣契的效果同時增加奉獻傷害
但是,事实没有想象中的那么好用,原因是如果奉獻CD中按下宏1,那么奉獻没有释放,但是更换了圣契,更要命的是触发了GCD...所以使用这个宏需要等技能冷却了再按(谁能保证自己手不抽会筋呢),所以没有任何实用性.
2、智能宏:
#showtooltip 神聖之盾
/施放 神聖之盾
/run local f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(s,e,u,p)
if u=="player" and p=="神聖之盾" then EquipItemByName("再現聖契") end end)
f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
#showtooltip 奉獻
/施放 奉獻
/run local f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(s,e,u,p)
if u=="player" and p=="奉獻" then EquipItemByName("崇聖護盾聖契") end end)
f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
(智能宏)
这个宏使用了脚本,看似很强大,但是,实际使用还是有些毛病:按下智能宏以后并不是理想中的转一个GCD,而是转一点点又退回去从头开始转一圈。
原因在于万恶的网络延时——假设你的ping是X,那么:
智能宏施放技能--经过X服务端作出响应产生战斗记录,通过宏判断换圣契
结果就是经过X以后换圣契的GCD从新开始计算,在网络延时的影响下智能宏产生的GCD比1.5秒稍长一点。
不要小看这点延时,假设你100ping用智能宏产生的实际GCD是1.6秒,而如果你500ping那么智能宏实际产生的GCD就是2秒!
这种情况下按3次智能宏就等于白损失一个GCD,实际效果得不偿失——到时候别说"用了你的换圣契宏我tps反而下降了XXOO"
总结下,已有的宏虽然可以实现无GCD 更换圣契,但是使用很不方便需要注意技能CD,网络延迟,不能狂按等,很不人性化.那么我们如何改进呢?
三 巧妙利用本地执行脚本GetSpellCooldown()实现,可以狂按,没有延迟,不卡技能,不用注意CD的更换圣契宏:
1、先介绍下函数(不想看的直接略过)
Retrieves the cooldown data of the spell specified.
start, duration, enabled = GetSpellCooldown(spellName or slotID, "bookType");
ArgumentsspellName :
String - name of the spell to retrieve cooldown data for.
slotID
Number - Valid values are 1 through total number of spells in the spellbook on all pages and all tabs, ignoring empty slots.
bookType
String - BOOKTYPE_SPELL or BOOKTYPE_PET depending on whether you wish to query the player or pet spellbook.
Returns
startTime
Number - The time when the cooldown started (as returned by GetTime()); zero if no cooldown; current time if (enabled == 0).
duration
Number - Cooldown duration in seconds, 0 if spell is ready to be cast.
enabled
Number - 0 if the spell is active (Stealth, Shadowmeld, Presence of Mind, etc)
and the cooldown will begin as soon as the spell is used/cancelled; 1 otherwise.
Example
local start, duration, enabled = GetSpellCooldown("Presence of Mind");
if enabled == 0 then
DEFAULT_CHAT_FRAME:AddMessage("Presence of Mind is currently active, use it and wait " .. duration .. " seconds for the next one.");
elseif ( start > 0 and duration > 0) then
DEFAULT_CHAT_FRAME:AddMessage("Presence of Mind is cooling down, wait " .. (start + duration - GetTime()) .. " seconds for the next one.");
else
DEFAULT_CHAT_FRAME:AddMessage("Presence of Mind is ready.");
3、由超级智能宏可以联想出的几个常用的宏 (持续更新):
II (3.13)防护
光明使者宝典
装备等级 70
装备: 你的审判技能也会令你的盾牌格挡值提高186点,持续5秒
黑暗神殿 莎赫拉丝主母 15% - 24%
悔改圣契
需要等级 70
装备: 当神圣之盾在激活状态下时,使你的格挡等级提高42。
沙塔斯城 基厄拉斯 牌子
(宏1)
/cast 智慧审判
/script local s,c=0,0;s,c=GetSpellCooldown('智慧审判'); if ((s-GetTime())>-0.002) then EquipItemByName("悔改圣契");end;
(宏2)
/cast 神圣之盾
/script local s,c=0,0;s,c=GetSpellCooldown('神圣之盾'); if ((s-GetTime())>-0.002) then EquipItemByName("光明使者宝典");end;
/startattack
实现 悔改圣契悔改圣契 效果双保持
III (WLK)防护骑
(宏1)
/cast 奉獻
/script local s,c=0,0;s,c=GetSpellCooldown('奉獻'); if ((s-GetTime())>-0.002) then EquipItemByName("崇聖護盾聖契");end;
(宏2)
/cast 神聖之盾
/script local s,c=0,0;s,c=GetSpellCooldown('神聖之盾'); if ((s-GetTime())>-0.002) then EquipItemByName("再現聖契");end;
/startattack
实现 再現聖契崇聖護盾聖契效果双保持
