vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 IMBA_OURO_SWEEP_MSG = "Ouro begins to cast Sweep."
2 IMBA_OURO_SWEEP_TIME = 20;
3  
4 IMBA_OURO_SANDBLAST_MSG = "Ouro begins to perform Sand Blast."
5 IMBA_OURO_SANDBLAST_TIME = 20;
6  
7 IMBA_OURO_SUBMERGE_MSG = "Ouro casts Summon Ouro Mounds."
8 IMBA_OURO_SUBMERGE_TIME = 30
9  
10 IMBA_OURO_EMERGE_MSG = "Dirt Mound casts Summon Ouro Scarabs."
11 IMBA_OURO_EMERGE_TIME = 90
12  
13 IMBA_OURO_ENRAGE_MSG = "goes into a berserker rage!"
14  
15 function IMBA_Ouro_RegenActivator()
16 IMBA_Ouro_TimerSubmerge:SetBarText("Ouro Submerging in");
17 IMBA_Ouro_TimerSubmerge:StartTimer(IMBA_OURO_EMERGE_TIME,true,nil,5);
18 IMBA_Ouro:Show();
19 IMBA_Ouro_Enraged=false;
20 end
21  
22 function IMBA_Ouro_RegisterEvents()
23 this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE");
24 this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF");
25 this:RegisterEvent("CHAT_MSG_MONSTER_EMOTE");
26 this:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH");
27 end
28  
29 function IMBA_Ouro_UnregisterEvents()
30 this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE");
31 this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF");
32 this:UnregisterEvent("CHAT_MSG_MONSTER_EMOTE");
33 this:UnregisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH");
34 end
35  
36 function IMBA_Ouro_OnLoad()
37 this:SetBackdropBorderColor(1, 1, 1, 1);
38 this:SetBackdropColor(0.0,0.0,0.0,0.6);
39  
40  
41 IMBA_Ouro_Title:SetText("Ouro Timers");
42  
43 IMBA_Ouro_TimerSweep:SetBarText("Sweep");
44 IMBA_Ouro_TimerSandBlast:SetBarText("Sand Blast");
45 IMBA_Ouro_TimerSubmerge:SetBarText("Ouro Submerging in");
46 IMBA_Ouro_HealthOuro.UnitName="Ouro";
47  
48  
49 IMBA_AddAddon("Ouro", "Timers for Sweep, Sand Blasts, and Submerge/Emerge", IMBA_LOCATIONS_AQ40, "IMBA_Ouro_RegenActivator", nil,nil,"IMBA_Ouro");
50 IMBA_AddOption2("Ouro","AnnounceSweep","Announce Sweep");
51 IMBA_AddOption2("Ouro","AnnounceSandBlast","Announce Sand Blast");
52 IMBA_AddOption2("Ouro","AnnounceSubmerge","Announce Submerge/Emerge");
53 IMBA_AddOption2("Ouro","AnnounceEnrage","Announce Enrage");
54  
55 IMBA_Ouro_Enraged=false;
56 end
57  
58  
59  
60 function IMBA_Ouro_OnEvent(event)
61 if event == "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE" then
62 if string.find(arg1,IMBA_OURO_SWEEP_MSG) then
63 IMBA_Ouro_TimerSweep:StartTimer(IMBA_OURO_SWEEP_TIME,false);
64 IMBA_AddRaidAlert("** Ouro is Sweeping **",IMBA_CheckVar("Ouro","AnnounceSweep"),IMBA_CheckVar("Ouro","AnnounceSweep"));
65 elseif string.find(arg1,IMBA_OURO_SANDBLAST_MSG) then
66 IMBA_Ouro_TimerSandBlast:StartTimer(IMBA_OURO_SWEEP_TIME,false);
67 IMBA_Ouro_TimerSandBlast:StartWarningTimer("** Ouro is Sand Blastin in ~5 Seconds **",5,IMBA_CheckVar("Ouro","AnnounceSandBlast"),IMBA_CheckVar("Ouro","AnnounceSandBlast"));
68 IMBA_AddRaidAlert("** Ouro is Sand Blasting **",IMBA_CheckVar("Ouro","AnnounceSandBlast"),IMBA_CheckVar("Ouro","AnnounceSandBlast"));
69 end
70 elseif event == "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF" then
71 if string.find(arg1,IMBA_OURO_SUBMERGE_MSG) then
72 IMBA_Ouro_TimerSubmerge:SetBarText("Ouro Emerging in");
73 IMBA_Ouro_TimerSubmerge:StartTimer(IMBA_OURO_SUBMERGE_TIME,false);
74 IMBA_Ouro_TimerSubmerge:StartWarningTimer("** Ouro is Emerging in 5 Seconds **",5,IMBA_CheckVar("Ouro","AnnounceSubmerge"),IMBA_CheckVar("Ouro","AnnounceSubmerge"));
75 IMBA_AddRaidAlert("** Ouro is Submerging **",IMBA_CheckVar("Ouro","AnnounceSubmerge"),IMBA_CheckVar("Ouro","AnnounceSubmerge"));
76 elseif string.find(arg1,IMBA_OURO_EMERGE_MSG) and IMBA_Ouro_Enraged==false then
77 IMBA_Ouro_TimerSubmerge:SetBarText("Ouro Submerging in");
78 IMBA_Ouro_TimerSubmerge:StartTimer(IMBA_OURO_EMERGE_TIME,true);
79 IMBA_AddRaidAlert("** Ouro is Emerging **",IMBA_CheckVar("Ouro","AnnounceSubmerge"),IMBA_CheckVar("Ouro","AnnounceSubmerge"));
80 end
81 elseif (event == "CHAT_MSG_MONSTER_EMOTE") then
82 if string.find(arg1,IMBA_OURO_ENRAGE_MSG) then
83 IMBA_AddRaidAlert("** Ouro is Enraged **",IMBA_CheckVar("Ouro","AnnounceEnrage"),IMBA_CheckVar("Ouro","AnnounceEnrage"));
84 IMBA_Ouro_Enraged=true;
85 end
86 elseif (event == "CHAT_MSG_COMBAT_HOSTILE_DEATH") then
87 if string.find(arg1,"Ouro dies") then
88 IMBA_Ouro_TimerSweep.active=false;
89 IMBA_Ouro_TimerSandBlast.active=false;
90 IMBA_Ouro_TimerSubmerge.active=false;
91 IMBA_Ouro:Hide();
92 end
93 end
94 end