Libram Swapping Add-on (BANG! Combat Item Switcher)

All things /script related

Moderators: Fridmarr, Worldie, Aergis, _Chloe

Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Jerey-Darkspear » Sat Aug 01, 2009 9:21 am

Spawned by discussion in Theck's Matlab TPS thread. Here

Basic idea is that you can keep multiple libram procs up at once by libram swapping and using an add-on to get it done quicker. DPS loss is minimal. Survivability gain is pretty large. I'm gaining over 800 block value due to this. Once we get the HotR libram and add that to the mix, we'll get even more. This works for DK and Druid relics, too.

Here's the add-on and code change you need to make...

Bang! Item Switcher - http://bangcraft.com/index.php?id=BangItemSwitcher or http://www.wowinterface.com/downloads/i ... tcher.html

Change the BangItemSwitcher:IsEquipped(query) function in BangItemSwitcher.lua from
Code: Select all
function BangItemSwitcher:IsEquipped(query)
local itemName,itemLink,itemRarity,itemLevel,itemMinLevel,itemType,itemSubType,itemStackCount,itemEquipLoc,itemTexture=GetItemInfo(query) equipped=false
for i=1,23 do local eitemLink,_,_,_,_,_,_,_,_,_=GetInventoryItemLink("player",i) if (eitemLink) then if eitemLink == itemLink then equipped=true end end i=i+1 end
if equipped == true then return true else return false end end function BangItemSwitcher:SPELL_UPDATE_COOLDOWN(cooldowndata) for n=1,#self.db.profile.ItemName,1 do
if (self.db.profile.Debuffswapz)and(self.db.profile.ItemName[n])and(self.db.profile.ItemSpell[n])and((self.db.profile.When[n] == "BEFORE")) then local cooldown=0
local cooldown=BangItemSwitcher:CheckCooldown(self.db.profile.ItemSpell[n]) if cooldown then if (cooldown>0.1) then if (cooldown>1.6) and not self.db.profile.real[n]==true then
self.db.profile.real[n]=true end if ((cooldown<1.5150)and(self.db.profile.real[n]==true)and(self.db.profile.When[n] == "BEFORE")) then
if (BangItemSwitcher:IsEquipped(self.db.profile.ItemName[n])==false) then EquipItemByName(self.db.profile.ItemName[n]) self.db.profile.real[n]=false else end end
end end end end end
to
Code: Select all
function BangItemSwitcher:IsEquipped(query)
local itemName,itemLink,itemRarity,itemLevel,itemMinLevel,itemType,itemSubType,itemStackCount,itemEquipLoc,itemTexture=GetItemInfo(query) equipped=false
local eitemLink,_,_,_,_,_,_,_,_,_=GetInventoryItemLink("player",17) if (eitemLink) then if eitemLink == itemLink then equipped=true end end 
if equipped == true then return true else return false end end function BangItemSwitcher:SPELL_UPDATE_COOLDOWN(cooldowndata) for n=1,#self.db.profile.ItemName,1 do
if (self.db.profile.Debuffswapz)and(self.db.profile.ItemName[n])and(self.db.profile.ItemSpell[n])and((self.db.profile.When[n] == "BEFORE")) then local cooldown=0
local cooldown=BangItemSwitcher:CheckCooldown(self.db.profile.ItemSpell[n]) if cooldown then if (cooldown>0.1) then if (cooldown>1.6) and not self.db.profile.real[n]==true then
self.db.profile.real[n]=true end if ((cooldown<1.5150)and(self.db.profile.real[n]==true)and(self.db.profile.When[n] == "BEFORE")) then
if (BangItemSwitcher:IsEquipped(self.db.profile.ItemName[n])==false) then EquipItemByName(self.db.profile.ItemName[n]) self.db.profile.real[n]=false else end end
end end end end end


NOTE: This removes functionality for all items except the ranged slot. It's also probably not proper to go around modifying the original code, but I don't need it to check all those slots and definitely don't want to go re-inventing the wheel but did want to share this with others. I'm sure there is more of the code that I could trim out/down, but for now, this was enough.
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby moduspwnens » Sat Aug 01, 2009 12:02 pm

My new add-on should also be able to do that when it's done, but that's definitely worth looking into for now. Thanks!
I rule.
moduspwnens
Moderator
 
Posts: 6211
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Jerey-Darkspear » Tue Aug 04, 2009 8:35 pm

Ouch. Do not use this during times of high server lag, like on patch day.
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby PsiVen » Wed Aug 05, 2009 7:51 pm

I like this addon, but is there any way that it can be tied to dual spec? Judgement swapping librams is bad for Ret :P

It does effectively double your lag, in a pretty noticeable way.
Gladiator Psiven, Retired Tankadin
WoW-sober since March 2014
Longtime addict of Space - Glory Through Conquest
User avatar
PsiVen
Moderator
 
Posts: 4364
Joined: Fri Jun 01, 2007 5:28 pm
Location: On a Boat

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Candiru » Thu Aug 06, 2009 7:46 am

Since the LoO has 100% uptime, and the LSS has 200% uptime, we only need to do 2 swaps every 20s. Does your addon just do this minimum switching, or does it swap for every Holy shield and judgement?

Ideally it would switch to LSS when duration on SacredShield buff is <10s and HolyShield has CD time of <3s and we are using HotR or ShoR.

It should switch to LoO when judgement CD is <3s and we are using HotR or ShoR.

That should result only in 2 swaps per 20s with something like

ShoR <switch in LSS>
HolyShield
HotR<switch in LoO>
Judgement

happening every 20s
Image
Candiru
 
Posts: 2480
Joined: Mon May 28, 2007 12:21 pm

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Tubben » Thu Aug 06, 2009 8:29 am

How do you configure BiS (/bis)?

#1 Judgement / LoO / Before
#2 Holy Shield / LotSS / Before

?

Tried it like this, lost ~100 dps (parsed at an lv 83 combat dummy from full mana to zero mana), he switched the libram, but most of the time i only got the buff from LotSS, but rarely from both librams.
Tubben
 
Posts: 52
Joined: Sun Nov 02, 2008 10:35 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Jerey-Darkspear » Wed Aug 12, 2009 3:26 pm

First, clarification. This is not my add-on. I just found it and shared it with yall. Don't want to take credit when it's due elsewhere. I did make some modifications to the author's code because I found it did some things I found wasteful.

My configuration:
Code: Select all
1 - Consecration         - Libram of Obstruction       - Instant
2 - Judgement of Wisdom  - Libram of the Sacred Shield - Instant
3 - Judgement of Light   - Libram of the Sacred Shield - Instant
4 - Judgement of Justice - Libram of the Sacred Shield - Instant


Using this configuration, the 9's must always go in the following order: Judgement -> Holy Shield -> Consecrate -> Repeat. If you use a different order for your 9's, you'd have to configure it differently.

Candiru - it's possible to make that switch if you hard-code the libram swapping, but since I settled with just using this one that was already developed instead of revising the wheel, so to speak, it's not possible with this mod. The easiest implementation might be to just force a 1-2 counter on the check. I'm not 100% certain it would remain functional if you had it performing buff-checking prior to swapping. That's the kind of automation Blizzard intended to stop, I believe.

PsiVen - I have not found such functionality built-in. Perhaps Modus could include it in his implementation that he's writing up. In the meantime, I have found that just typing /bis and disabling is sufficient. It can even be disabled in combat. Had to do so last week when we were getting all the lag.
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Candiru » Thu Aug 13, 2009 2:20 am

The before mode isn't very well implemented, it will activate extra GCD.

I would use the during mode, and have them set up the other way around.

There should be a before mode, since you *could* change inthe GCD before the spell comes off CD, but this addon doesn't seem to support it properly.
Image
Candiru
 
Posts: 2480
Joined: Mon May 28, 2007 12:21 pm

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Candiru » Thu Aug 13, 2009 3:09 am

*double post*

Now, I have been thinking about what this addon *should* do. (or rather, what we would want it to do as prot paladins)

We currently have the following librams:

200 dodge rating, 6s ICD, 18s duration procs from HotR LoD
272 block value for 20s, procs from Holy Shield LoSS
352 block value for 10s, procs from judgement LoO

Now, how to get all buffs up at once? We can't use simple macros to switch librams every time we use an ability, as then the 200 dodgerating will always be on cooldown. We need to only switch librams when necessary

The following rotation would do that:

Libram: LoSS
Holy Shield
ShoR <LoO>
Judgement <LoD> 6s ICD starts
HotR
Consecration
ShoR
Holy Shield <LoD off CD>
HotR (chance to proc LoD) <LoO>
Judgement
ShoR
Consecration
HotR <LoSS>
HolyShield

repeat

Should give LoO and LoSS 100% uptime, and gives you 1 chance to proc LoD in the 18s cycle (80% uptime?), It also only has 5 switches in a 18s cycle, which is much less lost swings than other methods.

The only problem is the need for an addon to automate it! How hard would it be to hardcode this cycle into an addon, which would give you 1 macro button to hammer to do your threat rotation as well as libram swapping?

There is even deadtime in there you could swap in the 200 Str libram for.
Image
Candiru
 
Posts: 2480
Joined: Mon May 28, 2007 12:21 pm

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Jerey-Darkspear » Thu Aug 13, 2009 11:33 am

LoO - "Libram of Obstruction" - 10 sec - Every Judgement
LotSS - "Increased Block" - 20 sec (every other Holy Shield)
LoD - unknown buff name - 18 sec/chance to proc (every HotR that buff has < 6 sec on)

Check combat events. Have one for the 9-sec events and the 6-sec events.

Combat Log Event Catcher
Code: Select all
function event_catcher_that_I'm_not_sure_of_syntax(_,_,_,_,spellname_in_here_somewhere,_)
  if spellname == "Hammer of the Righteous" or spellname == "Shield of Righteousness" then
    Nines_Libram_Check()
  end
  if spellname == "Consecrate" or spellname == "Holy Shield" or spellname == "Judgement of Vengeance" then
    HotR_Libram_ChecK()
  end
end


Nine's Libram Checker
Code: Select all
function Nines_Libram_Check()
  --begin psuedocode
  Get Cooldowns for Holy Shield and Judgement of Wisdom (the judgement doesn't matter since they share CD)
  If Holy Shield Cooldown < 1.5s then
    Check BuffTimeLeft on BuffName("Increased Block")
    if BuffTimeLeft < 9 s then EquipItemByName("Libram of the Sacred Shield") end
    return; --this is in the event that both HS and Judgement are off CD, it won't swap librams to judgement below
  end
  if Judgement of Wisdom Cooldown < 1.5s then
    EquipItemByName("Libram of Obstruction")
  end
  --end psuedocode
end


Hammer of the Righteous Libram Checker
[code]
function HotR_Libram_Check()
--begin psuedocode
Get Cooldown for Hammer of the Righteous
if HotR CD < 1.5s then
check BuffTimeLeft on BuffName(whatever the buff for LoD is called)
if BuffTimeLeft < ....code just broke when I remembered there's a six second internal cooldown. I assume this is proc'd upon equip like trinkets....no efficient way to switch this libram in then since it's not 100% proc rate...I forsee blizzard putting internal cooldowns on all the librams and that would stop libram swapping quite easily.

----EDIT----

It would be possible to hardcode what Candiru cited, but I don't like the idea of a scripted one-button automation of our rotations. Seems like cheating and also very easy to break. I take that back, too. I don't think it's possible to do what he wants either. You'd have to code spell casts into the lua and didn't blizzard make CastSpellByName(spellname) a restricted function while in combat?
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Candiru » Fri Aug 14, 2009 1:43 am

well, its just a long /castsequence macro with also swaps librams around when necessary. So it *should* be possible to automate, no?
Image
Candiru
 
Posts: 2480
Joined: Mon May 28, 2007 12:21 pm

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Jerey-Darkspear » Fri Aug 14, 2009 2:24 am

No. To my knowledge, /castsequence is restricted to 255 characters.
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Pracice » Mon Aug 24, 2009 6:20 am

This addon and thread is brilliant and extremely useful, I'm hitting 3k block value in raids now.

Hardly notice the difference in the rotation and my DPS, thanks Jerey!
Pracice
 
Posts: 12
Joined: Sat Jun 06, 2009 1:38 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Jerey-Darkspear » Mon Aug 24, 2009 7:17 am

No problem. Just remember that it's not worth swapping once you have Libram of Defiance. I use LoD for a set I call "Avoidance" that is used on 10-man hard modes and all of 25-man. I use BV libram swapping on a set I call "Block" for 10-man trash and heroics.
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Libram Swapping Add-on (BANG! Combat Item Switcher)

Postby Jerey-Darkspear » Tue Aug 25, 2009 9:52 pm

/end thread

Libram of Obstruction: The buff to block value from this relic is now exclusive with the buff to block value from Libram of the Sacred Shield; it is impossible to have both buffs at once.


Source - 3.2.2 PTR Notes
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Next

Return to Add-ons, UI, and Macros

Who is online

Users browsing this forum: No registered users and 1 guest

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 380 on Tue Oct 14, 2008 6:28 pm

Users browsing this forum: No registered users and 1 guest