vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1  
2 IMBA_4H_MARK_INITIAL = 20;
3 IMBA_4H_MARK_NORMAL = 12;
4 IMBA_4H_MARK_DURATION = 75;
5  
6 IMBA_4H_METEOR_TIME = 11;
7 IMBA_4H_METEOR_MSG = "Thane Korth'azz ?'s Meteor hits";
8  
9 IMBA_4H_HOLY_WRATH_TIME = 11;
10 IMBA_4H_HOLY_WRATH_MSG = "Sir Zeliek ?'s Holy Wrath hits";
11  
12 IMBA_4H_VOID_ZONE_TIME = 11;
13 IMBA_4H_VOID_ZONE_MSG = "Lady Blaumeux casts Void Zone.";
14 IMBA_4H_VOID_CONSUMPTION = "Void Zone's Consumption hits you";
15  
16  
17 IMBA_Mark=1;
18 function IMBA_FourHorsemen_StartNormal()
19 IMBA_FourHorsemen_TimerMark:StartTimer(IMBA_4H_MARK_NORMAL);
20 IMBA_AddRaidAlert("** Mark "..IMBA_Mark.." **",false,IMBA_CheckVar("Four Horsemen","AnnounceMarks"));
21 IMBA_Mark=IMBA_Mark+1;
22 IMBA_FourHorsemen_TimerMark:SetBarText("Mark "..IMBA_Mark.." in");
23 end
24  
25  
26 function IMBA_FourHorsemen_StartInitial()
27 IMBA_FourHorsemen_TimerMark:StartTimer(IMBA_4H_MARK_INITIAL);
28 IMBA_Mark=1;
29 IMBA_FourHorsemen_TimerMark:SetBarText("Mark "..IMBA_Mark.." in");
30 end
31  
32  
33 function IMBA_FourHorsemen_RegenActivator()
34 IMBA_FourHorsemen_StartInitial()
35 IMBA_FourHorsemen:Show();
36  
37 if IMBA_CheckVar("Four Horsemen","ActivateRangeChecker") then
38 IMBA_RangeChecker:Show();
39 end
40 end
41  
42 function IMBA_FourHorsemen_RegisterEvents()
43 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE");
44 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE");
45 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE");
46 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE");
47 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE");
48 this:RegisterEvent("PLAYER_DEAD");
49  
50 this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE");
51 this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE");
52 this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE");
53 IMBA_RangeChecker_Active=true;
54 end
55  
56 function IMBA_FourHorsemen_UnregisterEvents()
57 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE");
58 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE");
59 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE");
60 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE");
61 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE");
62 this:UnregisterEvent("PLAYER_DEAD");
63  
64 this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE");
65 this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE");
66 this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE");
67 IMBA_RangeChecker_Active=false;
68 end
69  
70 function IMBA_FourHorsemen_OnLoad()
71 this:SetBackdropBorderColor(1, 1, 1, 1);
72 this:SetBackdropColor(0.0,0.0,0.0,0.6);
73  
74  
75 IMBA_FourHorsemen_Title:SetText("Four Horsemen Timers");
76  
77 IMBA_FourHorsemen_TimerMeteor:SetBarText("Meteor");
78 IMBA_FourHorsemen_TimerHolyWrath:SetBarText("Holy Wrath");
79 IMBA_FourHorsemen_TimerVoidZone:SetBarText("Void Zone");
80 IMBA_Mark=1;
81 IMBA_FourHorsemen_TimerMark:SetBarText("Mark "..IMBA_Mark.." in");
82  
83  
84 IMBA_AddAddon("Four Horsemen", "Timers for Meteor, Holy Wrath, Void Zones, and Mark", IMBA_LOCATIONS_NAXX_DK, "IMBA_FourHorsemen_RegenActivator", nil, nil,"IMBA_FourHorsemen");
85 IMBA_AddBossName("Four Horsemen","Lady Blaumeux");
86 IMBA_AddBossName("Four Horsemen","Thane Korth'azz");
87 IMBA_AddBossName("Four Horsemen","Highlord Mograine");
88 IMBA_AddBossName("Four Horsemen","Sir Zeliek");
89  
90 IMBA_AddOption2("Four Horsemen","AnnounceMarks","Announce Marks")
91 IMBA_AddOption2("Four Horsemen","ActivateRangeChecker","Activate Range Checker");
92 IMBA_FourHorsemen_LockoutTime=0;
93 end
94  
95 function IMBA_FourHorsemen_OnEvent(event)
96  
97 if ( event == "CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE" ) or ( event == "CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE" ) or ( event == "CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE" ) or ( event == "CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE") or (event == "CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE") then
98 if IMBA_FourHorsemen_LockoutTime>GetTime() then
99 return;
100 end
101 if string.find(arg1, "is afflicted by Mark of Blaumeux") then
102 IMBA_FourHorsemen_StartNormal();
103 IMBA_FourHorsemen_LockoutTime=GetTime()+11;
104 elseif string.find(arg1, "is afflicted by Mark of Korth'azz") then
105 IMBA_FourHorsemen_StartNormal();
106 IMBA_FourHorsemen_LockoutTime=GetTime()+11;
107 elseif string.find(arg1, "is afflicted by Mark of Mograine") then
108 IMBA_FourHorsemen_StartNormal();
109 IMBA_FourHorsemen_LockoutTime=GetTime()+11;
110 elseif string.find(arg1, "is afflicted by Mark of Zeliek") then
111 IMBA_FourHorsemen_StartNormal();
112 IMBA_FourHorsemen_LockoutTime=GetTime()+11;
113 end
114 elseif (event == "CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE") or ( event == "CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE") or ( event == "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE") then
115 if string.find(arg1,IMBA_4H_METEOR_MSG) then
116 IMBA_FourHorsemen_TimerMeteor:StartTimer(IMBA_4H_METEOR_TIME)
117 elseif string.find(arg1,IMBA_4H_HOLY_WRATH_MSG) then
118 IMBA_FourHorsemen_TimerHolyWrath:StartTimer(IMBA_4H_HOLY_WRATH_TIME)
119 elseif string.find(arg1,IMBA_4H_VOID_ZONE_MSG) then
120 IMBA_FourHorsemen_TimerVoidZone:StartTimer(IMBA_4H_VOID_ZONE_TIME)
121 IMBA_AddAlert("Blaumeux summons a Void Zone");
122 IMBA_Flash_Warning();
123 elseif string.find(arg1,IMBA_4H_VOID_CONSUMPTION) then
124 IMBA_AddAlert("Standing in a Void Zone!");
125 IMBA_Flash_Warning();
126 end
127 end
128 end