Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Public Discussion » Public Discussion

Reply
 
LinkBack Thread Tools
Old 06/13/07, 7:20 PM   #1
Shocktar
Piston Honda
 
Worgen Rogue
 
Deathwing
5 second rule event in the API?

The author of Outfitter and I are trying to design a script that can automatically switch weapons based on whether or not one is in the 5 second rule.
Yes, I know this incurs a global cooldown.
Previously, we'd been using the event PLAYER_REGEN_DISABLED, but that is health regen, not mana. Is there a similar API call that uses mana regen, and fires when you're inside and outside the 5sr?

United States Offline
Reply With Quote
Old 06/13/07, 7:42 PM   #2
Polleke
Foobar
 
Polleke's Avatar
 
Troll Priest
 
Azjol-Nerub (EU)
I don't think this thread is in the right forum. I had a quick look in PittBull_Spark and it registers UNIT_MANA and UNIT_SPELLCAST_SUCCEEDED and bassicly checks if mana was used after a succesfull spellcast. And then counts for 5 seconds. That should work for your purpose aswell.

* Bla

Offline
Reply With Quote
Old 06/13/07, 7:45 PM   #3
Shocktar
Piston Honda
 
Worgen Rogue
 
Deathwing
You are absolutely right Polleke, thank you.

May I please have a mod move this into the Mods section?
Thank you.

United States Offline
Reply With Quote
Old 06/13/07, 8:04 PM   #4
Shadowed
Soda Popinski
 
Tauren Druid
 
Mal'Ganis
Nope, theres no event for detecting the 5 second rule, as was said above you have to use a combination of events + timer to detect it.

United States Offline
Reply With Quote
Old 06/14/07, 2:44 AM   #5
Roywyn
Bald Bull
 
Roywyn's Avatar
 
Roywyn
Gnome Mage
 
No WoW Account (EU)
Sorry if I derail a bit, but when exactly do the mana regeneration ticks happen?

Is it like energy for rogues, who get their energy ticks on a global timer?
(I.e. if you cast a spell that costs mana, you get your first tick 5-7s after your cast, depending on when your cast happens in the gloal timer.)
Or is it on a timer that ticks after spending mana?
(I.e. after you cast your spell, you always get your next tick of mana 7s (or 5s) after your cast, indepependant of exact timing.)

I'm still trying to figure that one out for evocation and weapon swapping.

Edit: Thanks for the replies that it's a global timer when all your mana regens ticks.

Last edited by Roywyn : 06/14/07 at 9:07 AM.

Offline
Reply With Quote
Old 06/14/07, 4:25 AM   #6
bobz0r
Glass Joe
 
Undead Priest
 
Cho'gall
Roywyn,
Maybe this can help clarify.


"The 5 second rule states that 5 seconds after your last spell cast you normally do not regenerate mana from spirit.
However, you do regenerate mana from mana every 5 second gear(mp5) and you can regenerate a reduced amount from spirit in the forum of talents, buffs (mage armor), and/or trinkets like Bangle of Endless Blessings.
In game, blizzard describes inside the 5 second rule as "while casting" and outside of the 5 second rule as "while not casting."
From: The Priest Mana Regeneration Model

http://forums.worldofwarcraft.com/th...11893046&sid=1

Last edited by bobz0r : 06/14/07 at 4:26 AM. Reason: added link

Offline
Reply With Quote
Old 06/14/07, 6:32 AM   #7
thorin5
Von Kaiser
 
thorin5's Avatar
 
Draenei Shaman
 
Hellscream
Originally Posted by Roywyn View Post
Sorry if I derail a bit, but when exactly do the mana regeneration ticks happen?

Is it like energy for rogues, who get their energy ticks on a global timer?
(I.e. if you cast a spell that costs mana, you get your first tick 5-7s after your cast, depending on when your cast happens in the gloal timer.)
Or is it on a timer that ticks after spending mana?
(I.e. after you cast your spell, you always get your next tick of mana 7s (or 5s) after your cast, indepependant of exact timing.)

I'm still trying to figure that one out for evocation and weapon swapping.
I'm pretty sure it behaves just like the regular energy ticks that rogues deal with. I'm not sure how often the energy ticks are, but for mana they happen every 2.5 seconds, which can easily be seen if you use Scrolling Combat Text and enable it to show all power gains(you'll see roughly half the mp5 listed on your character screen pop up every 2.5 seconds)

Offline
Reply With Quote
Old 06/14/07, 6:38 AM   #8
dakalro
Don Flamenco
 
Human Warlock
 
Frostmane (EU)
Regen ticks are every 2 seconds. Also confirmed ... somewhat, by having in combat regen % and seeing what the char screen says for your class regen formula. And as far as I saw from my druid it's a global tick, like energy.

Offline
Reply With Quote
Old 06/14/07, 8:23 AM   #9
Starbucks
King Hippo
 
Starbucks's Avatar
 
Tauren Shaman
 
Al'Akir (EU)
I do not think you can automatically change the weapon, to be honest with you I think making a plugin which adds the 5 second rule to SCT would be something you can look for, though I could be wrong and it is possible, considering Wardrobe 2 looks for the combat flag to drop before switching items if you try midcombat

Offline
Reply With Quote
Old 06/14/07, 9:42 AM   #10
Nomad_Wanderer
Von Kaiser
 
Human Priest
 
Lothar
I do believe you can change your gear based on events.. I think there is a closetgnome_Bigwigs that does this.

Quartz and pitbull both have global cooldown display, and a mod like regenFu (or naboo5sec), have good 5SR counters..

It's probably feasible to borrow code from a few of these to accomplish what you want.

Offline
Reply With Quote
Old 06/14/07, 1:14 PM   #11
Shocktar
Piston Honda
 
Worgen Rogue
 
Deathwing
Thanks for all the thoughts everyone,

Currently, we're writing a script using Chronos's timers and the UNIT_MANA event that should accomplish what we're looking for. I'm testing it tonight, and will provide updates tomorrow.

United States Offline
Reply With Quote
Old 06/15/07, 12:13 PM   #12
Nomad_Wanderer
Von Kaiser
 
Human Priest
 
Lothar
Originally Posted by Nomad_Wanderer View Post
I do believe you can change your gear based on events.. I think there is a closetgnome_Bigwigs that does this.

Quartz and pitbull both have global cooldown display, and a mod like regenFu (or naboo5sec), have good 5SR counters..

It's probably feasible to borrow code from a few of these to accomplish what you want.
I was stupid yesterday. Closetgnome_Switcher actually changes gear out on events, like evocate..... You might want to try and use this as a base mod, borrowing most of the code, and just changing the 'trigger'.

Offline
Reply With Quote
Old 06/15/07, 12:28 PM   #13
Pater
Don Flamenco
 
Tauren Druid
 
Khadgar
I wrote some early 5sr mods. IIRC, the only way to know if 5sr begins is when UNIT_MANA ("player") goes down at the same time as a SPELL_STOP_CASTING. IIRC, he only other check you have to do is for channeling--regen disabled the entire channel time. I can't remember if it resumes immediately after channel ends (assuming you channeled 5+ seconds) or if it tacks on another 5 sec at the end.

Offline
Reply With Quote
Old 06/15/07, 12:35 PM   #14
Overhead
Von Kaiser
 
Night Elf Priest
 
Shattered Hand
Originally Posted by Roywyn View Post
I'm still trying to figure that one out for evocation and weapon swapping.
Don't bother for evocation, it's an even number of channeled seconds, so regardless of when you start you get the same number of ticks with the buff up.

Something like innervate or the Bangle, however, there is a small timing issue to maximize it. It makes me wonder, is everyone on the same global tick, or is it player specific? ie can a druid time innervating a priest with their own regen tick?

Offline
Reply With Quote
Old 06/15/07, 12:55 PM   #15
Zaroua
Don Flamenco
 
Zaroua's Avatar
 
Dwarf Paladin
 
Sen'jin
I'll add a bit of info: the Pitbull power bar is for lack of better words, wrong. It's mainly a guide to help along. Spirit (and Energy) tick every 2 seconds:

0:00 Spirit tick. Oh shit tank needs a heal.
0:01 Start casting a 1.5 second spell.
0:02 Spirit tick. Still casting.
0:03 Spell finishes casting at 2.5 seconds.
0:04 Spirit tick but no gain due to 5sr.
0:05 Nothing.
0:06 Spirit tick but no gain due to 5sr.
0:07 Nothing.
0:08 Spirit tick outside of 5sr.
0:09 Nothing.
0:10 Spirit tick outside of 5sr.


Basically the heal casted at 2.5 seconds will put you inside the 5sr until the 8 seconds mark, not the 7.5 second. What would be really helpful is a mod that tracks every spirit tick (kinda like energy watch mods) and tracks the time of the last spell that landed the caster inside the 5sr until the next full spirit tick.



Edit: For the disbelievers, simply play a Warlock and use Life Drain. You'll see that it sometimes takes "a while" to get the first spirit tick after the spell finishes.

Theorycrafting procedures per role:
DPS = Theory -> Spreadsheet -> Practice
Healing = Theory -> Practice -> Logs
Tanking = Theory -> Theory -> Theory

Offline
Reply With Quote
Reply

Go Back   Elitist Jerks » Public Discussion » Public Discussion

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Event question Analyze User Interface and AddOns 3 05/31/07 2:48 PM
Bash'ir Landing event in BEM Pater Public Discussion 36 05/30/07 6:28 AM
A Simple Rule Praetorian Public Discussion 0 12/09/06 10:02 AM
5 Second Rule Hamlet Public Discussion 13 09/18/06 7:47 AM