lotrointerface.com
Search Downloads

LoTROInterface SVN Palantir

[/] [trunk/] [DigitalUtopia/] [Palantir/] [DebuffBar.lua] - Rev 127

Compare with Previous | Blame | View Log

import "DigitalUtopia.Palantir";
import "DigitalUtopia.DUInterface";
import "DigitalUtopia.Utilsx";
import "Turbine.UI";
import "Turbine.UI.Lotro";
import "Turbine.Gameplay";
--import "DigitalUtopia.Utilsx.Class";

DebuffBar = class( Turbine.UI.Window );

function DebuffBar:Constructor()
        Turbine.UI.Window.Constructor( self );
                self:SetVisible(true);
                function self:SetDisplayMode(num)
                
                        if(num==1)then
                                self.displayMode=1;
                                --Display Basic Debuff Bar
                                self.bw:SetVisible(false);
                                self.cdHolder:SetVisible(false);
                                self.wChar1:SetVisible(false);
                                self.wChar2:SetVisible(false);
                                self.wInf:SetVisible(false);
                                self.fChar1:SetVisible(false);
                                self.fChar2:SetVisible(false);
                                self.fInf:SetVisible(false);
                                self.dChar1:SetVisible(false);
                                self.dChar2:SetVisible(false);
                                self.dInf:SetVisible(false);
                                self.pChar1:SetVisible(false);
                                self.pChar2:SetVisible(false);
                                self.pInf:SetVisible(false);
                                self.qsWindow:SetVisible(false);
                        else
                                self.displayMode=2;
                                self.bw:SetVisible(true);
                                self.cdHolder:SetVisible(true);
                                self.qsWindow:SetVisible(true);
                                self:SetOpacity(1);
                                self.updateCounts();
                        end
                        
                end
                
                self.ShowInd = function(bool)
                        if(bool==true)then
                                self.wLit:SetVisible(true);
                                self.fLit:SetVisible(true);
                                self.dLit:SetVisible(true);
                                self.pLit:SetVisible(true);
                        else
                                self.wLit:SetVisible(false);
                                self.fLit:SetVisible(false);
                                self.dLit:SetVisible(false);
                                self.pLit:SetVisible(false);
                        end
                end
                
                self.GetIndicatorCount=function()
                        local val=0;
                        if (self.wLit:IsVisible()==false and self.fLit:IsVisible()==false and self.dLit:IsVisible()==false and self.pLit:IsVisible()==false)then
                                val=0;
                        else
                                val=1;
                        end
                        return val;
                end
                
                self.SetBarOpacity = function(num)
                        self.dbb:SetOpacity(num);
                        self.bbg:SetOpacity(num);
                end
                
                self.SetIndOpacity = function(num)
                        self.wLit:SetOpacity(num);
                        self.fLit:SetOpacity(num);
                        self.dLit:SetOpacity(num);
                        self.pLit:SetOpacity(num);
                        self.cdHolder:SetOpacity(num);
                end
                
                self.showQuickslots = function()
                        self.qsWindow:SetPosition(0,45);
                        self.qsWindow:SetHeight(34);
                        self.wqs:SetSize(32,32);
                        self.wqs:SetPosition(0,0);
                        self.fqs:SetSize(32,32);
                        self.fqs:SetPosition(34,0);
                        self.dqs:SetSize(32,32);
                        self.dqs:SetPosition(68,0);
                        self.pqs:SetSize(32,32);
                        self.pqs:SetPosition(102,0);
                        self.qsWindow:SetOpacity(1);
                        self.wqs:SetVisible(true);
                        self.fqs:SetVisible(true);
                        self.dqs:SetVisible(true);
                        self.pqs:SetVisible(true);
                end
        
                self.hideQuickslots = function()
                        self.qsWindow:SetPosition(10,5);
                        self.qsWindow:SetHeight(60);
                        self.wqs:SetPosition(3,0);
                        self.wqs:SetSize(28,25);
                        self.fqs:SetPosition(29,10);
                        self.fqs:SetSize(28,22);
                        self.dqs:SetPosition(55,10);
                        self.dqs:SetSize(28,22);
                        self.pqs:SetPosition(81,0);
                        self.pqs:SetSize(28,25);
                        self.qsWindow:SetOpacity(.01);
                end
                
                self.Refresh = function()
                        
                        wsc = self.wqs:GetShortcut();
                        self.fsc = self.fqs:GetShortcut();
                        dsc = self.dqs:GetShortcut();
                        psc = self.pqs:GetShortcut();
                        if (wsc:GetType() == 0 or self.dm==1)then
                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_mask2.tga");
                                self.wChar1:SetVisible(false);
                                self.wChar2:SetVisible(false);
                                self.wInf:SetVisible(false);
                                self.wBlock=true;
                                self.wCount=0;
                        elseif (wsc:GetType()==2)then
                                if(self.wCount > 0 and self.wCD ~= 0)then
                                        if(self.wTimerOn==false)then
                                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_green2.tga");
                                        else
                                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_red2.tga");
                                        end
                                        self.wBlock=false;
                                else
                                        self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_mask2.tga");
                                        self.wBlock=true;
                                end
                        else
                                        if(self.wTimerOn==false)then
                                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_green2.tga");
                                        else
                                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_red2.tga");
                                        end
                                        self.wBlock=false;
                        end
                                
                        if (self.fsc:GetType() == 0 or self.dm==1)then
                        
                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_mask2.tga");
                                self.fChar1:SetVisible(false);
                                self.fChar2:SetVisible(false);
                                self.fInf:SetVisible(false);
                                self.fBlock=true;
                                self.fCount=0;
                        elseif (self.fsc:GetType()==2)then
                                if(self.fCount > 0 and self.fCD ~= 0)then
                                        
                                        if(self.fTimerOn==false)then
                                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_green2.tga");
                                        else
                                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_red2.tga");
                                        end
                                        self.fBlock=false;
                                else
                                        self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_mask2.tga");
                                        self.fBlock=true;
                                end
                        else
                                        if(self.fTimerOn==false)then
                                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_green2.tga");
                                        else
                                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_red2.tga");
                                        end
                                        self.fBlock=false;
                        end
                        if (dsc:GetType() == 0 or self.dm==1)then
                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_mask2.tga");
                                self.dChar1:SetVisible(false);
                                self.dChar2:SetVisible(false);
                                self.dInf:SetVisible(false);
                                self.dCount=0;
                                self.dBlock=true;
                        elseif (dsc:GetType()==2)then
                
                                if(self.dCount > 0 and self.dCD ~= 0)then
                                
                                        if(self.dTimerOn==false)then
                                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_green2.tga");
                                        else
                                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_red2.tga");
                                        end
                                        self.dBlock=false;
                                else
                                        self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_mask2.tga");
                                        self.dBlock=true;
                                end
                        else
                                        if(self.dTimerOn==false)then
                                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_green2.tga");
                                        else
                                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_red2.tga");
                                        end
                                        self.dBlock=false;
                        end
                        if (psc:GetType() == 0 or self.dm==1)then
                                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_mask2.tga");
                                self.pChar1:SetVisible(false);
                                self.pChar2:SetVisible(false);
                                self.pInf:SetVisible(false);
                                self.pCount=0;
                                self.pBlock=true;
                        elseif (psc:GetType()==2)then
                                if(self.pCount > 0 and self.pCD ~= 0)then
                                        if(self.pTimerOn==false)then
                                                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_green2.tga");
                                        else
                                                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_red2.tga");
                                        end
                                        self.pBlock=false;
                                else
                                        self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_mask2.tga");
                                        self.pBlock=true;
                                end
                        else
                                        
                                        if(self.pTimerOn==false)then
                                                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_green2.tga");
                                        else
                                                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_red2.tga");
                                        end
                                        self.pBlock=false;
                        end
                end
                
                self.bClick = function(qs)
                        qs:SetMouseVisible(false);
                end
                
                self.aClick = function(qs)
                        qs:SetMouseVisible(true);
                end
                
                self.SetNum = function(chra,chrb,slot,num)
                        if (num < 10)then
                                chra:SetVisible(true);
                                        chra:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot"..slot.."/"..string.sub(num,1)..".tga");
                                chrb:SetVisible(false);
                        else
                                chra:SetVisible(true);
                                chrb:SetVisible(true);
                                chra:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot"..slot.."/"..string.sub(num,1,1)..".tga");
                                chrb:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot"..slot.."/"..string.sub(num,2)..".tga");                          
                        end
                end
                
        
        
        
        
        self.getEffects = function()
        el=self.player:GetEffects();
        local wCountx=0;
        local fCountx=0;
        local dCountx=0;
        local pCountx=0;
        
        if(el:GetCount() > 0) then
                
                for x=1,(el:GetCount()) do
                        ef = el:Get(x);
                        if (ef:IsDebuff()==true)then
                                if(ef:GetCategory() == Turbine.Gameplay.EffectCategory.Wound and ef:IsCurable()==true)then
                                        wCountx=wCountx+1;
                                elseif (ef:GetCategory() == Turbine.Gameplay.EffectCategory.Fear and ef:IsCurable()==true)then
                                        fCountx=fCountx+1;
                                elseif (ef:GetCategory() == Turbine.Gameplay.EffectCategory.Disease and ef:IsCurable()==true)then
                                        dCountx=dCountx+1;
                                elseif (ef:GetCategory() == Turbine.Gameplay.EffectCategory.Poison and ef:IsCurable()==true)then
                                        pCountx=pCountx+1;
                                end
                        end
                end
        end     
                if (wCountx > 0)then
                        self.wLit:SetVisible(true);
                else
                        self.wLit:SetVisible(false);
                end
                if (fCountx > 0)then
                        self.fLit:SetVisible(true);
                else
                        self.fLit:SetVisible(false);
                end
                if (dCountx > 0)then
                        self.dLit:SetVisible(true);
                else
                        self.dLit:SetVisible(false);
                end
                if (pCountx > 0)then
                        self.pLit:SetVisible(true);

                else
                        self.pLit:SetVisible(false);

                end
                
                self.indicatorCount=wCountx+fCountx+dCountx+pCountx;
        
end


        self.updateCounts=function()
                wsc = self.wqs:GetShortcut();
                fsc = self.fqs:GetShortcut();
                dsc = self.dqs:GetShortcut();
                psc = self.pqs:GetShortcut();
                if (wsc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                        self.wInf:SetVisible(false);
                        self.SetNum(self.wChar1,self.wChar2,1,self.wCount);
                elseif (wsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                        self.wChar1:SetVisible(false);
                        self.wChar2:SetVisible(false);
                        self.wInf:SetVisible(true);
                end
                if (fsc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                        self.fInf:SetVisible(false);
                        self.SetNum(self.fChar1,self.fChar2,2,self.fCount);
                elseif (fsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                        self.fChar1:SetVisible(false);
                        self.fChar2:SetVisible(false);
                        self.fInf:SetVisible(true);
                end
                if (dsc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                        self.dInf:SetVisible(false);
                        self.SetNum(self.dChar1,self.dChar2,3,self.dCount);
                elseif (dsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                        self.dChar1:SetVisible(false);
                        self.dChar2:SetVisible(false);
                        self.dInf:SetVisible(true);
                end
                if (psc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                        self.pInf:SetVisible(false);
                        self.SetNum(self.pChar1,self.pChar2,4,self.pCount);
                elseif (psc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                        self.pChar1:SetVisible(false);
                        self.pChar2:SetVisible(false);
                        self.pInf:SetVisible(true);
                end
                
        end

        self.updateCooldowns=function(w,f,d,p)
                self.wCD=w;
                self.fCD=f;
                self.dCD=d;
                self.pCD=p;
                self.qslot.sOneCD=self.wCD;
                self.qslot.sTwoCD=self.fCD;
                self.qslot.sThreeCD=self.dCD;
                self.qslot.sFourCD=self.pCD;
                self.Refresh();
        end

        self.displayMode=2;
        self.Override=false;
        self.player=Turbine.Gameplay.LocalPlayer.GetInstance();
        self.wBlock=true;
        self.fBlock=true;
        self.dBlock=true;
        self.pBlock=true;       
        self.indOpacity=.8;
        self.dbOpacity=.5;
        self.qslot={sOneType="",sOneData="",sOneCD="0",sTwoType="",sTwoData="",sTwoCD="0",sThreeType="",sThreeData="",sThreeCD="0",sFourType="",sFourData="",sFourCD="0"};
        self:SetWantsUpdates(true);     
        self:SetSize(134,80);
        self.indicatorCount=0;
        self.dbb=Turbine.UI.Window();
        self.dbb:SetVisible(true);
        self.dbb:SetParent(self);
        self.dbb:SetSize(114,33);
        self.dbb:SetPosition(10,5);
        self.dbb:SetBackground("DigitalUtopia/Palantir/Resources/DBB/dbbc.tga");
        self.dbb:SetVisible(true);
        self.dbb:SetWantsKeyEvents(false);
        self.dbb:SetWantsUpdates(true);
        self.dbb:SetMouseVisible(false);
        self.dbb:SetOpacity(self.dbOpacity);
        self.dbb:SetBlendMode(4);
        self.dbb:SetZOrder(20);
        self.bw=Turbine.UI.Window();
        self.bw:SetSize(90,17);
        self.bw:SetPosition(23,0);
        self.bw:SetParent(self);
        self.bw:SetVisible(true);
        --self.bw:SetBackColor(Turbine.UI.Color(.01,0,0,0));
        --self.bw:SetBlendMode(4);
        --self.bw:SetBackColorBlendMode(2);
        --self.bw:SetStretchMode(2);
        self.bw:SetMouseVisible(false);
        
        self.bbg=Turbine.UI.Window();
        self.bbg:SetVisible(true);
        self.bbg:SetParent(self);
        self.bbg:SetSize(90,17);
        self.bbg:SetPosition(22,0);
        self.bbg:SetZOrder(25);
        self.bbg:SetBackground("DigitalUtopia/Palantir/Resources/DBB/bar_bg.tga");
        self.bbg:SetMouseVisible(false);
        self.bbg:SetOpacity(self.dbOpacity);
        --self.bbg:SetBackColor(Turbine.UI.Color(.01,0,0,0));
        --self.bbg:SetBlendMode(4);
        --self.bbg:SetBackColorBlendMode(4);
        --self.bbg:SetStretchMode(2);
        self.qsWindow=Turbine.UI.Window();
        self.qsWindow:SetVisible(true);
        self.qsWindow:SetParent(self);
        self.qsWindow:SetPosition(10,5);
        self.qsWindow:SetSize(136,60);
        self.qsWindow:SetMouseVisible(false);
        self.qsWindow:SetBackColor(Turbine.UI.Color(.25,1,1,1));

        self.wqs=Turbine.UI.Lotro.Quickslot();
        self.wqs:SetVisible(true);
        self.wqs:SetParent(self.qsWindow);
        self.wqs:SetPosition(3,0);
        self.wqs:SetSize(28,25);
        
        self.fqs=Turbine.UI.Lotro.Quickslot();
        self.fqs:SetVisible(true);
        self.fqs:SetParent(self.qsWindow);
        self.fqs:SetPosition(29,10);
        self.fqs:SetSize(28,22);
        self.dqs=Turbine.UI.Lotro.Quickslot();
        self.dqs:SetVisible(true);
        self.dqs:SetParent(self.qsWindow);
        self.dqs:SetPosition(55,10);
        self.dqs:SetSize(28,22);
        self.pqs=Turbine.UI.Lotro.Quickslot();
        self.pqs:SetVisible(true);
        self.pqs:SetParent(self.qsWindow);
        self.pqs:SetPosition(81,0);
        self.pqs:SetSize(28,25);
        
-- indicator help :)    
        
        self.wqs.MouseEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(true);
                        self.fLit:SetVisible(false);
                        self.dLit:SetVisible(false);
                        self.pLit:SetVisible(false);
                end
        end
        
        self.wqs.DragEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(true);
                        self.fLit:SetVisible(false);
                        self.dLit:SetVisible(false);
                        self.pLit:SetVisible(false);
                end
        end
        
        self.wqs.DragLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                end
        end
        
        self.wqs.MouseLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                end
        end
        
        self.fqs.MouseEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                        self.fLit:SetVisible(true);
                        self.dLit:SetVisible(false);
                        self.pLit:SetVisible(false);
                end
        end
        
        self.fqs.DragEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                        self.fLit:SetVisible(true);
                        self.dLit:SetVisible(false);
                        self.pLit:SetVisible(false);
                end
        end
        
        self.fqs.DragLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.fLit:SetVisible(false);
                end
        end
        
        self.fqs.MouseLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.fLit:SetVisible(false);
                end
        end
        
        self.dqs.MouseEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                        self.fLit:SetVisible(false);
                        self.dLit:SetVisible(true);
                        self.pLit:SetVisible(false);
                end
        end
        
        self.dqs.DragEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                        self.fLit:SetVisible(false);
                        self.dLit:SetVisible(true);
                        self.pLit:SetVisible(false);
                end
        end
        
        self.dqs.DragLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.dLit:SetVisible(false);
                end
        end
        
        self.dqs.MouseLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.dLit:SetVisible(false);
                end
        end
        
        self.pqs.MouseEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                        self.fLit:SetVisible(false);
                        self.pLit:SetVisible(true);
                        self.dLit:SetVisible(false);
                end
        end
        
        self.pqs.DragEnter=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.wLit:SetVisible(false);
                        self.fLit:SetVisible(false);
                        self.pLit:SetVisible(true);
                        self.dLit:SetVisible(false);
                end
        end
        
        self.pqs.DragLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.pLit:SetVisible(false);
                end
        end
        
        self.pqs.MouseLeave=function(sender,args)
                if (self.Override==true and self:GetParent().setupVisible==true)then
                        self.pLit:SetVisible(false);
                end
        end
        
        
        -- wound
        
        self.wCD = 30;
        self.wCount=0;
        self.wTimerOn=false;
        self.wTimer = DigitalUtopia.Utilsx.Timer();
        self.wTimer.AutoReset=true;
        self.wTimer.Interval=1;
        
        self.wLit = Turbine.UI.Window();
        self.wLit:SetParent(self.dbb);
        self.wLit:SetZOrder(27);
        self.wLit:SetSize(34,34);
        self.wLit:SetPosition(0,0);
        self.wLit:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/ind2.tga");
        self.wLit:SetMouseVisible(false);
        self.wLit:SetBlendMode(4);
        self.wLit:SetOpacity(self.indOpacity);
        self.wLit:SetVisible(false);
        
        self.cdHolder=Turbine.UI.Window();
        self.cdHolder:SetVisible(true);
        self.cdHolder:SetParent(self);
        self.cdHolder:SetSize(90,17);
        self.cdHolder:SetPosition(22,0);
        self.wCdInd = Turbine.UI.Control();
        self.wCdInd:SetParent(self.cdHolder)
        self.wCdInd:SetSize(20,10);
        self.wCdInd:SetPosition(2,2);
        self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_green2.tga");
        self.wCdInd:SetZOrder(26);
        self.wCdInd:SetMouseVisible(false); 
        self.wCdInd:SetBlendMode(4);
        
        self.wCdMask=Turbine.UI.Control();
        self.wCdMask:SetParent(self.wCdInd);
        self.wCdMask:SetSize(0,10);                                                             
        self.wCdMask:SetPosition(0,0);                                                        
        self.wCdMask:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_mask2.tga");
        self.wCdMask:SetBlendMode(5);
        self.wCdMask:SetMouseVisible(false); 
        
        
        self.wChar = Turbine.UI.Control();
        self.wChar:SetParent(self);
        self.wChar:SetZOrder(26);
        self.wChar:SetPosition(14,25)
        self.wChar:SetSize(20,16);
        self.wChar:SetMouseVisible(false);
        self.wChar:SetBlendMode(2);
        self.wChar:SetBackColor(Turbine.UI.Color(.01,0,0,0));
        self.wChar:SetBackColorBlendMode(2);
        self.wChar1 = Turbine.UI.Control();
        self.wChar1:SetParent(self.wChar);
        self.wChar1:SetSize(11,11);
        self.wChar1:SetPosition(0,0);
        self.wChar1:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/0.tga");
        self.wChar1:SetVisible(false);
        self.wChar1:SetMouseVisible(false);
        self.wChar1:SetBlendMode(4);
        self.wChar1:SetBackColorBlendMode(4);
        self.wChar2 = Turbine.UI.Control();
        self.wChar2:SetParent(self.wChar);
        self.wChar2:SetSize(11,11);
        self.wChar2:SetPosition(8,3);
        self.wChar2:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/0.tga");
        self.wChar2:SetVisible(false);
        self.wChar2:SetMouseVisible(false);
        self.wChar2:SetBlendMode(4);
        self.wChar2:SetBackColorBlendMode(4);
        self.wInf = Turbine.UI.Control();
        self.wInf:SetParent(self.wChar);
        self.wInf:SetSize(14,11);
        self.wInf:SetPosition(2,1);
        self.wInf:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/inf.tga");
        self.wInf:SetVisible(false);
        self.wInf:SetMouseVisible(false);
        self.wInf:SetBlendMode(4);
        self.wInf:SetBackColorBlendMode(4);
        --self.SetNum(self.wChar1,self.wChar2,9);
        self:hideQuickslots();
        self.wsc=self.wqs:GetShortcut();
        
        self.wqs.ShortcutChanged=function(sender,args)
                self.wCdMask:SetWidth(0);
                self.wTimer:Stop();
                self.wTimerOn=false; 
                self.wBlock=false;
        
                self.wsc=Turbine.UI.Lotro.Shortcut();
                self.wsc=self.wqs:GetShortcut();
                if (self.wsc:GetData() ~= "")then
                        if (self.wsc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                                self.wInf:SetVisible(false);
                                self.wCount=self.wsc:GetItem():GetQuantity();
                                if (self.wCount==0)then
                                        self.wCount=1;
                                end
                                self.witem=self.wsc:GetItem();
                                self.witem.QuantityChanged = function(sender,args)
                                        local oCount=self.wCount;
                                        self.wCount=self.witem:GetQuantity();
                                        self.SetNum(self.wChar1,self.wChar2,1,self.wCount);
                                        if(oCount-self.witem:GetQuantity() == 1)then
                                        
                                                if (self.fInf:IsVisible()==false and self.fBlock==false)then
                                                        self.fCooldown();
                                                end
                                                if (self.dInf:IsVisible()==false and self.dBlock==false)then
                                                        self.dCooldown();
                                                end
                                                if (self.pInf:IsVisible()==false and self.pBlock==false)then
                                                        self.pCooldown();
                                                end
                                                self.wTimer:Start();
                                                self.wTimerOn=true;
                                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_red2.tga");
                                                self.wCdMask:SetWidth(0);
                                                self.wBlock=true;
                                        end
                                end
                                self.SetNum(self.wChar1,self.wChar2,1,self.wCount);
                        elseif (self.wsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                self.wChar1:SetVisible(false);
                                self.wChar2:SetVisible(false);
                                self.wInf:SetVisible(true);
                        end
                        self.qslot.sOneType = self.wsc:GetType();
                        self.qslot.sOneData = self.wsc:GetData();
                        
                end
                self.Refresh();
        end
        
        
        
        self.wCooldown = function ()
                self.wTimer:Start();
                self.wTimerOn=true;
                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_red2.tga");
                self.wCdMask:SetWidth(0);
                self.wBlock=true;
        end
        
        
        self.wqs.MouseClick=function(sender,args)
        
                if(self.wBlock==false)then
                        if (self.wCount==1)then
                                self.wCount = self.wCount - 1;
                                self.wTimer:Start();
                                self.wTimerOn=true;
                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_red2.tga");
                                self.wCdMask:SetWidth(0);
                                self.wBlock=true;
                        end
                        if (self.wsc:GetType() == 2)then
                                if (self.fInf:IsVisible()==false and self.fBlock==false)then
                                        self.fCooldown();
                                end
                                if (self.dInf:IsVisible()==false and self.dBlock==false)then
                                        self.dCooldown();
                                end
                                if (self.pInf:IsVisible()==false and self.pBlock==false)then
                                        self.pCooldown();
                                end
                        elseif (self.wsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                self.wTimer:Start();
                                self.wTimerOn=true;
                                self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_red2.tga");
                                self.wCdMask:SetWidth(0);
                                self.wBlock=true;
                        end
                        

                        if (self.wsc:GetType()==2)then
                                self.SetNum(self.wChar1,self.wChar2,1,self.wCount)
                        end
                        
                end
        end
        
        self.wTimer.TimerElapsed=function(sender,args)
                if (self.wTimer.count == self.wCD or self.wCD==0)then
                        self.wCdMask:SetWidth(0);
                        self.wTimer:Stop();
                        self.wTimerOn=false; 
                        self.wBlock=false;
                        self.wCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot1/bar_green2.tga");
                        self.Refresh();
                else
                        timePct = self.wTimer.count/self.wCD
                        pix = 20 * timePct; 
                        self.wCdMask:SetWidth(0 + pix);
                end
        end
        
        --fear
        self.fCD = 30;
        self.fCount=0;
        self.fTimerOn=false;
        self.fTimer = DigitalUtopia.Utilsx.Timer();
        self.fTimer.AutoReset=true;
        self.fTimer.Interval=1;
        
        self.fLit = Turbine.UI.Window();
        self.fLit:SetParent(self.dbb);
        self.fLit:SetZOrder(28);
        self.fLit:SetSize(28,34);
        self.fLit:SetPosition(30,0);
        self.fLit:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/ind2.tga");
        self.fLit:SetMouseVisible(false);
        self.fLit:SetBlendMode(4);
        self.fLit:SetVisible(false);
        self.fLit:SetOpacity(self.indOpacity);
        
        self.fCdInd = Turbine.UI.Control();
        self.fCdInd:SetParent(self.cdHolder)
        self.fCdInd:SetSize(19,6);
        self.fCdInd:SetPosition(24,10);
        self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_green2.tga");
        self.fCdInd:SetZOrder(26);
        self.fCdInd:SetMouseVisible(false); 
        self.fCdInd:SetBlendMode(4);
        
        self.fCdMask=Turbine.UI.Control();
        self.fCdMask:SetParent(self.fCdInd);
        self.fCdMask:SetSize(0,6);                                                             
        self.fCdMask:SetPosition(0,0);                                                        
        self.fCdMask:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_mask2.tga");
        self.fCdMask:SetBlendMode(4);
        self.fCdMask:SetMouseVisible(false); 
        
        self.fChar = Turbine.UI.Control();
        self.fChar:SetParent(self);
        self.fChar:SetZOrder(26);
        self.fChar:SetPosition(42,31)
        self.fChar:SetSize(20,16);
        self.fChar:SetMouseVisible(false);
        self.fChar:SetBlendMode(2);
        self.fChar:SetBackColor(Turbine.UI.Color(.01,0,0,0));
        self.fChar:SetBackColorBlendMode(2);
        self.fChar1 = Turbine.UI.Control();
        self.fChar1:SetParent(self.fChar);
        self.fChar1:SetSize(10,11);
        self.fChar1:SetPosition(0,3);
        self.fChar1:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/0.tga");
        self.fChar1:SetVisible(false);
        self.fChar1:SetMouseVisible(false);
        self.fChar1:SetBlendMode(4);
        self.fChar1:SetBackColorBlendMode(4);
        self.fChar2 = Turbine.UI.Control();
        self.fChar2:SetParent(self.fChar);
        self.fChar2:SetSize(10,11);
        self.fChar2:SetPosition(8,4);
        self.fChar2:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/0.tga");
        self.fChar2:SetVisible(false);
        self.fChar2:SetMouseVisible(false);
        self.fChar2:SetBlendMode(4);
        self.fChar2:SetBackColorBlendMode(4);
        self.fInf = Turbine.UI.Control();
        self.fInf:SetParent(self.fChar);
        self.fInf:SetSize(15,9);
        self.fInf:SetPosition(2,4);
        self.fInf:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/inf.tga");
        self.fInf:SetVisible(false);
        self.fInf:SetMouseVisible(false);
        self.fInf:SetBlendMode(4);
        self.fInf:SetBackColorBlendMode(4);
        --self.SetNum(self.fChar1,self.fChar2,9);
        self:hideQuickslots();
        self.fqs.ShortcutChanged=function(sender,args)
                
                self.fCdMask:SetWidth(0);
                self.fTimer:Stop();
                self.fTimerOn=false; 
                self.fBlock=false;
                self.fsc=Turbine.UI.Lotro.Shortcut();
                self.fsc=self.fqs:GetShortcut();
                if (self.fsc:GetData() ~= "")then
                        
                        if (self.fsc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                                self.fInf:SetVisible(false);
                                self.fCount=self.fsc:GetItem():GetQuantity();
                                if (self.fCount==0)then
                                        self.fCount=1;
                                end
                                self.fitem=self.fsc:GetItem();
                                self.fitem.QuantityChanged = function(sender,args)
                                        local oCount=self.fCount;
                                        self.fCount=self.fitem:GetQuantity();
                                        self.SetNum(self.fChar1,self.fChar2,2,self.fCount);
                                        if(oCount-self.fitem:GetQuantity() == 1)then
                                                if (self.wInf:IsVisible()==false and self.wBlock==false)then
                                                        self.wCooldown();
                                                end
                                                if (self.dInf:IsVisible()==false and self.dBlock==false)then
                                                        self.dCooldown();
                                                end
                                                if (self.pInf:IsVisible()==false and self.pBlock==false)then
                                                        self.pCooldown();
                                                end
                                                self.fTimer:Start();
                                                self.fTimerOn=true;
                                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_red2.tga");
                                                self.fCdMask:SetWidth(0);
                                                self.fBlock=true;
                                        end
                                end
                                self.SetNum(self.fChar1,self.fChar2,2,self.fCount);
                        elseif (self.fsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                self.fChar1:SetVisible(false);
                                self.fChar2:SetVisible(false);
                                self.fInf:SetVisible(true);
                        end
                        self.qslot.sTwoType = self.fsc:GetType();
                        self.qslot.sTwoData = self.fsc:GetData();
                end
                
                self.Refresh();
        end
        
        
        
        self.fCooldown = function ()
                self.fTimer:Start();
                self.fTimerOn=true;
                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_red2.tga");
                self.fCdMask:SetWidth(0);
                self.fBlock=true;
        end
        
        
        self.fqs.MouseClick=function(sender,args)
        
                if(self.fBlock==false)then
                        if (self.fCount==1)then
                                self.fCount = self.fCount - 1;
                                self.fTimer:Start();
                                self.fTimerOn=true;
                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_red2.tga");
                                self.fCdMask:SetWidth(0);
                                self.fBlock=true;
                        end
                        if (self.fsc:GetType() == 2)then
                                if (self.wInf:IsVisible()==false and self.wBlock==false)then
                                        self.wCooldown();
                                end
                                if (self.dInf:IsVisible()==false and self.dBlock==false)then
                                        self.dCooldown();
                                end
                                if (self.pInf:IsVisible()==false and self.pBlock==false)then
                                        self.pCooldown();
                                end
                        elseif (self.fsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                self.fTimer:Start();
                                self.fTimerOn=true;
                                self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_red2.tga");
                                self.fCdMask:SetWidth(0);
                                self.fBlock=true;
                        end
                        
                        if (self.fsc:GetType()==2)then
                                self.SetNum(self.fChar1,self.fChar2,2,self.fCount)
                        end
                        
                end
        end
        
        self.fTimer.TimerElapsed=function(sender,args)
                if (self.fTimer.count == self.fCD or self.fCD==0)then
                        self.fCdMask:SetWidth(0);
                        self.fTimer:Stop(); 
                        self.fTimerOn=false;
                        self.fBlock=false;
                        self.fCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot2/bar_green2.tga");
                        self.Refresh();
                else
                        timePct = self.fTimer.count/self.fCD
                        pix = 19 * timePct; 
                        self.fCdMask:SetWidth(0 + pix);
                end
        end
        
        --disease
        
        self.dCD = 30;
        self.dCount=0;
        self.dTimerOn=false;
        self.dTimer = DigitalUtopia.Utilsx.Timer();
        self.dTimer.AutoReset=true;
        self.dTimer.Interval=1;
        
        self.dLit = Turbine.UI.Window();
        self.dLit:SetParent(self.dbb);
        self.dLit:SetZOrder(29);
        self.dLit:SetSize(26,34);
        self.dLit:SetPosition(58,0);
        self.dLit:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/ind2.tga");
        self.dLit:SetMouseVisible(false);
        self.dLit:SetOpacity(self.indOpacity);
        self.dLit:SetBlendMode(4);
        self.dLit:SetVisible(false);
        
        self.dCdInd = Turbine.UI.Control();
        self.dCdInd:SetParent(self.cdHolder)
        self.dCdInd:SetSize(19,6);
        self.dCdInd:SetPosition(47,10);
        self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_green2.tga");
        self.dCdInd:SetZOrder(26);
        self.dCdInd:SetMouseVisible(false);
        self.dCdInd:SetBlendMode(4); 
        
        self.dCdMask=Turbine.UI.Control();
        self.dCdMask:SetParent(self.dCdInd);
        self.dCdMask:SetSize(0,6);                                                             
        self.dCdMask:SetPosition(0,0);                                                        
        self.dCdMask:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_mask2.tga");
        self.dCdMask:SetBlendMode(4);
        self.dCdMask:SetMouseVisible(false); 
        
        self.dChar = Turbine.UI.Control();
        self.dChar:SetParent(self);
        self.dChar:SetZOrder(26);
        self.dChar:SetPosition(72,31)
        self.dChar:SetSize(20,16);
        self.dChar:SetMouseVisible(false);
        self.dChar:SetBlendMode(2);
        self.dChar:SetBackColor(Turbine.UI.Color(.01,0,0,0));
        self.dChar:SetBackColorBlendMode(2);
        self.dChar1 = Turbine.UI.Control();
        self.dChar1:SetParent(self.dChar);
        self.dChar1:SetSize(10,10);
        self.dChar1:SetPosition(0,6);
        self.dChar1:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/0.tga");
        self.dChar1:SetVisible(false);
        self.dChar1:SetMouseVisible(false);
        self.dChar1:SetBlendMode(4);
        self.dChar1:SetBackColorBlendMode(4);
        self.dChar2 = Turbine.UI.Control();
        self.dChar2:SetParent(self.dChar);
        self.dChar2:SetSize(10,10);
        self.dChar2:SetPosition(8,5);
        self.dChar2:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/0.tga");
        self.dChar2:SetVisible(false);
        self.dChar2:SetMouseVisible(false);
        self.dChar2:SetBlendMode(4);
        self.dChar2:SetBackColorBlendMode(4);
        self.dInf = Turbine.UI.Control();
        self.dInf:SetParent(self.dChar);
        self.dInf:SetSize(14,9);
        self.dInf:SetPosition(2,4);
        self.dInf:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/inf.tga");
        self.dInf:SetVisible(false);
        self.dInf:SetMouseVisible(false);
        self.dInf:SetBlendMode(4);
        self.dInf:SetBackColorBlendMode(4);
        --self.SetNum(self.dChar1,self.dChar2,9);
        self:hideQuickslots();
        self.dqs.ShortcutChanged=function(sender,args)
                self.dCdMask:SetWidth(0);
                self.dTimer:Stop();
                self.dTimerOn=false; 
                self.dBlock=false;
                self.dsc=Turbine.UI.Lotro.Shortcut();
                self.dsc=self.dqs:GetShortcut();
                if (self.dsc:GetData() ~= "")then
                        if (self.dsc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                                self.dInf:SetVisible(false);
                                self.dCount=self.dsc:GetItem():GetQuantity();
                                if (self.dCount==0)then
                                        self.dCount=1;
                                end
                                self.ditem=self.dsc:GetItem();
                                self.ditem.QuantityChanged = function(sender,args)
                                        local oCount=self.dCount;
                                        self.dCount=self.ditem:GetQuantity();
                                        self.SetNum(self.dChar1,self.dChar2,3,self.dCount);
                                        if((self.dCount-self.ditem:GetQuantity()) == 1)then
                                                if (self.wInf:IsVisible()==false and self.wBlock==false)then
                                                        self.wCooldown();
                                                end
                                                if (self.fInf:IsVisible()==false and self.fBlock==false)then
                                                        self.fCooldown();
                                                end
                                                if (self.pInf:IsVisible()==false and self.pBlock==false)then
                                                        self.pCooldown();
                                                end
                                                self.dTimer:Start();
                                                self.dTimerOn=true;
                                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_red2.tga");
                                                self.dCdMask:SetWidth(0);
                                                self.dBlock=true;
                                        end
                                end
                                self.SetNum(self.dChar1,self.dChar2,3,self.dCount);
                        elseif (self.dsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                self.dChar1:SetVisible(false);
                                self.dChar2:SetVisible(false);
                                self.dInf:SetVisible(true);
                        end
                        self.qslot.sThreeType = self.dsc:GetType();
                        self.qslot.sThreeData = self.dsc:GetData();
                end
                self.Refresh();
        end
        
        
        
        self.dCooldown = function ()
                self.dTimer:Start();
                self.dTimerOn=true;
                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_red2.tga");
                self.dCdMask:SetWidth(0);
                self.dBlock=true;
        end
        
        
        self.dqs.MouseClick=function(sender,args)
        
                if(self.dBlock==false)then
                        if (self.dCount==1)then
                                self.dCount = self.dCount - 1;
                                self.dTimer:Start();
                                self.dTimerOn=true;
                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_red2.tga");
                                self.dCdMask:SetWidth(0);
                                self.dBlock=true;
                        end
                                if (self.dsc:GetType() == 2)then
                                        if (self.wInf:IsVisible()==false and self.wBlock==false)then
                                                self.wCooldown();
                                        end
                                        if (self.fInf:IsVisible()==false and self.fBlock==false)then
                                                self.fCooldown();
                                        end
                                        if (self.pInf:IsVisible()==false and self.pBlock==false)then
                                                self.pCooldown();
                                        end
                                elseif (self.dsc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                        self.dTimer:Start();
                                        self.dTimerOn=true;
                                        self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_red2.tga");
                                        self.dCdMask:SetWidth(0);
                                        self.dBlock=true;
                                end
                                self.dTimer:Start();
                                self.dTimerOn=true;
                                self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_red2.tga");
                                self.dCdMask:SetWidth(0);
                                self.dBlock=true;
                        if (self.dsc:GetType()==2)then
                                self.SetNum(self.dChar1,self.dChar2,3,self.dCount)
                        end
                        
                end
        end
        
        self.dTimer.TimerElapsed=function(sender,args)
                if (self.dTimer.count == self.dCD or self.dCD==0)then
                        self.dCdMask:SetWidth(0);
                        self.dTimer:Stop(); 
                        self.dTimerOn=false;
                        self.aClick(self.dqs);
                        self.dCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot3/bar_green2.tga");
                        self.Refresh();
                else
                        timePct = self.dTimer.count/self.dCD
                        pix = 19 * timePct; 
                        self.dCdMask:SetWidth(0 + pix);
                end
        end
        
        --poison
        
        self.pCD = 0;
        self.pCount=0;
        self.pTimerOn=false;
        self.pTimer = DigitalUtopia.Utilsx.Timer();
        self.pTimer.AutoReset=true;
        self.pTimer.Interval=1;
        
        self.pLit = Turbine.UI.Window();
        self.pLit:SetParent(self.dbb);
        self.pLit:SetZOrder(30);
        self.pLit:SetSize(32,34);
        self.pLit:SetPosition(82,0);
        self.pLit:SetBlendMode(4);
        self.pLit:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/ind2.tga");
        self.pLit:SetMouseVisible(false);
        self.pLit:SetVisible(false);
        self.pLit:SetOpacity(self.indOpacity);

        self.pCdInd = Turbine.UI.Control();
        self.pCdInd:SetParent(self.cdHolder)
        self.pCdInd:SetSize(19,11);
        self.pCdInd:SetPosition(69,1);
        self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_green2.tga");
        self.pCdInd:SetZOrder(26);
        self.pCdInd:SetMouseVisible(false); 
        self.pCdInd:SetBlendMode(4);
        self.pCdMask=Turbine.UI.Control();
        self.pCdMask:SetParent(self.pCdInd);
        self.pCdMask:SetSize(0,11);                                                             
        self.pCdMask:SetPosition(0,0);                                                        
        self.pCdMask:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_mask2.tga");
        self.pCdMask:SetBlendMode(4);
        self.pCdMask:SetMouseVisible(false); 
        self.pCdMask:SetZOrder(27);
        self.pChar = Turbine.UI.Control();
        self.pChar:SetParent(self);
        self.pChar:SetZOrder(26);
        self.pChar:SetPosition(102,23)
        self.pChar:SetSize(20,16);
        self.pChar:SetBlendMode(2);
        self.pChar:SetBackColorBlendMode(2);
        self.pChar:SetMouseVisible(false);
        self.pChar1 = Turbine.UI.Control();
        self.pChar1:SetParent(self.pChar);
        self.pChar1:SetSize(10,11);
        self.pChar1:SetPosition(0,6);
        self.pChar1:SetBlendMode(4);
        self.pChar1:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/0.tga");
        self.pChar1:SetVisible(false);
        self.pChar1:SetMouseVisible(false);
        self.pChar:SetBackColor(Turbine.UI.Color(.01,0,0,0));
        self.pChar1:SetBackColorBlendMode(4);
        self.pChar2 = Turbine.UI.Control();
        self.pChar2:SetParent(self.pChar);
        self.pChar2:SetSize(10,11);
        self.pChar2:SetPosition(8,3);
        self.pChar2:SetBlendMode(4);
        self.pChar2:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/0.tga");
        self.pChar2:SetVisible(false);
        self.pChar2:SetMouseVisible(false);
        self.pChar2:SetBackColorBlendMode(4);
        self.pInf = Turbine.UI.Control();
        self.pInf:SetParent(self.pChar);
        self.pInf:SetSize(14,10);
        self.pInf:SetPosition(1,5);
        self.pInf:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/inf.tga");
        self.pInf:SetVisible(false);
        self.pInf:SetMouseVisible(false);
        self.pInf:SetBlendMode(4);
        self.pInf:SetBackColorBlendMode(4);
        self.psc=Turbine.UI.Lotro.Shortcut();
        --self.pit=Turbine.Gameplay.Item();
        
        
        self:hideQuickslots();
        self.pqs.ShortcutChanged=function(sender,args)
                self.pCdMask:SetWidth(0);
                self.pTimer:Stop();
                self.pTimerOn=false; 
                self.pBlock=false;
                self.psc=Turbine.UI.Lotro.Shortcut();
                self.psc=self.pqs:GetShortcut();
                if (self.psc:GetData() ~= "")then
                        if (self.psc:GetType() == Turbine.UI.Lotro.ShortcutType.Item)then
                                self.pInf:SetVisible(false);
                                self.pCount=self.psc:GetItem():GetQuantity();
                                if (self.pCount==0)then
                                        self.pCount=1;
                                end
                                self.pitem=self.psc:GetItem();
                                self.pitem.QuantityChanged = function(sender,args)
                                        local oCount=self.pCount;
                                        self.pCount=self.pitem:GetQuantity();
                                        self.SetNum(self.pChar1,self.pChar2,4,self.pCount);
                                        if(self.pCount-self.pitem:GetQuantity() == 1)then
                                                if (self.wInf:IsVisible()==false and self.wBlock==false)then
                                                        self.wCooldown();
                                                end
                                                if (self.fInf:IsVisible()==false and self.fBlock==false)then
                                                        self.fCooldown();
                                                end
                                                if (self.dInf:IsVisible()==false and self.dBlock==false)then
                                                        self.dCooldown();
                                                end
                                                self.pTimer:Start();
                                                self.pTimerOn=true;
                                                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_red2.tga");
                                                self.pCdMask:SetWidth(0);
                                                self.pBlock=true;
                                        end
                                end
                                self.SetNum(self.pChar1,self.pChar2,4,self.pCount);
                        elseif (self.psc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                self.pChar1:SetVisible(false);
                                self.pChar2:SetVisible(false);
                                self.pInf:SetVisible(true);
                        end
                        self.qslot.sFourType = self.psc:GetType();
                        self.qslot.sFourData = self.psc:GetData();
                end
                self.Refresh();
        end
        
        
        
        self.pCooldown = function ()
                self.pTimer:Start();
                self.pTimerOn=true;
                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_red2.tga");
                self.pCdMask:SetWidth(0);
                self.pBlock=true;
        end
        
        
        self.pqs.MouseClick=function(sender,args)
        
                if(self.pBlock==false)then
                        if (self.pCount==1)then
                                self.pCount = self.pCount - 1;
                                self.pTimer:Start();
                                self.pTimerOn=true;
                                self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_red2.tga");
                                self.pCdMask:SetWidth(0);
                                self.pBlock=true;
                        end
                                if (self.psc:GetType() == 2)then
                                        if (self.wInf:IsVisible()==false and self.wBlock==false)then
                                                self.wCooldown();
                                        end
                                        if (self.fInf:IsVisible()==false and self.fBlock==false)then
                                                self.fCooldown();
                                        end
                                        if (self.dInf:IsVisible()==false and self.dBlock==false)then
                                                self.dCooldown();
                                        end
                                elseif (self.psc:GetType() == Turbine.UI.Lotro.ShortcutType.Skill)then
                                        self.pTimer:Start();
                                        self.pTimerOn=true;
                                        self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_red2.tga");
                                        self.pCdMask:SetWidth(0);
                                        self.pBlock=true;
                                end
                                
                        if (self.psc:GetType()==2)then
                                self.SetNum(self.pChar1,self.pChar2,4,self.pCount)
                        end
                        
                end
        end
        
        self.pTimer.TimerElapsed=function(sender,args)
                if (self.pTimer.count == self.pCD or self.pCD==0)then
                        self.pCdMask:SetWidth(0);
                        self.pTimer:Stop();
                        self.pTimerOn=false; 
                        self.aClick(self.pqs);
                        self.pCdInd:SetBackground("DigitalUtopia/Palantir/Resources/DBB/Slot4/bar_green2.tga");
                        self.Refresh();
                else
                        timePct = self.pTimer.count/self.pCD
                        pix = 19 * timePct; 
                        self.pCdMask:SetWidth(0 + pix);
                end
                self.qslot.sFourType = psc:GetType();
                self.qslot.sFourData = psc:GetData();
        end
        self.Refresh();
self.Update = function(sender,args)
                if(self.Override==false and self:IsVisible())then
                        self.getEffects();
                                self.dsc = self.dqs:GetShortcut();
                                
                                
                end
        end
end

Compare with Previous | Blame


All times are GMT -5. The time now is 02:51 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui