What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Duration of Debuff on target?

Koalemos

New Member
Joined
Jun 20, 2010
Messages
369
Reaction score
1
I tried to figure this out on my own but I just don't seem to be doing something right. I'm trying to figure out in my CC how to find the duration or time left of a debuff on my target so I know whether to wait and recast it so it's always up or cast another spell instead. Also curious if the integers for the length would be in seconds or milliseconds.

Thank you for any help!
 
check out an existing CC and look how they did it perhaps?
 
Try:

Code:
SpellManager.KnownSpells["Drain Soul"].BaseCooldown
SpellManager.KnownSpells["Drain Soul"].Cooldown
 
Code:
if (!ObjectManager.Me.CurrentTarget.Auras.ContainsKey("Shadow Word: Pain"))
{
       SpellManagerEx.Cast("Shadow Word: Pain")
}
 
This is what I use when debugging;

Utils.Log("*** Moonfire debuff will runout in " + CT.Auras["Moonfire"].TimeLeft.Seconds);


This is what you're looking for. But first its a good idea to check if the debuff is on the target before checking how long it has left otherwise you will get an exception:

Me.CurrentTarget.Auras["Moonfire"].TimeLeft.Seconds

Are you trying to check if the debuff is on the target or how long the debuff has left until it expires? If want to check for the presence of the debuff then Raphus's is what you need. If you want to check the duration remaining of the debuff then my code is what you need.
 
Last edited:
Thank you very much. That seems like exactly what I was wanting.
I'm wanting to check the duration so I know whether to use combo points on one attack or another if it's about to run out.

Thank you to the others with the helpful code as well.
 
Back
Top