Need help with Castbar script menu

User Tag List

Results 1 to 1 of 1
  1. #1
    wetesla's Avatar Member
    Reputation
    1
    Join Date
    Jan 2016
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with Castbar script

    Hey guys,

    new to this place and also to LUA. I already asked this question in the official WoW Forums but no one seems to care.
    Currently I am working on a Castbar Script that places a Cast Bar with a small border under my player/target/focus frame and changes color if it's not interruptable.

    This is what I have so far:

    Code:
    --PlayerCastBar
    CastingBarFrame:ClearAllPoints()
    CastingBarFrame:SetPoint("Bottom",UIParent,"Bottom", -230, 150)
    CastingBarFrame.SetPoint = function() end
    CastingBarFrame:SetHeight(30)
    CastingBarFrame:SetWidth(225)
    CastingBarFrame:SetStatusBarColor(1,1,1)
    CastingbarFrame.SetStatusBarColor = function() end
    
    --NotWorking
    CastingBarFrameText:ClearAllPoints()
    CastingBarFrameText:SetPoint(Bottom,0,0)
    CastingBarFrameText:SetFont(testFont, 12, "Outline")
    CastingBarFrameBorder:SetTexture(nil)
    CastingBarFrameFlash:SetTexture(nil)
    
    
    --Timers
    CastingBarFrame.timer = CastingBarFrame:CreateFontString(nil);
    CastingBarFrame.timer:SetFont(testFont,12,"OUTLINE");
    CastingBarFrame.timer:SetPoint("TOP", CastingBarFrame, "BOTTOM", 0, 0);
    CastingBarFrame.update = .1;
    
    hooksecurefunc("CastingBarFrame_OnUpdate", function(self, elapsed)
            if not self.timer then return end
            if self.update and self.update < elapsed then
                    if self.casting then
                            self.timer:SetText(format("%2.1f/%1.1f", max(self.maxValue - self.value, 0), self.maxValue))
                    elseif self.channeling then
                            self.timer:SetText(format("%.1f", max(self.value, 0)))
                    else
                            self.timer:SetText("")
                    end
                    self.update = .1
            else
                    self.update = self.update - elapsed
            end
    end)
    My problems are:

    1) The default WoW Border still shows up.
    2) I don't have a clue on how to add a proper spell name and cast time to my bars.
    3) I don't know how to create a border around the cast bar that sticks to it in case if have to adjust the cast bar position.

    May seem like a dumb question but I have never learned a programming language before.

    Cheers

    Need help with Castbar script

Similar Threads

  1. [Lua Script] Need help with 2 Scripts (One Boss, One Gauntlet)
    By controlsx2 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 07-22-2010, 02:42 AM
  2. Need help with Lua script
    By Pieterkii in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 03-04-2010, 07:07 AM
  3. need help with npc script
    By bitty in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-16-2008, 06:21 AM
  4. Need help with my script [lua]
    By Satzen in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 05-18-2008, 05:19 PM
  5. [C++]Need help with my Scripted Item
    By freezer1012 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 01-13-2008, 05:55 PM
All times are GMT -5. The time now is 09:31 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search