• 0

    posted a message on Need help with toggling a texture based on range.
    hehe
    well I haven't really had that much contact with the guy, I just get stories from my friend.
    One thing I noticed when I visited there was that the USB connections on each computer are filled with something that looked like wall filler to me.

    About the function thing. I got it, sort of, to work. After I stopped looking at wowwiki.
    Got this now.
    local Rangeframe = CreateFrame("Frame", nil, TargetFrame) 
    Rangeframe:SetFrameStrata("BACKGROUND")
    Rangeframe:SetWidth(24)
    Rangeframe:SetHeight(24)
    
    local RangeframeTexture = Rangeframe:CreateTexture(nil,"BACKGROUND")
    RangeframeTexture:SetTexture("Interface\\AddOns\\krammeUI\\Textures\\Ability_Hunter_SniperShot.blp")
    RangeframeTexture:SetAllPoints(Rangeframe)
    Rangeframe.texture = RangeframeTexture
    Rangeframe:SetPoint("TOPLEFT", 9, 3)
    
    local targetchangeframe = CreateFrame("Frame", "kuitargetchangeframe")
    local targetchangeevent = {
        ["PLAYER_TARGET_CHANGED"] = true,
        ["UNIT_FACTION"] = true,
    }
    for event in pairs(targetchangeevent) do
        targetchangeframe:RegisterEvent(event)
    end
    
    targetchangeframe:SetScript("OnEvent", function(self, event)
        if targetchangeevent[event] then
            local inRange = 0
            if UnitExists("target") and UnitCanAttack("player", "target") and not UnitIsDead("target") then --  and IsVisible("target")
                inRange = IsSpellInRange("Auto Shot", "target")
            end
            if inRange==1 then
                Rangeframe:Show()
            else
                Rangeframe:Hide()
            end
        end
    end)
    I commented the IsVisible out, cause it throws an error, thou it is used in the example on the wiki.

    Here's the sort of part.
    It only works if I deselect and select target as I move closer, some sort of repeat of the above is needed.

    I looked at some addons that does the same thing, nudge and another one with "Range" in its name, deleted it again.
    They use something called "ScheduleRepeatingEvent". I assume its Ace too, since it doesn't work with what I got.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Need help with toggling a texture based on range.
    Quote from Seerah

    Curious though, ckramme - why do you say in your file comments that using RedRange is "against policy"?

    A good friend of mine works at a youth club, where they have recently setup 20 computers in a room to only run WoW for all the young kids.

    The facility computer administrator is insane and he will not allow any download of files or installation of any programs, not even by employees.

    The kids have been complaining about the standard UI and my friend talked the admin into allowing a small UI package to be made, but it had to be made by someone who he can talk to in person.

    So I have taken up this thing, with a list of minimum UI requirements made by the kids.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Need help with toggling a texture based on range.
    No i am not, just what information I can find on wowwiki.
    The article on the wiki about events doesn't say that you need ace framework, but maybe thats like basic knowledge :D
    Posted in: Lua Code Discussion
  • 0

    posted a message on Need help with toggling a texture based on range.
    Hey,
    I am trying to get a texture to show when in shooting range.
    This is all part of a bigger addon.
    The code for creating the frame and texture works fine.
    Everything is built from extensive reading at wowwiki.com.

    Here is what I got so far.
    -- Create the frame.
    local Rangeframe = CreateFrame("Frame", nil, TargetFrame) 
    Rangeframe:SetFrameStrata("BACKGROUND")
    Rangeframe:SetWidth(24)
    Rangeframe:SetHeight(24)
    
    -- Create the texture to go in the frame.
    -- Temporary texture, just trying to get it to work.
    local RangeframeTexture = Rangeframe:CreateTexture(nil,"BACKGROUND")
    RangeframeTexture:SetTexture("Interface\\AddOns\\krammeUI\\Textures\\Ability_Hunter_SniperShot.blp")
    RangeframeTexture:SetAllPoints(Rangeframe)
    Rangeframe.texture = RangeframeTexture
    Rangeframe:SetPoint("TOPLEFT", 9, 3)
    
    -- Trying to get the whole appear-when-in-range thing to work.
    -- Using http://www.wowwiki.com/API_IsSpellInRange, but I can't get it working.
    local inRange = 0
    if UnitExists("target") and IsVisible("target") and UnitCanAttack("player", "target") and not UnitIsDead("target") then
        inRange = IsSpellInRange("Auto Shot", "target")
    end
    if inRange==1 then
        Rangeframe:Show()
    else
        Rangeframe:Hide()
    end
    On wowwiki I read about
    obj:RegisterEvent('EVENT', 'Something')
    after which I am supposed to do
    function addon:Something(event, ...)
         My uber-awesome-sauce
    end
    But it will not work...

    I have very little coding experience, I have attached my entire addon lua file, this file is the only coding I have ever done.

    Any help appreciated :D
    Posted in: Lua Code Discussion
  • 0

    posted a message on UI art rework - Let me know what you think
    I absolutely love it! I for one don't mind the border.
    I have no idea how it works, so what would happen if someone uses an addon that changes the default ui frames like fx auctioneer?
    I don't mean the art, but the shape and size.
    Posted in: General Chat
  • 0

    posted a message on BadBoy: An extremely minimal spam blocker & reporter
    Something for the list
    <>
    Posted in: General AddOns
  • 0

    posted a message on Whisp - Makes chatting fun again!
    Get this when pressing enter to open the editbox the first time.
    Date: 2008-07-20 18:32:06
    ID: 55
    Error occured in: Global
    Count: 1
    Message: ..\AddOns\Whisp\modules\EditboxPlugin.lua line 90:
      attempt to index field 'db' (a nil value)
    Debug:
      [C]: ?
      Whisp\modules\EditboxPlugin.lua:90: ?()
      ...face\AddOns\Chatter\Libs\AceHook-3.0\AceHook-3.0.lua:76:
       ...face\AddOns\Chatter\Libs\AceHook-3.0\AceHook-3.0.lua:73
      [C]: Show()
      ..\FrameXML\ChatFrame.lua:2329: ChatFrame_OpenChat()
      [string "OPENCHAT"]:1:
       [string "OPENCHAT"]:1

    Tried without Chatter and it still pops up. Same lib error, different addon.
    Posted in: General AddOns
  • 0

    posted a message on YurrCombatLog - Official Thread (Stable Beta)
    Hi
    Shouldn't disabling Player as source in Buff prevent the cl from showing any buffs I give myself?

    I have attached a ss of the situation, I don't really need to see what I put on, only what others give me.
    Posted in: General AddOns
  • 0

    posted a message on nQuestLog
    Would it be possible for someone to hack in options for hiding when in BG and when Raiding automaticly.
    Manual works, but auto would be sweeter :D
    Posted in: General AddOns
  • 0

    posted a message on Bartender4 - Official Topic
    Hey Nev,
    just wanted to make sure that the option to have standard UI look with Bar4 features, is still in and hasn't been scrubed ;)
    Posted in: General AddOns
  • 0

    posted a message on StatBlocks v1: Official Thread
    How would I go about changing the strata on the statblocks_tracking module?
    I have a kgpanels frame as background with strata 0, but for some reason the tracker will not react to mouse input when above the kgpanels frame.
    Works fine when its outside.

    Nevermind, it is a frame in the mod Chinchilla that isn't really removed, its just invisible.
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    I have a rather big issue with this mod. I am trying to create frames, but usually after a while it fucks up, making the frame I am working on, disappear and every input I do after that point changes the layout of the kg panels frame instead. Picture below.

    http://paard.dk/files/WoWScrnShot_062808_091223.jpg

    I can remove all saved files and start over, but at some point, usually after 2 or 3 created frames it goes wonka. There is no errors or anything.
    Posted in: General AddOns
  • 0

    posted a message on Bartender4 - Official Topic
    Quote from Nevcairiel »

    Planned Features
    • The Alignment Menu (more Details to follow here)
    • Options to control the hiding of the default blizzard artwork (you might still want that to be displayed..)
    • Localization


    I really like the look of the original UI, but the function of it isn't really that great. So really looking forward to the underlined/bolded feature. A few questions thou.

    - Will the BT bars automaticly be in the correct places according to the artwork?
    - You said that you didn't make the key bag and the xp/rep bar, will there then be holes in the art or will it be there, just not working.
    - What about the small latency/fps bar?

    /Fibonacci
    Posted in: General AddOns
  • 0

    posted a message on After XP system restore, WAU won't uninstall/install. (solved)
    Hi
    I had to do a system restore in XP, after the restore I tried to run WAU, but it crashed saying "Application cannot start. Contact the application vendor."

    I have run the .NET installer and repaired the installation with success, or so it says :)

    I have tried uninstalling WAU, but it won't even give an error, its just doesn't work.
    I have tried reinstall WAU through IE7 and FF, getting the crash error.
    I have tried downloading the ZIP folder and installing it locally, getting the same error.

    Dunno if it will help, but attached the exception log as a text file.

    Best Regards
    Fibonacci

    Update: problem fixed
    I am not entirely sure which of the below steps actually worked, but heres how I got it to work when getting the "Application cannot start. Contact the application vendor." error after a system restore.

    Deleted C:\Documents and Settings\<user>\Local Settings\Application Data\apps\2.0

    Deleted the following registry key (Typing regedit in the commandprompt)
    HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide

    Deleted the temp folder in C:\Documents and Settings\<user>\Local Settings\Application Data\Temp\WowAceUpdater

    After this I was able to reinstall WAU and now it works like a charm.
    Posted in: Updaters
  • To post a comment, please or register a new account.