1. #1
    Deleted

    Question Need help with a macro script

    Hey all,

    This macro used to work pre-cataclysm, but now after the release of Cataclysm, it doesn't work anymore.

    What the macro should do, is that the persons whispers the dkp holder (in this case me), and then it'll return that persons dkp in a whisper. The whisper that shows the amount of dkp would then be posted in the raid chat.

    Here is the macro:

    Code:
    /script f = CreateFrame("Frame");f:RegisterEvent("CHAT_MSG_WHISPER");f:SetScript("OnEvent", function()  SendChatMessage(strsub(arg1,22),"RAID");this:UnregisterAllEvents(); end);SendChatMessage("!dkp","WHISPER",nil,"Noiranda");
    Thanks in advance,

    Noiranda

  2. #2
    Deleted
    Could you outline the exact order of whispers you want and what they contain? I'm kind of confused by your explaination.

  3. #3
    Deleted
    Yes of course.

    What I want the macro to do is that a random raid member should be able to click it. The macro will then whisper the webdkp holder which in this scenario is Noiranda. The person that whispered Noiranda will then receive his or her dkp in a whisper. Then that value will be posted into the raid chat where everyone can see it.

    I hope that made it more clear,

    Thanks for helping out

    Noiranda

  4. #4
    Deleted
    Ah.
    Code:
    /run local h,m,s,e="Noiranda",DKPWF,SendChatMessage,"CHAT_MSG_WHISPER" if not m then m=CreateFrame("Frame","DKPWF")m:SetScript("OnEvent",function(a,_,c,d)if d==h then s(c,"RAID")a:UnregisterEvent(e)end end)end m:RegisterEvent(e)s("!dkp","WHISPER",nil,h)
    Phew. There you go.

    The reason your macro wasn't working because it was using the [deprecated since 3.0] autolocals arg1 and this - they now need to specified in the function declaration if you want to use them.

  5. #5
    Deleted
    Hey Treston,

    For some reason the macro is returning !dkp into the raid and not the actual dkp amount.

  6. #6
    Deleted
    Probably because it's the first whisper you receive from yourself. Since you tested it on yourself.

  7. #7
    Deleted
    Yeah, it works now Thanks alot for the help, Treeston.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •