1. Friends of wowprogramming,

    I have these codes and would like to know if you have something wrong with the second line


     local oficial = 0
     local strings = {}
    
      strings[1] = "hi"
      strings[10] = GetGuildRosterMOTD()
    
     local function onUpdate(self,elapsed)
         oficial = oficial + elapsed
         if oficial >= 900 then
             SendChatMessage(strings[random(1,2)], "OFFICER", GetDefaultLanguage("player"), nil);
             oficial = 0
         end
     end
     local f = CreateFrame("frame")
     f:SetScript("OnUpdate", onUpdate)
    

    I'm pretty sure that should be strings[2].

    Though why not just do local oficial = 0 local strings = {"hi",GetGuildRosterMOTD()}.

    PS: Not sure if GetGuildRosterMOTD() even returns proper results on addon load, though.

    is exactly the problem I'm finding the event "GetGuildRosterMOTD()" is not returning the message of the guild, do not know why

    The GUILD_ROSTER_UPDATE event needs to fire first. The following should do the trick:

    local strings, oficial = {"hi",""},0
    local function onUpdate(self,elapsed)
        oficial = oficial+elapsed
        if oficial >= 900 then
            SendChatMessage(strings[random(1,2)],"OFFICER") -- defaults are automatically used
            oficial = 0
        end
    end
    local function onEvent(self,event)
        if event == "GUILD_ROSTER_UPDATE" then
            strings[2] = GetGuildRosterMOTD()
        end
    end
    local f = CreateFrame("Frame")
    f:SetScript("OnUpdate",onUpdate)
    f:SetScript("OnEvent",onEvent)
    f:RegisterEvent("GUILD_ROSTER_UPDATE")
    GuildRoster()
    

    PS: If you want an entire block to appear as code, indent it.

    thank you my friend ... is working perfectly

    and

    I wonder if there is any command that only changes the position of the enemy's debuff has no move targetframe.

    Table I want to move: http://s9.postimage.org/mz80dl74d/Semttulo_2.png

    is possible to move this frame?

    Try the following (untested):

    hooksecurefunc("TargetFrame_UpdateDebuffAnchor",function(s,gName,index)
        if index == 1 then
            local buff = _G[("%s1"):format(gName)]
            buff:ClearAllPoints()
            buff:SetPoint("TOPLEFT",s,"TOPLEFT",0,0) -- your offsets, 's' is TargetFrame
        end
    end)
    

    my friend is working properly. but I noticed a small detail, at times, the debuffs on my target and standard remain in place only fit for the location I selected the addon after I take an attack or sap. would fix this?

    I couldn't quite find the issue here, sadly. Use this instead:

    local hooked={}
    hooksecurefunc("TargetFrame_UpdateDebuffAnchor",function(s,gName,index)
        if index == 1 then
            local buff = _G[("%s1"):format(gName)]
            buff:ClearAllPoints()
            buff:SetPoint("TOPLEFT",s,"TOPLEFT",0,0) -- your offsets, 's' is TargetFrame
            if not hooked[buff] then
                hooked[buff] = true
                hooksecurefunc(buff,"SetPoint",function() print(debugstack()) end)
            end
        end
    end)
    

    While this will be a bit spammy, it should print every time the debuff icons' position is changed. When the issue occurs again, could you copy the latest debug stack it printed for me, please? That should lead us to the issue.

    I performed some tests and found that I need the commands

    TargetFrameUpdateDebuffAnchor TargetFrameUpdateBuffAnchor

    or a command to do their job

    I used the code you sent me and it was working fine, but if my target was not with no debuff or even out of combat (sometimes), the icons were not shown in the selected position, so I tried to use the codes ...

    local buff local function myFunc(self, gName, index) if index == 1 then

    buff = _G[gName.."1"]
    buff:ClearAllPoints()
    buff:SetPoint("CENTER", self, "CENTER", 230, -650)
    

    end end hooksecurefunc("TargetFrameUpdateBuffAnchor", myFunc) hooksecurefunc("TargetFrameUpdateDebuffAnchor", myFunc)

    Works as I expected, the only problem is that the "TargetFrameUpdateDebuffAnchor" falls over "TargetFrameUpdateBuffAnchor" leaving unclear the screen as the image.

    http://s15.postimage.org/505o9hpo7/Semttulo_1.png http://s18.postimage.org/rjubr0xhh/Semttulo_2.png

    Would fix this?

    Give this a shot:

    if (index == 1) and (gName == "TargetFrameDebuff") then