vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | DL_CONDITIONS_MENU = { |
2 | { text="No Condition", value=0, desc="Using this condition causes the response to be run everytime the loop checks the condition, in other words, a number of times per second equal to the Updates Per Second set in Misc Options."}, |
||
3 | { text="Action Cooling Down", value=1, params=1, desc="Detects if the action you choose is cooling down." }, |
||
4 | { text="Action In Range", value=2, params=2, desc="Detects if the action you choose is in range." }, |
||
5 | { text="Action Is Equipped", value=57, params=2, desc="Detects if the action you choose is an item that's currently equipped."}, |
||
6 | { text="Action Is Not Equipped", value=58, params=2, desc="Detects if the action you choose is not an item that's currently equipped."}, |
||
7 | { text="Action Item Count", value=29, params=11, desc="Use this to check the number of items left in a stack the specified action holds." }, |
||
8 | { text="Action Just Used", value=54, params=2, desc="Used to check the last action used by any means: clicking an action button, pressing a keybinding, auto-cast, etc." }, |
||
9 | { text="Action Not Cooling Down", value=3, params=1, desc="Detects if the action you choose is not cooling down." }, |
||
10 | { text="Action Out of Range", value=4, params=2, desc="Detects if the action you choose is out of range." }, |
||
11 | { text="Action Unusable", value=37, params=2, desc="Detects if the action you choose is unusable. It checks if you have enough mana, the action is in range, and not cooling down as well as the unusable flag."}, |
||
12 | { text="Action Usable", value=5, params=2, desc="Detects if the action you choose is usable. It checks if you have enough mana, the action is in range, and not cooling down as well as the unusable flag." }, |
||
13 | { text="Aggro Gained", value=40, desc="Detects if you've done anything to generate threat from a mob." }, |
||
14 | { text="Aggro Lost", value=41, desc="Detects if you've lost all threat from any mobs." }, |
||
15 | { text="Alt Key Down", value=66, desc="Detects if you're pressing the Alt key." }, |
||
16 | { text="Alt Key Up", value=67, desc="Detects if you're not pressing the Alt key." }, |
||
17 | { text="Auto-attack Off", value=42, desc="Detects if you're not currently using an auto-attack action." }, |
||
18 | { text="Auto-attack On", value=43, desc="Detects if you're currently using an auto-attack action." }, |
||
19 | { text="Buff Active", value=6, params=3, desc="Detects if a unit currently has a specified buff on them. You don't have to use the full name of the buff, a partial name will do. For example: 'Power Word' will detect Power Word: Shield and Power Word: Fortitude." }, |
||
20 | { text="Buff Inactive", value=38, params=3, desc="Detects if a unit does not currently have a specified buff on them. You don't have to use the full name of the buff, a partial name will do. For example: 'Power Word' will detect Power Word: Shield and Power Word: Fortitude." }, |
||
21 | { text="Combo Points", value=7, params=4, desc="Used to check how many combo points you currently have." }, |
||
22 | { text="Creature Type", value=8, params=5, desc="Used to check the creature type (Humanoid, Undead, etc.) of your current target." }, |
||
23 | { text="Creature Type Is Not", value=30, params=5, desc="Used to check if your target is not the specified creature type (Humanoid, Undead, etc.)." }, |
||
24 | { text="Ctrl Key Down", value=68, desc="Used to check if you're pressing the Ctrl key." }, |
||
25 | { text="Ctrl Key Up", value=69, desc="Used to check if you're not pressing the Ctrl key." }, |
||
26 | { text="Cursor Is Not Over", value=9, desc="Used to check if the mouse cursor is over this object." }, |
||
27 | { text="Cursor Is Over", value=10, desc="Used to check if the mouse cursor is not over this object." }, |
||
28 | { text="Debuff Active", value=12, params=3, desc="Used to check if a certain debuff is currently active on a unit. You don't have to use the full name of the debuff, a partial name will do. For example: 'Curse of' will detect Curse of Agony and Curse of Weakness." }, |
||
29 | { text="Debuff Inactive", value=39, params=3, desc="Used to check if a certain debuff is not currently active on a unit. You don't have to use the full name of the debuff, a partial name will do. For example: 'Curse of' will detect Curse of Agony and Curse of Weakness." }, |
||
30 | { text="Debuff Status", value=11, params=6, desc="Used to check if a Poison, Disease, Curse, or Magic debuff is on the specified unit and how many of that status effect the unit has." }, |
||
31 | { text="Frame Is Hidden", value=49, params=12, desc="Used to check if any frame is not currently visible. Type in the name of the frame." }, |
||
32 | { text="Frame Is Visible", value=50, params=12, desc="Used to check if any frame is currently visible. Type in the name of the frame." }, |
||
33 | { text="Function Returned False", value=72, params=12, desc="Calls the specified function and checks if it returned a false value. Type in the name of the function." }, |
||
34 | { text="Function Returned True", value=73, params=12, desc="Calls the specified function and checks if it returned a true value. Type in the name of the function." }, |
||
35 | { text="Health", value=13, params=7, desc="Used to check the current amount of health remaining on any unit. Use unit <= 0 to detect a dead unit." }, |
||
36 | { text="Health Lost", value=44, params=7, desc="Used to check to total amount of damage a unit has taken." }, |
||
37 | { text="In Combat", value=14, desc="Used to check if you're in combat." }, |
||
38 | { text="Main-Hand Buff Active", value=15, desc="Used to check if you have a buff active on your main-hand weapon." }, |
||
39 | { text="Main-Hand Buff Inactive", value=46, desc="Used to check if you don't have a buff active on your main-hand weapon." }, |
||
40 | { text="Mana", value=16, params=7, desc="Used to check the amount of mana, rage, energy, or focus a unit has left." }, |
||
41 | { text="Mana Lost", value=45, params=7, desc="Used to check the amount of mana, rage, energy, or focus a unit has used." }, |
||
42 | { text="No Target Selected", value=55, desc="Used to check if you're not currently targetting anything." }, |
||
43 | { text="Not In Combat", value=17, desc="Used to check if you're not in combat." }, |
||
44 | { text="Off-Hand Buff Active", value=18, desc="Used to check if you have a buff active on your off-hand weapon." }, |
||
45 | { text="Off-Hand Buff Inactive", value=47, desc="Used to check if you don't have a buff active on your off-hand weapon." }, |
||
46 | { text="Party Members", value=19, params=4, desc="Used to check the number of members currently in your party." }, |
||
47 | { text="Pet Named", value=33, params=12, desc="Used to check the name of your currently summoned pet." }, |
||
48 | { text="Pet Not Named", value=34, params=12, desc="Used to check if your currently summoned pet doesn't have a particular name." }, |
||
49 | { text="Pet Not Summoned", value=20, desc="Used to check if you don't have a pet summoned." }, |
||
50 | { text="Pet Summoned", value=48, desc="Used to check if you have a pet summoned." }, |
||
51 | { text="Raid Members", value=21, params=4, desc="Used to check the number of members in your raid." }, |
||
52 | { text="Shapeshift Form Active", value=22, params=8, desc="Used to check which shapeshift form (stealth, stance, animal form) you're currently in." }, |
||
53 | { text="Shapeshift Form Inactive", value=53, params=8, desc="Used to check if you're not in a particular shapeshift form (stealth, stance, animal form)." }, |
||
54 | { text="Shift Key Down", value=64, desc="Used to check if the Shift key is being pressed." }, |
||
55 | { text="Shift Key Up", value=65, desc="Used to check if the Shift key is not being pressed." }, |
||
56 | { text="Target Is", value=23, params=9, desc="Used to check if your target is friendly, hostile, a player, an NPC, or a spellcaster." }, |
||
57 | { text="Target Is Not", value=26, params=9, desc="Used to check if your target is not friendly, hostile, a player, an NPC, or a spellcaster." }, |
||
58 | { text="Target Just Blocked", value=59, desc="Used to check if your target just blocked one of your attacks." }, |
||
59 | { text="Target Just Dodged", value=60, desc="Used to check if your target just dodged one of your attacks." }, |
||
60 | { text="Target Just Parried", value=61, desc="Used to check if your target just parried one of your attacks." }, |
||
61 | { text="Target Selected", value=56, desc="Used to check if you currently have a target."}, |
||
62 | { text="Timer Active", value=70, params=12, desc="Check if a timer you set is counting down. Set such a timer with the Set Timer response." }, |
||
63 | { text="Timer Finished", value=71, params=12, desc="Check if a timer you set is finished counting down. Set such a timer with the Set Timer response." }, |
||
64 | { text="Unit In Detection Range", value=75, params=13, desc="Used to check if a unit is within detection range, around 78 yards." }, |
||
65 | { text="Unit Not In Detection Range", value=76, params=13, desc="Used to check if a unit is not within detection range, around 78 yards." }, |
||
66 | { text="Unit Is Class", value=24, params=5, desc="Used to check the class of any unit." }, |
||
67 | { text="Unit Is Not Class", value=25, params=5, desc="Used to check if a unit is not a particular class." }, |
||
68 | { text="Unit Is Connected", value=62, params=13, desc="Used to check if a unit is online." }, |
||
69 | { text="Unit Is Not Connected", value=63, params=13, desc="Used to check if a unit is offline." }, |
||
70 | { text="Unit Is Ghost", value=35, params=13, desc="Used to check if a unit is a ghost." }, |
||
71 | { text="Unit Is Not Ghost", value=36, params=13, desc="Used to check if any unit is not a ghost." }, |
||
72 | { text="Unit Level", value=74, params=7, desc="Used to check how the level of the specified unit compares to a number you specify." }, |
||
73 | { text="Unit Is Unit", value=51, params=14, desc="Used to check if two units are the same unit. Useful for checking if someone has the same target as you." }, |
||
74 | { text="Unit Is Not Unit", value=52, params=14, desc="Used to check if two units are not the same unit. Useful for checking if someone doesn't have the same target as you." }, |
||
75 | { text="Unit Is PvP-flagged", value=77, params=13, desc="Used to check if a unit is pvp-flagged." }, |
||
76 | { text="Unit Is Not PvP-flagged", value=78, params=13, desc="Used to check if a unit is not pvp-flagged." }, |
||
77 | { text="Variable Is False", value=31, params=12, desc="Used to check if any global variable is false. Type in the name of the variable." }, |
||
78 | { text="Variable Is True", value=32, params=12, desc="Used to check if any global variable is true. Type in the name of the variable." }, |
||
79 | { text="Variable Keybinding Down", value=27, params=10, desc="Used to check if a Variable Keybinding is currently pressed. Type in the number you set in the Variable Keybinding's middle drop-down menu." }, |
||
80 | { text="Variable Keybinding Up", value=28, params=10, desc="Used to check if a Variable Keybinding is not currently pressed. Type in the number you set in the Variable Keybinding's middle drop-down menu." }, |
||
81 | { text="Zone Is", value=79, params=5, desc="Used to check if you're in a certain zone." }, |
||
82 | { text="Zone Isn't", value=80, params=5, desc="Used to check if you're not in a certain zone." }, |
||
83 | } |
||
84 | |||
85 | DL_CheckCondition = {}; |
||
86 | |||
87 | -- Action Cooling Down |
||
88 | DL_CheckCondition[1] = function(conditions) |
||
89 | local cd = DL_CooldownLeft(conditions.action); |
||
90 | if (conditions.ignoreGlobal and cd > 2) then |
||
91 | return true; |
||
92 | elseif ((not conditions.ignoreGlobal) and cd > 0) then |
||
93 | return true; |
||
94 | end |
||
95 | end |
||
96 | |||
97 | -- Action In Range |
||
98 | DL_CheckCondition[2] = function(conditions) |
||
99 | if (UnitName("target") and IsActionInRange(conditions.action) ~= 0) then |
||
100 | return true; |
||
101 | end |
||
102 | end |
||
103 | |||
104 | -- Action Not Cooling Down |
||
105 | DL_CheckCondition[3] = function(conditions) |
||
106 | local cd = DL_CooldownLeft(conditions.action); |
||
107 | if (conditions.ignoreGlobal and cd <= 2) then |
||
108 | return true; |
||
109 | elseif ((not conditions.ignoreGlobal) and cd <= 0) then |
||
110 | return true; |
||
111 | end |
||
112 | end |
||
113 | |||
114 | -- Action Not In Range |
||
115 | DL_CheckCondition[4] = function(conditions) |
||
116 | if (UnitName("target") and IsActionInRange(conditions.action) == 0) then |
||
117 | return true; |
||
118 | end |
||
119 | end |
||
120 | |||
121 | -- Action Usable |
||
122 | DL_CheckCondition[5] = function(conditions) |
||
123 | return DL_ActionUsable(conditions.action); |
||
124 | end |
||
125 | |||
126 | -- Buff Active |
||
127 | DL_CheckCondition[6] = function(conditions) |
||
128 | local buff; |
||
129 | if (string.sub(conditions.buff, 1, 6) == "action") then |
||
130 | local actionID = tonumber(string.sub(conditions.buff, 7)); |
||
131 | buff = DL_Get_ActionName(tonumber(actionID), 1); |
||
132 | else |
||
133 | buff = conditions.buff; |
||
134 | end |
||
135 | return DL_CheckBuff(conditions.unit, buff); |
||
136 | end |
||
137 | |||
138 | -- Combo Points |
||
139 | DL_CheckCondition[7] = function(conditions) |
||
140 | if (DL_Compare(GetComboPoints(), conditions.number, conditions.compare)) then |
||
141 | return true; |
||
142 | end |
||
143 | end |
||
144 | |||
145 | -- Creature Type Is |
||
146 | DL_CheckCondition[8] = function(conditions) |
||
147 | if (UnitCreatureType(conditions.unit) == conditions.text) then |
||
148 | return true; |
||
149 | end |
||
150 | end |
||
151 | |||
152 | -- Cursor Is Not Over |
||
153 | DL_CheckCondition[9] = function(frame) |
||
154 | if (not DL_IsMouseOver(frame)) then |
||
155 | return true; |
||
156 | end |
||
157 | end |
||
158 | |||
159 | -- Cursor Is Over |
||
160 | DL_CheckCondition[10] = function(frame) |
||
161 | return DL_IsMouseOver(frame); |
||
162 | end |
||
163 | |||
164 | -- Status Count |
||
165 | DL_CheckCondition[11] = function(conditions) |
||
166 | if (DL_Compare(DL_CheckStatus(conditions.unit, conditions.text), conditions.number, conditions.compare)) then |
||
167 | return true; |
||
168 | end |
||
169 | end |
||
170 | |||
171 | -- Debuff Active |
||
172 | DL_CheckCondition[12] = function(conditions) |
||
173 | local buff; |
||
174 | if (string.sub(conditions.buff, 1, 6) == "action") then |
||
175 | local actionID = tonumber(string.sub(conditions.buff, 7)); |
||
176 | buff = DL_Get_ActionName(tonumber(actionID), 1); |
||
177 | else |
||
178 | buff = conditions.buff; |
||
179 | end |
||
180 | return DL_CheckDebuff(conditions.unit, buff); |
||
181 | end |
||
182 | |||
183 | -- Health |
||
184 | DL_CheckCondition[13] = function(conditions) |
||
185 | if (conditions.number < 1) then |
||
186 | return DL_Compare(DL_Get_Health(conditions.unit)/DL_Get_HealthMax(conditions.unit), conditions.number, conditions.compare); |
||
187 | else |
||
188 | return DL_Compare(DL_Get_Health(conditions.unit), conditions.number, conditions.compare); |
||
189 | end |
||
190 | end |
||
191 | |||
192 | -- In Combat |
||
193 | DL_CheckCondition[14] = function() |
||
194 | return DL_INCOMBAT; |
||
195 | end |
||
196 | |||
197 | -- Main Hand Buff Active |
||
198 | DL_CheckCondition[15] = function() |
||
199 | local hasMainHandEnchant = GetWeaponEnchantInfo(); |
||
200 | return hasMainHandEnchant; |
||
201 | end |
||
202 | |||
203 | -- Mana |
||
204 | DL_CheckCondition[16] = function(conditions) |
||
205 | if (conditions.number < 1) then |
||
206 | return DL_Compare(UnitMana(conditions.unit)/UnitManaMax(conditions.unit), conditions.number, conditions.compare); |
||
207 | else |
||
208 | return DL_Compare(UnitMana(conditions.unit), conditions.number, conditions.compare); |
||
209 | end |
||
210 | end |
||
211 | |||
212 | -- Not In Combat |
||
213 | DL_CheckCondition[17] = function() |
||
214 | if (not DL_INCOMBAT) then |
||
215 | return true; |
||
216 | end |
||
217 | end |
||
218 | |||
219 | -- Off Hand Buff Active |
||
220 | DL_CheckCondition[18] = function() |
||
221 | local _, _, _, hasOffHandEnchant = GetWeaponEnchantInfo(); |
||
222 | return hasOffHandEnchant; |
||
223 | end |
||
224 | |||
225 | -- Num Party Members |
||
226 | DL_CheckCondition[19] = function(conditions) |
||
227 | return DL_Compare(GetNumPartyMembers(), conditions.number, conditions.compare); |
||
228 | end |
||
229 | |||
230 | -- Pet Not Summoned |
||
231 | DL_CheckCondition[20] = function() |
||
232 | if (not UnitExists("pet")) then |
||
233 | return true; |
||
234 | end |
||
235 | end |
||
236 | |||
237 | -- Num Raid Members |
||
238 | DL_CheckCondition[21] = function(conditions) |
||
239 | return DL_Compare(GetNumRaidMembers(), conditions.number, conditions.compare); |
||
240 | end |
||
241 | |||
242 | -- Shapeshift Form |
||
243 | DL_CheckCondition[22] = function(conditions) |
||
244 | if (DL_Get_ShapeshiftForm() == conditions.form) then |
||
245 | return true; |
||
246 | end |
||
247 | end |
||
248 | |||
249 | -- Target Is |
||
250 | DL_CheckCondition[23] = function(conditions) |
||
251 | if (UnitName("target")) then |
||
252 | if (conditions.target == 1) then |
||
253 | return UnitIsPlayer("target"); |
||
254 | elseif (conditions.target == 2) then |
||
255 | if (not UnitIsPlayer("target")) then |
||
256 | return true; |
||
257 | end |
||
258 | elseif (conditions.target == 3) then |
||
259 | if (UnitHealth("target") <= 0) then |
||
260 | return; |
||
261 | else |
||
262 | return UnitCanAttack("player", "target"); |
||
263 | end |
||
264 | elseif (conditions.target == 4) then |
||
265 | if (not UnitCanAttack("player", "target")) then |
||
266 | return true; |
||
267 | end |
||
268 | elseif (conditions.target == 5) then |
||
269 | if (UnitIsPlayer("target") and UnitCanAttack("player", "target")) then |
||
270 | return true; |
||
271 | end |
||
272 | elseif (conditions.target == 6) then |
||
273 | if (UnitIsPlayer("target") and (not UnitCanAttack("player", "target"))) then |
||
274 | return true; |
||
275 | end |
||
276 | elseif (conditions.target == 7) then |
||
277 | if (UnitPowerType("target") == 0 and UnitManaMax("target") > 0) then |
||
278 | return true; |
||
279 | end |
||
280 | end |
||
281 | else |
||
282 | return; |
||
283 | end |
||
284 | end |
||
285 | |||
286 | -- Unit Class Is |
||
287 | DL_CheckCondition[24] = function(conditions) |
||
288 | if (UnitClass(conditions.unit) == conditions.text) then |
||
289 | return true; |
||
290 | end |
||
291 | end |
||
292 | |||
293 | -- Unit Class Is Not |
||
294 | DL_CheckCondition[25] = function(conditions) |
||
295 | if (UnitClass(conditions.unit) ~= conditions.text) then |
||
296 | return true; |
||
297 | end |
||
298 | end |
||
299 | |||
300 | -- Target Is Not |
||
301 | DL_CheckCondition[26] = function(conditions) |
||
302 | if (UnitName("target")) then |
||
303 | if (conditions.target == 1) then |
||
304 | if (not UnitIsPlayer("target")) then |
||
305 | return true; |
||
306 | end |
||
307 | elseif (conditions.target == 2) then |
||
308 | if (UnitIsPlayer("target")) then |
||
309 | return true; |
||
310 | end |
||
311 | elseif (conditions.target == 3) then |
||
312 | if ((not UnitCanAttack("player", "target")) or UnitHealth("target") <= 0) then |
||
313 | return true; |
||
314 | end |
||
315 | elseif (conditions.target == 4) then |
||
316 | if (UnitCanAttack("player", "target")) then |
||
317 | return true; |
||
318 | end |
||
319 | elseif (conditions.target == 5) then |
||
320 | if (UnitIsPlayer("target") and UnitCanAttack("player", "target")) then |
||
321 | return; |
||
322 | else |
||
323 | return true; |
||
324 | end |
||
325 | elseif (conditions.target == 6) then |
||
326 | if (UnitIsPlayer("target") and (not UnitCanAttack("player", "target"))) then |
||
327 | return; |
||
328 | else |
||
329 | return true; |
||
330 | end |
||
331 | elseif (conditions.target == 7) then |
||
332 | if (UnitPowerType("target") == 0 and UnitManaMax("target") > 0) then |
||
333 | return; |
||
334 | else |
||
335 | return true; |
||
336 | end |
||
337 | end |
||
338 | else |
||
339 | return; |
||
340 | end |
||
341 | end |
||
342 | |||
343 | -- Variable Keybinding Down |
||
344 | DL_CheckCondition[27] = function(conditions) |
||
345 | if (DAB_VARIABLE_KEYBINDINGS[conditions.number] == 1) then return true; end |
||
346 | end |
||
347 | |||
348 | -- Variable Keybinding Up |
||
349 | DL_CheckCondition[28] = function(conditions) |
||
350 | if (DAB_VARIABLE_KEYBINDINGS[conditions.number] == 2) then return true; end |
||
351 | end |
||
352 | |||
353 | -- Action Item Count |
||
354 | DL_CheckCondition[29] = function(conditions) |
||
355 | if (IsConsumableAction(conditions.action)) then |
||
356 | return DL_Compare(GetActionCount(conditions.action), conditions.number, conditions.compare); |
||
357 | end |
||
358 | end |
||
359 | |||
360 | -- Creature Type Is Not |
||
361 | DL_CheckCondition[30] = function(conditions) |
||
362 | if (UnitCreatureType(conditions.unit) ~= conditions.text) then |
||
363 | return true; |
||
364 | end |
||
365 | end |
||
366 | |||
367 | -- Variable Is False |
||
368 | DL_CheckCondition[31] = function(conditions) |
||
369 | if (not getglobal(conditions.text)) then |
||
370 | return true; |
||
371 | end |
||
372 | end |
||
373 | |||
374 | -- Variable Is True |
||
375 | DL_CheckCondition[32] = function(conditions) |
||
376 | return getglobal(conditions.text); |
||
377 | end |
||
378 | |||
379 | -- Pet Name Is |
||
380 | DL_CheckCondition[33] = function(conditions) |
||
381 | if (UnitExists("pet") and UnitName("pet") == conditions.text) then |
||
382 | return true; |
||
383 | end |
||
384 | end |
||
385 | |||
386 | -- Pet Name Is Not |
||
387 | DL_CheckCondition[34] = function(conditions) |
||
388 | if (UnitExists("pet") and UnitName("pet") ~= conditions.text) then |
||
389 | return true; |
||
390 | end |
||
391 | end |
||
392 | |||
393 | -- Unit Is Ghost |
||
394 | DL_CheckCondition[35] = function(conditions) |
||
395 | return UnitIsGhost(conditions.unit); |
||
396 | end |
||
397 | |||
398 | -- Unit Is Not Ghost |
||
399 | DL_CheckCondition[36] = function(conditions) |
||
400 | if (not UnitIsGhost(conditions.unit)) then |
||
401 | return true; |
||
402 | end |
||
403 | end |
||
404 | |||
405 | -- Action Unusable |
||
406 | DL_CheckCondition[37] = function(conditions) |
||
407 | if (not DL_ActionUsable(conditions.action)) then |
||
408 | return true; |
||
409 | end |
||
410 | end |
||
411 | |||
412 | -- Buff Inactive |
||
413 | DL_CheckCondition[38] = function(conditions) |
||
414 | local buff; |
||
415 | if (string.sub(conditions.buff, 1, 6) == "action") then |
||
416 | local actionID = tonumber(string.sub(conditions.buff, 7)); |
||
417 | buff = DL_Get_ActionName(tonumber(actionID), 1); |
||
418 | else |
||
419 | buff = conditions.buff; |
||
420 | end |
||
421 | if (not DL_CheckBuff(conditions.unit, buff)) then |
||
422 | return true; |
||
423 | end |
||
424 | end |
||
425 | |||
426 | -- Debuff Inactive |
||
427 | DL_CheckCondition[39] = function(conditions) |
||
428 | local buff; |
||
429 | if (string.sub(conditions.buff, 1, 6) == "action") then |
||
430 | local actionID = tonumber(string.sub(conditions.buff, 7)); |
||
431 | buff = DL_Get_ActionName(tonumber(actionID), 1); |
||
432 | else |
||
433 | buff = conditions.buff; |
||
434 | end |
||
435 | if (not DL_CheckDebuff(conditions.unit, buff)) then |
||
436 | return true; |
||
437 | end |
||
438 | end |
||
439 | |||
440 | -- Player Has Threat |
||
441 | DL_CheckCondition[40] = function() |
||
442 | if (not DL_REGEN) then |
||
443 | return true; |
||
444 | end |
||
445 | end |
||
446 | |||
447 | -- Player Does Not Have Threat |
||
448 | DL_CheckCondition[41] = function() |
||
449 | return DL_REGEN; |
||
450 | end |
||
451 | |||
452 | -- Player Not In Attack Mode |
||
453 | DL_CheckCondition[42] = function() |
||
454 | if (not DL_ATTACKING) then |
||
455 | return true; |
||
456 | end |
||
457 | end |
||
458 | |||
459 | -- Player In Attack Mode |
||
460 | DL_CheckCondition[43] = function() |
||
461 | return DL_ATTACKING; |
||
462 | end |
||
463 | |||
464 | -- Health Lost |
||
465 | DL_CheckCondition[44] = function(conditions) |
||
466 | if (conditions.number < 1) then |
||
467 | return DL_Compare(1 - DL_Get_Health(conditions.unit)/DL_Get_HealthMax(conditions.unit), conditions.number, conditions.compare); |
||
468 | else |
||
469 | return DL_Compare(DL_Get_HealthMax(conditions.unit) - DL_Get_Health(conditions.unit), conditions.number, conditions.compare); |
||
470 | end |
||
471 | end |
||
472 | |||
473 | -- Mana Lost |
||
474 | DL_CheckCondition[45] = function(conditions) |
||
475 | if (conditions.number < 1) then |
||
476 | return DL_Compare(1 - UnitMana(conditions.unit)/UnitManaMax(conditions.unit), conditions.number, conditions.compare); |
||
477 | else |
||
478 | return DL_Compare(UnitManaMax(conditions.unit) - UnitMana(conditions.unit), conditions.number, conditions.compare); |
||
479 | end |
||
480 | end |
||
481 | |||
482 | -- Main Hand Buff Inactive |
||
483 | DL_CheckCondition[46] = function() |
||
484 | local hasMainHandEnchant = GetWeaponEnchantInfo(); |
||
485 | if (not hasMainHandEnchant) then |
||
486 | return true; |
||
487 | end |
||
488 | end |
||
489 | |||
490 | -- Off Hand Buff Inactive |
||
491 | DL_CheckCondition[47] = function() |
||
492 | local _, _, _, hasOffHandEnchant = GetWeaponEnchantInfo(); |
||
493 | if (not hasOffHandEnchant) then |
||
494 | return true; |
||
495 | end |
||
496 | end |
||
497 | |||
498 | -- Pet Summoned |
||
499 | DL_CheckCondition[48] = function() |
||
500 | if (UnitName("pet") and UnitExists("pet")) then |
||
501 | return true; |
||
502 | end |
||
503 | end |
||
504 | |||
505 | -- Frame Is Hidden |
||
506 | DL_CheckCondition[49] = function(conditions) |
||
507 | local frame = getglobal(conditions.text); |
||
508 | if (frame and ((not frame:IsVisible()) or frame.fauxhidden)) then |
||
509 | return true; |
||
510 | end |
||
511 | end |
||
512 | |||
513 | -- Frame Is Visible |
||
514 | DL_CheckCondition[50] = function(conditions) |
||
515 | local frame = getglobal(conditions.text); |
||
516 | if (frame and frame:IsVisible() and (not frame.fauxhidden)) then |
||
517 | return true; |
||
518 | end |
||
519 | end |
||
520 | |||
521 | -- Unit Is Unit |
||
522 | DL_CheckCondition[51] = function(conditions) |
||
523 | return UnitIsUnit(conditions.unit, conditions.unit2); |
||
524 | end |
||
525 | |||
526 | -- Unit Is Not Unit |
||
527 | DL_CheckCondition[52] = function(conditions) |
||
528 | if (not UnitIsUnit(conditions.unit, conditions.unit2)) then |
||
529 | return true; |
||
530 | end |
||
531 | end |
||
532 | |||
533 | -- Not In Shapeshift Form |
||
534 | DL_CheckCondition[53] = function(conditions) |
||
535 | if (DL_Get_ShapeshiftForm() ~= conditions.form) then |
||
536 | return true; |
||
537 | end |
||
538 | end |
||
539 | |||
540 | -- Action Just Used |
||
541 | DL_CheckCondition[54] = function(conditions) |
||
542 | if (conditions.action == DL_LAST_ACTION) then |
||
543 | return true; |
||
544 | end |
||
545 | end |
||
546 | |||
547 | -- No Target Selected |
||
548 | DL_CheckCondition[55] = function() |
||
549 | if (not UnitName("target")) then return true; end |
||
550 | end |
||
551 | |||
552 | -- Target Selected |
||
553 | DL_CheckCondition[56] = function() |
||
554 | if (UnitName("target")) then return true; end |
||
555 | end |
||
556 | |||
557 | -- Action Is Equipped |
||
558 | DL_CheckCondition[57] = function(conditions) |
||
559 | return IsEquippedAction(conditions.action); |
||
560 | end |
||
561 | |||
562 | -- Action Is Not Equipped |
||
563 | DL_CheckCondition[58] = function(conditions) |
||
564 | if (not IsEquippedAction(conditions.action)) then |
||
565 | return true; |
||
566 | end |
||
567 | end |
||
568 | |||
569 | -- Target Just Blocked |
||
570 | DL_CheckCondition[59] = function() |
||
571 | return DL_TARGET_BLOCKED; |
||
572 | end |
||
573 | |||
574 | -- Target Just Dodged |
||
575 | DL_CheckCondition[60] = function() |
||
576 | return DL_TARGET_DODGED; |
||
577 | end |
||
578 | |||
579 | -- Target Just Parried |
||
580 | DL_CheckCondition[61] = function() |
||
581 | return DL_TARGET_PARRIED; |
||
582 | end |
||
583 | |||
584 | -- Unit Is Connected |
||
585 | DL_CheckCondition[62] = function(conditions) |
||
586 | return UnitIsConnected(conditions.unit); |
||
587 | end |
||
588 | |||
589 | -- Unit Is Not Connected |
||
590 | DL_CheckCondition[63] = function(conditions) |
||
591 | if (not UnitIsConnected(conditions.unit)) then |
||
592 | return true; |
||
593 | end |
||
594 | end |
||
595 | |||
596 | -- Shift Key Down |
||
597 | DL_CheckCondition[64] = function() |
||
598 | return IsShiftKeyDown(); |
||
599 | end |
||
600 | |||
601 | -- Shift Key Up |
||
602 | DL_CheckCondition[65] = function() |
||
603 | if (not IsShiftKeyDown()) then |
||
604 | return true; |
||
605 | end |
||
606 | end |
||
607 | |||
608 | -- Alt Key Down |
||
609 | DL_CheckCondition[66] = function() |
||
610 | return IsAltKeyDown(); |
||
611 | end |
||
612 | |||
613 | -- Alt Key Up |
||
614 | DL_CheckCondition[67] = function() |
||
615 | if (not IsAltKeyDown()) then |
||
616 | return true; |
||
617 | end |
||
618 | end |
||
619 | |||
620 | -- Ctrl Key Down |
||
621 | DL_CheckCondition[68] = function() |
||
622 | return IsControlKeyDown(); |
||
623 | end |
||
624 | |||
625 | -- Ctrl Key Up |
||
626 | DL_CheckCondition[69] = function() |
||
627 | if (not IsControlKeyDown()) then |
||
628 | return true; |
||
629 | end |
||
630 | end |
||
631 | |||
632 | -- Timer is Counting Down |
||
633 | DL_CheckCondition[70] = function(conditions) |
||
634 | if (DL_TIMERS and DL_TIMERS[conditions.text] and DL_TIMERS[conditions.text] > 0) then |
||
635 | return true; |
||
636 | end |
||
637 | end |
||
638 | |||
639 | -- Timer is Finished |
||
640 | DL_CheckCondition[71] = function(conditions) |
||
641 | if (DL_TIMERS and DL_TIMERS[conditions.text] and DL_TIMERS[conditions.text] <= 0) then |
||
642 | return true; |
||
643 | end |
||
644 | end |
||
645 | |||
646 | -- Function Returned False |
||
647 | DL_CheckCondition[72] = function(conditions) |
||
648 | if (not getglobal(conditions.text)()) then |
||
649 | return true; |
||
650 | end |
||
651 | end |
||
652 | |||
653 | -- Function Returned True |
||
654 | DL_CheckCondition[73] = function(conditions) |
||
655 | return getglobal(conditions.text)(); |
||
656 | end |
||
657 | |||
658 | -- Unit Level |
||
659 | DL_CheckCondition[74] = function(conditions) |
||
660 | return DL_Compare(UnitLevel(conditions.unit), conditions.number, conditions.compare); |
||
661 | end |
||
662 | |||
663 | -- Unit In Detection Range |
||
664 | DL_CheckCondition[75] = function(conditions) |
||
665 | return UnitIsVisible(conditions.unit); |
||
666 | end |
||
667 | |||
668 | -- Unit Not In Detection Range |
||
669 | DL_CheckCondition[76] = function(conditions) |
||
670 | if (not UnitIsVisible(conditions.unit)) then |
||
671 | return true; |
||
672 | end |
||
673 | end |
||
674 | |||
675 | -- Unit Is PvP-flagged |
||
676 | DL_CheckCondition[77] = function(conditions) |
||
677 | if (UnitIsPVP(conditions.unit) or UnitIsPVPFreeForAll(conditions.unit)) then |
||
678 | return true; |
||
679 | end |
||
680 | end |
||
681 | |||
682 | -- Unit Is Not PvP-flagged |
||
683 | DL_CheckCondition[78] = function(conditions) |
||
684 | if (not UnitIsPVP(conditions.unit)) and (not UnitIsPVPFreeForAll(conditions.unit)) then |
||
685 | return true; |
||
686 | end |
||
687 | end |
||
688 | |||
689 | -- Zone Is |
||
690 | DL_CheckCondition[79] = function(conditions) |
||
691 | if (conditions.text == GetRealZoneText()) then |
||
692 | return true; |
||
693 | end |
||
694 | end |
||
695 | |||
696 | -- Zone Isn;t |
||
697 | DL_CheckCondition[80] = function(conditions) |
||
698 | if (conditions.text ~= GetRealZoneText()) then |
||
699 | return true; |
||
700 | end |
||
701 | end |