1. #1

    Avoiding /yell spam and exceeding 255 characters in macros

    Hi. I'm trying to create a macro that spams /yell once my cooldowns have been succesfully casts. I have two problems with this:

    A) I can do it without the macro being aware that the spell has been cast or not. The result is that I /yell spam as I'm spamming my cooldown until it pops.
    B) I can do it but it exceeds 255 characters.

    Here's what I have bound to my "f" key:

    /cast [target=mouseover,help] Lay on Hands
    /run local name = UnitName("mouseover") f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(s,e,u,p) if u=="player" and p=="Lay on Hands" then SendChatMessage("Casting [Lay on Hands] on " .. name .. ". 7 minute cooldown", "yell", nil, name) end end) f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")

    The end goal is to have that not do anything while LoH is on cooldown, and whenever i mouse hover over a friendly unitframe and hit 'f' and LoH is available, it prints "Casting [Lay on Hands] on (targetname). 7 minute cooldown" only once.

    Unfortunately, this macro is 354 characters.

    Any thoughts?

  2. #2
    Deleted
    I wouldn't do it like that, just causes issues.
    Code:
    local a = CreateFrame("Frame")
    a:SetScript("OnEvent", function(self, event, ...)
        local arg{...}
        self.pguid = self.pguid or UnitGUID("player")
        if arg[2] == "SPELL_CAST_SUCCESS" and arg[9]==633 and arg[3] == self.pguid then
            SendChatMessage("Casting \124cff71d5ff\124Hspell:633\124h[Lay on Hands]\124h\124r on "..arg[7]..". 7 minute cooldown!", "YELL")
        end
    end)
    a:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    How to use. Untested. Report back with feedback.

  3. #3
    there is a actionbar addon called Macaroon that allows you to make macros that are upto 1024 characters in length.

    http://www.wowinterface.com/download...-Macaroon.html

Posting Permissions

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