vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --[[
2 distance
3 Author: dan
4 ]]
5 ---------------------------------------------------------------------------------------------------------------------------------
6 --range SCALE
7 local range41 = 41;
8 local range40 = 40;
9 local range35 = 35;
10 local range30 = 30;
11 local range25 = 25;
12 local range21 = 21;
13 local range20 = 20;
14 local range10 = 10;
15 local range09 = 9;
16 local range08 = 8;
17 local range05 = 5;
18 local range00 = 0.1;
19 ---------------------------------------------------------
20 --range text
21 local textooR = "ooR";
22 local text41 = "41";
23 local text40 = "40";
24 local text35 = "35";
25 local text30 = "30";
26 local text25 = "25";
27 local text21 = "21";
28 local text20 = "20";
29 local text10 = "10";
30 local text09 = "09";
31 local text08 = "08";
32 local text05 = "05";
33 local text00 = "00";
34 ---------------------------------------------------------
35 --frame update
36 distance_frame_UpdateInterval = 0.01;
37  
38 distance_color_tab1=false;
39 distance_color_tab2=false;
40 distance_color_tab3=false;
41 distance_color_tab4=false;
42 distance_color_tab5=false;
43  
44 --textures
45 --distance_bar_texture_h = "Interface\\AddOns\\Distance\\texture\\bar_h";
46 --distance_bar_texture_w = "Interface\\AddOns\\Distance\\texture\\bar_w";
47  
48 --[[barcolors
49 barcolor = {
50 b1_color_h_r = 1,
51 b1_color_h_g = 1,
52 b1_color_h_b = 1,
53 b1_color_h_a = 1,
54  
55 b2_color_h_r = 1,
56 b2_color_h_g = 1,
57 b2_color_h_b = 0,
58 b2_color_h_a = 1,
59  
60 b3_color_h_r = 1,
61 b3_color_h_g = 0,
62 b3_color_h_b = 0,
63 b3_color_h_a = 1,
64  
65 b4_color_h_r = 0,
66 b4_color_h_g = 1,
67 b4_color_h_b = 0,
68 b4_color_h_a = 1,
69  
70  
71 b1_color_w_r = 1,
72 b1_color_w_g = 1,
73 b1_color_w_b = 1,
74 b1_color_w_a = 1,
75  
76 b2_color_w_r = 1,
77 b2_color_w_g = 1,
78 b2_color_w_b = 0,
79 b2_color_w_a = 1,
80  
81 b3_color_w_r = 1,
82 b3_color_w_g = 0,
83 b3_color_w_b = 0,
84 b3_color_w_a = 1,
85  
86 b4_color_w_r = 0,
87 b4_color_w_g = 1,
88 b4_color_w_b = 0,
89 b4_color_w_a = 1
90 }]]
91 ---------------------------------------------------------------------------------------------------------------------------------
92 ---------------------------------------------------------------------------------------------------------------------------------
93 --OnLoad
94 function distance_OnLoad()
95  
96 --Slash Commands
97 SLASH_DISTANCE1 = "/distance";
98 SLASH_DISTANCE2 = "/dist";
99 SlashCmdList["DISTANCE"] = distance_Command;
100 ---------------------------------------------------------
101 --Handlers
102 this:RegisterEvent("ADDON_LOADED");
103 distance_frame:RegisterEvent("PLAYER_TARGET_CHANGED");
104 distance_frame:RegisterEvent("SPELLS_CHANGED");
105 distance_frame:RegisterEvent("CHARACTER_POINTS_CHANGED");
106 distance_frame:RegisterEvent("DUEL_FINISHED");
107 distance_frame:RegisterEvent("PLAYER_REGEN_ENABLED");
108 distance_frame:RegisterEvent("PLAYER_REGEN_DISABLED");
109  
110 distance_frame:RegisterEvent("PLAYER_ALIVE");
111  
112 DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance Addon: |cFFFF0000Loaded");
113  
114 distance_frame.TimeSinceLastUpdate = 0;
115 end
116 ---------------------------------------------------------------------------------------------------------------------------------
117 ---------------------------------------------------------------------------------------------------------------------------------
118 --OnEvent
119 function distance_Load_OnEvent()
120 if (event == "ADDON_LOADED") then
121 distance_frame:EnableMouse(false);
122 end
123 --set bar colors
124 if (event == "ADDON_LOADED") then
125 if barcolor == nil then
126 barcolor = {
127 b1_color_h_r = 1,
128 b1_color_h_g = 1,
129 b1_color_h_b = 1,
130 b1_color_h_a = 1,
131  
132 b2_color_h_r = 1,
133 b2_color_h_g = 1,
134 b2_color_h_b = 0,
135 b2_color_h_a = 1,
136  
137 b3_color_h_r = 1,
138 b3_color_h_g = 0,
139 b3_color_h_b = 0,
140 b3_color_h_a = 1,
141  
142 b4_color_h_r = 0,
143 b4_color_h_g = 1,
144 b4_color_h_b = 0,
145 b4_color_h_a = 1,
146  
147  
148 b1_color_w_r = 1,
149 b1_color_w_g = 1,
150 b1_color_w_b = 1,
151 b1_color_w_a = 1,
152  
153 b2_color_w_r = 1,
154 b2_color_w_g = 1,
155 b2_color_w_b = 0,
156 b2_color_w_a = 1,
157  
158 b3_color_w_r = 1,
159 b3_color_w_g = 0,
160 b3_color_w_b = 0,
161 b3_color_w_a = 1,
162  
163 b4_color_w_r = 0,
164 b4_color_w_g = 1,
165 b4_color_w_b = 0,
166 b4_color_w_a = 1
167 }
168 end
169 end
170 --set bar width
171 if (event == "ADDON_LOADED") then
172 if distance_frame_width==nil then
173 distance_frame_width=28
174 end
175 end
176 --set bar height
177 if (event == "ADDON_LOADED") then
178 if height_value==nil then
179 height_value=3
180 distance_frame:SetHeight(41 * height_value +5);
181 end
182 end
183 --load texture
184 if (event == "ADDON_LOADED") then
185 if distance_bar_texture_h==nil then distance_bar_texture_h = "Interface\\AddOns\\Distance\\texture\\bar_h"
186 else distance_bar_height_texture_editbox:SetText(distance_bar_texture_h);
187 distance_bar_height_texture_editbox:SetAutoFocus(false);
188 end
189  
190 if distance_bar_texture_w==nil then distance_bar_texture_w="Interface\\AddOns\\Distance\\texture\\bar_w"
191 else distance_bar_width_texture_editbox:SetText(distance_bar_texture_w);
192 distance_bar_width_texture_editbox:SetAutoFocus(false);
193 end
194 end
195  
196 --load frame position
197 if (event == "ADDON_LOADED")
198 then
199 if distance_frame_X==nil and distance_frame_Y==nil
200 then
201 distance_frame:ClearAllPoints();
202 distance_frame:SetPoint("CENTER", "UIParent", "CENTER", 0, 0);
203 else
204 distance_frame:ClearAllPoints();
205 distance_frame:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", distance_frame_X, distance_frame_Y);
206 end
207  
208 end
209 ---------------------------------------------------------
210 --load bar layout
211 if (event == "ADDON_LOADED") then
212 if distance_layout==nil
213 then distance_layout=false
214 distance_options_frame_rotate_button:SetChecked(false)
215 else
216 if distance_layout==false then
217 distance_options_frame_rotate_button:SetChecked(false)
218  
219 distance_range1:SetWidth(distance_frame:GetWidth()-5);
220 distance_range2:SetWidth(distance_frame:GetWidth()-5);
221 distance_range3:SetWidth(distance_frame:GetWidth()-5);
222 distance_range4:SetWidth(distance_frame:GetWidth()-5);
223  
224 distance_range1:ClearAllPoints()
225 distance_range1:SetPoint("BOTTOM",distance_frame ,"BOTTOM",0,2)
226 distance_range2:ClearAllPoints()
227 distance_range2:SetPoint("BOTTOM",distance_frame ,"BOTTOM",0,2)
228 distance_range3:ClearAllPoints()
229 distance_range3:SetPoint("BOTTOM",distance_frame ,"BOTTOM",0,2)
230 distance_range4:ClearAllPoints()
231 distance_range4:SetPoint("BOTTOM",distance_frame ,"BOTTOM",0,2)
232  
233 else
234 if distance_layout==true then
235 distance_options_frame_rotate_button:SetChecked(true)
236  
237 distance_range1:SetHeight(distance_frame:GetHeight()-5);
238 distance_range2:SetHeight(distance_frame:GetHeight()-5);
239 distance_range3:SetHeight(distance_frame:GetHeight()-5);
240 distance_range4:SetHeight(distance_frame:GetHeight()-5);
241  
242 distance_range1:ClearAllPoints()
243 distance_range1:SetPoint("LEFT",distance_frame ,"LEFT",3,0)
244 distance_range2:ClearAllPoints()
245 distance_range2:SetPoint("LEFT",distance_frame ,"LEFT",3,0)
246 distance_range3:ClearAllPoints()
247 distance_range3:SetPoint("LEFT",distance_frame ,"LEFT",3,0)
248 distance_range4:ClearAllPoints()
249 distance_range4:SetPoint("LEFT",distance_frame ,"LEFT",3,0)
250  
251 end
252 end
253 end
254 end
255 ---------------------------------------------------------
256 --load bar values
257 if (event == "ADDON_LOADED") then
258  
259 if distance_frame_width == nil
260 then distance_frame_width = distance_frame:GetWidth();
261 distance_frame:SetWidth(distance_frame_width)
262 distance_range1:SetWidth(distance_frame:GetWidth()-5);
263 distance_range2:SetWidth(distance_frame:GetWidth()-5);
264 distance_range3:SetWidth(distance_frame:GetWidth()-5);
265 distance_range4:SetWidth(distance_frame:GetWidth()-5);
266 --DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance width:" ..distance_frame_width);
267 else if (distance_layout==false)
268 then distance_frame:SetWidth(distance_frame_width)
269 distance_range1:SetWidth(distance_frame:GetWidth()-5);
270 distance_range2:SetWidth(distance_frame:GetWidth()-5);
271 distance_range3:SetWidth(distance_frame:GetWidth()-5);
272 distance_range4:SetWidth(distance_frame:GetWidth()-5);
273 --DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance width o:" ..distance_frame_width);
274 else if (distance_layout==true)
275 then distance_frame:SetWidth(distance_frame_width);
276 end
277 end
278 end
279  
280 if distance_frame_height == nil
281 then distance_frame_height = distance_frame:GetHeight();
282 distance_frame:SetHeight(distance_frame_height)
283 --DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance height:" ..distance_frame_height);
284 else if (distance_layout==false)
285 then distance_frame:SetHeight(distance_frame_height)
286 --DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance height o:" ..distance_frame_height);
287 else if (distance_layout==true)
288 then distance_frame:SetHeight(distance_frame_height)
289 distance_range1:SetHeight(distance_frame:GetHeight()-5);
290 distance_range2:SetHeight(distance_frame:GetHeight()-5);
291 distance_range3:SetHeight(distance_frame:GetHeight()-5);
292 distance_range4:SetHeight(distance_frame:GetHeight()-5);
293 end
294 end
295 end
296  
297 if distance_frame_alpha == nil
298 then distance_frame_alpha = distance_frame:GetAlpha()
299 distance_frame:SetAlpha(distance_frame_alpha)
300 --DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance alpha:" ..distance_frame_alpha);
301 else distance_frame:SetAlpha(distance_frame_alpha)
302 --DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance alpha o:" ..distance_frame_alpha);
303 end
304  
305 end
306 ---------------------------------------------------------
307 --load text anchor
308 if (event == "ADDON_LOADED") then
309 if distance_text_position == nil
310 then distance_text_position = "BR"
311 distance_text_offset();
312 distance_text:ClearAllPoints();
313 distance_text1:ClearAllPoints();
314 distance_text:SetPoint("CENTER", "distance_range2", "TOP", offset_X_1, -offset_Y_1);
315 distance_text1:SetPoint("CENTER", "distance_range4", "TOP", offset_X_2, -offset_Y_2);
316 else
317 if (distance_layout==false) then
318 distance_text_offset();
319 if distance_text_position == "BR"
320 then distance_text:ClearAllPoints();
321 distance_text1:ClearAllPoints();
322 distance_text:SetPoint("CENTER", "distance_range2", "TOP", offset_X_1, -offset_Y_1);
323 distance_text1:SetPoint("CENTER", "distance_range4", "TOP", offset_X_2, -offset_Y_2);
324 elseif distance_text_position == "BL"
325 then distance_text:ClearAllPoints();
326 distance_text1:ClearAllPoints();
327 distance_text:SetPoint("CENTER", "distance_range2", "TOP", -offset_X_1, -offset_Y_1);
328 distance_text1:SetPoint("CENTER", "distance_range4", "TOP", -offset_X_2, -offset_Y_2);
329 elseif distance_text_position == "TL"
330 then distance_text:ClearAllPoints();
331 distance_text1:ClearAllPoints();
332 distance_text:SetPoint("CENTER", "distance_range2", "TOP", -offset_X_1, offset_Y_1);
333 distance_text1:SetPoint("CENTER", "distance_range4", "TOP", -offset_X_2, offset_Y_2);
334 elseif distance_text_position == "TR"
335 then distance_text:ClearAllPoints();
336 distance_text1:ClearAllPoints();
337 distance_text:SetPoint("CENTER", "distance_range2", "TOP", offset_X_1, offset_Y_1);
338 distance_text1:SetPoint("CENTER", "distance_range4", "TOP", offset_X_2, offset_Y_2);
339 elseif distance_text_position == "TC"
340 then distance_text:ClearAllPoints();
341 distance_text1:ClearAllPoints();
342 distance_text:SetPoint("CENTER", "distance_range2", "TOP", 0, offset_Y_1);
343 distance_text1:SetPoint("CENTER", "distance_range4", "TOP", 0, offset_Y_2);
344 elseif distance_text_position == "BC"
345 then distance_text:ClearAllPoints();
346 distance_text1:ClearAllPoints();
347 distance_text:SetPoint("CENTER", "distance_range2", "TOP", 0, -offset_Y_1);
348 distance_text1:SetPoint("CENTER", "distance_range4", "TOP", 0, -offset_Y_2);
349 end
350 else if(distance_layout==true) then
351 distance_text_offset();
352 if distance_text_position == "BR"
353 then distance_text:ClearAllPoints();
354 distance_text1:ClearAllPoints();
355 distance_text:SetPoint("CENTER", "distance_range2", "RIGHT", offset_Y_1, -offset_X_1);
356 distance_text1:SetPoint("CENTER", "distance_range4", "RIGHT", offset_Y_1, -offset_X_1);
357 elseif distance_text_position == "BL"
358 then distance_text:ClearAllPoints();
359 distance_text1:ClearAllPoints();
360 distance_text:SetPoint("CENTER", "distance_range2", "RIGHT", -offset_Y_1, -offset_X_1);
361 distance_text1:SetPoint("CENTER", "distance_range4", "RIGHT", -offset_Y_1, -offset_X_1);
362 elseif distance_text_position == "TL"
363 then distance_text:ClearAllPoints();
364 distance_text1:ClearAllPoints();
365 distance_text:SetPoint("CENTER", "distance_range2", "RIGHT", -offset_Y_1, offset_X_1);
366 distance_text1:SetPoint("CENTER", "distance_range4", "RIGHT", -offset_Y_1, offset_X_1);
367 elseif distance_text_position == "TR"
368 then distance_text:ClearAllPoints();
369 distance_text1:ClearAllPoints();
370 distance_text:SetPoint("CENTER", "distance_range2", "RIGHT", offset_Y_1, offset_X_1);
371 distance_text1:SetPoint("CENTER", "distance_range4", "RIGHT", offset_Y_1, offset_X_1);
372 elseif distance_text_position == "TC"
373 then distance_text:ClearAllPoints();
374 distance_text1:ClearAllPoints();
375 distance_text:SetPoint("CENTER", "distance_range2", "RIGHT", offset_Y_1, 0);
376 distance_text1:SetPoint("CENTER", "distance_range4", "RIGHT", offset_Y_1, 0);
377 elseif distance_text_position == "BC"
378 then distance_text:ClearAllPoints();
379 distance_text1:ClearAllPoints();
380 distance_text:SetPoint("CENTER", "distance_range2", "RIGHT", -offset_Y_1, 0);
381 distance_text1:SetPoint("CENTER", "distance_range4", "RIGHT", -offset_Y_1, 0);
382 end
383 end
384 end
385  
386 end
387 end
388 end
389  
390 ---------------------------------------------------------------------------------------------------------------------------------
391 ---------------------------------------------------------------------------------------------------------------------------------
392 function distance_Change_OnEvent()
393 --talent points
394 if (event == "CHARACTER_POINTS_CHANGED")
395 then DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance Addon: |cFFFF0000Talents checked");
396 distance_talent_check();
397 end
398  
399  
400 --change target
401 if (event == "PLAYER_TARGET_CHANGED") or (event == "DUEL_FINISHED") or (event == "PLAYER_ALIVE")
402 then
403  
404 --show/hide frame
405 if (UnitIsFriend("player", "target")==1) --add classes for friendly ranges
406 and (UnitClass("player")==DISTANCE_SHAMAN)
407 or (UnitClass("player")==DISTANCE_PALADIN)
408 or (UnitClass("player")==DISTANCE_PRIEST)
409 --or (UnitClass("player")==DISTANCE_MAGE)
410 --or (UnitClass("player")==DISTANCE_WARLOCK)
411  
412 then distance_frame:Show();
413 elseif (UnitIsFriend("player", "target")==nil)
414 then distance_frame:Show();
415 else distance_frame:Hide();
416 end
417  
418 --show/hide range2/4
419 if (UnitIsFriend("player", "target")==nil)
420 then distance_talent_check();
421 distance_spell_check();
422 distance_range4:Hide();
423 distance_range2:Show();
424 elseif (UnitIsFriend("player", "target")==1)
425 then distance_talent_check();
426 distance_spell_check();
427 distance_range4:Show();
428 distance_range2:Hide();
429 end
430  
431 --hide if enemy target is dead, show if friendly target is dead
432 if (UnitIsDeadOrGhost("target")==1)
433 and (UnitIsFriend("player", "target")==nil)
434 then distance_frame:Hide();
435 elseif (UnitIsDeadOrGhost("target")==1)
436 and (UnitIsFriend("player", "target")==1)
437 and (UnitClass("player")==DISTANCE_SHAMAN) --show for classes with resurection spells else hide
438 or (UnitClass("player")==DISTANCE_PALADIN)
439 or (UnitClass("player")==DISTANCE_PRIEST)
440 then distance_frame:Show();
441 end
442  
443 --hide if no unit or disconnected
444 if (UnitExists("target")==nil) or (UnitIsConnected("target")==nil)
445 then distance_frame:Hide();
446 end
447  
448 --hide if player is dead
449 if (UnitIsDeadOrGhost("player"))
450 then distance_frame:Hide();
451 end
452 end
453  
454 end
455 ---------------------------------------------------------------------------------------------------------------------------------
456 ---------------------------------------------------------------------------------------------------------------------------------
457 function distance_Command(cmd)
458  
459 --display commands
460 if (cmd=="")
461 then DEFAULT_CHAT_FRAME:AddMessage("Distance Commands:");
462 DEFAULT_CHAT_FRAME:AddMessage("/distance menu");
463 end
464 ---------------------------------------------------------
465 if (cmd=="menu")
466 then distance_options_frame:Show();
467 distance_frame:Show();
468  
469 if (distance_layout==false) then
470 distance_options_slider_width:SetMinMaxValues(14, 200);
471 distance_options_slider_width:SetOrientation("HORIZONTAL");
472 distance_options_slider_width:SetValue(distance_frame_width);
473 distance_options_slider_width:SetValueStep(1);
474  
475 distance_options_slider_height:SetMinMaxValues(100, 1000);
476 distance_options_slider_height:SetOrientation("HORIZONTAL");
477 distance_options_slider_height:SetValue(height_value*100);
478 distance_options_slider_height:SetValueStep(1);
479  
480 distance_options_slider_alpha:SetMinMaxValues(0, 100);
481 distance_options_slider_alpha:SetOrientation("HORIZONTAL");
482 distance_options_slider_alpha:SetValue(distance_frame_alpha*100);
483 distance_options_slider_alpha:SetValueStep(1);
484  
485 distance_color_tab1=true
486 distance_color_tab2=false
487 distance_color_tab3=false
488 distance_color_tab4=false
489 distance_color_tab5=false
490  
491 --distance_color_bar1:SetTexture(distance_bar_texture_w)
492 --distance_color_bar1:SetVertexColor(barcolor.b1_color_w_r, barcolor.b1_color_w_g, barcolor.b1_color_w_b);
493  
494 distance_options_color_tab1:SetTextHeight(14);
495 distance_options_color_bar1:SetHighlightTexture(distance_bar_texture_w);
496  
497 distance_options_color_bar1:SetHeight(25);
498 distance_options_color_bar1:SetWidth(60);
499  
500 distance_options_color_tab2:SetTextHeight(12);
501 distance_options_color_bar2:SetHeight(20);
502 distance_options_color_bar2:SetWidth(50);
503  
504 distance_options_color_tab3:SetTextHeight(12);
505 distance_options_color_bar3:SetHeight(20);
506 distance_options_color_bar3:SetWidth(50);
507  
508 distance_options_color_tab4:SetTextHeight(12);
509 distance_options_color_bar4:SetHeight(20);
510 distance_options_color_bar4:SetWidth(50);
511  
512 distance_options_color_tab5:SetTextHeight(12);
513 distance_options_color_bar5:SetHeight(20);
514 distance_options_color_bar5:SetWidth(50);
515  
516 distance_options_slider_red:SetMinMaxValues(0, 100);
517 distance_options_slider_red:SetOrientation("HORIZONTAL");
518 distance_options_slider_red:SetValue(barcolor.b1_color_w_r*100);
519 distance_options_slider_red:SetValueStep(1);
520  
521 distance_options_slider_green:SetMinMaxValues(0, 100);
522 distance_options_slider_green:SetOrientation("HORIZONTAL");
523 distance_options_slider_green:SetValue(barcolor.b1_color_w_g*100);
524 distance_options_slider_green:SetValueStep(1);
525  
526 distance_options_slider_blue:SetMinMaxValues(0, 100);
527 distance_options_slider_blue:SetOrientation("HORIZONTAL");
528 distance_options_slider_blue:SetValue(barcolor.b1_color_w_b*100);
529 distance_options_slider_blue:SetValueStep(1);
530 else
531 if (distance_layout==true) then
532 distance_options_slider_width:SetMinMaxValues(14, 200);
533 distance_options_slider_width:SetOrientation("HORIZONTAL");
534 distance_options_slider_width:SetValue(distance_frame_height);
535 distance_options_slider_width:SetValueStep(1);
536  
537 distance_options_slider_height:SetMinMaxValues(100, 1000);
538 distance_options_slider_height:SetOrientation("HORIZONTAL");
539 distance_options_slider_height:SetValue(height_value*100);
540 distance_options_slider_height:SetValueStep(1);
541  
542 distance_options_slider_alpha:SetMinMaxValues(0, 100);
543 distance_options_slider_alpha:SetOrientation("HORIZONTAL");
544 distance_options_slider_alpha:SetValue(distance_frame_alpha*100);
545 distance_options_slider_alpha:SetValueStep(1);
546  
547 distance_color_tab1=true
548 distance_color_tab2=false
549 distance_color_tab3=false
550 distance_color_tab4=false
551 distance_color_tab5=false
552  
553 distance_options_color_tab1:SetTextHeight(14);
554 distance_options_color_bar1:SetHighlightTexture(distance_bar_texture_w);
555  
556 distance_options_color_bar1:SetHeight(25);
557 distance_options_color_bar1:SetWidth(60);
558  
559 distance_options_color_tab2:SetTextHeight(12);
560 distance_options_color_bar2:SetHeight(20);
561 distance_options_color_bar2:SetWidth(50);
562  
563 distance_options_color_tab3:SetTextHeight(12);
564 distance_options_color_bar3:SetHeight(20);
565 distance_options_color_bar3:SetWidth(50);
566  
567 distance_options_color_tab4:SetTextHeight(12);
568 distance_options_color_bar4:SetHeight(20);
569 distance_options_color_bar4:SetWidth(50);
570  
571 distance_options_color_tab5:SetTextHeight(12);
572 distance_options_color_bar5:SetHeight(20);
573 distance_options_color_bar5:SetWidth(50);
574  
575 distance_options_slider_red:SetMinMaxValues(0, 100);
576 distance_options_slider_red:SetOrientation("HORIZONTAL");
577 distance_options_slider_red:SetValue(barcolor.b1_color_w_r*100);
578 distance_options_slider_red:SetValueStep(1);
579  
580 distance_options_slider_green:SetMinMaxValues(0, 100);
581 distance_options_slider_green:SetOrientation("HORIZONTAL");
582 distance_options_slider_green:SetValue(barcolor.b1_color_w_g*100);
583 distance_options_slider_green:SetValueStep(1);
584  
585 distance_options_slider_blue:SetMinMaxValues(0, 100);
586 distance_options_slider_blue:SetOrientation("HORIZONTAL");
587 distance_options_slider_blue:SetValue(barcolor.b1_color_w_b*100);
588 distance_options_slider_blue:SetValueStep(1);
589 end
590 end
591 if distance_frame:IsMovable(true)
592 then distance_options_frame_lock_button:SetChecked(false)
593 else distance_options_frame_lock_button:SetChecked(true)
594 end
595 end
596 end
597 ---------------------------------------------------------------------------------------------------------------------------------
598 ---------------------------------------------------------------------------------------------------------------------------------
599 --move frame
600 function distance_OnMouseUp()
601 if (distance_frame.isMoving) then
602 distance_frame:StopMovingOrSizing();
603 distance_frame.isMoving = false;
604 distance_frame_Y = distance_frame:GetBottom();
605 distance_frame_X = distance_frame:GetLeft();
606 distance_frame:ClearAllPoints();
607 distance_frame:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", distance_frame_X, distance_frame_Y);
608 --DEFAULT_CHAT_FRAME:AddMessage("X: " .. distance_frame_X );
609 --DEFAULT_CHAT_FRAME:AddMessage("Y: " .. distance_frame_Y );
610 end
611 end
612 ---------------------------------------------------------------------------------------------------------------------------------
613 function distance_OnMouseDown()
614 if (distance_frame:IsMovable()) then
615 if ( ( not distance_frame.isLocked ) or ( distance_frame.isLocked == 0 ) and ( arg1 == "LeftButton" ) ) then
616 distance_frame:StartMoving();
617 distance_frame.isMoving = true;
618 end
619 end
620 end
621 ---------------------------------------------------------------------------------------------------------------------------------
622 ---------------------------------------------------------------------------------------------------------------------------------
623 --Spell check
624 function distance_spell_check()
625  
626 --HUNTER SPELLS
627 if UnitClass("player")==DISTANCE_HUNTER
628 then
629  
630 --HUNTER
631 --41yard ENEMY
632 for i = 1, 120 do t = GetActionTexture(i)
633 if (t and string.find(t,"Ability_ImpalingBolt")) --Arcane Shot
634 or (t and string.find(t,"INV_Spear_07")) --aimed shot
635 or (t and string.find(t,"Ability_Hunter_Quickshot")) --serpent sting
636 or (t and string.find(t,"Ability_Hunter_CriticalShot")) --scorpid sting
637 or (t and string.find(t,"Ability_Hunter_AimedShot")) --viper sting
638 or (t and string.find(t,"Spell_Arcane_Blink")) --distracting shot
639 or (t and string.find(t,"Ability_UpgradeMoonGlaive")) --multi shot
640 or (t and string.find(t,"Spell_Nature_Drowsy")) --tranquilizing shot
641 or (t and string.find(t,"Spell_Frost_Stun")) --Concussive Shot
642 or (t and string.find(t,"INV_Spear_02")) --Wyvern Sting
643 then yard41=i
644 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_41:"..i);
645 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_41:"..t);
646 break
647 end
648 end
649  
650 --HUNTER
651 --30yard ENEMY
652 for i = 1, 120 do t = GetActionTexture(i)
653 if (t and string.find(t,"Ability_Throw")) --Throw
654 then yard30=i
655 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
656 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
657 break
658 end
659 end
660  
661 --HUNTER
662 --21yard ENEMY
663 for i = 1, 120 do t = GetActionTexture(i)
664 if (t and string.find(t,"Ability_GolemStormBolt")) --Scatter Shot
665 then yard21=i
666 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_21:"..i);
667 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_21:"..t);
668 break
669 end
670 end
671  
672 --HUNTER
673 --05yard ENEMY
674 for i = 1, 120 do t = GetActionTexture(i)
675 if (t and string.find(t,"Ability_Rogue_Trip")) --Wing Clip
676 or (t and string.find(t,"Ability_Hunter_SwiftStrike")) --mongoose bite
677 or (t and string.find(t,"Ability_Warrior_Challange")) --counterattack
678 or (t and string.find(t,"Ability_Rogue_Feint")) --disengage
679 then yard05=i
680 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_05:"..i);
681 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_05:"..t);
682 break
683 end
684 end
685 end
686 ---------------------------------------------------------------------------------------------------------------------------------
687 --SHAMAN
688 if UnitClass("player")==DISTANCE_SHAMAN
689 then
690  
691 --SHAMAN
692 --40yard FRIEND
693 for i = 1, 120 do t = GetActionTexture(i)
694 if (t and string.find(t,"Spell_Nature_HealingWaveLesser")) --Lesser Healing Wave
695 or (t and string.find(t,"Spell_Nature_HealingWaveGreater")) --Chain Heal
696 or (t and string.find(t,"Spell_Nature_MagicImmunity")) --Healing Wave
697 then friendyard40=i
698 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
699 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
700 break
701 end
702 end
703  
704 --SHAMAN
705 --30yard FRIEND
706 for i = 1, 120 do t = GetActionTexture(i)
707 if (t and string.find(t,"Spell_Nature_NullifyPoison")) --Cure Poison
708 or (t and string.find(t,"Spell_Nature_RemoveDisease")) --Cure Disease
709 or (t and string.find(t,"Spell_Frost_WindWalkOn")) --Water Walking
710 or (t and string.find(t,"Spell_Shadow_DemonBreath")) --Water Breathing
711 --or (t and string.find(t,"Spell_Nature_Regenerate")) --Ancestral Spirit
712 then friendyard30=i
713 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
714 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
715 break
716 end
717 end
718  
719 --SHAMAN
720 --30yard ENEMY
721 for i = 1, 120 do t = GetActionTexture(i)
722 if (t and string.find(t,"Spell_Nature_ChainLightning")) --Chain Lightning
723 or (t and string.find(t,"Spell_Nature_Lightning")) --Lightning Bolt
724 --or (t and string.find(t,"Spell_Nature_Purge")) --Purge
725 then yard30=i
726 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
727 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
728 break
729 end
730 end
731  
732 --SHAMAN
733 --20yard ENEMY
734 for i = 1, 120 do t = GetActionTexture(i)
735 if (t and string.find(t,"Spell_Nature_EarthShock")) --Earth Shock
736 or (t and string.find(t,"Spell_Fire_FlameShock")) --Flame Shock
737 or (t and string.find(t,"Spell_Frost_FrostShock")) --FrostShock
738 then yard21=i
739 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_20:"..i);
740 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_20:"..t);
741 break
742 end
743 end
744  
745 --SHAMAN
746 --05yard ENEMY
747 for i = 1, 120 do t = GetActionTexture(i)
748 if (t and string.find(t,"Spell_Holy_SealOfMight")) --Stormstrike
749 then yard05=i
750 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_05:"..i);
751 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_05:"..t);
752 break
753 end
754 end
755 end
756 ---------------------------------------------------------------------------------------------------------------------------------
757 --MAGE SPELLS
758 if UnitClass("player")==DISTANCE_MAGE
759 then
760  
761 --MAGE
762 --30yard FRIEND
763  
764 --MAGE
765 --40yard ENEMY
766 for i = 1, 120 do t = GetActionTexture(i)
767 if (t and string.find(t,"Spell_Holy_Dizzy")) --Detect Magic
768 then yard41=i
769 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_41_Detect Magic:"..i);
770 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_41_Detect Magic:"..t);
771 break
772 end
773 end
774  
775 --MAGE
776 --35yard ENEMY rangeFlameThrowing35
777 for i = 1, 120 do t = GetActionTexture(i)
778 if (t and string.find(t,"Spell_Fire_FlameBolt")) --Fireball
779 then yard35=i
780 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_35_Fireball:"..i);
781 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_35_Fireball:"..t);
782 break
783 end
784 end
785  
786 --MAGE
787 --30yard ENEMY rangeFlameThrowing30
788 for i = 1, 120 do t = GetActionTexture(i)
789 if (t and string.find(t,"Spell_Fire_SoulBurn")) --Scorch
790 then fire_yard30=i
791 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30_Fire_Scorch:"..i);
792 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30_Fire_Scorch:"..t);
793 break
794 end
795 end
796  
797 --MAGE
798 --30yard ENEMY rangeArcticReach30
799 for i = 1, 120 do t = GetActionTexture(i)
800 if (t and string.find(t,"Spell_Frost_FrostBolt02")) --Frostbolt
801 then frost_yard30=i
802 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30_Frost_Frostbolt:"..i);
803 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30_Frost_Frostbolt:"..t);
804 break
805 end
806 end
807  
808 --MAGE
809 --20yard ENEMY rangeFlameThrowing20
810 for i = 1, 120 do t = GetActionTexture(i)
811 if (t and string.find(t,"Spell_Fire_Fireball")) --Fire Blast
812 then yard21=i
813 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_20_Fire Blast :"..i);
814 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_20_Fire Blast :"..t);
815 break
816 end
817 end
818 end
819 ---------------------------------------------------------------------------------------------------------------------------------
820 --DRUID SPELLS
821 if UnitClass("player")==DISTANCE_DRUID
822 then
823  
824 --DRUID
825 --30yard ENEMY
826 for i = 1, 120 do t = GetActionTexture(i)
827 if (t and string.find(t,"Spell_Nature_AbolishMagic")) --Warth
828 then yard30=i
829 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
830 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
831 break
832 end
833 end
834 end
835 ---------------------------------------------------------------------------------------------------------------------------------
836 --PALADIN SPELLS
837 if UnitClass("player")==DISTANCE_PALADIN
838 then
839  
840 --PALADIN
841 -- 40yard FRIEND
842 for i = 1, 120 do t = GetActionTexture(i)
843 if (t and string.find(t,"Spell_Holy_FlashHeal")) --Flash of Light
844 or (t and string.find(t,"Spell_Holy_HolyBolt")) --Holy Light
845 or (t and string.find(t,"Spell_Holy_LayOnHands")) --Lay on Hands
846 or (t and string.find(t,"Spell_Holy_GreaterBlessingofKings")) --Greater Blessing of Might
847 or (t and string.find(t,"Spell_Holy_GreaterBlessingofWisdom")) --Greater Blessing of Wisdom
848 or (t and string.find(t,"Spell_Holy_GreaterBlessingofSalvation")) --Greater Blessing of Salvation
849 or (t and string.find(t,"Spell_Holy_GreaterBlessingofLight")) --Greater Blessing of Light
850 or (t and string.find(t,"Spell_Magic_GreaterBlessingofKings")) --Greater Blessing of Kings
851 or (t and string.find(t,"Spell_Holy_GreaterBlessingofSanctuary")) --Greater Blessing of Sanctuary
852 or (t and string.find(t,"Spell_Nature_TimeStop")) --Divine Intervention
853 then friendyard40=i
854 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_40:"..i);
855 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_40:"..t);
856 break
857 end
858 end
859  
860 --PALADIN
861 -- 30yard FRIEND
862 for i = 1, 120 do t = GetActionTexture(i)
863 if (t and string.find(t,"Spell_Holy_FistOfJustice")) --Blessing of Might
864 or (t and string.find(t,"Spell_Holy_SealOfWisdom")) --Blessing of Wisdom
865 or (t and string.find(t,"Spell_Holy_SealOfSalvation")) --Blessing of Salvation
866 or (t and string.find(t,"Spell_Holy_PrayerOfHealing02")) --Blessing of Light
867 or (t and string.find(t,"Spell_Magic_MageArmor")) --Blessing of Kings
868 or (t and string.find(t,"Spell_Nature_LightningShield")) --Blessing of Sanctuary
869 or (t and string.find(t,"Spell_Holy_SealOfValor")) --Blessing of Freedom
870 or (t and string.find(t,"Spell_Holy_SealOfSacrifice")) --Blessing of Sacrifice
871 or (t and string.find(t,"Spell_Holy_SealOfProtection")) --Blessing of Protection
872 or (t and string.find(t,"Spell_Holy_Renew")) --Cleanse
873 --or (t and string.find(t,"Spell_Holy_Resurrection")) --Redemption
874 then friendyard30=i
875 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
876 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
877 break
878 end
879 end
880  
881 --PALADIN
882 -- 20yard FRIEND
883 for i = 1, 120 do t = GetActionTexture(i)
884 if (t and string.find(t,"Spell_Holy_SearingLight")) --Holy Shock
885 then friendyard20=i
886 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_20:"..i);
887 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_20:"..t);
888 break
889 end
890 end
891  
892 --PALADIN
893 -- 30yard ENEMY
894 for i = 1, 120 do t = GetActionTexture(i)
895 if (t and string.find(t,"Spell_Holy_Exorcism_02")) --Exorcism
896 then yard30=i
897 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
898 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
899 break
900 end
901 end
902  
903 --PALADIN
904 -- 20yard ENEMY
905 for i = 1, 120 do t = GetActionTexture(i)
906 if (t and string.find(t,"Spell_Holy_Exorcism")) --Holy Wrath
907 or (t and string.find(t,"Spell_Holy_TurnUndead")) --Turn Undead
908 or (t and string.find(t,"Spell_Holy_SearingLight")) --Holy Shock
909 then yard20=i
910 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_20:"..i);
911 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_20:"..t);
912 break
913 end
914 end
915 end
916 ---------------------------------------------------------------------------------------------------------------------------------
917 --PRIEST SPELLS
918 if UnitClass("player")==DISTANCE_PRIEST
919 then
920  
921 --PRIEST
922 -- 40yard FRIEND
923 for i = 1, 120 do t = GetActionTexture(i)
924 if (t and string.find(t,"Spell_Holy_FlashHeal")) --Flash Heal
925 or(t and string.find(t,"Spell_Holy_GreaterHeal")) --Greater Heal
926 or(t and string.find(t,"Spell_Holy_Heal02")) --Heal
927 or(t and string.find(t,"Spell_Holy_LesserHeal")) --Lesser Heal
928 or(t and string.find(t,"Spell_Holy_PowerWordShield")) --Power Word:Shield
929 or(t and string.find(t,"Spell_Holy_Renew")) --Renew
930 then friendyard40=i
931 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_40:"..i);
932 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_40:"..t);
933 break
934 end
935 end
936  
937 --PRIEST
938 -- 30yard FRIEND
939 for i = 1, 120 do t = GetActionTexture(i)
940 if (t and string.find(t,"Spell_Nature_NullifyDisease")) --Abolish Disease
941 or(t and string.find(t,"Spell_Holy_NullifyDisease")) --Cure Disease
942 or(t and string.find(t,"Spell_Holy_DispelMagic")) --Dispell Magic
943 or(t and string.find(t,"Spell_Holy_DivineSpirit")) --Divine Spirit
944 or(t and string.find(t,"Spell_Holy_WordFortitude")) --Power Word: Fortitude
945 --or(t and string.find(t,"Spell_Holy_Resurrection")) --Resurrection
946 or(t and string.find(t,"Spell_Shadow_AntiShadow")) --Shadow Protection
947 then friendyard30=i
948 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
949 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
950 break
951 end
952 end
953  
954 --PRIEST
955 -- 40yard ENEMY
956 for i = 1, 120 do t = GetActionTexture(i)
957 if (t and string.find(t,"Spell_Holy_MindSooth")) --Mind Shoothe
958 then yard40=i
959 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_40:"..i);
960 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_40:"..t);
961 break
962 end
963 end
964  
965 --PRIEST
966 -- 30yard ENEMY
967 for i = 1, 120 do t = GetActionTexture(i)
968 if (t and string.find(t,"Spell_Holy_DispelMagic")) --Dispell Magic
969 then yard30=i
970 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
971 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
972 break
973 end
974 end
975  
976 --PRIEST
977 -- 30yard ENEMY HOLY
978 for i = 1, 120 do t = GetActionTexture(i)
979 if(t and string.find(t,"Spell_Holy_SearingLight")) --Holy Fire
980 or(t and string.find(t,"Spell_Holy_HolySmite")) --Smite
981 then holy_yard30=i
982 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
983 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
984 break
985 end
986 end
987  
988 --PRIEST
989 -- 30yard ENEMY SHADOW
990 for i = 1, 120 do t = GetActionTexture(i)
991 if(t and string.find(t,"Spell_Shadow_ManaBurn")) --Mana Burn
992 or(t and string.find(t,"Spell_Shadow_UnholyFrenzy")) --Mind Blast
993 or(t and string.find(t,"Spell_Shadow_ShadowWordPain")) --Shadow Word: Pain
994 then shadow_yard30=i
995 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
996 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
997 break
998 end
999 end
1000  
1001 --PRIEST
1002 -- 20yard ENEMY
1003 for i = 1, 120 do t = GetActionTexture(i)
1004 if (t and string.find(t,"Spell_Shadow_ShadowWordDominate")) --Mind Control
1005 or (t and string.find(t,"Spell_Shadow_SiphonMana")) --Mind Flay
1006  
1007 then yard20=i
1008 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_20:"..i);
1009 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_20:"..t);
1010 break
1011 end
1012 end
1013 end
1014 ---------------------------------------------------------------------------------------------------------------------------------
1015 --WARLOCK SPELLS
1016 if UnitClass("player")==DISTANCE_WARLOCK
1017 then
1018  
1019 --WARLOCK
1020 -- 30yard ENEMY Destructive Reach
1021 for i = 1, 120 do t = GetActionTexture(i)
1022 if (t and string.find(t,"Spell_Fire_Immolation")) --Immolate
1023 or (t and string.find(t,"Spell_Fire_SoulBurn")) --Searing Pain
1024 or (t and string.find(t,"Spell_Fire_Fireball02")) --Soul Fire
1025 or (t and string.find(t,"Spell_Shadow_ShadowBolt")) --Shadow Bolt
1026 or (t and string.find(t,"Spell_Fire_Fireball")) --Conflagrate
1027 then destruction_yard30=i
1028 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
1029 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
1030 break
1031 end
1032 end
1033  
1034 --WARLOCK
1035 -- 30yard ENEMY Grim Reach
1036 for i = 1, 120 do t = GetActionTexture(i)
1037 if (t and string.find(t,"Spell_Shadow_AbominationExplosion")) --Corruption
1038 or (t and string.find(t,"Spell_Shadow_CurseOfSargeras")) --Curse of Agony
1039 or (t and string.find(t,"Spell_Shadow_AuraOfDarkness")) --Curse of Doom
1040 or (t and string.find(t,"Spell_Shadow_UnholyStrength")) --Curse of Recklessness
1041 or (t and string.find(t,"Spell_Shadow_CurseOfAchimonde")) --Curse of Shadow
1042 or (t and string.find(t,"Spell_Shadow_ChillTouch")) --Curse of Elements
1043 or (t and string.find(t,"Spell_Shadow_CurseOfTounges")) --Curse of Tongues
1044 or (t and string.find(t,"Spell_Shadow_CurseOfMannoroth")) --Curse of Weakness
1045 or (t and string.find(t,"Spell_Shadow_DeathCoil")) --Death Coil
1046 or (t and string.find(t,"Spell_Shadow_Haunting")) --Drain Soul
1047 then grim_yard30=i
1048 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
1049 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
1050 break
1051 end
1052 end
1053  
1054 --WARLOCK
1055 -- 20yard ENEMY Grim Reach
1056 for i = 1, 120 do t = GetActionTexture(i)
1057 if (t and string.find(t,"Spell_Shadow_Possession")) --Fear
1058 or (t and string.find(t,"Spell_Shadow_SiphonMana")) --Drain Mana
1059 or (t and string.find(t,"Spell_Shadow_LifeDrain02")) --Drain Life
1060 then grim_yard20=i
1061 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_20:"..i);
1062 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_20:"..t);
1063 break
1064 end
1065 end
1066  
1067 --WARLOCK
1068 -- 30yard FRIEND
1069 for i = 1, 120 do t = GetActionTexture(i)
1070 if (t and string.find(t,"Spell_Shadow_DetectInvisibility")) --Detect Invisibility
1071 or (t and string.find(t,"Spell_Shadow_DetectLesserInvisibility")) --Detect Lesser Invisibility
1072 or (t and string.find(t,"Spell_Shadow_DemonBreath")) --Unending Breath
1073 then friend_yard30=i
1074 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
1075 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
1076 break
1077 end
1078 end
1079 end
1080 ---------------------------------------------------------------------------------------------------------------------------------
1081 --WARRIORSPELLS
1082 if UnitClass("player")==DISTANCE_WARRIOR
1083 then
1084  
1085 --30yard WARRIOR
1086 for i = 1, 120 do t = GetActionTexture(i)
1087 if (t and string.find(t,"Ability_Marksmanship")) --Shoot
1088 or (t and string.find(t,"Ability_Throw")) --Throw
1089 then yard30=i
1090 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
1091 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
1092 break
1093 end
1094 end
1095  
1096 --25yard WARRIOR
1097 for i = 1, 120 do t = GetActionTexture(i)
1098 if (t and string.find(t,"Ability_Warrior_Charge")) --Charge
1099 or (t and string.find(t,"Ability_Rogue_Sprint")) --Intercept
1100 then yard25=i
1101 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_25:"..i);
1102 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_25:"..t);
1103 break
1104 end
1105 end
1106  
1107 --10yard WARRIOR
1108 for i = 1, 120 do t = GetActionTexture(i)
1109 if (t and string.find(t,"Ability_GolemThunderClap")) --Intimidating Shout
1110 then yard10=i
1111 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_10:"..i);
1112 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_10:"..t);
1113 break
1114 end
1115 end
1116  
1117 --08yard WARRIOR
1118 for i = 1, 120 do t = GetActionTexture(i)
1119 if (t and string.find(t,"Ability_Marksmanship")) --Shoot
1120 or (t and string.find(t,"Ability_Throw")) --Throw
1121 then yard08=i
1122 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_08:"..i);
1123 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_08:"..t);
1124 break
1125 end
1126 end
1127  
1128 --05yard WARRIOR
1129 for i = 1, 120 do t = GetActionTexture(i)
1130 if (t and string.find(t,"Ability_Warrior_Sunder")) --Sunder Armor
1131 or (t and string.find(t,"Ability_Warrior_DecisiveStrike")) --Slam
1132 or (t and string.find(t,"Ability_Warrior_Disarm")) --Disarm
1133 or (t and string.find(t,"INV_Gauntlets_04")) --Pummel
1134 or (t and string.find(t,"Ability_MeleeDamage")) --Overpower
1135 or (t and string.find(t,"Ability_Warrior_PunishingBlow")) --Mocking Blow
1136 or (t and string.find(t,"Ability_Warrior_Revenge")) --Revenge
1137 or (t and string.find(t,"Ability_Gouge")) --Rend
1138 or (t and string.find(t,"INV_Sword_48")) --Execute
1139 or (t and string.find(t,"Ability_ShockWave")) --Hamstring
1140 then yard05=i
1141 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_05:"..i);
1142 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_05:"..t);
1143 break
1144 end
1145 end
1146 end
1147 ---------------------------------------------------------------------------------------------------------------------------------
1148 --ROGUESPELLS
1149 if UnitClass("player")==DISTANCE_ROGUE
1150 then
1151  
1152 --30yard ROGUE
1153 for i = 1, 120 do t = GetActionTexture(i)
1154 if (t and string.find(t,"Ability_Marksmanship")) --Shoot
1155 or (t and string.find(t,"Ability_Throw")) --Throw
1156 --or (t and string.find(t,"Ability_Rogue_Distract")) --Distract
1157 then yard30=i
1158 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_30:"..i);
1159 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_30:"..t);
1160 break
1161 end
1162 end
1163  
1164 --10yard ROGUE
1165 for i = 1, 120 do t = GetActionTexture(i)
1166 if (t and string.find(t,"Spell_Shadow_MindSteal")) --Blind
1167 then yard10=i
1168 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_10:"..i);
1169 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_10:"..t);
1170 break
1171 end
1172 end
1173  
1174 --05yard ROGUE
1175 for i = 1, 120 do t = GetActionTexture(i)
1176 if (t and string.find(t,"Ability_Rogue_Ambush")) --Ambush
1177 or (t and string.find(t,"Ability_BackStab")) --Backstab
1178 or (t and string.find(t,"Ability_CheapShot")) --Cheap Shot
1179 or (t and string.find(t,"Ability_Rogue_Eviscerate")) --Eviscerate
1180 or (t and string.find(t,"Ability_Warrior_Riposte")) --Expose Armor
1181 or (t and string.find(t,"Ability_Rogue_Feint")) --Feint
1182 or (t and string.find(t,"Ability_Rogue_Garrote")) --Garrote
1183 or (t and string.find(t,"Ability_Gouge")) --Gouge
1184 or (t and string.find(t,"Spell_Shadow_LifeDrain")) --Hemorrage
1185 or (t and string.find(t,"Ability_Kick")) --Kick
1186 or (t and string.find(t,"Ability_Rogue_KidneyShot")) --Kidney Shot
1187 or (t and string.find(t,"Ability_Rogue_Rupture")) --Rupture
1188 or (t and string.find(t,"Ability_Sap")) --Sap
1189 or (t and string.find(t,"Spell_Shadow_RitualOfSacrifice")) --Sinister Strike
1190 then yard05=i
1191 --DEFAULT_CHAT_FRAME:AddMessage("-Slot_05:"..i);
1192 --DEFAULT_CHAT_FRAME:AddMessage("-Texture_05:"..t);
1193 break
1194 end
1195 end
1196 end
1197  
1198 end
1199 ---------------------------------------------------------------------------------------------------------------------------------
1200 ---------------------------------------------------------------------------------------------------------------------------------
1201 --Talent check distance_talent_check
1202 function distance_talent_check()
1203  
1204 local numTabs = GetNumTalentTabs();
1205 for t=1, numTabs do
1206 local numTalents = GetNumTalents(t);
1207 for i = 1, numTalents do nameTalent, icon, tier, column, currRank, maxRank= GetTalentInfo(t,i);
1208 ---------------------------------------------------------
1209 --HUNTER
1210 if UnitClass("player")==DISTANCE_HUNTER
1211 then if nameTalent==DISTANCE_HAWK_EYE
1212 then if currRank==0
1213 then rangeHawkEye = 35; textHawkEye = 35;
1214 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1215 end
1216 if currRank==1
1217 then rangeHawkEye = 37; textHawkEye = 37;
1218 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1219 end
1220 if currRank==2
1221 then rangeHawkEye = 39; textHawkEye = 39;
1222 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1223 end
1224 if currRank==3
1225 then rangeHawkEye = 41; textHawkEye = 41;
1226 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1227 end
1228 end
1229 end
1230 ---------------------------------------------------------
1231 ---------------------------------------------------------
1232 --SHAMAN
1233 if UnitClass("player")==DISTANCE_SHAMAN
1234 then if nameTalent==DISTANCE_STORM_REACH
1235 then if currRank==0
1236 then rangeStormReach = 30; textStormReach = 30;
1237 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1238 end
1239 if currRank==1
1240 then rangeStormReach = 33; textStormReach = 33;
1241 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1242 end
1243 if currRank==2
1244 then rangeStormReach = 36; textStormReach = 36;
1245 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1246 end
1247 end
1248 end
1249 ---------------------------------------------------------
1250 ---------------------------------------------------------
1251 --MAGE FIRE
1252 if UnitClass("player")==DISTANCE_MAGE
1253 then if nameTalent==DISTANCE_FLAME_THROWING
1254 then if currRank==0
1255 then rangeFlameThrowing35 = 35; textFlameThrowing35 = 35;
1256 rangeFlameThrowing30 = 30; textFlameThrowing30 = 30;
1257 rangeFlameThrowing20 = 20; textFlameThrowing20 = 20;
1258 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1259 end
1260 if currRank==1
1261 then rangeFlameThrowing35 = 38; textFlameThrowing35 = 38;
1262 rangeFlameThrowing30 = 33; textFlameThrowing30 = 33;
1263 rangeFlameThrowing20 = 23; textFlameThrowing20 = 23;
1264 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1265 end
1266 if currRank==2
1267 then rangeFlameThrowing35 = 41; textFlameThrowing35 = 41;
1268 rangeFlameThrowing30 = 36; textFlameThrowing30 = 36;
1269 rangeFlameThrowing20 = 26; textFlameThrowing20 = 26;
1270 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1271 end
1272 end
1273 end
1274 ---------------------------------------------------------
1275 --MAGE FROST 30
1276 if UnitClass("player")==DISTANCE_MAGE
1277 then if nameTalent==DISTANCE_ARCTIC_REACH
1278 then if currRank==0
1279 then rangeArcticReach30 = 30; textArcticReach30 = 30;
1280 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1281 end
1282 if currRank==1
1283 then rangeArcticReach30 = 33; textArcticReach30 = 33;
1284 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1285 end
1286 if currRank==2
1287 then rangeArcticReach30 = 36; textArcticReach30 = 36;
1288 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1289 end
1290 end
1291 end
1292 ---------------------------------------------------------
1293 ---------------------------------------------------------
1294 --DRUID 30
1295 if UnitClass("player")==DISTANCE_DRUID
1296 then if nameTalent==DISTANCE_NATURES_REACH
1297 then if currRank==0
1298 then rangeNaturesReach30 = 30; textNaturesReach30 = 30;
1299 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1300 end
1301 if currRank==1
1302 then rangeNaturesReach30 = 33; textNaturesReach30 = 33;
1303 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1304 end
1305 if currRank==2
1306 then rangeNaturesReach30 = 36; textNaturesReach30 = 36;
1307 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1308 end
1309 end
1310 end
1311 ---------------------------------------------------------
1312 ---------------------------------------------------------
1313 --PRIEST HOLY
1314 if UnitClass("player")==DISTANCE_PRIEST
1315 then if nameTalent==DISTANCE_HOLY_REACH
1316 then if currRank==0
1317 then rangeHolyReach30 = 30; textHolyReach30 = 30;
1318 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1319 end
1320 if currRank==1
1321 then rangeHolyReach30 = 33; textHolyReach30 = 33;
1322 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1323 end
1324 if currRank==2
1325 then rangeHolyReach30 = 36; textHolyReach30 = 36;
1326 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1327 end
1328 end
1329 end
1330 ---------------------------------------------------------
1331 --PRIEST SHADOW
1332 if UnitClass("player")==DISTANCE_PRIEST
1333 then if nameTalent==DISTANCE_SHADOW_REACH
1334 then if currRank==0
1335 then rangeShadowReach30 = 30; textShadowReach30 = 30;
1336 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1337 end
1338 if currRank==1
1339 then rangeShadowReach30 = 31.8; textShadowReach30 = 31.8;
1340 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1341 end
1342 if currRank==2
1343 then rangeShadowReach30 = 33.9; textShadowReach30 = 33.9;
1344 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1345 end
1346 if currRank==3
1347 then rangeShadowReach30 = 36; textShadowReach30 = 36;
1348 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1349 end
1350 end
1351 end
1352 ---------------------------------------------------------
1353 ---------------------------------------------------------
1354 --WARLOCK Destruction
1355 if UnitClass("player")==DISTANCE_WARLOCK
1356 then if nameTalent==DISTANCE_DESTRUCTIVE_REACH
1357 then if currRank==0
1358 then rangeDestructiveReach30 = 30; textDestructiveReach30 = 30;
1359 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1360 end
1361 if currRank==1
1362 then rangeDestructiveReach30 = 33; textDestructiveReach30 = 33;
1363 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1364 end
1365 if currRank==2
1366 then rangeDestructiveReach30 = 36; textDestructiveReach30 = 36;
1367 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1368 end
1369 end
1370 end
1371  
1372 --WARLOCK Affliction
1373 if UnitClass("player")==DISTANCE_WARLOCK
1374 then if nameTalent==DISTANCE_GRIM_REACH
1375 then if currRank==0
1376 then rangeGrimReach30 = 30; textGrimReach30 = 30;
1377 rangeGrimReach20 = 20; textGrimReach20 = 20;
1378 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1379 end
1380 if currRank==1
1381 then rangeGrimReach30 = 33; textGrimReach30 = 33;
1382 rangeGrimReach20 = 22; textGrimReach20 = 22;
1383 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1384 end
1385 if currRank==2
1386 then rangeGrimReach30 = 36; textGrimReach30 = 36;
1387 rangeGrimReach20 = 24; textGrimReach20 = 24;
1388 --DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
1389 end
1390 end
1391 end
1392 ---------------------------------------------------------
1393 end
1394 end
1395 end
1396 ---------------------------------------------------------------------------------------------------------------------------------
1397 ---------------------------------------------------------------------------------------------------------------------------------
1398 --OnUpdate range WHITE
1399 function distance_range1_OnUpdate(arg1)
1400  
1401 if distance_layout==false
1402 then
1403 distance_range_color1:SetTexture(distance_bar_texture_h)
1404 distance_range_color1:SetVertexColor(barcolor.b1_color_h_r, barcolor.b1_color_h_g, barcolor.b1_color_h_b);
1405 distance_color_bar1:SetTexture(distance_bar_texture_w)
1406 distance_color_bar1:SetVertexColor(barcolor.b1_color_w_r, barcolor.b1_color_w_g, barcolor.b1_color_w_b);
1407 else
1408 distance_range_color1:SetTexture(distance_bar_texture_w)
1409 distance_range_color1:SetVertexColor(barcolor.b1_color_w_r, barcolor.b1_color_w_g, barcolor.b1_color_w_b);
1410 distance_color_bar1:SetTexture(distance_bar_texture_w)
1411 distance_color_bar1:SetVertexColor(barcolor.b1_color_w_r, barcolor.b1_color_w_g, barcolor.b1_color_w_b);
1412 end
1413  
1414 distance_frame.TimeSinceLastUpdate = distance_frame.TimeSinceLastUpdate + arg1;
1415 if (distance_frame.TimeSinceLastUpdate > distance_frame_UpdateInterval) then
1416 ---------------------------------------------------------------------------------------------------------------------------------
1417 if (UnitClass("player")==DISTANCE_HUNTER) then
1418  
1419 --oor HUNTER
1420 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==0) and (UnitIsFriend("player", "target")==nil)
1421 then
1422 if (distance_layout==false)
1423 then distance_range1:SetHeight(range41 * height_value)
1424 else distance_range1:SetWidth(range41 * height_value)
1425 end
1426 end
1427 ---------------------------------------------------------
1428 --41 HUNTER
1429 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
1430 then
1431 if (distance_layout==false)
1432 then distance_range1:SetHeight(rangeHawkEye * height_value)
1433 else distance_range1:SetWidth(rangeHawkEye * height_value)
1434 end
1435 end
1436 ---------------------------------------------------------
1437 --30 HUNTER
1438 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
1439 then
1440 if (distance_layout==false)
1441 then distance_range1:SetHeight(rangeHawkEye * height_value)
1442 else distance_range1:SetWidth(rangeHawkEye * height_value)
1443 end
1444 end
1445 ---------------------------------------------------------
1446 --25 HUNTER
1447 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
1448 then
1449 if (distance_layout==false)
1450 then distance_range1:SetHeight(range30 * height_value)
1451 else distance_range1:SetWidth(range30 * height_value)
1452 end
1453 end
1454 ---------------------------------------------------------
1455 --21 HUNTER
1456 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
1457 then
1458 if (distance_layout==false)
1459 then UIFrameFlash(distance_range1, .5, .5, .5, true, .5, .5)
1460 distance_range1:SetHeight(range25 * height_value)
1461 else UIFrameFlash(distance_range1, .5, .5, .5, true, .5, .5)
1462 distance_range1:SetWidth(range25 * height_value)
1463 end
1464 end
1465 ---------------------------------------------------------
1466 --08 HUNTER
1467 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==1)
1468 then
1469 if (distance_layout==false)
1470 then distance_range1:SetHeight(range21 * height_value)
1471 else distance_range1:SetWidth(range21 * height_value)
1472 end
1473 end
1474 ---------------------------------------------------------
1475 --05 HUNTER
1476 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
1477 then
1478 if (distance_layout==false)
1479 then distance_range1:SetHeight(range08 * height_value)
1480 else distance_range1:SetWidth(range08 * height_value)
1481 end
1482 end
1483 end
1484 ---------------------------------------------------------------------------------------------------------------------------------
1485 if (UnitClass("player")==DISTANCE_SHAMAN) then
1486  
1487 --oor SHAMAN ENEMY
1488 if (UnitIsVisible("target")==1) and (UnitIsFriend("player", "target")==nil)
1489 then
1490 if (distance_layout==false)
1491 then distance_range1:SetHeight(range41 * height_value)
1492 else distance_range1:SetWidth(range41 * height_value)
1493 end
1494 end
1495 ---------------------------------------------------------
1496 --41 SHAMAN ENEMY
1497 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
1498 then
1499 if (distance_layout==false)
1500 then distance_range1:SetHeight(range41 * height_value)
1501 else distance_range1:SetWidth(range41 * height_value)
1502 end
1503 end
1504  
1505 --41 SHAMAN FRIEND
1506 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
1507 then
1508 if (distance_layout==false)
1509 then distance_range1:SetHeight(range41 * height_value)
1510 else distance_range1:SetWidth(range41 * height_value)
1511 end
1512 end
1513 ---------------------------------------------------------
1514 --30 SHAMAN ENEMY
1515 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
1516 then
1517 if (distance_layout==false)
1518 then distance_range1:SetHeight(range41 * height_value)
1519 else distance_range1:SetWidth(range41 * height_value)
1520 end
1521 end
1522  
1523 --30 SHAMAN FRIEND
1524 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
1525 then
1526 if (distance_layout==false)
1527 then distance_range1:SetHeight(range41 * height_value)
1528 else distance_range1:SetWidth(range41 * height_value)
1529 end
1530 end
1531 ---------------------------------------------------------
1532 --25 SHAMAN ENEMY
1533 if (CheckInteractDistance("target",4)==1) and (UnitIsFriend("player", "target")==nil)
1534 then
1535 if (distance_layout==false)
1536 then distance_range1:SetHeight(rangeStormReach * height_value)
1537 else distance_range1:SetWidth(rangeStormReach * height_value)
1538 end
1539 end
1540  
1541 --25 SHAMAN FRIEND
1542 if (CheckInteractDistance("target",4)==1) and (UnitIsFriend("player", "target")==1)
1543 then
1544 if (distance_layout==false)
1545 then distance_range1:SetHeight(range30 * height_value)
1546 else distance_range1:SetWidth(range30 * height_value)
1547 end
1548 end
1549 ---------------------------------------------------------
1550 --21 SHAMAN ENEMY
1551 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
1552 then
1553 if (distance_layout==false)
1554 then distance_range1:SetHeight(range25 * height_value)
1555 else distance_range1:SetWidth(range25 * height_value)
1556 end
1557 end
1558 ---------------------------------------------------------
1559 --10 SHAMAN
1560 if (CheckInteractDistance("target",3)==1) --and (UnitIsFriend("player", "target")==nil)
1561 then
1562 if (distance_layout==false)
1563 then distance_range1:SetHeight(range20 * height_value)
1564 else distance_range1:SetWidth(range20 * height_value)
1565 end
1566 end
1567 ---------------------------------------------------------
1568 --05 SHAMAN ENEMY
1569 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
1570 then
1571 if (distance_layout==false)
1572 then distance_range1:SetHeight(range10 * height_value)
1573 else distance_range1:SetWidth(range10 * height_value)
1574 end
1575 end
1576  
1577 --05 SHAMAN
1578 --if (CheckInteractDistance("target",1)==1) and (UnitIsFriend("player", "target")==1)
1579 -- then distance_range1:SetHeight(range10)
1580 --end
1581 end
1582 ---------------------------------------------------------------------------------------------------------------------------------
1583 --MAGE RANGE_1
1584 if (UnitClass("player")==DISTANCE_MAGE) then
1585  
1586 --ooR MAGE
1587 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
1588 then
1589 if (distance_layout==false)
1590 then distance_range1:SetHeight(range41 * height_value)
1591 else distance_range1:SetWidth(range41 * height_value)
1592 end
1593 end
1594 ---------------------------------------------------------
1595 --41 MAGE
1596 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
1597 then
1598 if (distance_layout==false)
1599 then distance_range1:SetHeight(range41 * height_value)
1600 else distance_range1:SetWidth(range41 * height_value)
1601 end
1602 end
1603 ---------------------------------------------------------
1604 --35 MAGE FIRE
1605 if (IsActionInRange(yard35)==1) and (UnitIsFriend("player", "target")==nil)
1606 then
1607 if (distance_layout==false)
1608 then distance_range1:SetHeight(range41 * height_value)
1609 else distance_range1:SetWidth(range41 * height_value)
1610 end
1611 end
1612 ---------------------------------------------------------
1613 --30 MAGE FIRE
1614 if (IsActionInRange(fire_yard30)==1) and (UnitIsFriend("player", "target")==nil)
1615 then
1616 if (distance_layout==false)
1617 then distance_range1:SetHeight(rangeFlameThrowing35 * height_value)
1618 else distance_range1:SetWidth(rangeFlameThrowing35 * height_value)
1619 end
1620 end
1621  
1622 --30 MAGE FROST
1623 if (IsActionInRange(frost_yard30)==1) and (UnitIsFriend("player", "target")==nil)
1624 then
1625 if (distance_layout==false)
1626 then distance_range1:SetHeight(rangeFlameThrowing35 * height_value)
1627 else distance_range1:SetWidth(rangeFlameThrowing35 * height_value)
1628 end
1629 end
1630 ---------------------------------------------------------
1631 --21 MAGE
1632 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil) --FIRE*FROST??
1633 then
1634 if (distance_layout==false)
1635 then distance_range1:SetHeight(rangeFlameThrowing30 * height_value)
1636 else distance_range1:SetWidth(rangeFlameThrowing30 * height_value)
1637 end
1638 end
1639  
1640 --21 MAGE
1641 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil) --FIRE*FROST??
1642 then
1643 if (distance_layout==false)
1644 then distance_range1:SetHeight(rangeArcticReach30 * height_value)
1645 else distance_range1:SetWidth(rangeArcticReach30 * height_value)
1646 end
1647 end
1648 ---------------------------------------------------------
1649 --10 MAGE
1650 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
1651 then
1652 if (distance_layout==false)
1653 then UIFrameFlash(distance_range1, .5, .5, .5, true, .5, .5)
1654 distance_range1:SetHeight(range20 * height_value)
1655 else UIFrameFlash(distance_range1, .5, .5, .5, true, .5, .5)
1656 distance_range1:SetWidth(range20 * height_value)
1657 end
1658 end
1659 ---------------------------------------------------------
1660 --05 MAGE
1661 --if (CheckInteractDistance("target",1)) and (UnitIsFriend("player", "target")==nil)
1662 -- then distance_range1:SetHeight(range10)
1663 --end
1664 end
1665 ---------------------------------------------------------------------------------------------------------------------------------
1666 --DRUID RANGE_1
1667 if (UnitClass("player")==DISTANCE_DRUID) then
1668  
1669 --oor DRUID
1670 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
1671 then
1672 if (distance_layout==false)
1673 then distance_range1:SetHeight(range41 * height_value)
1674 else distance_range1:SetWidth(range41 * height_value)
1675 end
1676 end
1677 ---------------------------------------------------------
1678 --30 DRUID
1679 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
1680 then
1681 if (distance_layout==false)
1682 then distance_range1:SetHeight(range41 * height_value)
1683 else distance_range1:SetWidth(range41 * height_value)
1684 end
1685 end
1686 ---------------------------------------------------------
1687 --25 DRUID
1688 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
1689 then
1690 if (distance_layout==false)
1691 then distance_range1:SetHeight(rangeNaturesReach30 * height_value)
1692 else distance_range1:SetWidth(rangeNaturesReach30 * height_value)
1693 end
1694 end
1695 ---------------------------------------------------------
1696 --10 DRUID
1697 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
1698 then
1699 if (distance_layout==false)
1700 then distance_range1:SetHeight(range25 * height_value)
1701 else distance_range1:SetWidth(range25 * height_value)
1702 end
1703 end
1704 ---------------------------------------------------------
1705 --05 DRUID
1706 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
1707 then
1708 if (distance_layout==false)
1709 then distance_range1:SetHeight(range10 * height_value)
1710 else distance_range1:SetWidth(range10 * height_value)
1711 end
1712 end
1713 end
1714 ---------------------------------------------------------------------------------------------------------------------------------
1715 --PALADIN RANGE_1
1716 if (UnitClass("player")==DISTANCE_PALADIN) then
1717  
1718 --oor PALADIN
1719 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
1720 then
1721 if (distance_layout==false)
1722 then distance_range1:SetHeight(range41 * height_value)
1723 else distance_range1:SetWidth(range41 * height_value)
1724 end
1725 end
1726 ---------------------------------------------------------
1727 --40 PALADIN FRIEND
1728 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
1729 then
1730 if (distance_layout==false)
1731 then distance_range1:SetHeight(range41 * height_value)
1732 else distance_range1:SetWidth(range41 * height_value)
1733 end
1734 end
1735 ---------------------------------------------------------
1736 --30 PALADIN ENEMY
1737 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
1738 then
1739 if (distance_layout==false)
1740 then distance_range1:SetHeight(range41 * height_value)
1741 else distance_range1:SetWidth(range41 * height_value)
1742 end
1743 end
1744  
1745 --30 PALADIN FRIEND
1746 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
1747 then
1748 if (distance_layout==false)
1749 then distance_range1:SetHeight(range41 * height_value)
1750 else distance_range1:SetWidth(range41 * height_value)
1751 end
1752 end
1753 ---------------------------------------------------------
1754 --25 PALADIN
1755 if (CheckInteractDistance("target",4))
1756 then
1757 if (distance_layout==false)
1758 then distance_range1:SetHeight(range30 * height_value)
1759 else distance_range1:SetWidth(range30 * height_value)
1760 end
1761 end
1762 ---------------------------------------------------------
1763 --20 PALADIN ENEMY
1764 if (IsActionInRange(yard20)==1) and (UnitIsFriend("player", "target")==nil)
1765 then
1766 if (distance_layout==false)
1767 then distance_range1:SetHeight(range25 * height_value)
1768 else distance_range1:SetWidth(range25 * height_value)
1769 end
1770 end
1771  
1772 --20 PALADIN FRIEND
1773 if (IsActionInRange(friendyard20)==1) and (UnitIsFriend("player", "target")==1)
1774 then
1775 if (distance_layout==false)
1776 then distance_range1:SetHeight(range25 * height_value)
1777 else distance_range1:SetWidth(range25 * height_value)
1778 end
1779 end
1780 ---------------------------------------------------------
1781 --10 PALADIN
1782 if (CheckInteractDistance("target",3))
1783 then
1784 if (distance_layout==false)
1785 then distance_range1:SetHeight(range20 * height_value)
1786 else distance_range1:SetWidth(range20 * height_value)
1787 end
1788 end
1789 end
1790 ---------------------------------------------------------------------------------------------------------------------------------
1791 --PRIEST RANGE_1
1792 if (UnitClass("player")==DISTANCE_PRIEST) then
1793  
1794 --oor PRIEST
1795 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
1796 then
1797 if (distance_layout==false)
1798 then distance_range1:SetHeight(range41 * height_value)
1799 else distance_range1:SetWidth(range41 * height_value)
1800 end
1801 end
1802 ---------------------------------------------------------
1803 --40 PRIEST ENEMY
1804 if (IsActionInRange(yard40)==1) and (UnitIsFriend("player", "target")==nil)
1805 then
1806 if (distance_layout==false)
1807 then distance_range1:SetHeight(range41 * height_value)
1808 else distance_range1:SetWidth(range41 * height_value)
1809 end
1810 end
1811  
1812 --40 PRIEST FRIEND
1813 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
1814 then
1815 if (distance_layout==false)
1816 then distance_range1:SetHeight(range41 * height_value)
1817 else distance_range1:SetWidth(range41 * height_value)
1818 end
1819 end
1820 ---------------------------------------------------------
1821 --30 PRIEST ENEMY
1822 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
1823 then
1824 if (distance_layout==false)
1825 then distance_range1:SetHeight(range41 * height_value)
1826 else distance_range1:SetWidth(range41 * height_value)
1827 end
1828 end
1829  
1830 --30 PRIEST HOLY
1831 if (IsActionInRange(holy_yard30)==1) and (UnitIsFriend("player", "target")==nil)
1832 then
1833 if (distance_layout==false)
1834 then distance_range1:SetHeight(range41 * height_value)
1835 else distance_range1:SetWidth(range41 * height_value)
1836 end
1837 end
1838  
1839 --30 PRIEST SHADOW
1840 if (IsActionInRange(shadow_yard30)==1) and (UnitIsFriend("player", "target")==nil)
1841 then
1842 if (distance_layout==false)
1843 then distance_range1:SetHeight(range41 * height_value)
1844 else distance_range1:SetWidth(range41 * height_value)
1845 end
1846 end
1847  
1848 --30 PRIEST FRIEND
1849 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
1850 then
1851 if (distance_layout==false)
1852 then distance_range1:SetHeight(range41 * height_value)
1853 else distance_range1:SetWidth(range41 * height_value)
1854 end
1855 end
1856 ---------------------------------------------------------
1857 --25 PRIEST
1858 if (CheckInteractDistance("target",4))
1859 then
1860 if (distance_layout==false)
1861 then distance_range1:SetHeight(range30 * height_value)
1862 else distance_range1:SetWidth(range30 * height_value)
1863 end
1864 end
1865  
1866 --25 PRIEST HOLY
1867 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
1868 then
1869 if (distance_layout==false)
1870 then distance_range1:SetHeight(rangeHolyReach30 * height_value)
1871 else distance_range1:SetWidth(rangeHolyReach30 * height_value)
1872 end
1873 end
1874  
1875 --25 PRIEST SHADOW
1876 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
1877 then
1878 if (distance_layout==false)
1879 then distance_range1:SetHeight(rangeShadowReach30 * height_value)
1880 else distance_range1:SetWidth(rangeShadowReach30 * height_value)
1881 end
1882 end
1883 ---------------------------------------------------------
1884 --20 PRIEST ENEMY
1885 if (IsActionInRange(yard20)==1) and (UnitIsFriend("player", "target")==nil)
1886 then
1887 if (distance_layout==false)
1888 then distance_range1:SetHeight(range25 * height_value)
1889 else distance_range1:SetWidth(range25 * height_value)
1890 end
1891 end
1892 ---------------------------------------------------------
1893 --10 PRIEST
1894 if (CheckInteractDistance("target",3))
1895 then
1896 if (distance_layout==false)
1897 then distance_range1:SetHeight(range20 * height_value)
1898 else distance_range1:SetWidth(range20 * height_value)
1899 end
1900 end
1901 end
1902 ---------------------------------------------------------------------------------------------------------------------------------
1903 --WARLOCK RANGE_1
1904 if (UnitClass("player")==DISTANCE_WARLOCK) then
1905  
1906 --oor WARLOCK
1907 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
1908 then
1909 if (distance_layout==false)
1910 then distance_range1:SetHeight(range41 * height_value)
1911 else distance_range1:SetWidth(range41 * height_value)
1912 end
1913 end
1914 ---------------------------------------------------------
1915 --30 WARLOCK GRIM
1916 if (IsActionInRange(grim_yard30)==1) and (UnitIsFriend("player", "target")==nil)
1917 then
1918 if (distance_layout==false)
1919 then distance_range1:SetHeight(range41 * height_value)
1920 else distance_range1:SetWidth(range41 * height_value)
1921 end
1922 end
1923  
1924 --30 WARLOCK DESTRUCTION
1925 if (IsActionInRange(destruction_yard30)==1) and (UnitIsFriend("player", "target")==nil)
1926 then
1927 if (distance_layout==false)
1928 then distance_range1:SetHeight(range41 * height_value)
1929 else distance_range1:SetWidth(range41 * height_value)
1930 end
1931 end
1932 ---------------------------------------------------------
1933 --25 WARLOCK GRIM
1934 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
1935 then
1936 if (distance_layout==false)
1937 then distance_range1:SetHeight(rangeGrimReach30 * height_value)
1938 else distance_range1:SetWidth(rangeGrimReach30 * height_value)
1939 end
1940 end
1941  
1942 --25 WARLOCK DESTRUCTION
1943 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
1944 then
1945 if (distance_layout==false)
1946 then distance_range1:SetHeight(rangeDestructiveReach30 * height_value)
1947 else distance_range1:SetWidth(rangeDestructiveReach30 * height_value)
1948 end
1949 end
1950 ---------------------------------------------------------
1951 --20 WARLOCK GRIM
1952 if (IsActionInRange(grim_yard20)==1) and (UnitIsFriend("player", "target")==nil)
1953 then
1954 if (distance_layout==false)
1955 then distance_range1:SetHeight(range25 * height_value)
1956 else distance_range1:SetWidth(range25 * height_value)
1957 end
1958 end
1959 ---------------------------------------------------------
1960 --10 WARLOCK
1961 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
1962 then
1963 if (distance_layout==false)
1964 then distance_range1:SetHeight(rangeGrimReach20 * height_value)
1965 else distance_range1:SetWidth(rangeGrimReach20 * height_value)
1966 end
1967 end
1968 end
1969 ---------------------------------------------------------------------------------------------------------------------------------
1970 -- WARRIOR RANGE_1
1971 if (UnitClass("player")==DISTANCE_WARRIOR) then
1972  
1973 --oor WARRIOR
1974 if (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
1975 then
1976 if (distance_layout==false)
1977 then distance_range1:SetHeight(range41 * height_value)
1978 else distance_range1:SetWidth(range41 * height_value)
1979 end
1980 end
1981 ---------------------------------------------------------
1982 --30 WARRIOR
1983 if (IsActionInRange(yard30)==1) and (IsActionInRange(yard10)==0) and (UnitIsFriend("player", "target")==nil)
1984 then
1985 if (distance_layout==false)
1986 then distance_range1:SetHeight(range41 * height_value)
1987 else distance_range1:SetWidth(range41 * height_value)
1988 end
1989 end
1990 ---------------------------------------------------------
1991 --25 WARRIOR
1992 if (IsActionInRange(yard25)==1) and (UnitIsFriend("player", "target")==nil)
1993 then
1994 if (distance_layout==false)
1995 then distance_range1:SetHeight(range30 * height_value)
1996 else distance_range1:SetWidth(range30 * height_value)
1997 end
1998 end
1999 ---------------------------------------------------------
2000 --10 WARRIOR
2001 if (IsActionInRange(yard10)==1) and (UnitIsFriend("player", "target")==nil)
2002 then
2003 if (distance_layout==false)
2004 then distance_range1:SetHeight(range25 * height_value)
2005 else distance_range1:SetWidth(range25 * height_value)
2006 end
2007 end
2008 ---------------------------------------------------------
2009 --08 WARRIOR
2010 if (IsActionInRange(yard10)==1) and (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
2011 then
2012 if (distance_layout==false)
2013 then distance_range1:SetHeight(range10 * height_value)
2014 else distance_range1:SetWidth(range10 * height_value)
2015 end
2016 end
2017 ---------------------------------------------------------
2018 --05 WARRIOR
2019 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2020 then
2021 if (distance_layout==false)
2022 then distance_range1:SetHeight(range08 * height_value)
2023 else distance_range1:SetWidth(range08 * height_value)
2024 end
2025 end
2026 end
2027 ---------------------------------------------------------------------------------------------------------------------------------
2028 --ROGUE RANGE_1
2029 if (UnitClass("player")==DISTANCE_ROGUE) then
2030  
2031 --oor ROGUE
2032 if (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
2033 then
2034 if (distance_layout==false)
2035 then distance_range1:SetHeight(range41 * height_value)
2036 else distance_range1:SetWidth(range41 * height_value)
2037 end
2038 end
2039 ---------------------------------------------------------
2040 --30 ROGUE
2041 if (IsActionInRange(yard30)==1)
2042 and (IsActionInRange(yard10)==0)
2043 and (UnitIsFriend("player", "target")==nil)
2044 then
2045 if (distance_layout==false)
2046 then distance_range1:SetHeight(range41 * height_value)
2047 else distance_range1:SetWidth(range41 * height_value)
2048 end
2049 end
2050 ---------------------------------------------------------
2051 --25 ROGUE
2052 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2053 then
2054 if (distance_layout==false)
2055 then distance_range1:SetHeight(range30 * height_value)
2056 else distance_range1:SetWidth(range30 * height_value)
2057 end
2058 end
2059 ---------------------------------------------------------
2060 --10 ROGUE
2061 if (IsActionInRange(yard10)==1) and (UnitIsFriend("player", "target")==nil)
2062 then
2063 if (distance_layout==false)
2064 then distance_range1:SetHeight(range25 * height_value)
2065 else distance_range1:SetWidth(range25 * height_value)
2066 end
2067 end
2068 ---------------------------------------------------------
2069 --08 ROGUE
2070 if (IsActionInRange(yard10)==1)
2071 and (IsActionInRange(yard30)==0)
2072 and (UnitIsFriend("player", "target")==nil)
2073 then
2074 if (distance_layout==false)
2075 then distance_range1:SetHeight(range10 * height_value)
2076 else distance_range1:SetWidth(range10 * height_value)
2077 end
2078 end
2079 ---------------------------------------------------------
2080 --05 ROGUE
2081 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2082 then
2083 if (distance_layout==false)
2084 then distance_range1:SetHeight(range08 * height_value)
2085 else distance_range1:SetWidth(range08 * height_value)
2086 end
2087 end
2088 end
2089  
2090 distance_frame.TimeSinceLastUpdate = 0;
2091  
2092 end
2093 end
2094 ---------------------------------------------------------------------------------------------------------------------------------
2095 ---------------------------------------------------------------------------------------------------------------------------------
2096 --OnUpdate range YELLOW
2097 function distance_range2_OnUpdate(arg1)
2098  
2099 if distance_layout==false
2100 then
2101 distance_range_color2:SetTexture(distance_bar_texture_h)
2102 distance_range_color2:SetVertexColor(barcolor.b2_color_h_r, barcolor.b2_color_h_g, barcolor.b2_color_h_b);
2103 distance_color_bar2:SetTexture(distance_bar_texture_w)
2104 distance_color_bar2:SetVertexColor(barcolor.b2_color_w_r, barcolor.b2_color_w_g, barcolor.b2_color_w_b);
2105 else
2106 distance_range_color2:SetTexture(distance_bar_texture_w)
2107 distance_range_color2:SetVertexColor(barcolor.b2_color_w_r, barcolor.b2_color_w_g, barcolor.b2_color_w_b);
2108 distance_color_bar2:SetTexture(distance_bar_texture_w)
2109 distance_color_bar2:SetVertexColor(barcolor.b2_color_w_r, barcolor.b2_color_w_g, barcolor.b2_color_w_b);
2110 end
2111  
2112 distance_frame.TimeSinceLastUpdate = distance_frame.TimeSinceLastUpdate + arg1;
2113 if (distance_frame.TimeSinceLastUpdate > distance_frame_UpdateInterval) then
2114 ---------------------------------------------------------------------------------------------------------------------------------
2115 --HUNTER RANGE_2
2116 if (UnitClass("player")==DISTANCE_HUNTER) then
2117  
2118 --oor HUNTER
2119 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==0) and (UnitIsFriend("player", "target")==nil)
2120 then
2121 if (distance_layout==false)
2122 then distance_range2:SetHeight(range41 * height_value)
2123 distance_number:SetText(textooR)
2124 else distance_range2:SetWidth(range41 * height_value)
2125 distance_number:SetText(textooR)
2126 end
2127 end
2128 ---------------------------------------------------------
2129 --41 HUNTER
2130 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
2131 then
2132 if (distance_layout==false)
2133 then distance_range2:SetHeight(rangeHawkEye * height_value)
2134 distance_number:SetText(textHawkEye)
2135 else distance_range2:SetWidth(rangeHawkEye * height_value)
2136 distance_number:SetText(textHawkEye)
2137 end
2138 end
2139 ---------------------------------------------------------
2140 --30 HUNTER
2141 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
2142 then
2143 if (distance_layout==false)
2144 then distance_range2:SetHeight(range30 * height_value)
2145 distance_number:SetText(text30)
2146 else distance_range2:SetWidth(range30 * height_value)
2147 distance_number:SetText(text30)
2148 end
2149 end
2150 ---------------------------------------------------------
2151 --25 HUNTER
2152 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2153 then
2154 if (distance_layout==false)
2155 then distance_range2:SetHeight(range25 * height_value)
2156 distance_number:SetText(text25)
2157 else distance_range2:SetWidth(range25 * height_value)
2158 distance_number:SetText(text25)
2159 end
2160 end
2161 ---------------------------------------------------------
2162 --21 HUNTER
2163 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
2164 then
2165 if (distance_layout==false)
2166 then distance_range2:SetHeight(range21 * height_value)
2167 distance_number:SetText(text21)
2168 else distance_range2:SetWidth(range21 * height_value)
2169 distance_number:SetText(text21)
2170 end
2171 end
2172 ---------------------------------------------------------
2173 --08 HUNTER
2174 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
2175 then
2176 if (distance_layout==false)
2177 then distance_range2:SetHeight(range08 * height_value)
2178 distance_number:SetText(text08)
2179 else distance_range2:SetWidth(range08 * height_value)
2180 distance_number:SetText(text08)
2181 end
2182 end
2183 ---------------------------------------------------------
2184 --05 HUNTER
2185 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2186 then
2187 if (distance_layout==false)
2188 then distance_range2:SetHeight(range05 * height_value)
2189 distance_number:SetText(text05)
2190 else distance_range2:SetWidth(range05 * height_value)
2191 distance_number:SetText(text05)
2192 end
2193 end
2194 end
2195 ---------------------------------------------------------------------------------------------------------------------------------
2196 --SHAMAN RANGE_2
2197 if (UnitClass("player")==DISTANCE_SHAMAN) then
2198  
2199 --oor SHAMAN
2200 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
2201 then
2202 if (distance_layout==false)
2203 then distance_range2:SetHeight(range41 * height_value)
2204 distance_number:SetText(textooR)
2205 else distance_range2:SetWidth(range41 * height_value)
2206 distance_number:SetText(textooR)
2207 end
2208  
2209 end
2210 ---------------------------------------------------------
2211 --41 SHAMAN
2212 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
2213 then
2214 if (distance_layout==false)
2215 then distance_range2:SetHeight(range41 * height_value)
2216 distance_number:SetText(text41)
2217 else distance_range2:SetWidth(range41 * height_value)
2218 distance_number:SetText(text41)
2219 end
2220 end
2221 ---------------------------------------------------------
2222 --30 SHAMAN
2223 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
2224 then
2225 if (distance_layout==false)
2226 then distance_range2:SetHeight(rangeStormReach * height_value)
2227 distance_number:SetText(textStormReach)
2228 else distance_range2:SetWidth(rangeStormReach * height_value)
2229 distance_number:SetText(textStormReach)
2230 end
2231 end
2232 ---------------------------------------------------------
2233 --25 SHAMAN
2234 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2235 then
2236 if (distance_layout==false)
2237 then distance_range2:SetHeight(range25 * height_value)
2238 distance_number:SetText(text25)
2239 else distance_range2:SetWidth(range25 * height_value)
2240 distance_number:SetText(text25)
2241 end
2242 end
2243 ---------------------------------------------------------
2244 --22 SHAMAN
2245 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
2246 then
2247 if (distance_layout==false)
2248 then distance_range2:SetHeight(range20 * height_value)
2249 distance_number:SetText(text20)
2250 else distance_range2:SetWidth(range20 * height_value)
2251 distance_number:SetText(text20)
2252 end
2253 end
2254 ---------------------------------------------------------
2255 --10 SHAMAN
2256 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
2257 then
2258 if (distance_layout==false)
2259 then distance_range2:SetHeight(range10 * height_value)
2260 distance_number:SetText(text10)
2261 else distance_range2:SetWidth(range10 * height_value)
2262 distance_number:SetText(text10)
2263 end
2264 end
2265 ---------------------------------------------------------
2266 --05 SHAMAN
2267 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2268 then
2269 if (distance_layout==false)
2270 then distance_range2:SetHeight(range05 * height_value)
2271 distance_number:SetText(text05)
2272 else distance_range2:SetWidth(range05 * height_value)
2273 distance_number:SetText(text05)
2274 end
2275 end
2276 end
2277 ---------------------------------------------------------------------------------------------------------------------------------
2278 --MAGE RANGE_2
2279 if (UnitClass("player")==DISTANCE_MAGE) then
2280  
2281 --oor MAGE
2282 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
2283 then
2284 if (distance_layout==false)
2285 then distance_range2:SetHeight(range41 * height_value)
2286 distance_number:SetText(textooR)
2287 else distance_range2:SetWidth(range41 * height_value)
2288 distance_number:SetText(textooR)
2289 end
2290 end
2291 ---------------------------------------------------------
2292 --41 MAGE
2293 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
2294 then
2295 if (distance_layout==false)
2296 then distance_range2:SetHeight(range41 * height_value)
2297 distance_number:SetText(text41)
2298 else distance_range2:SetWidth(range41 * height_value)
2299 distance_number:SetText(text41)
2300 end
2301 end
2302 ---------------------------------------------------------
2303 --35 MAGE FIRE
2304 if (IsActionInRange(yard35)==1) and (UnitIsFriend("player", "target")==nil)
2305 then
2306 if (distance_layout==false)
2307 then distance_range2:SetHeight(rangeFlameThrowing35 * height_value)
2308 distance_number:SetText(textFlameThrowing35)
2309 else distance_range2:SetWidth(rangeFlameThrowing35 * height_value)
2310 distance_number:SetText(textFlameThrowing35)
2311 end
2312 end
2313 ---------------------------------------------------------
2314 --30 MAGE FIRE
2315 if (IsActionInRange(fire_yard30)==1) and (UnitIsFriend("player", "target")==nil)
2316 then
2317 if (distance_layout==false)
2318 then distance_range2:SetHeight(rangeFlameThrowing30 * height_value)
2319 distance_number:SetText(textFlameThrowing30)
2320 else distance_range2:SetWidth(rangeFlameThrowing30 * height_value)
2321 distance_number:SetText(textFlameThrowing30)
2322 end
2323 end
2324  
2325 --30 MAGE FROST
2326 if (IsActionInRange(frost_yard30)==1) and (UnitIsFriend("player", "target")==nil)
2327 then
2328 if (distance_layout==false)
2329 then distance_range2:SetHeight(rangeArcticReach30 * height_value)
2330 distance_number:SetText(textArcticReach30)
2331 else distance_range2:SetWidth(rangeArcticReach30 * height_value)
2332 distance_number:SetText(textArcticReach30)
2333 end
2334 end
2335 ---------------------------------------------------------
2336 --21 MAGE
2337 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
2338 then
2339 if (distance_layout==false)
2340 then distance_range2:SetHeight(rangeFlameThrowing20 * height_value)
2341 distance_number:SetText(textFlameThrowing20)
2342 else distance_range2:SetWidth(rangeFlameThrowing20 * height_value)
2343 distance_number:SetText(textFlameThrowing20)
2344 end
2345 end
2346 ---------------------------------------------------------
2347 --10 MAGE
2348 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
2349 then
2350 if (distance_layout==false)
2351 then distance_range2:SetHeight(range10 * height_value)
2352 distance_number:SetText(text10)
2353 else distance_range2:SetWidth(range10 * height_value)
2354 distance_number:SetText(text10)
2355 end
2356 end
2357 ---------------------------------------------------------
2358 --05 MAGE
2359 --if (CheckInteractDistance("target",1)) and (UnitIsFriend("player", "target")==nil)
2360 -- then distance_range2:SetHeight(range05)
2361 -- distance_number:SetText(text05)
2362 --end
2363 end
2364 ---------------------------------------------------------------------------------------------------------------------------------
2365 --DRUID RANGE_2
2366 if (UnitClass("player")==DISTANCE_DRUID) then
2367  
2368 --oor DRUID
2369 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
2370 then
2371 if (distance_layout==false)
2372 then distance_range2:SetHeight(range41 * height_value)
2373 distance_number:SetText(textooR)
2374 else distance_range2:SetWidth(range41 * height_value)
2375 distance_number:SetText(textooR)
2376 end
2377 end
2378 ---------------------------------------------------------
2379 --30 DRUID
2380 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
2381 then
2382 if (distance_layout==false)
2383 then distance_range2:SetHeight(rangeNaturesReach30 * height_value)
2384 distance_number:SetText(textNaturesReach30)
2385 else distance_range2:SetWidth(rangeNaturesReach30 * height_value)
2386 distance_number:SetText(textNaturesReach30)
2387 end
2388 end
2389 ---------------------------------------------------------
2390 --25 DRUID
2391 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2392 then
2393 if (distance_layout==false)
2394 then distance_range2:SetHeight(range25 * height_value)
2395 distance_number:SetText(text25)
2396 else distance_range2:SetWidth(range25 * height_value)
2397 distance_number:SetText(text25)
2398 end
2399 end
2400 ---------------------------------------------------------
2401 --10 DRUID
2402 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
2403 then
2404 if (distance_layout==false)
2405 then distance_range2:SetHeight(range10 * height_value)
2406 distance_number:SetText(text10)
2407 else distance_range2:SetWidth(range10 * height_value)
2408 distance_number:SetText(text10)
2409 end
2410 end
2411 ---------------------------------------------------------
2412 --05 DRUID
2413 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2414 then
2415 if (distance_layout==false)
2416 then distance_range2:SetHeight(range05 * height_value)
2417 distance_number:SetText(text05)
2418 else distance_range2:SetWidth(range05 * height_value)
2419 distance_number:SetText(text05)
2420 end
2421 end
2422 end
2423 ---------------------------------------------------------------------------------------------------------------------------------
2424 --PALADIN RANGE_2
2425 if (UnitClass("player")==DISTANCE_PALADIN) then
2426  
2427 --oor PALADIN
2428 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
2429 then
2430 if (distance_layout==false)
2431 then distance_range2:SetHeight(range41 * height_value)
2432 distance_number:SetText(textooR)
2433 else distance_range2:SetWidth(range41 * height_value)
2434 distance_number:SetText(textooR)
2435 end
2436 end
2437 ---------------------------------------------------------
2438 --30 PALADIN
2439 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
2440 then
2441 if (distance_layout==false)
2442 then distance_range2:SetHeight(range30 * height_value)
2443 distance_number:SetText(text30)
2444 else distance_range2:SetWidth(range30 * height_value)
2445 distance_number:SetText(text30)
2446 end
2447 end
2448 ---------------------------------------------------------
2449 --25 PALADIN
2450 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2451 then
2452 if (distance_layout==false)
2453 then distance_range2:SetHeight(range25 * height_value)
2454 distance_number:SetText(text25)
2455 else distance_range2:SetWidth(range25 * height_value)
2456 distance_number:SetText(text25)
2457 end
2458 end
2459 ---------------------------------------------------------
2460 --20 PALADIN
2461 if (IsActionInRange(yard20)==1) and (UnitIsFriend("player", "target")==nil)
2462 then
2463 if (distance_layout==false)
2464 then distance_range2:SetHeight(range20 * height_value)
2465 distance_number:SetText(text20)
2466 else distance_range2:SetWidth(range20 * height_value)
2467 distance_number:SetText(text20)
2468 end
2469 end
2470 ---------------------------------------------------------
2471 --10 PALADIN
2472 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
2473 then
2474 if (distance_layout==false)
2475 then distance_range2:SetHeight(range10 * height_value)
2476 distance_number:SetText(text10)
2477 else distance_range2:SetWidth(range10 * height_value)
2478 distance_number:SetText(text10)
2479 end
2480 end
2481 end
2482 ---------------------------------------------------------------------------------------------------------------------------------
2483 --PRIEST RANGE_2
2484 if (UnitClass("player")==DISTANCE_PRIEST) then
2485  
2486 --oor PRIEST
2487 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
2488 then
2489 if (distance_layout==false)
2490 then distance_range2:SetHeight(range41 * height_value)
2491 distance_number:SetText(textooR)
2492 else distance_range2:SetWidth(range41 * height_value)
2493 distance_number:SetText(textooR)
2494 end
2495 end
2496 ---------------------------------------------------------
2497 --40 PRIEST
2498 if (IsActionInRange(yard40)==1) and (UnitIsFriend("player", "target")==nil)
2499 then
2500 if (distance_layout==false)
2501 then distance_range2:SetHeight(range41 * height_value)
2502 distance_number:SetText(text40)
2503 else distance_range2:SetWidth(range41 * height_value)
2504 distance_number:SetText(text40)
2505 end
2506 end
2507 ---------------------------------------------------------
2508 --30 PRIEST
2509 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
2510 then
2511 if (distance_layout==false)
2512 then distance_range2:SetHeight(range30 * height_value)
2513 distance_number:SetText(text30)
2514 else distance_range2:SetWidth(range30 * height_value)
2515 distance_number:SetText(text30)
2516 end
2517 end
2518  
2519 --30 PRIEST HOLY
2520 if (IsActionInRange(holy_yard30)==1) and (UnitIsFriend("player", "target")==nil)
2521 then
2522 if (distance_layout==false)
2523 then distance_range2:SetHeight(rangeHolyReach30 * height_value)
2524 distance_number:SetText(textHolyReach30)
2525 else distance_range2:SetWidth(rangeHolyReach30 * height_value)
2526 distance_number:SetText(textHolyReach30)
2527 end
2528 end
2529  
2530 --30 PRIEST SHADOW
2531 if (IsActionInRange(shadow_yard30)==1) and (UnitIsFriend("player", "target")==nil)
2532 then
2533 if (distance_layout==false)
2534 then distance_range2:SetHeight(rangeShadowReach30 * height_value)
2535 distance_number:SetText(textShadowReach30)
2536 else distance_range2:SetWidth(rangeShadowReach30 * height_value)
2537 distance_number:SetText(textShadowReach30)
2538 end
2539 end
2540 ---------------------------------------------------------
2541 --25 PRIEST
2542 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2543 then
2544 if (distance_layout==false)
2545 then distance_range2:SetHeight(range25 * height_value)
2546 distance_number:SetText(text25)
2547 else distance_range2:SetWidth(range25 * height_value)
2548 distance_number:SetText(text25)
2549 end
2550 end
2551 ---------------------------------------------------------
2552 --20 PRIEST
2553 if (IsActionInRange(yard20)==1) and (UnitIsFriend("player", "target")==nil)
2554 then
2555 if (distance_layout==false)
2556 then distance_range2:SetHeight(range20 * height_value)
2557 distance_number:SetText(text20)
2558 else distance_range2:SetWidth(range20 * height_value)
2559 distance_number:SetText(text20)
2560 end
2561 end
2562 ---------------------------------------------------------
2563 --10 PRIEST
2564 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
2565 then
2566 if (distance_layout==false)
2567 then distance_range2:SetHeight(range10 * height_value)
2568 distance_number:SetText(text10)
2569 else distance_range2:SetWidth(range10 * height_value)
2570 distance_number:SetText(text10)
2571 end
2572 end
2573 end
2574 ---------------------------------------------------------------------------------------------------------------------------------
2575 --WARLOCK RANGE_2
2576 if (UnitClass("player")==DISTANCE_WARLOCK) then
2577  
2578 --oor WARLOCK
2579 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
2580 then
2581 if (distance_layout==false)
2582 then distance_range2:SetHeight(range41 * height_value)
2583 distance_number:SetText(textooR)
2584 else distance_range2:SetWidth(range41 * height_value)
2585 distance_number:SetText(textooR)
2586 end
2587 end
2588 ---------------------------------------------------------
2589 --30 WARLOCK GRIM
2590 if (IsActionInRange(grim_yard30)==1) and (UnitIsFriend("player", "target")==nil)
2591 then
2592 if (distance_layout==false)
2593 then distance_range2:SetHeight(rangeGrimReach30 * height_value)
2594 distance_number:SetText(textGrimReach30)
2595 else distance_range2:SetWidth(rangeGrimReach30 * height_value)
2596 distance_number:SetText(textGrimReach30)
2597 end
2598 end
2599  
2600 --30 WARLOCK DESTRUCTION
2601 if (IsActionInRange(destruction_yard30)==1) and (UnitIsFriend("player", "target")==nil)
2602 then
2603 if (distance_layout==false)
2604 then distance_range2:SetHeight(rangeDestructiveReach30 * height_value)
2605 distance_number:SetText(textDestructiveReach30)
2606 else distance_range2:SetWidth(rangeDestructiveReach30 * height_value)
2607 distance_number:SetText(textDestructiveReach30)
2608 end
2609 end
2610 ---------------------------------------------------------
2611 --25 WARLOCK
2612 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2613 then
2614 if (distance_layout==false)
2615 then distance_range2:SetHeight(range25 * height_value)
2616 distance_number:SetText(text25)
2617 else distance_range2:SetWidth(range25 * height_value)
2618 distance_number:SetText(text25)
2619 end
2620 end
2621 ---------------------------------------------------------
2622 --20 WARLOCK GRIM
2623 if (IsActionInRange(grim_yard20)==1) and (UnitIsFriend("player", "target")==nil)
2624 then
2625 if (distance_layout==false)
2626 then distance_range2:SetHeight(rangeGrimReach20 * height_value)
2627 distance_number:SetText(textGrimReach20)
2628 else distance_range2:SetWidth(rangeGrimReach20 * height_value)
2629 distance_number:SetText(textGrimReach20)
2630 end
2631 end
2632 ---------------------------------------------------------
2633 --10 WARLOCK
2634 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
2635 then
2636 if (distance_layout==false)
2637 then distance_range2:SetHeight(range10 * height_value)
2638 distance_number:SetText(text10)
2639 else distance_range2:SetWidth(range10 * height_value)
2640 distance_number:SetText(text10)
2641 end
2642 end
2643 end
2644 ---------------------------------------------------------------------------------------------------------------------------------
2645 -- WARRIOR RANGE_2
2646 if (UnitClass("player")==DISTANCE_WARRIOR) then
2647  
2648 --oor WARRIOR
2649 if (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
2650 then
2651 if (distance_layout==false)
2652 then distance_range2:SetHeight(range41 * height_value)
2653 distance_number:SetText(textooR)
2654 else distance_range2:SetWidth(range41 * height_value)
2655 distance_number:SetText(textooR)
2656 end
2657 end
2658 ---------------------------------------------------------
2659 --30 WARRIOR
2660 if (IsActionInRange(yard30)==1) and (IsActionInRange(yard10)==0) and (UnitIsFriend("player", "target")==nil)
2661 then
2662 if (distance_layout==false)
2663 then distance_range2:SetHeight(range30 * height_value)
2664 distance_number:SetText(text30)
2665 else distance_range2:SetWidth(range30 * height_value)
2666 distance_number:SetText(text30)
2667 end
2668 end
2669 ---------------------------------------------------------
2670 --25 WARRIOR
2671 if (IsActionInRange(yard25)==1) and (UnitIsFriend("player", "target")==nil)
2672 then
2673 if (distance_layout==false)
2674 then distance_range2:SetHeight(range25 * height_value)
2675 distance_number:SetText(text25)
2676 else distance_range2:SetWidth(range25 * height_value)
2677 distance_number:SetText(text25)
2678 end
2679 end
2680 ---------------------------------------------------------
2681 --10 WARRIOR
2682 if (IsActionInRange(yard10)==1) and (UnitIsFriend("player", "target")==nil)
2683 then
2684 if (distance_layout==false)
2685 then distance_range2:SetHeight(range10 * height_value)
2686 distance_number:SetText(text10)
2687 else distance_range2:SetWidth(range10 * height_value)
2688 distance_number:SetText(text10)
2689 end
2690 end
2691 ---------------------------------------------------------
2692 --08 WARRIOR
2693 if (IsActionInRange(yard10)==1) and (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
2694 then
2695 if (distance_layout==false)
2696 then distance_range2:SetHeight(range08 * height_value)
2697 distance_number:SetText(text08)
2698 else distance_range2:SetWidth(range08 * height_value)
2699 distance_number:SetText(text08)
2700 end
2701 end
2702 ---------------------------------------------------------
2703 --05 WARRIOR
2704 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2705 then
2706 if (distance_layout==false)
2707 then distance_range2:SetHeight(range05 * height_value)
2708 distance_number:SetText(text05)
2709 else distance_range2:SetWidth(range05 * height_value)
2710 distance_number:SetText(text05)
2711 end
2712 end
2713 end
2714 ---------------------------------------------------------------------------------------------------------------------------------
2715 --ROGUE RANGE_2
2716 if (UnitClass("player")==DISTANCE_ROGUE) then
2717  
2718 --oor ROGUE
2719 if (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
2720 then
2721 if (distance_layout==false)
2722 then distance_range2:SetHeight(range41 * height_value)
2723 distance_number:SetText(textooR)
2724 else distance_range2:SetWidth(range41 * height_value)
2725 distance_number:SetText(textooR)
2726 end
2727 end
2728 ---------------------------------------------------------
2729 --30 ROGUE
2730 if (IsActionInRange(yard30)==1)
2731 and (IsActionInRange(yard10)==0)
2732 and (UnitIsFriend("player", "target")==nil)
2733 then
2734 if (distance_layout==false)
2735 then distance_range2:SetHeight(range30 * height_value)
2736 distance_number:SetText(text30)
2737 else distance_range2:SetWidth(range30 * height_value)
2738 distance_number:SetText(text30)
2739 end
2740 end
2741 ---------------------------------------------------------
2742 --25 ROGUE
2743 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2744 then
2745 if (distance_layout==false)
2746 then distance_range2:SetHeight(range25 * height_value)
2747 distance_number:SetText(text25)
2748 else distance_range2:SetWidth(range25 * height_value)
2749 distance_number:SetText(text25)
2750 end
2751 end
2752 ---------------------------------------------------------
2753 --10 ROGUE
2754 if (IsActionInRange(yard10)==1) and (UnitIsFriend("player", "target")==nil)
2755 then
2756 if (distance_layout==false)
2757 then distance_range2:SetHeight(range10 * height_value)
2758 distance_number:SetText(text10)
2759 else distance_range2:SetWidth(range10 * height_value)
2760 distance_number:SetText(text10)
2761 end
2762 end
2763 ---------------------------------------------------------
2764 --08 ROGUE
2765 if (IsActionInRange(yard10)==1)
2766 and (IsActionInRange(yard30)==0)
2767 and (UnitIsFriend("player", "target")==nil)
2768 then
2769 if (distance_layout==false)
2770 then distance_range2:SetHeight(range08 * height_value)
2771 distance_number:SetText(text08)
2772 else distance_range2:SetWidth(range08 * height_value)
2773 distance_number:SetText(text08)
2774 end
2775 end
2776 ---------------------------------------------------------
2777 --05 ROGUE
2778 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2779 then
2780 if (distance_layout==false)
2781 then distance_range2:SetHeight(range05 * height_value)
2782 distance_number:SetText(text05)
2783 else distance_range2:SetWidth(range05 * height_value)
2784 distance_number:SetText(text05)
2785 end
2786 end
2787 end
2788  
2789 distance_frame.TimeSinceLastUpdate = 0;
2790  
2791 end
2792 end
2793 ---------------------------------------------------------------------------------------------------------------------------------
2794 ---------------------------------------------------------------------------------------------------------------------------------
2795 --OnUpdate range RED
2796 function distance_range3_OnUpdate(arg1)
2797  
2798 if distance_layout==false
2799 then
2800 distance_range_color3:SetTexture(distance_bar_texture_h)
2801 distance_range_color3:SetVertexColor(barcolor.b3_color_h_r, barcolor.b3_color_h_g, barcolor.b3_color_h_b);
2802 distance_color_bar3:SetTexture(distance_bar_texture_w)
2803 distance_color_bar3:SetVertexColor(barcolor.b3_color_w_r, barcolor.b3_color_w_g, barcolor.b3_color_w_b);
2804 else
2805 distance_range_color3:SetTexture(distance_bar_texture_w)
2806 distance_range_color3:SetVertexColor(barcolor.b3_color_w_r, barcolor.b3_color_w_g, barcolor.b3_color_w_b);
2807 distance_color_bar3:SetTexture(distance_bar_texture_w)
2808 distance_color_bar3:SetVertexColor(barcolor.b3_color_w_r, barcolor.b3_color_w_g, barcolor.b3_color_w_b);
2809 end
2810  
2811 distance_frame.TimeSinceLastUpdate = distance_frame.TimeSinceLastUpdate + arg1;
2812 if (distance_frame.TimeSinceLastUpdate > distance_frame_UpdateInterval) then
2813 ---------------------------------------------------------------------------------------------------------------------------------
2814 --HUNTER_RANGE_3
2815 if (UnitClass("player")==DISTANCE_HUNTER) then
2816 --oor HUNTER
2817 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==0) and (UnitIsFriend("player", "target")==nil)
2818 then
2819 if (distance_layout==false)
2820 then distance_range3:SetHeight(rangeHawkEye * height_value)
2821 else distance_range3:SetWidth(rangeHawkEye * height_value)
2822 end
2823 end
2824 ---------------------------------------------------------
2825 --41 HUNTER
2826 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
2827 then
2828 if (distance_layout==false)
2829 then distance_range3:SetHeight(range30 * height_value)
2830 else distance_range3:SetWidth(range30 * height_value)
2831 end
2832 end
2833 ---------------------------------------------------------
2834 --30 HUNTER
2835 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
2836 then
2837 if (distance_layout==false)
2838 then distance_range3:SetHeight(range25 * height_value)
2839 else distance_range3:SetWidth(range25 * height_value)
2840 end
2841 end
2842 ---------------------------------------------------------
2843 --25 HUNTER
2844 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2845 then
2846 if (distance_layout==false)
2847 then distance_range3:SetHeight(range21 * height_value)
2848 else distance_range3:SetWidth(range21 * height_value)
2849 end
2850 end
2851 ---------------------------------------------------------
2852 --21 HUNTER
2853 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
2854 then
2855 if (distance_layout==false)
2856 then distance_range3:SetHeight(range08 * height_value)
2857 else distance_range3:SetWidth(range08 * height_value)
2858 end
2859 end
2860 ---------------------------------------------------------
2861 --08 HUNTER
2862 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
2863 then
2864 if (distance_layout==false)
2865 then distance_range3:SetHeight(range05 * height_value)
2866 else distance_range3:SetWidth(range05 * height_value)
2867 end
2868 end
2869 ---------------------------------------------------------
2870 --05 HUNTER
2871 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2872 then
2873 if (distance_layout==false)
2874 then distance_range3:SetHeight(range00 * height_value)
2875 else distance_range3:SetWidth(range00 * height_value)
2876 end
2877 end
2878 end
2879 ---------------------------------------------------------------------------------------------------------------------------------
2880 --SHAMAN RANGE_3
2881 if (UnitClass("player")==DISTANCE_SHAMAN) then
2882  
2883 --oor SHAMAN
2884 if (UnitIsVisible("target"))
2885 then
2886 if (distance_layout==false)
2887 then distance_range3:SetHeight(range41 * height_value)
2888 else distance_range3:SetWidth(range41 * height_value)
2889 end
2890 end
2891 ---------------------------------------------------------
2892 --41 SHAMAN ENEMY
2893 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
2894 then
2895 if (distance_layout==false)
2896 then distance_range3:SetHeight(rangeStormReach * height_value)
2897 else distance_range3:SetWidth(rangeStormReach * height_value)
2898 end
2899 end
2900  
2901 --41 SHAMAN FRIEND
2902 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
2903 then
2904 if (distance_layout==false)
2905 then distance_range3:SetHeight(range30 * height_value)
2906 else distance_range3:SetWidth(range30 * height_value)
2907 end
2908 end
2909  
2910 ---------------------------------------------------------
2911 --30 SHAMAN ENEMY
2912 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
2913 then
2914 if (distance_layout==false)
2915 then distance_range3:SetHeight(range25 * height_value)
2916 else distance_range3:SetWidth(range25 * height_value)
2917 end
2918 end
2919  
2920 --30 SHAMAN FRIEND
2921 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
2922 then
2923 if (distance_layout==false)
2924 then distance_range3:SetHeight(range25 * height_value)
2925 else distance_range3:SetWidth(range25 * height_value)
2926 end
2927 end
2928 ---------------------------------------------------------
2929 --25 SHAMAN
2930 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
2931 then
2932 if (distance_layout==false)
2933 then distance_range3:SetHeight(range20 * height_value)
2934 else distance_range3:SetWidth(range20 * height_value)
2935 end
2936 end
2937  
2938 --25 SHAMAN FRIEND
2939 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==1)
2940 then
2941 if (distance_layout==false)
2942 then distance_range3:SetHeight(range10 * height_value)
2943 else distance_range3:SetWidth(range10 * height_value)
2944 end
2945 end
2946 ---------------------------------------------------------
2947 --21 SHAMAN
2948 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
2949 then
2950 if (distance_layout==false)
2951 then distance_range3:SetHeight(range10 * height_value)
2952 else distance_range3:SetWidth(range10 * height_value)
2953 end
2954 end
2955 ---------------------------------------------------------
2956 --10 SHAMAN ENEMY
2957 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
2958 then
2959 if (distance_layout==false)
2960 then distance_range3:SetHeight(range05 * height_value)
2961 else distance_range3:SetWidth(range05 * height_value)
2962 end
2963 end
2964  
2965 --10 SHAMAN FRIEND
2966 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==1)
2967 then
2968 if (distance_layout==false)
2969 then distance_range3:SetHeight(range00 * height_value)
2970 else distance_range3:SetWidth(range00 * height_value)
2971 end
2972 end
2973 ---------------------------------------------------------
2974 --05 SHAMAN ENEMY
2975 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
2976 then
2977 if (distance_layout==false)
2978 then distance_range3:SetHeight(range00 * height_value)
2979 else distance_range3:SetWidth(range00 * height_value)
2980 end
2981 end
2982  
2983 --05 SHAMAN FRIEND
2984 --if (CheckInteractDistance("target",1)) and (UnitIsFriend("player", "target")==1)
2985 -- then distance_range3:SetHeight(range00)
2986 --end
2987 end
2988 ---------------------------------------------------------------------------------------------------------------------------------
2989 --MAGE RANGE_3
2990 if (UnitClass("player")==DISTANCE_MAGE) then
2991  
2992 --oor MAGE
2993 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
2994 then
2995 if (distance_layout==false)
2996 then distance_range3:SetHeight(range41 * height_value)
2997 else distance_range3:SetWidth(range41 * height_value)
2998 end
2999 end
3000 ---------------------------------------------------------
3001 --41 MAGE
3002 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==nil)
3003 then
3004 if (distance_layout==false)
3005 then distance_range3:SetHeight(rangeFlameThrowing35 * height_value)
3006 else distance_range3:SetWidth(rangeFlameThrowing35 * height_value)
3007 end
3008 end
3009 ---------------------------------------------------------
3010 --35 MAGE FIRE
3011 if (IsActionInRange(yard35)==1) and (UnitIsFriend("player", "target")==nil)
3012 then
3013 if (distance_layout==false)
3014 then distance_range3:SetHeight(rangeFlameThrowing30 * height_value)
3015 else distance_range3:SetWidth(rangeFlameThrowing30 * height_value)
3016 end
3017 end
3018  
3019 --35 MAGE FROST
3020 if (IsActionInRange(yard35)==1) and (UnitIsFriend("player", "target")==nil)
3021 then
3022 if (distance_layout==false)
3023 then distance_range3:SetHeight(rangeArcticReach30 * height_value)
3024 else distance_range3:SetWidth(rangeArcticReach30 * height_value)
3025 end
3026 end
3027 ---------------------------------------------------------
3028 --30 MAGE FIRE
3029 if (IsActionInRange(fire_yard30)==1) and (UnitIsFriend("player", "target")==nil)
3030 then
3031 if (distance_layout==false)
3032 then distance_range3:SetHeight(rangeFlameThrowing20 * height_value)
3033 else distance_range3:SetWidth(rangeFlameThrowing20 * height_value)
3034 end
3035 end
3036  
3037 --30 MAGE FROST
3038 if (IsActionInRange(frost_yard30)==1) and (UnitIsFriend("player", "target")==nil)
3039 then
3040 if (distance_layout==false)
3041 then distance_range3:SetHeight(rangeFlameThrowing20 * height_value)
3042 else distance_range3:SetWidth(rangeFlameThrowing20 * height_value)
3043 end
3044 end
3045 ---------------------------------------------------------
3046 --21 MAGE
3047 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==nil)
3048 then
3049 if (distance_layout==false)
3050 then distance_range3:SetHeight(range10 * height_value)
3051 else distance_range3:SetWidth(range10 * height_value)
3052 end
3053 end
3054 ---------------------------------------------------------
3055 --10 MAGE
3056 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
3057 then
3058 if (distance_layout==false)
3059 then distance_range3:SetHeight(range00 * height_value)
3060 else distance_range3:SetWidth(range00 * height_value)
3061 end
3062 end
3063 ---------------------------------------------------------
3064 --05 MAGE
3065 --if (CheckInteractDistance("target",1)) and (UnitIsFriend("player", "target")==nil)
3066 -- then distance_range3:SetHeight(range00)
3067 --end
3068 end
3069 ---------------------------------------------------------------------------------------------------------------------------------
3070 --DRUID RANGE_3
3071 if (UnitClass("player")==DISTANCE_DRUID) then
3072  
3073 --oor DRUID
3074 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
3075 then
3076 if (distance_layout==false)
3077 then distance_range3:SetHeight(range41 * height_value)
3078 else distance_range3:SetWidth(range41 * height_value)
3079 end
3080 end
3081 ---------------------------------------------------------
3082 --30 DRUID
3083 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
3084 then
3085 if (distance_layout==false)
3086 then distance_range3:SetHeight(range25 * height_value)
3087 else distance_range3:SetWidth(range25 * height_value)
3088 end
3089 end
3090 ---------------------------------------------------------
3091 --25 DRUID
3092 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
3093 then
3094 if (distance_layout==false)
3095 then distance_range3:SetHeight(range10 * height_value)
3096 else distance_range3:SetWidth(range10 * height_value)
3097 end
3098 end
3099 ---------------------------------------------------------
3100 --10 DRUID
3101 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
3102 then
3103 if (distance_layout==false)
3104 then distance_range3:SetHeight(range05 * height_value)
3105 else distance_range3:SetWidth(range05 * height_value)
3106 end
3107 end
3108 ---------------------------------------------------------
3109 --05 DRUID
3110 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
3111 then
3112 if (distance_layout==false)
3113 then distance_range3:SetHeight(range00 * height_value)
3114 else distance_range3:SetWidth(range00 * height_value)
3115 end
3116 end
3117 end
3118 ---------------------------------------------------------------------------------------------------------------------------------
3119 --PALADIN RANGE_3
3120 if (UnitClass("player")==DISTANCE_PALADIN) then
3121  
3122 --oor PALADIN
3123 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
3124 then
3125 if (distance_layout==false)
3126 then distance_range3:SetHeight(range41 * height_value)
3127 else distance_range3:SetWidth(range41 * height_value)
3128 end
3129 end
3130 ---------------------------------------------------------
3131 --40 PALADIN FRIEND
3132 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
3133 then
3134 if (distance_layout==false)
3135 then distance_range3:SetHeight(range30 * height_value)
3136 else distance_range3:SetWidth(range30 * height_value)
3137 end
3138 end
3139 ---------------------------------------------------------
3140 --30 PALADIN ENEMY
3141 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
3142 then
3143 if (distance_layout==false)
3144 then distance_range3:SetHeight(range25 * height_value)
3145 else distance_range3:SetWidth(range25 * height_value)
3146 end
3147 end
3148  
3149 --30 PALADIN FRIEND
3150 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
3151 then
3152 if (distance_layout==false)
3153 then distance_range3:SetHeight(range25 * height_value)
3154 else distance_range3:SetWidth(range25 * height_value)
3155 end
3156 end
3157 ---------------------------------------------------------
3158 --25 PALADIN
3159 if (CheckInteractDistance("target",4))
3160 then
3161 if (distance_layout==false)
3162 then distance_range3:SetHeight(range20 * height_value)
3163 else distance_range3:SetWidth(range20 * height_value)
3164 end
3165 end
3166 ---------------------------------------------------------
3167 --20 PALADIN ENEMY
3168 if (IsActionInRange(yard20)==1) and (UnitIsFriend("player", "target")==nil)
3169 then
3170 if (distance_layout==false)
3171 then distance_range3:SetHeight(range10 * height_value)
3172 else distance_range3:SetWidth(range10 * height_value)
3173 end
3174 end
3175  
3176 --20 PALADIN FRIEND
3177 if (IsActionInRange(friendyard20)==1) and (UnitIsFriend("player", "target")==1)
3178 then
3179 if (distance_layout==false)
3180 then distance_range3:SetHeight(range10 * height_value)
3181 else distance_range3:SetWidth(range10 * height_value)
3182 end
3183 end
3184 ---------------------------------------------------------
3185 --10 PALADIN ENEMY
3186 if (CheckInteractDistance("target",3))
3187 then
3188 if (distance_layout==false)
3189 then distance_range3:SetHeight(range00 * height_value)
3190 else distance_range3:SetWidth(range00 * height_value)
3191 end
3192 end
3193 end
3194 ---------------------------------------------------------------------------------------------------------------------------------
3195 --PRIEST RANGE_3
3196 if (UnitClass("player")==DISTANCE_PRIEST) then
3197  
3198 --oor PRIEST
3199 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
3200 then
3201 if (distance_layout==false)
3202 then distance_range3:SetHeight(range41 * height_value)
3203 else distance_range3:SetWidth(range41 * height_value)
3204 end
3205 end
3206 ---------------------------------------------------------
3207 --40 PRIEST ENEMY
3208 if (IsActionInRange(yard40)==1) and (UnitIsFriend("player", "target")==nil)
3209 then
3210 if (distance_layout==false)
3211 then distance_range3:SetHeight(range30 * height_value)
3212 else distance_range3:SetWidth(range30 * height_value)
3213 end
3214 end
3215  
3216 --40 PRIEST ENEMY HOLY
3217 if (IsActionInRange(yard40)==1) and (UnitIsFriend("player", "target")==nil)
3218 then
3219 if (distance_layout==false)
3220 then distance_range3:SetHeight(rangeHolyReach30 * height_value)
3221 else distance_range3:SetWidth(rangeHolyReach30 * height_value)
3222 end
3223 end
3224  
3225 --40 PRIEST ENEMY SHADOW
3226 if (IsActionInRange(yard40)==1) and (UnitIsFriend("player", "target")==nil)
3227 then
3228 if (distance_layout==false)
3229 then distance_range3:SetHeight(rangeHolyReach30 * height_value)
3230 else distance_range3:SetWidth(rangeHolyReach30 * height_value)
3231 end
3232 end
3233  
3234 --40 PRIEST FRIEND
3235 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
3236 then
3237 if (distance_layout==false)
3238 then distance_range3:SetHeight(range30 * height_value)
3239 else distance_range3:SetWidth(range30 * height_value)
3240 end
3241 end
3242 ---------------------------------------------------------
3243 --30 PRIEST ENEMY
3244 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
3245 then
3246 if (distance_layout==false)
3247 then distance_range3:SetHeight(range25 * height_value)
3248 else distance_range3:SetWidth(range25 * height_value)
3249 end
3250 end
3251  
3252 --30 PRIEST HOLY
3253 if (IsActionInRange(holy_yard30)==1) and (UnitIsFriend("player", "target")==nil)
3254 then
3255 if (distance_layout==false)
3256 then distance_range3:SetHeight(range25 * height_value)
3257 else distance_range3:SetWidth(range25 * height_value)
3258 end
3259 end
3260  
3261 --30 PRIEST SHADOW
3262 if (IsActionInRange(shadow_yard30)==1) and (UnitIsFriend("player", "target")==nil)
3263 then
3264 if (distance_layout==false)
3265 then distance_range3:SetHeight(range25 * height_value)
3266 else distance_range3:SetWidth(range25 * height_value)
3267 end
3268 end
3269  
3270 --30 PRIEST FRIEND
3271 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
3272 then
3273 if (distance_layout==false)
3274 then distance_range3:SetHeight(range25 * height_value)
3275 else distance_range3:SetWidth(range25 * height_value)
3276 end
3277 end
3278 ---------------------------------------------------------
3279 --25 PRIEST
3280 if (CheckInteractDistance("target",4))
3281 then
3282 if (distance_layout==false)
3283 then distance_range3:SetHeight(range20 * height_value)
3284 else distance_range3:SetWidth(range20 * height_value)
3285 end
3286 end
3287 ---------------------------------------------------------
3288 --20 PRIEST ENEMY
3289 if (IsActionInRange(yard20)==1) and (UnitIsFriend("player", "target")==nil)
3290 then
3291 if (distance_layout==false)
3292 then distance_range3:SetHeight(range10 * height_value)
3293 else distance_range3:SetWidth(range10 * height_value)
3294 end
3295 end
3296 ---------------------------------------------------------
3297 --10 PRIEST
3298 if (CheckInteractDistance("target",3))
3299 then
3300 if (distance_layout==false)
3301 then distance_range3:SetHeight(range00 * height_value)
3302 else distance_range3:SetWidth(range00 * height_value)
3303 end
3304 end
3305 end
3306 ---------------------------------------------------------------------------------------------------------------------------------
3307 --WARLOCK RANGE_3
3308 if (UnitClass("player")==DISTANCE_WARLOCK) then
3309  
3310 --oor WARLOCK
3311 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==nil)
3312 then
3313 if (distance_layout==false)
3314 then distance_range3:SetHeight(range41 * height_value)
3315 else distance_range3:SetWidth(range41 * height_value)
3316 end
3317 end
3318 ---------------------------------------------------------
3319 --30 WARLOCK GRIM
3320 if (IsActionInRange(grim_yard30)==1) and (UnitIsFriend("player", "target")==nil)
3321 then
3322 if (distance_layout==false)
3323 then distance_range3:SetHeight(range25 * height_value)
3324 else distance_range3:SetWidth(range25 * height_value)
3325 end
3326 end
3327  
3328 --30 WARLOCK DESTRUCTION
3329 if (IsActionInRange(destruction_yard30)==1) and (UnitIsFriend("player", "target")==nil)
3330 then
3331 if (distance_layout==false)
3332 then distance_range3:SetHeight(range25 * height_value)
3333 else distance_range3:SetWidth(range25 * height_value)
3334 end
3335 end
3336 ---------------------------------------------------------
3337 --25 WARLOCK
3338 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
3339 then
3340 if (distance_layout==false)
3341 then distance_range3:SetHeight(rangeGrimReach20 * height_value)
3342 else distance_range3:SetWidth(rangeGrimReach20 * height_value)
3343 end
3344 end
3345 ---------------------------------------------------------
3346 --20 WARLOCK GRIM
3347 if (IsActionInRange(grim_yard20)==1) and (UnitIsFriend("player", "target")==nil)
3348 then
3349 if (distance_layout==false)
3350 then distance_range3:SetHeight(range10 * height_value)
3351 else distance_range3:SetWidth(range10 * height_value)
3352 end
3353 end
3354 ---------------------------------------------------------
3355 --10 WARLOCK
3356 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==nil)
3357 then
3358 if (distance_layout==false)
3359 then distance_range3:SetHeight(range00 * height_value)
3360 else distance_range3:SetWidth(range00 * height_value)
3361 end
3362 end
3363 end
3364 ---------------------------------------------------------------------------------------------------------------------------------
3365 -- WARRIOR RANGE_3
3366 if (UnitClass("player")==DISTANCE_WARRIOR) then
3367  
3368 --oor WARRIOR
3369 if (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
3370 then
3371 if (distance_layout==false)
3372 then distance_range3:SetHeight(range41 * height_value)
3373 else distance_range3:SetWidth(range41 * height_value)
3374 end
3375 end
3376 ---------------------------------------------------------
3377 --30 WARRIOR
3378 if (IsActionInRange(yard30)==1) and (IsActionInRange(yard10)==0) and (UnitIsFriend("player", "target")==nil)
3379 then
3380 if (distance_layout==false)
3381 then distance_range3:SetHeight(range25 * height_value)
3382 else distance_range3:SetWidth(range25 * height_value)
3383 end
3384 end
3385 ---------------------------------------------------------
3386 --25 WARRIOR
3387 if (IsActionInRange(yard25)==1) and (UnitIsFriend("player", "target")==nil)
3388 then
3389 if (distance_layout==false)
3390 then distance_range3:SetHeight(range10 * height_value)
3391 else distance_range3:SetWidth(range10 * height_value)
3392 end
3393 end
3394 ---------------------------------------------------------
3395 --10 WARRIOR
3396 if (IsActionInRange(yard10)==1) and (UnitIsFriend("player", "target")==nil)
3397 then
3398 if (distance_layout==false)
3399 then distance_range3:SetHeight(range08 * height_value)
3400 else distance_range3:SetWidth(range08 * height_value)
3401 end
3402 end
3403 ---------------------------------------------------------
3404 --08 WARRIOR
3405 if (IsActionInRange(yard10)==1) and (IsActionInRange(yard30)==0) and (UnitIsFriend("player", "target")==nil)
3406 then
3407 if (distance_layout==false)
3408 then distance_range3:SetHeight(range05 * height_value)
3409 else distance_range3:SetWidth(range05 * height_value)
3410 end
3411 end
3412 ---------------------------------------------------------
3413 --05 WARRIOR
3414 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
3415 then
3416 if (distance_layout==false)
3417 then distance_range3:SetHeight(range00 * height_value)
3418 else distance_range3:SetWidth(range00 * height_value)
3419 end
3420 end
3421 end
3422 ---------------------------------------------------------------------------------------------------------------------------------
3423 --ROGUE RANGE_3
3424 if (UnitClass("player")==DISTANCE_ROGUE) then
3425  
3426 --oor ROGUE
3427 if (IsActionInRange(yard30)==0)
3428 and (IsActionInRange(yard10)==0) or (IsActionInRange(yard10)==nil)
3429 and (UnitIsFriend("player", "target")==nil)
3430 then
3431 if (distance_layout==false)
3432 then distance_range3:SetHeight(range41 * height_value)
3433 else distance_range3:SetWidth(range41 * height_value)
3434 end
3435 end
3436 ---------------------------------------------------------
3437 --30 ROGUE
3438 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==nil)
3439 then
3440 if (distance_layout==false)
3441 then distance_range3:SetHeight(range25 * height_value)
3442 else distance_range3:SetWidth(range25 * height_value)
3443 end
3444 end
3445 ---------------------------------------------------------
3446 --25 ROGUE
3447 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==nil)
3448 then
3449 if (distance_layout==false)
3450 then distance_range3:SetHeight(range10 * height_value)
3451 else distance_range3:SetWidth(range10 * height_value)
3452 end
3453 end
3454 ---------------------------------------------------------
3455 --10 ROGUE
3456 if (IsActionInRange(yard10)==1) and (UnitIsFriend("player", "target")==nil)
3457 then
3458 if (distance_layout==false)
3459 then distance_range3:SetHeight(range08 * height_value)
3460 else distance_range3:SetWidth(range08 * height_value)
3461 end
3462 end
3463 ---------------------------------------------------------
3464 --08 ROGUE
3465 if (IsActionInRange(yard30)==0)
3466 and (IsActionInRange(yard10)==1)
3467 and (UnitIsFriend("player", "target")==nil)
3468 then
3469 if (distance_layout==false)
3470 then distance_range3:SetHeight(range05 * height_value)
3471 else distance_range3:SetWidth(range05 * height_value)
3472 end
3473 end
3474 ---------------------------------------------------------
3475 --05 ROGUE
3476 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==nil)
3477 then
3478 if (distance_layout==false)
3479 then distance_range3:SetHeight(range00 * height_value)
3480 else distance_range3:SetWidth(range00 * height_value)
3481 end
3482 end
3483 end
3484  
3485 distance_frame.TimeSinceLastUpdate = 0;
3486  
3487 end
3488 end
3489 ---------------------------------------------------------------------------------------------------------------------------------
3490 ---------------------------------------------------------------------------------------------------------------------------------
3491 --OnUpdate range GREEN
3492 function distance_range4_OnUpdate(arg1)
3493  
3494 if distance_layout==false
3495 then
3496 distance_range_color4:SetTexture(distance_bar_texture_h)
3497 distance_range_color4:SetVertexColor(barcolor.b4_color_h_r, barcolor.b4_color_h_g, barcolor.b4_color_h_b);
3498 distance_color_bar4:SetTexture(distance_bar_texture_w)
3499 distance_color_bar4:SetVertexColor(barcolor.b4_color_w_r, barcolor.b4_color_w_g, barcolor.b4_color_w_b);
3500 else
3501 distance_range_color4:SetTexture(distance_bar_texture_w)
3502 distance_range_color4:SetVertexColor(barcolor.b4_color_w_r, barcolor.b4_color_w_g, barcolor.b4_color_w_b);
3503 distance_color_bar4:SetTexture(distance_bar_texture_w)
3504 distance_color_bar4:SetVertexColor(barcolor.b4_color_w_r, barcolor.b4_color_w_g, barcolor.b4_color_w_b);
3505 end
3506  
3507 distance_frame.TimeSinceLastUpdate = distance_frame.TimeSinceLastUpdate + arg1;
3508 if (distance_frame.TimeSinceLastUpdate > distance_frame_UpdateInterval) then
3509 ---------------------------------------------------------------------------------------------------------------------------------
3510 --HUNTER RANGE_4
3511 if (UnitClass("player")==DISTANCE_HUNTER) then
3512  
3513 --oor HUNTER
3514 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==0) and (UnitIsFriend("player", "target")==1)
3515 then
3516 if (distance_layout==false)
3517 then distance_range4:SetHeight(range41 * height_value)
3518 distance_number1:SetText(textooR)
3519 else distance_range4:SetWidth(range41 * height_value)
3520 distance_number1:SetText(textooR)
3521 end
3522 end
3523 ---------------------------------------------------------
3524 --41 HUNTER
3525 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==1)
3526 then
3527 if (distance_layout==false)
3528 then distance_range4:SetHeight(rangeHawkEye * height_value)
3529 distance_number1:SetText(textHawkEye)
3530 else distance_range4:SetWidth(rangeHawkEye * height_value)
3531 distance_number1:SetText(textHawkEye)
3532 end
3533 end
3534 ---------------------------------------------------------
3535 --30 HUNTER
3536 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==1)
3537 then
3538 if (distance_layout==false)
3539 then distance_range4:SetHeight(range30 * height_value)
3540 distance_number1:SetText(text30)
3541 else distance_range4:SetWidth(range30 * height_value)
3542 distance_number1:SetText(text30)
3543 end
3544 end
3545 ---------------------------------------------------------
3546 --25 HUNTER
3547 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==1)
3548 then
3549 if (distance_layout==false)
3550 then distance_range4:SetHeight(range25 * height_value)
3551 distance_number1:SetText(text25)
3552 else distance_range4:SetWidth(range25 * height_value)
3553 distance_number1:SetText(text25)
3554 end
3555 end
3556 ---------------------------------------------------------
3557 --21 HUNTER
3558 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==1)
3559 then
3560 if (distance_layout==false)
3561 then distance_range4:SetHeight(range21 * height_value)
3562 distance_number1:SetText(text21)
3563 else distance_range4:SetWidth(range21 * height_value)
3564 distance_number1:SetText(text21)
3565 end
3566 end
3567 ---------------------------------------------------------
3568 --08 HUNTER
3569 if (IsActionInRange(yard41)==0) and (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==1)
3570 then
3571 if (distance_layout==false)
3572 then distance_range4:SetHeight(range08 * height_value)
3573 distance_number1:SetText(text08)
3574 else distance_range4:SetWidth(range08 * height_value)
3575 distance_number1:SetText(text08)
3576 end
3577 end
3578 ---------------------------------------------------------
3579 --05 HUNTER
3580 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==1)
3581 then
3582 if (distance_layout==false)
3583 then distance_range4:SetHeight(range05 * height_value)
3584 distance_number1:SetText(text05)
3585 else distance_range4:SetWidth(range05 * height_value)
3586 distance_number1:SetText(text05)
3587 end
3588 end
3589 end
3590 ---------------------------------------------------------------------------------------------------------------------------------
3591 --SHAMAN RANGE_4
3592 if (UnitClass("player")==DISTANCE_SHAMAN) then
3593  
3594 --oor SHAMAN
3595 if (UnitIsVisible("target")==1) and (UnitIsFriend("player", "target")==1)
3596 then
3597 if (distance_layout==false)
3598 then distance_range4:SetHeight(range41 * height_value)
3599 distance_number1:SetText(textooR)
3600 else distance_range4:SetWidth(range41 * height_value)
3601 distance_number1:SetText(textooR)
3602 end
3603 end
3604 ---------------------------------------------------------
3605 --41 SHAMAN
3606 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
3607 then
3608 if (distance_layout==false)
3609 then distance_range4:SetHeight(range41 * height_value)
3610 distance_number1:SetText(text41)
3611 else distance_range4:SetWidth(range41 * height_value)
3612 distance_number1:SetText(text41)
3613 end
3614 end
3615 ---------------------------------------------------------
3616 --30 SHAMAN
3617 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
3618 then
3619 if (distance_layout==false)
3620 then distance_range4:SetHeight(range30 * height_value)
3621 distance_number1:SetText(text30)
3622 else distance_range4:SetWidth(range30 * height_value)
3623 distance_number1:SetText(text30)
3624 end
3625 end
3626 ---------------------------------------------------------
3627 --25 SHAMAN
3628 if (CheckInteractDistance("target",4)==1) and (UnitIsFriend("player", "target")==1)
3629 then
3630 if (distance_layout==false)
3631 then distance_range4:SetHeight(range25 * height_value)
3632 distance_number1:SetText(text25)
3633 else distance_range4:SetWidth(range25 * height_value)
3634 distance_number1:SetText(text25)
3635 end
3636 end
3637 ---------------------------------------------------------
3638 --10 SHAMAN
3639 if (CheckInteractDistance("target",3)==1) and (UnitIsFriend("player", "target")==1)
3640 then
3641 if (distance_layout==false)
3642 then distance_range4:SetHeight(range10 * height_value)
3643 distance_number1:SetText(text10)
3644 else distance_range4:SetWidth(range10 * height_value)
3645 distance_number1:SetText(text10)
3646 end
3647 end
3648 ---------------------------------------------------------
3649 --05 SHAMAN
3650 --if (CheckInteractDistance("target",1)==1) and (UnitIsFriend("player", "target")==1)
3651 -- then distance_range4:SetHeight(range05)
3652 -- distance_number1:SetText(text05)
3653 --end
3654 end
3655 ---------------------------------------------------------------------------------------------------------------------------------
3656 --MAGE RANGE_4
3657 if (UnitClass("player")==DISTANCE_MAGE) then
3658  
3659 --oor MAGE
3660 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==1)
3661 then
3662 if (distance_layout==false)
3663 then distance_range4:SetHeight(range41 * height_value)
3664 distance_number1:SetText(textooR)
3665 else distance_range4:SetWidth(range41 * height_value)
3666 distance_number1:SetText(textooR)
3667 end
3668 end
3669 ---------------------------------------------------------
3670 --41 MAGE
3671 if (IsActionInRange(yard41)==1) and (UnitIsFriend("player", "target")==1)
3672 then
3673 if (distance_layout==false)
3674 then distance_range4:SetHeight(range41 * height_value)
3675 distance_number1:SetText(text41)
3676 else distance_range4:SetWidth(range41 * height_value)
3677 distance_number1:SetText(text41)
3678 end
3679 end
3680 ---------------------------------------------------------
3681 --35 MAGE FIRE
3682 if (IsActionInRange(yard35)==1) and (UnitIsFriend("player", "target")==1)
3683 then
3684 if (distance_layout==false)
3685 then distance_range4:SetHeight(rangeFlameThrowing35 * height_value)
3686 distance_number1:SetText(textFlameThrowing35)
3687 else distance_range4:SetWidth(rangeFlameThrowing35 * height_value)
3688 distance_number1:SetText(textFlameThrowing35)
3689 end
3690 end
3691 ---------------------------------------------------------
3692 --30 MAGE FIRE
3693 if (IsActionInRange(fire_yard30)==1) and (UnitIsFriend("player", "target")==1)
3694 then
3695 if (distance_layout==false)
3696 then distance_range4:SetHeight(rangeFlameThrowing30 * height_value)
3697 distance_number1:SetText(textFlameThrowing30)
3698 else distance_range4:SetWidth(rangeFlameThrowing30 * height_value)
3699 distance_number1:SetText(textFlameThrowing30)
3700 end
3701 end
3702  
3703 --30 MAGE FROST
3704 if (IsActionInRange(frost_yard30)==1) and (UnitIsFriend("player", "target")==1)
3705 then
3706 if (distance_layout==false)
3707 then distance_range4:SetHeight(rangeArcticReach30 * height_value)
3708 distance_number1:SetText(textArcticReach30)
3709 else distance_range4:SetWidth(rangeArcticReach30 * height_value)
3710 distance_number1:SetText(textArcticReach30)
3711 end
3712 end
3713 ---------------------------------------------------------
3714 --21 MAGE
3715 if (IsActionInRange(yard21)==1) and (UnitIsFriend("player", "target")==1)
3716 then
3717 if (distance_layout==false)
3718 then distance_range4:SetHeight(rangeFlameThrowing20 * height_value)
3719 distance_number1:SetText(textFlameThrowing20)
3720 else distance_range4:SetWidth(rangeFlameThrowing20 * height_value)
3721 distance_number1:SetText(textFlameThrowing20)
3722 end
3723 end
3724 ---------------------------------------------------------
3725 --10 MAGE
3726 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==1)
3727 then
3728 if (distance_layout==false)
3729 then distance_range4:SetHeight(range10 * height_value)
3730 distance_number1:SetText(text10)
3731 else distance_range4:SetWidth(range10 * height_value)
3732 distance_number1:SetText(text10)
3733 end
3734 end
3735 ---------------------------------------------------------
3736 --05 MAGE
3737 --if (CheckInteractDistance("target",1)) and (UnitIsFriend("player", "target")==1)
3738 -- then distance_range4:SetHeight(range05)
3739 -- distance_number1:SetText(text05)
3740 --end
3741 end
3742 ---------------------------------------------------------------------------------------------------------------------------------
3743 --DRUID RANGE_4
3744 if (UnitClass("player")==DISTANCE_DRUID) then
3745  
3746 --oor DRUID
3747 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==1)
3748 then
3749 if (distance_layout==false)
3750 then distance_range4:SetHeight(range41 * height_value)
3751 distance_number1:SetText(textooR)
3752 else distance_range4:SetWidth(range41 * height_value)
3753 distance_number1:SetText(textooR)
3754 end
3755 end
3756 ---------------------------------------------------------
3757 --30 DRUID
3758 if (IsActionInRange(yard30)==1) and (UnitIsFriend("player", "target")==1)
3759 then
3760 if (distance_layout==false)
3761 then distance_range4:SetHeight(rangeNaturesReach30 * height_value)
3762 distance_number1:SetText(textNaturesReach30)
3763 else distance_range4:SetWidth(rangeNaturesReach30 * height_value)
3764 distance_number1:SetText(textNaturesReach30)
3765 end
3766 end
3767 ---------------------------------------------------------
3768 --25 DRUID
3769 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==1)
3770 then
3771 if (distance_layout==false)
3772 then distance_range4:SetHeight(range25 * height_value)
3773 distance_number1:SetText(text25)
3774 else distance_range4:SetWidth(range25 * height_value)
3775 distance_number1:SetText(text25)
3776 end
3777 end
3778 ---------------------------------------------------------
3779 --10 DRUID
3780 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==1)
3781 then
3782 if (distance_layout==false)
3783 then distance_range4:SetHeight(range10 * height_value)
3784 distance_number1:SetText(text10)
3785 else distance_range4:SetWidth(range10 * height_value)
3786 distance_number1:SetText(text10)
3787 end
3788 end
3789 ---------------------------------------------------------
3790 --05 DRUID
3791 if (IsActionInRange(yard05)==1) and (UnitIsFriend("player", "target")==1)
3792 then
3793 if (distance_layout==false)
3794 then distance_range4:SetHeight(range05 * height_value)
3795 distance_number1:SetText(text05)
3796 else distance_range4:SetWidth(range05 * height_value)
3797 distance_number1:SetText(text05)
3798 end
3799 end
3800 end
3801 ---------------------------------------------------------------------------------------------------------------------------------
3802 --PALADIN RANGE_4
3803 if (UnitClass("player")==DISTANCE_PALADIN) then
3804  
3805 --oor PALADIN
3806 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==1)
3807 then
3808 if (distance_layout==false)
3809 then distance_range4:SetHeight(range41 * height_value)
3810 distance_number1:SetText(textooR)
3811 else distance_range4:SetWidth(range41 * height_value)
3812 distance_number1:SetText(textooR)
3813 end
3814 end
3815 ---------------------------------------------------------
3816 --40 PALADIN
3817 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
3818 then
3819 if (distance_layout==false)
3820 then distance_range4:SetHeight(range41 * height_value)
3821 distance_number1:SetText(text40)
3822 else distance_range4:SetWidth(range41 * height_value)
3823 distance_number1:SetText(text40)
3824 end
3825 end
3826 ---------------------------------------------------------
3827 --30 PALADIN
3828 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
3829 then
3830 if (distance_layout==false)
3831 then distance_range4:SetHeight(range30 * height_value)
3832 distance_number1:SetText(text30)
3833 else distance_range4:SetWidth(range30 * height_value)
3834 distance_number1:SetText(text30)
3835 end
3836 end
3837 ---------------------------------------------------------
3838 --25 PALADIN
3839 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==1)
3840 then
3841 if (distance_layout==false)
3842 then distance_range4:SetHeight(range25 * height_value)
3843 distance_number1:SetText(text25)
3844 else distance_range4:SetWidth(range25 * height_value)
3845 distance_number1:SetText(text25)
3846 end
3847 end
3848 ---------------------------------------------------------
3849 --20 PALADIN
3850 if (IsActionInRange(friendyard20)==1) and (UnitIsFriend("player", "target")==1)
3851 then
3852 if (distance_layout==false)
3853 then distance_range4:SetHeight(range20 * height_value)
3854 distance_number1:SetText(text20)
3855 else distance_range4:SetWidth(range20 * height_value)
3856 distance_number1:SetText(text20)
3857 end
3858 end
3859 ---------------------------------------------------------
3860 --10 PALADIN
3861 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==1)
3862 then
3863 if (distance_layout==false)
3864 then distance_range4:SetHeight(range10 * height_value)
3865 distance_number1:SetText(text10)
3866 else distance_range4:SetWidth(range10 * height_value)
3867 distance_number1:SetText(text10)
3868 end
3869 end
3870 end
3871 ---------------------------------------------------------------------------------------------------------------------------------
3872 --PRIEST RANGE_4
3873 if (UnitClass("player")==DISTANCE_PRIEST) then
3874  
3875 --oor PRIEST
3876 if (UnitIsVisible("target")) and (UnitIsFriend("player", "target")==1)
3877 then
3878 if (distance_layout==false)
3879 then distance_range4:SetHeight(range41 * height_value)
3880 distance_number1:SetText(textooR)
3881 else distance_range4:SetWidth(range41 * height_value)
3882 distance_number1:SetText(textooR)
3883 end
3884 end
3885 ---------------------------------------------------------
3886 --40 PRIEST
3887 if (IsActionInRange(friendyard40)==1) and (UnitIsFriend("player", "target")==1)
3888 then
3889 if (distance_layout==false)
3890 then distance_range4:SetHeight(range41 * height_value)
3891 distance_number1:SetText(text40)
3892 else distance_range4:SetWidth(range41 * height_value)
3893 distance_number1:SetText(text40)
3894 end
3895 end
3896 ---------------------------------------------------------
3897 --30 PRIEST
3898 if (IsActionInRange(friendyard30)==1) and (UnitIsFriend("player", "target")==1)
3899 then
3900 if (distance_layout==false)
3901 then distance_range4:SetHeight(range30 * height_value)
3902 distance_number1:SetText(text30)
3903 else distance_range4:SetWidth(range30 * height_value)
3904 distance_number1:SetText(text30)
3905 end
3906 end
3907 ---------------------------------------------------------
3908 --25 PRIEST
3909 if (CheckInteractDistance("target",4)) and (UnitIsFriend("player", "target")==1)
3910 then
3911 if (distance_layout==false)
3912 then distance_range4:SetHeight(range25 * height_value)
3913 distance_number1:SetText(text25)
3914 else distance_range4:SetWidth(range25 * height_value)
3915 distance_number1:SetText(text25)
3916 end
3917 end
3918 ---------------------------------------------------------
3919 --20 PRIEST
3920 --if (IsActionInRange(yard20)==1) and (UnitIsFriend("player", "target")==1)
3921 -- then distance_range4:SetHeight(range20)
3922 -- distance_number1:SetText(text20)
3923 --end
3924 ---------------------------------------------------------
3925 --10 PRIEST
3926 if (CheckInteractDistance("target",3)) and (UnitIsFriend("player", "target")==1)
3927 then
3928 if (distance_layout==false)
3929 then distance_range4:SetHeight(range10 * height_value)
3930 distance_number1:SetText(text10)
3931 else distance_range4:SetWidth(range10 * height_value)
3932 distance_number1:SetText(text10)
3933 end
3934 end
3935 end
3936  
3937 distance_frame.TimeSinceLastUpdate = 0;
3938  
3939 end
3940 end
3941  
3942 ---------------------------------------------------------------------------------------------------------------------------------
3943 function actionspell()
3944 local i=1
3945 for i=1,120 do t = GetActionTexture(i)
3946 break
3947 end
3948 DEFAULT_CHAT_FRAME:AddMessage( i .. '(' .. t.. ')' )
3949 end
3950  
3951 function gettalent()
3952 local numTabs = GetNumTalentTabs();
3953 for t=1, numTabs do
3954 DEFAULT_CHAT_FRAME:AddMessage(GetTalentTabInfo(t)..":");
3955 local numTalents = GetNumTalents(t);
3956 for i=1, numTalents do
3957 nameTalent, icon, tier, column, currRank, maxRank= GetTalentInfo(t,i);
3958 DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
3959 end
3960 end
3961 end
3962  
3963 function getspells()
3964 for i = 1, 250 do t=GetSpellTexture(i, BOOKTYPE_SPELL)
3965 if (t and string.find(t,"Ability_ImpalingBolt"))
3966 then yard41=i
3967 DEFAULT_CHAT_FRAME:AddMessage(i);
3968 DEFAULT_CHAT_FRAME:AddMessage(t);
3969 break
3970 end
3971 end
3972 end
3973  
3974 function distance_check()
3975 DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance Addon: |cFFFF0000Talents checked");
3976 distance_talent_check();
3977 DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00Distance Addon: |cFFFF0000Spells checked");
3978 distance_spell_check();
3979 end
3980 ---------------------------------------------------------------------------------------------------------------------------------
3981 ---------------------------------------------------------------------------------------------------------------------------------