Jump to content

Energy Pool Version Of SND Lua Code (Read Me)


Womble

Recommended Posts

Basically I want to know if there's a way to change this: -

ret=1;
local nameSpell = GetSpellInfo(5171);
if (not nameSpell) then return; end
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate,  spellId = UnitBuff("player", nameSpell);
if (not expirationTime) then return; end
local expireTimeLeft = expirationTime-GetTime();
if expireTimeLeft > 6 then ret = 0 end
for the use of Shadow Dance.
 
What I want it to do is use Shadow Dance when I have over 74 energy but I also want it to 'pause' my rotation and save energy in order to do that. I assume it's not as straight forward as 'if energy > 74 then ret = 0 end'
Link to comment
Share on other sites

Hello,

 

You can try it:

ret=1;
if (UnitPower("player" ,SPELL_POWER_ENERGY) <= 74) then ret = 0; return; end
local nameSpell = GetSpellInfo(51713);
if (not nameSpell) then return; end
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate,  spellId = UnitBuff("player", nameSpell);
if (not expirationTime) then return; end
local expireTimeLeft = expirationTime-GetTime();
if expireTimeLeft > 6 then ret = 0 end

I have added line:

if (UnitPower("player" ,SPELL_POWER_ENERGY) <= 74) then ret = 0; return; end

or you can use condition "Energy".

Link to comment
Share on other sites

Sorry I meant similar to that code. Like I could use the energy condition but then shadow dance never works because it never has enough energy. In my profile when the spell is usable I have all my abilities individually stop so it then had > 74 energy and uses it but its problematic and conflicts with my stealth pull because shadow dance is ready on a boss pull.

So what I'm wondering if < 74 energy when shadow dance is usable can I use lua somehow to make it wait, stop or pause until it uses shadow dance as this would greatly improve the rotations DPS on the pull.

Link to comment
Share on other sites

Okay do you have any idea how I can have stealth work on the pull (only time that spell is used) without my rotation freezing?

The reason it does this is because like bug catcher suggested i already have condition checks that make sure my abilities don't go through when shadow dance is available and when you are stealthed on a pull it does nothing because shadow dance is available.

I can't come up with anything ATM although I've not been at home the last few days to test anything. Any conditions I can think of all seem to conflict in one way or another.

Link to comment
Share on other sites

instantspell

condition:

   Is Spell Usable: ShadowDance = false

 

anotherSpell

condition:

   Is Spell Usable: ShadowDance = false

 

instantspell and anotherSpell won't be casted, if shadowdance is available. Again: You have to wait in wrobot like you have wait in WoW. Do nothing until you have enough energy to do shadowdance. If you want to do your rotation, you will never have enough energy...

Link to comment
Share on other sites

instantspell

condition:

   Is Spell Usable: ShadowDance = false

 

anotherSpell

condition:

   Is Spell Usable: ShadowDance = false

 

instantspell and anotherSpell won't be casted, if shadowdance is available. Again: You have to wait in wrobot like you have wait in WoW. Do nothing until you have enough energy to do shadowdance. If you want to do your rotation, you will never have enough energy...

 

I don't know why you said that as though I don't understand the subtlety spec? If you understood then you wouldn't be telling me what I already know.

 

Here is what I last said: -

 

 

 

Okay do you have any idea how I can have stealth work on the pull (only time that spell is used) without my rotation freezing? 

The reason it does this is because like bug catcher suggested i already have condition checks that make sure my abilities don't go through when shadow dance is available and when you are stealthed on a pull it does nothing because shadow dance is available.

I can't come up with anything ATM although I've not been at home the last few days to test anything. Any conditions I can think of all seem to conflict in one way or another. 

 

Stealth is another buff we have. You don't do your rotation during Shadow Dance, it is completely different - so I can't afford to stop my profile during Stealth (gives the same available skill ((ambush) as both Shadow Dance and Vanish, only it's specific to the opening of a fight). Subtlety is a lot more involved than the other specs. I cannot find a way to create my profile in such a way that it opens properly because when ShadowDance is available my rotation stops. 

 

A dumbed down version of the opening would be something like this: -

 

Stealth

Garrote

Ambush

(Ambush - if energy / haste allows)

 

Normal rotation is basically

Hemo - keep debuff up on target

Backstab CP builder

*insert finisher*

 

Normal rotation cannot be used when shadow dance is available otherwise I never have the required energy to use it. However this affects Stealth.

 

Maybe lua can be used to say something along the lines of 'if shadowdance = false AND IF stealth = false then 

 

If I was playing I would only apply the 'shadowdance = false' after stealth drops (a buff I will only ever have on the pull, because after that, during the fight you use Shadow Dance and Vanish as your main Cooldowns. So, I wouldn't stop, because for the duration of stealth I would use 1x garrote and 2x ambush (1x ambush if energy doesn't allow i.e. gear < 12,000 haste-ish) but as my profile is now there is a huge loss of DPS on the pull.

 

I am just wondering if anyone knows any clever work around to avoid this.

Link to comment
Share on other sites

I've also noticed Wrobot is slow at reacting to the energy condition. So once my stealth drops it sometimes hits anywhere between 80-100 energy before it uses Shadow Dance instead of '> 74'. This seemed to be a massive factor in the DPS loss as well.

 

I've changed this to 64 and it seems to react by around 74-80 now which seems to be working a lot better.

 

I'll have to test it properly later, only just got back home.

 

Edit 2: I also think I have a possible fix for Shadow Dance itself, maybe a variation of lua, I'll update this later.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...