-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathViscidus.lua
278 lines (226 loc) · 9.32 KB
/
Viscidus.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
------------------------------
-- Are you local? --
------------------------------
local boss = AceLibrary("Babble-Boss-2.2")["Viscidus"]
local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)
local prior
----------------------------
-- Localization --
----------------------------
L:RegisterTranslations("enUS", function() return {
cmd = "Viscidus",
volley_cmd = "volley",
volley_name = "Poison Volley Alert",
volley_desc = "Warn for Poison Volley",
toxinyou_cmd = "toxinyou",
toxinyou_name = "Toxin Cloud on You Alert",
toxinyou_desc = "Warn if you are standing in a toxin cloud",
toxinother_cmd = "toxinother",
toxinother_name = "Toxin Cloud on Others Alert",
toxinother_desc = "Warn if others are standing in a toxin cloud",
freeze_cmd = "freeze",
freeze_name = "Freezing States Alert",
freeze_desc = "Warn for the different frozen states",
trigger1 = "Viscidus begins to slow.",
trigger2 = "Viscidus is freezing up.",
trigger3 = "Viscidus is frozen solid.",
trigger4 = "Viscidus begins to crack.",
trigger5 = "Viscidus looks ready to shatter.",
trigger6 = "afflicted by Poison Bolt Volley",
trigger7 = "^([^%s]+) ([^%s]+) afflicted by Toxin%.$",
you = "You",
are = "are",
warn1 = "First freeze phase!",
warn2 = "Second freeze phase!",
warn3 = "Viscidus is frozen!",
warn4 = "Cracking up - little more now!",
warn5 = "Cracking up - almost there!",
warn6 = "Poison Bolt Volley!",
warn7 = "Poison Bolt Volley in ~3 sec!",
warn8 = " is in a toxin cloud!",
warn9 = "You are in the toxin cloud!",
bar1text = "Poison Bolt Volley",
} end )
L:RegisterTranslations("deDE", function() return {
volley_name = "Poison Volley Alert", -- ?
volley_desc = "Warn for Poison Volley", -- ?
toxinyou_name = "Toxin Wolke",
toxinyou_desc = "Warnung, wenn Du in einer Toxin Wolke stehst.",
toxinother_name = "Toxin Wolke auf Anderen",
toxinother_desc = "Warnung, wenn andere Spieler in einer Toxin Wolke stehen.",
freeze_name = "Freeze Phasen",
freeze_desc = "Zeigt die verschiedenen Freeze Phasen an.",
trigger1 = "wird langsamer!",
trigger2 = "friert ein!",
trigger3 = "ist tiefgefroren!",
trigger4 = "geht die Puste aus!", --CHECK
trigger5 = "ist kurz davor, zu zerspringen!",
trigger6 = "afflicted by Poison Bolt Volley", -- ?
trigger7 = "^([^%s]+) ([^%s]+) von Toxin betroffen.$",
you = "Ihr",
are = "seid",
warn1 = "Erste Freeze Phase!",
warn2 = "Zweite Freeze Phase!",
warn3 = "Dritte Freeze Phase!",
warn4 = "Zerspringen - etwas noch!",
warn5 = "Zerspringen - fast da!",
warn6 = "Poison Bolt Volley!", -- ?
warn7 = "Incoming Poison Bolt Volley in ~3 Sekunden!", -- ?
warn8 = " ist in einer Toxin Wolke!",
warn9 = "Du bist in einer Toxin Wolke!",
bar1text = "Poison Bolt Volley",
} end )
L:RegisterTranslations("zhCN", function() return {
volley_name = "毒性之箭警报",
volley_desc = "毒性之箭警报",
toxinyou_name = "玩家毒云警报",
toxinyou_desc = "你站在毒云中时发出警报",
toxinother_name = "队友毒云警报",
toxinother_desc = "队友站在毒云中时发出警报",
freeze_name = "冻结状态警报",
freeze_desc = "冻结状态警报",
trigger1 = "的速度慢下来了!",
trigger2 = "冻结了!",
trigger3 = "变成了坚硬的固体!",
trigger4 = "开始碎裂了!",
trigger5 = "马上就要碎裂的样子!",
trigger6 = "受到了毒性之箭效果",
trigger7 = "^(.+)受(.+)了剧毒效果的影响。$",
you = "你",
are = "到",
warn1 = "冻结第一阶段!",
warn2 = "冻结第二阶段 - 做好准备",
warn3 = "冻结第三阶段 - DPS全开!",
warn4 = "即将碎裂 - 加大火力!",
warn5 = "即将碎裂 - 几近成功!",
warn6 = "毒性之箭 - 迅速解毒!",
warn7 = "3秒后发动毒性之箭!",
warn8 = "在毒云中 - 快跑开!",
warn9 = "你在毒云中 - 快跑开!",
bar1text = "毒性之箭",
} end )
L:RegisterTranslations("zhTW", function() return {
-- Viscidus 維希度斯
volley_name = "毒性之箭警報",
volley_desc = "當維希度斯施放毒性之箭時時發出警報",
toxinyou_name = "玩家毒雲警報",
toxinyou_desc = "你站在毒雲中時發出警報",
toxinother_name = "隊友毒雲警報",
toxinother_desc = "隊友站在毒雲中時發出警報",
freeze_name = "凍結狀態警報",
freeze_desc = "友方被凍結時發出警報",
trigger1 = "的速度慢下來了!",
trigger2 = "凍住了!",
trigger3 = "變成了堅硬的固體!",
trigger4 = "開始碎裂了!",
trigger5 = "馬上就要碎裂的樣子!",
trigger6 = "受到了毒性之箭效果",
trigger7 = "^(.+)受到(.*)劇毒的",
you = "你",
are = "了",
warn1 = "凍結階段 1/3 !",
warn2 = "凍結階段 2/3 !做好准備!",
warn3 = "凍結階段 3/3 !火力全開!",
warn4 = "碎裂階段 1/3 !加大火力!",
warn5 = "碎裂階段 2/3 !幾近成功!",
warn6 = "毒性之箭 - 迅速解毒!",
warn7 = "3 秒後發動毒性之箭!",
warn8 = "在毒雲中!快跑開!!",
warn9 = "你在毒雲中!快跑開!",
bar1text = "毒性之箭",
} end )
L:RegisterTranslations("koKR", function() return {
volley_name = "연발 독액 경고",
volley_desc = "연발 독액에 대한 경고",
toxinyou_name = "자신의 독구름 경고",
toxinyou_desc = "자신이 독구름일 때 알림",
toxinother_name = "타인의 독구름 경고",
toxinother_desc = "타인이 독구름일 때 알림",
freeze_name = "빙결 상태 경고",
freeze_desc = "각각의 빙결 상태에 대한 경고",
trigger1 = "%s|1이;가; 느려지기 시작했습니다!", -- CHECK
trigger2 = "%s|1이;가; 얼어붙고 있습니다!", -- CHECK
trigger3 = "%s|1이;가; 단단하게 얼었습니다!", -- CHECK
trigger4 = "%s|1이;가; 분해되기 시작합니다!", -- CHECK
trigger5 = "%s|1이;가; 부서질 것 같습니다!", -- CHECK
trigger6 = "연발 독액에 걸렸습니다", -- CHECK
trigger7 = "^([^|;%s]*)(.*)독소에 걸렸습니다%.$", -- CHECK
you = "",
are = "",
warn1 = "1 단계 - 느려집니다!",
warn2 = "2 단계 - 얼어붙고 있습니다!",
warn3 = "3 단계 - 얼었습니다! 물리 공격 시작!",
warn4 = "4 단계 - 좀 더 빠르게 공격!",
warn5 = "5 단계 - 거의 부서졌습니다!",
warn6 = "연발 독액 - 독 해제 하세요!",
warn7 = "연발 독액 - 약 3 초후 시전!",
warn8 = "님이 독소에 걸렸습니다 - 대피!",
warn9 = "당신은 독구름에 걸렸습니다!",
bar1text = "연발 독액",
} end )
L:RegisterTranslations("frFR", function() return {
-- need french chat/combatlog
trigger7 = "^([^%s]+) ([^%s]+) subit les effets de Toxine%.$",
you = "Vous",
are = "subissez",
} end )
----------------------------------
-- Module Declaration --
----------------------------------
BigWigsViscidus = BigWigs:NewModule(boss)
BigWigsViscidus.zonename = AceLibrary("Babble-Zone-2.2")["Ahn'Qiraj"]
BigWigsViscidus.enabletrigger = boss
BigWigsViscidus.bossSync = "Viscidus"
BigWigsViscidus.toggleoptions = {"freeze", "volley", "toxinyou", "toxinother", "bosskill"}
BigWigsViscidus.revision = tonumber(string.sub("$Revision: 16282 $", 12, -3))
------------------------------
-- Initialization --
------------------------------
function BigWigsViscidus:OnEnable()
self.started = nil
prior = nil
self:RegisterEvent("BigWigs_Message")
self:RegisterEvent("CHAT_MSG_RAID_BOSS_EMOTE")
self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE", "CheckVis")
self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE", "CheckVis")
self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE", "CheckVis")
end
------------------------------
-- Event Handlers --
------------------------------
function BigWigsViscidus:CheckVis(arg1)
if not prior and self.db.profile.volley and string.find(arg1, L["trigger6"]) then
self:TriggerEvent("BigWigs_Message", L["warn6"], "Urgent")
self:ScheduleEvent("BigWigs_Message", 7, L["warn7"], "Urgent")
self:TriggerEvent("BigWigs_StartBar", self, L["bar1text"], 10, "Interface\\Icons\\Spell_Nature_CorrosiveBreath")
prior = true
elseif string.find(arg1, L["trigger7"]) then
local _,_, pl, ty = string.find(arg1, L["trigger7"])
if (pl and ty) then
if self.db.profile.toxinyou and pl == L["you"] and ty == L["are"] then
self:TriggerEvent("BigWigs_Message", L["warn9"], "Personal", true)
self:TriggerEvent("BigWigs_Message", UnitName("player") .. L["warn8"], "Important", nil, nil, true)
elseif self.db.profile.toxinother then
self:TriggerEvent("BigWigs_Message", pl .. L["warn8"], "Important")
self:TriggerEvent("BigWigs_SendTell", pl, L["warn9"])
end
end
end
end
function BigWigsViscidus:CHAT_MSG_RAID_BOSS_EMOTE(arg1)
if not self.db.profile.freeze then return end
if arg1 == L["trigger1"] then
self:TriggerEvent("BigWigs_Message", L["warn1"], "Atention")
elseif arg1 == L["trigger2"] then
self:TriggerEvent("BigWigs_Message", L["warn2"], "Urgent")
elseif arg1 == L["trigger3"] then
self:TriggerEvent("BigWigs_Message", L["warn3"], "Important")
elseif arg1 == L["trigger4"] then
self:TriggerEvent("BigWigs_Message", L["warn4"], "Urgent")
elseif arg1 == L["trigger5"] then
self:TriggerEvent("BigWigs_Message", L["warn5"], "Important")
end
end
function BigWigsViscidus:BigWigs_Message(text)
if text == L["warn7"] then prior = nil end
end