Language:
Lua     Change language:
Pastebin: 88543
Author: xbiggs // zork
Subject: rFilter2
Created: 2008-05-28 01:09:04
Download and save
Toggle line numbers
1--[[------------------------------------------------------------------------- 
2  Copyright (c) 2008, zork 
3  All rights reserved. 
4 
5  Redistribution and use in source and binary forms, with or without 
6  modification, are permitted provided that the following conditions are 
7  met: 
8 
9      * Redistributions of source code must retain the above copyright 
10        notice, this list of conditions and the following disclaimer. 
11      * Redistributions in binary form must reproduce the above 
12        copyright notice, this list of conditions and the following 
13        disclaimer in the documentation and/or other materials provided 
14        with the distribution. 
15      * Neither the name of rFilter nor the names of its contributors may 
16        be used to endorse or promote products derived from this 
17        software without specific prior written permission. 
18 
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
20  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
21  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
22  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
23  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
24  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
25  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, 
26  DATA, OR PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
27  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
28  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
29  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
30---------------------------------------------------------------------------]] 
31 
32  local addon = CreateFrame"Frame" 
33  local _G = getfenv(0
34  local rf2_player_name, _ = UnitName("player"
35  local _, rf2_player_class = UnitClass("player"
36 
37  ----------------------------------------------------- 
38  -- EDIT YOUR BUFFS/DEBUFFS IN HERE 
39  -- IMPORTANT, TAGS HAVE TO BE UNIQUE!!! 
40  ----------------------------------------------------- 
41 
42  -- to enable the icons OOC, put this to 1 while moving the icons and to 0 when ready 
43  -- 0 = off // 1 = on 
44  local testmode = 0 
45 
46  --DEFAULT_CHAT_FRAME:AddMessage("found "..rf2_player_name.." : "..rf2_player_class) 
47 
48  if rf2_player_class == "HUNTER" then 
49    rf2_spell_list = { 
50      buffs = { 
51        [1] = { tag = "battle", spellid = 2048, size = 32, fontsize = 24, posx = 0, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"}
52        [2] = { tag = "commanding", spellid = 469, size = 32, fontsize = 24, posx = 40, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"}
53      }
54      debuffs = { 
55        [1] = { tag = "demo", spellid = 25203, size = 32, fontsize = 24, posx = 0, posy = 40, framestrata = "BACKGROUND", anchor = "UIParent"}
56        [2] = { tag = "sunder", spellid = 25225, size = 32, fontsize = 24, posx = 40, posy = 40, framestrata = "BACKGROUND", anchor = "UIParent"}
57        [3] = { tag = "clap", spellid = 25264, size = 32, fontsize = 24, posx = 80, posy = 40, framestrata = "BACKGROUND", anchor = "UIParent"}
58        [4] = { tag = "scorpid", spellid = 3043, size = 32, fontsize = 24, posx = 120, posy = 40, framestrata = "BACKGROUND", anchor = "UIParent"}
59      }
60      cooldowns = { 
61        [1] = { tag = "wrath", spellid = 19574, size = 32, fontsize = 24, posx = 0, posy = 80, framestrata = "BACKGROUND", anchor = "UIParent"}
62        [2] = { tag = "rapid", spellid = 3045, size = 32, fontsize = 24, posx = 40, posy = 80, framestrata = "BACKGROUND", anchor = "UIParent"}
63        [3] = { tag = "arcane", spellid = 27019, size = 32, fontsize = 24, posx = 80, posy = 80, framestrata = "BACKGROUND", anchor = "UIParent"}
64      }
65    } 
66  elseif rf2_player_class == "WARRIOR" then 
67    rf2_spell_list = { 
68      buffs = { 
69        [1] = { tag = "battle", spellid = 2048, size = 18, fontsize = 16, posx = -25, posy = -230, framestrata = "BACKGROUND", anchor = "UIParent"}
70        [2] = { tag = "commanding", spellid = 469, size = 18, fontsize = 16, posx = 0, posy = -230, framestrata = "BACKGROUND", anchor = "UIParent"}
71        [3] = { tag = "rampage", spellid = 30033, size = 18, fontsize = 16, posx = 25, posy = -230, framestrata = "BACKGROUND", anchor = "UIParent"}
72        --[3] = { tag = "berserker", spellid = 18499, size = 32, fontsize = 24, posx = 160, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"}, 
73        --[5] = { tag = "block", spellid = 2565, size = 32, fontsize = 24, posx = 80, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"}, 
74      }
75      debuffs = { 
76        [1] = { tag = "sunder", spellid = 25225, size = 18, fontsize = 16, posx = -75, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
77        [2] = { tag = "demo", spellid = 25203, size = 18, fontsize = 16, posx = -50, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
78        [3] = { tag = "clap", spellid = 25264, size = 18, fontsize = 16, posx = -25, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
79        [4] = { tag = "scorpid", spellid = 3043, size = 18, fontsize = 16, posx = 0, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
80        [5] = { tag = "fearie", spellid = 26993, size = 18, fontsize = 16, posx = 25, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
81        [6] = { tag = "fearieferal", spellid = 27011, size = 18, fontsize = 16, posx = 25, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
82        [7] = { tag = "curseofreck", spellid = 27226, size = 18, fontsize = 16, posx = 50, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
83        [8] = { tag = "curseoftong", spellid = 11719, size = 18, fontsize = 16, posx = 75, posy = -200, framestrata = "BACKGROUND", anchor = "UIParent"}
84      }
85      cooldowns = { 
86        [1] = { tag = "bloodrage", spellid = 2687, size = 32, fontsize = 24, posx = -140, posy = -215, framestrata = "BACKGROUND", anchor = "UIParent"}
87        [2] = { tag = "berserkercool", spellid = 18499, size = 32, fontsize = 24, posx = -180, posy = -215, framestrata = "BACKGROUND", anchor = "UIParent"}
88        --[1] = { tag = "revenge", spellid = 30357, size = 32, fontsize = 24, posx = 0, posy = 80, framestrata = "BACKGROUND", anchor = "UIParent"}, 
89        --[2] = { tag = "shieldslam", spellid = 30356, size = 32, fontsize = 24, posx = 40, posy = 80, framestrata = "BACKGROUND", anchor = "UIParent"}, 
90      }
91    } 
92    elseif rf2_player_class == "ROGUE" then 
93    rf2_spell_list = { 
94      buffs = { 
95        [1] = { tag = "slice", spellid = 6774, size = 18, fontsize = 12, posx = -225, posy = -275, framestrata = "BACKGROUND", anchor = "UIParent"}
96        [2] = { tag = "blade", spellid = 13877, size = 18, fontsize = 12, posx = -200, posy = -275, framestrata = "BACKGROUND", anchor = "UIParent"}
97        [3] = { tag = "adrenalin", spellid = 13750, size = 18, fontsize = 12, posx = -175, posy = -275, framestrata = "BACKGROUND", anchor = "UIParent"}
98        [4] = { tag = "cloak", spellid = 31224, size = 18, fontsize = 12, posx = -150, posy = -275, framestrata = "BACKGROUND", anchor = "UIParent"}
99        [5] = { tag = "ghostly", spellid = 14278, size = 18, fontsize = 12, posx = -125, posy = -275, framestrata = "BACKGROUND", anchor = "UIParent"}
100        --[3] = { tag = "berserker", spellid = 18499, size = 32, fontsize = 24, posx = 160, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"}, 
101        --[5] = { tag = "block", spellid = 2565, size = 32, fontsize = 24, posx = 80, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"}, 
102      }
103      debuffs = { 
104        [1] = { tag = "rupture", spellid = 26867, size = 18, fontsize = 12, posx = 50, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
105        [2] = { tag = "deadly", spellid = 27187, size = 18, fontsize = 12, posx = 75, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
106        [3] = { tag = "wound", spellid = 27189, size = 18, fontsize = 12, posx = 100, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
107        [4] = { tag = "mind", spellid = 11399, size = 18, fontsize = 12, posx = 125, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
108        [5] = { tag = "kidney", spellid = 8643, size = 18, fontsize = 12, posx = 150, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
109        [6] = { tag = "cheap", spellid = 1833, size = 18, fontsize = 12, posx = 175, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
110        [7] = { tag = "sap", spellid = 11297, size = 18, fontsize = 12, posx = 200, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
111        [8] = { tag = "exposearmor", spellid = 26866, size = 18, fontsize = 12, posx = 225, posy = -220, framestrata = "BACKGROUND", anchor = "UIParent"}
112        [9] = { tag = "gouge"