WEAKAURA

#### Insanity Bar (7.1.5 / 2017-01-21)

Updated Jan 21st 2017 WoW 7.1.5 User Twintop Views 191,517 Comments 19 Stars 72 Collections 20

Description:
Tracks your current Insanity level, time remaining in Voidform, and expected stacks at the end.

When updating to a new version, COMPLETELY REMOVE the old version first, "/console reloadui", install the new version, and "/console reloadui" again!

Notes:
-Right Side Text:
--Shows current Insanity %.
--Shows incoming Insanity gains from either hardcasting or Shadowy Apparitions (if Auspicious Spirits is talented).
-Left Side Text:
--Shows current Haste%.
--Outside Voidform, shows how many Lingering Insanity stacks you have (if you have any).
---Inside Voidform, shows how many stacks of Voidform you currently have as well as how many more stacks you will be able to gain before exiting Voidform.
-Center Text:
--Shows how long you have until you will exit Voidform, and, what the current Insanity drain per second is (not including Void Torrent or Dispersion reducing it to 0).
-Line denotes your threshold for being able to toggle Voidform on, depending on your talent choices (Legacy of the Void).
-Bar flashes white and changes color when you are able to enter Voidform.
-Colors progress to darker shades of purple as you move from: unable to toggle Voidform, can toggle Voidform, and finally to in Voidform.
-At the end of Voidform, the bar color changes from purple to yellow when you have between 1 - 2 GCDs until you will exit, red when you have under 1 GCD until you will exit.
-If you are hardcasting a spell that generates insanity, the position of the bar after you complete casting is denoted by the White bar. Likewise, the white text "xx + " in front of the current Insanity text is the raw amount of Insanity you will gain at the end of your cast.
-If you have the Auspicious Spirits Tracker Weak Aura enabled (just the trigger, the icon/GUI is optional!), then the lighter purple bar denotes the position of the Insanity bar once all active Shadowy Apparitions strike their targets. Likewise, the lighter purple text "xx +" in front of the current Insanity (or hardcast Insanity) text is the raw amount of Insanity you will gain when all current SAs strike their targets.
-Tracks when channelling Void Torrent or Dispersion and adjusts the time remaining accordingly.
-Accounts for current latency in the time remaining.
-Choose whether or not to print out a summary to chat after each Surrender to Madness (or Voidform).
-To edit the colors of the bar and text, resize the bar, change the font size, or (NEW) change what text is displayed in the left/middle/right of the bar, see the "Options and Trigger" aura, Actions Tab, Init section.

This is a collection of 12 auras:

Insanity Bar - Options and Trigger (text)
Insanity Bar - Text - Left (text)
Insanity Bar - Text - Middle (text)
Insanity Bar - Text - Right (text)
Insanity Bar - Border - Insanity Ready (aurabar)
Insanity Bar - Main Bar (aurabar)
Insanity Bar - Casting Bar (aurabar)
Insanity Bar - Auspicious Spirits Bar (aurabar)
Insanity Bar - LotV Marker 1 (texture)
Insanity Bar - LotV Marker 2 (texture)
Insanity Bar - Non-LotV Marker 1 (texture)
Insanity Bar - Non-LotV Marker 2 (texture)

This Weak Aura includes custom functions.

Preview

Posted by Twintop 3 months ago. Reply 2016-12-17 15:36
@sablemm See the Options and Settings WA. That's the Wilhelm Scream.
Posted by sablemm 3 months ago. Reply 2016-12-17 15:04
hi there,first thank u for this amazing code,and i have a question that,every time die from s2m，there will be a sound "ah~", can u tell me how could i delete it? thanks alot..
Posted by Phaton 3 months ago. Reply 2016-12-16 17:44
@Twintop Sorry! after reloading the UI it worked. Thanks so much for this amazing aura! Twintop MVP!
Posted by Phaton 3 months ago. Reply 2016-12-16 17:37
@Twintop Same error. Thanks for the efforts. Let me know what can I do to help.
Posted by Twintop 3 months ago. Reply 2016-12-16 17:13
That may be part of it, @Jordy. I thought I had updated the instructions to include that but, if I made any changes to any functions used (or added new ones) then a /reloadui after importing is needed. Have it updated now, though!
Posted by Jordy 3 months ago. Reply 2016-12-16 14:07
@Jordy Not sure if I can edit my previous comment but it looks like this fixes itself if you reloadui AGAIN after importing the new aura. I know in the summary you state to reloadui after removing the previous version but before importing, but it looks like you also need to reloadui after importing the new version. This might fix the issue for others if they are experiencing the same problem.
Posted by Jordy 3 months ago. Reply 2016-12-16 14:01
@Twintop I am also having this issue (I also use ElvUI). The latest update doesn't seem to fix it. The errors appear to be stemming from a couple of things:

1. WA_Insanity_Bar_Color_Text_Middle is nil in the Insanity Bar - Text - Middle aura
2. tonumber(WA_Insanity_Bar_v_major), tonumber(WA_Insanity_Bar_v_minor), and tonumber(WA_Insanity_Bar_v_bf) are all nil in the Insanity Bar - Text - Right aura

When I replace those variables with regular values then the errors go away. I'm not exactly sure how you'd fix these issues exactly but I thought this might help.
Posted by Twintop 3 months ago. Reply 2016-12-14 18:57
@Splast @Xarf @Phaton Try this new version. I think it addresses the issue but still can't reproduce it locally. Thanks!
Posted by Splast 3 months ago. Reply 2016-12-13 15:32
I am having the same issue. I went back to version 7 and not receiving errors. They only happen with the latest version.
Posted by Xarf 3 months ago. Reply 2016-12-13 09:30
I found a little workaround:

if you are suing ElvUI you can simply type: /luaerror off and then the Lua Error Window will disappear.

Its not the best workaround but now insanitybar works for me...
Posted by Xarf 3 months ago. Reply 2016-12-13 02:46
I'm getting the same errors like Phaton:
Message: [string "return -- Insanity Bar -- By Twintop - Illi..."]:7: bad argument #2 to 'format' (string expected, got nil)
Time: 12/13/16 11:43:12
Count: 601
Stack: [C]: ?
[C]: in function format'
[string "return -- Insanity Bar -- By Twintop - Illi..."]:7: in function <[string "return -- Insanity Bar -- By Twintop - Illi..."]:2>

- English Client
- same Talents like @Phaton
Posted by Twintop 3 months ago. Reply 2016-12-11 14:20
@Phaton What version of WAs do you have installed? Are you positive there are no old versions of the Insanity Bar WAs left? I'm not able to reproduce this issue, unfortunately. :\
Posted by Gandalfthefabule 3 months ago. Reply 2016-12-11 10:50
Posted by Phaton 3 months ago. Reply 2016-12-09 02:10
@Twintop http://www.wowdb.com/talent-calculator#CpUX . I'm 110. My client is in english. I' ve not changed a thing from of your auras.
Posted by Twintop 3 months ago. Reply 2016-12-08 17:54
@Phaton Also, what talents were you using, what level are you, and what is the language for your client?
Posted by Twintop 3 months ago. Reply 2016-12-08 17:53
@Phaton Did you do any customizations or changes to the LUA for the bar in any way, including editing the variables in the Options and Triggers WA?
Posted by Phaton 4 months ago. Reply 2016-12-08 05:13
Well, then started again when the bar tryed to reference them.
Posted by Phaton 4 months ago. Reply 2016-12-08 05:12
I've tried deleting all of the "Text" auras and the errors stoped.
Posted by Phaton 4 months ago. Reply 2016-12-08 04:49
I'm getting the same error here :(
Message: [string "return -- Insanity Bar -- By Twintop - Illi..."]:7: bad argument #2 to 'format' (string expected, got nil)
Time: 12/08/16 13:48:54
Count: 1053
Stack: [C]: ?
[C]: in function format'
[string "return -- Insanity Bar -- By Twintop - Illi..."]:7: in function <[string "return -- Insanity Bar -- By Twintop - Illi..."]:2>