Schaka / TBC-research

Research for several functionalities used in The Burning Crusade
8 stars 5 forks source link

LUA API: EquipItemByName #5

Open Evolvee opened 7 years ago

Evolvee commented 7 years ago

This is something that can be considered as an exploit (because it befenits only to those, who know how to handle LUA API and how to write its scripts), however it worked on retail since vanilla up to patch 3.3.0 wotlk (so it was in the game few years without blizzard ever touching it), so I will just paste it here, at the end of the day you can do whatever you want with it...

I tried to research this as much as possible(because it benefits hybrid/unpopular class specs in S3-S4 where the healing from weapons actually matters), but there are just a few mentions of it, especially right after 3.3.0 when ppl realized they cant bypass their GCD anymore and instead of this they were switching their weapons right AFTER the spell cast in order to bypass the GCD. However this is not that effective since you have to wait 1 GCD to apply the effect from the weapon that you switched.

Explanation of "EquipItemByName"´s behaviour:

Using EquipItemByName in /script-s (especially when you can bypass the 255 letters macro limit by additional addon/BindPad/whatever) enables you to switch weapons "inside" the GCD triggered by a spell cast.

This is a very specific behaviour since: It basically enables you to bypass double GCD. If you fake cast (aka interrupt this or get interrupted by warrior/rogue/shaman/etc.) this spell cast (into which you switched a weapon by EquipItemByName script), you will still be bound with a 1.5s GCD from the weapon switch. This is extremely important because if you fail to use these scripts, you will end up with even worse situation than what would happen without the script; for example you try to cast a spell(and switch a weapon into it) on a target that is behind LoS, you will lose this GCD for basically nothing(by switching weapons into no spell cast), since there is no possible way to specify the condition of LoS in TBC Expansion in scripts. I believe that the condition of "not execute the script when target is behind LoS" came with WOTLK+ but I am not sure here, it doesnt matter here anyway. I cant even count how many arenas I lost because I am retarded and I casted something while I couldnt but I hadnt it fixed in conditions... You have to basically fix every sigle possible condition(gcd, cc, mana, weakened soul debuff for pw:s etc.) in order to not get double GCD at every third spell cast by not triggering the weapon switch when you cant cast the spell. If you wont specify them, you will be penalized every single time because scripts dont care if you are missing the mana for the spell to be casted...

Its worth to mention that this function excels especially in COMBAT. Because out of combat, you can switch weps and cast without any GCD at all with a basic macro: /Equip x /Equip Y /cast

But this doesnt work in combat, and thats where EquipItemByName is your only way to switch weps and at the same time cast a spell which should be influenced by stats of the newly switched weapon.

This mechanic was nerfed in late WOTLK due to roguess massively using this in raids in order to increase their DPS. This either needs to be implemented properly or not at all because it might cause tons of problems when cooperating with spell delay system. For example: You cast Ambush and at the same time you switch from Dagger into Mace and you deal dmg equal to the mace... You can probably imagine tons of other shits bound with it.

Evidence that I managed to gather:

Videos:

https://youtu.be/EvmxORefCss?t=1543 This is actual raw true TBC footage! Notice that when he is in bubble, he equips the bonus healing shield + BH 1H weapon and cast heal at the same time while he is in combat.


http://www.warcraftmovies.com/movieview.php?id=40511 Movie published at 25.4.2007 (early TBC content) Description of movie:

hi there.Maybe a few of you don´t know how to do the 'Expose Armor trick' (EA when enemy is gouged/blinded/etc.) so i made a short (and relatively boring :P) how-to movie about it... hope some of you find it quite usefull! greetings, Tetharion edit: a few additional infos... of course you have a cooldown after the weapon switch, but it doesn´t matter (you don´t attack within this 1,5 sec. or what is was...) this was recorded on patch 2.0.12 so it DOES work in bc, don´t know what you mean Vexorian ;) i am no expert in macro writing, maybe the weapon-swap macro can be written better, but they works aswell: /script if(IsEquippedItem("YourStandardMainhand")) then EquipItemByName("YourSwappedMainhand", 16); EquipItemByName("YourSwappedOffhand", 17); else EquipItemByName("YourStandardMainhand", 16); EquipItemByName("YourStandardOffhand", 17); end finally: i know my english is really really bad, sorry for that :-P.

Comments:

http://wowprogramming.com/docs/api/EquipItemByName


http://wowwiki.wikia.com/wiki/API_EquipItemByName

Changes in 3.3.0 When in combat this function now "picks up" the item instead of equipping it, similar to PickupInventoryItem. Out of combat, the function behaves as expected. This change was made to address the issue of rogues using "poison swapping" addons to increase their DPS.


http://us.battle.net/forums/en/wow/topic/4081812252

EquipItemByName only picks up the item (rather than equipping it) in combat due to Blizzard's restrictions. This was done to prevent Rogues automatically switching weapons in combat.


http://www.wowhead.com/forums&topic=126939.1#p1501092 Patch 3.2.2 Wowhead comment:

It goes the other way, that way could give you two GCDs if you are in combat.

Here are my macros:

/cast Seal of Command /run local f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(s,e,u,p) if u=="player" and p=="Seal of Command" then EquipItemByName(42852) end end) f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")

Where 42852 is the Deadly PvP libram.

/cast Seal of Corruption /run local f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(s,e,u,p) if u=="player" and p=="Seal of Corruption" then EquipItemByName("Libram of Valiance") end end) f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")

http://www.wowhead.com/forums&topic=122481/dual-weapon-swap-macro Patch 3.2.2


http://www.arenajunkies.com/topic/26396-macro-weapon-swapping-macro/ Posted at 28 June 2008


https://forums.wowace.com/showthread.php?t=15475 Posted at 30.12.2008


http://www.dslreports.com/forum/remark,23150699

Equips the Idol of the Corruptor if you don't have it equipped

/run if not IsEquippedItem("Idol of the Corruptor") then EquipItemByName("Idol of the Corruptor")end

Mangle /startattack /run if not IsEquippedItem("Idol of the Corruptor") then EquipItemByName("Idol of the Corruptor")end /cast Mangle (bear)(rank 5) /cast !Maul


http://www.arenajunkies.com/topic/29964-need-innervate-weapon-swap-macro/ Posted at 21 July 2008

credit goes to google i guess xd

Klimpb commented 7 years ago

"Equipping an item will now cancel any spell cast currently in progress." - 2.4.3 patch notes

What Blizzard fixed in patch 2.4.3 was to prevent this type of playstyle.

If you change weapon while in combat, it will trigger a GCD and if you change weapon while casting, it will stop the cast. Plan ahead and you can accomplish the same thing except it requires just that, planning ahead.

Just give up evolve.

Evolvee commented 7 years ago

"Equipping an item will now cancel any spell cast currently in progress."

I dont see how you can cancel instant spell cast. Blizzard didnt fix much when it was clearly used even on WOTLK...