Here are some macros that are useful on this server.


Companion macros

These macros help you work with the Companions.


macros.jpg Most useful commands

The best commands to macro and keybind somewhere accessible are:

Other commands you might want quick access to:

Most of the others are safe to leave to the CCP addon, but if you want to macro them all, go for it! In particular, using the role arguments with the movement commands like .z comestay can be pretty helpful for positioning your party in dungeons.


dead.jpg Give your Companions orders even if you are dead

You might have noticed that you can't use .z commands while you are dead. That's because the commands are a custom module that isn't native to the client. The default channel is /say, so the client thinks you are just trying to talk in /say, which you cannot do while dead.

There is an easy way around this. Simply prefix your macros with /p. This puts you into the party-chat channel, which you can communicate in whether you are dead or not.

For example:

/p .z start


zfollow.jpg .z follow & .z unfollow 1 button macro

This will use .z follow if your target is friendly; otherwise, it will use .z unfollow.

/run if UnitIsFriend("player", "target") then SendChatMessage(".z follow", "party") else SendChatMessage(".z unfollow", "party")end


General 1.12 macros

These macros are not specific to the Companions, but are generally helpful on this 1.12 server.


findherbs.jpgCombined Find Herbs and Find Minerals

Since you can learn all professions on this server, this macro will switch between Find Herbs and Find Minerals.

/run if n~= 1 then CastSpellByName("Find Herbs") n=1 else CastSpellByName("Find Minerals") n=0 end


listtalents.jpgCombined Shoot macro

This combines all three Shoot abilities into one macro.

/run s="Shoot "r="Crossbow"c=CastSpellByName _,_,i= string.find(GetInventoryItemLink("player",18),"item:(%d+).+%[(.+)%]")_,_,_,_,_,w=GetItemInfo(i)if w==r.."s"then c(s..r)elseif w=="Bows"then c(s.."Bow")else c(s.."Gun")end —CastSpellByName("Shoot Gun")


sinister.jpgAutoattack macro

To use this macro, you should place your Attack ability in the 1st slot of actionbar 2. This is the "page 2" of the main actionbar that most people do not use. In the default UI you can access it by clicking the little arrows next to the actionbar.

/cast Sinister Strike
/script if not IsCurrentAction(13) then AttackTarget() end;


SuperMacros

How to use supermacros:

1. Download SuperMacro. You can get it from Discord in the #downloads section.

2. Unzip it in your Inferface/Addon folder.

3. Open the SuperMacro folder.

4. Open the SM_Extend.lua file with a text editor. I recommend Notepad++

5. Copy the macro code inside the SM_Extend.lua file, at the end of the file.

6. Create a macro in game using the Supermacro addon:

6a. In game press Esc then hit the red Supermacro button.

6b. At the top of the window, press either New account macro or New character macro.

6c. Type in a desired name for your macro and select an icon for it.

6d. In the bottom left panel insert the macro usage command to call the macro, as detailed in the instructions, such as:
/script CompanionBuffMe("Paladin", "Blessing of Might")

6e. Press Save Macro.

6f. Move the macro button to your hotbar.

8. Reload your user interface (can be done by relogging or typing /rl if you use pfUI).

9. Use the macro.

supermacro.jpg

blessing.jpg Order a Companion to buff you

This SuperMacro will let you ask a Companion for a specific buff without needing to change the macro for the Companion's name every time you hire a new one.

Syntax:
/script CompanionBuffMe(class, buff)
Usage:
/script CompanionBuffMe("Paladin", "Blessing of Might")

function IsAlive(id)
    if not id then return end
    if UnitName(id) and (not UnitIsDead(id) and UnitHealth(id)>1 and not UnitIsGhost(id) and UnitIsConnected(id)) then return true end
end

function CompanionBuffMe(class, buff)
    if buffed(buff,"player") then return end
    TargetUnit("player")
    if UnitName("target") ~= UnitName("player") then return end
    if GetNumPartyMembers() == 0 then return end
    local n=GetNumPartyMembers()
    local timer = 0
    IndicatorFrame = CreateFrame("Frame",nil,UIParent)
    IndicatorFrame:SetScript("OnUpdate", function()
        timer = timer + 1
        if (timer == 100) then 
            for i=1,n do
                if UnitName("party"..i) and IsAlive("party"..i) and CheckInteractDistance("party"..i, 4) and UnitClass("party"..i) == class then
                    SendChatMessage("cast "..buff,WHISPER,nil,UnitName("party"..i))
                end
            end
        end 
        if (timer >= 200) then IndicatorFrame:SetScript("OnUpdate", nil) end        
    end)
end

blessing.jpg Hire Companions

This allows you to hire companions using the license in your bags, just like using the CCP addon, but at the press of a single button.

Syntax:
/script HireCompanions()

function HireCompanions()
    local timer = 0
    IndicatorFrame = CreateFrame("Frame",nil,UIParent)
    IndicatorFrame:SetScript("OnUpdate", function()
        if (timer == 200) then 
            SendChatMessage(".z add warrior tank")
        end
        if (timer == 400) then 
            SendChatMessage(".z add paladin tank")
        end
        if (timer == 600) then 
            SendChatMessage(".z add paladin healer")
        end
        if (timer == 800) then 
            SendChatMessage(".z add priest healer")
        end
        timer = timer + 1
        if (timer >= 1000) then IndicatorFrame:SetScript("OnUpdate", nil) end
    end)
end

blessing.jpg Invite Companions

This allows you to hire companions from your entire account. It's particularly useful when you want to hire an entire raid with the press of a button, and especially during the 1 hour period after a server restart when you can hire from anywhere in the world. It doesn't have the same restriction as using the CCP addon because it doesn't look at the licenses in your bag but rather it allows you to use any licenses you have unlocked.

Command Syntax:
.z invite [character name][license][class][role][spec][race][gender][preset]
Syntax:
/script hire(preset name)
Usage:
/script hire("mc")
/script hire("bwl")

local presets = {
    -- Preset 1
    ["mc"] = {
        -- Group 1
        ".z invite holymana t5r warrior tank default human",
        ".z invite tigerbow t4r hunter rangedps default nightelf",
        ".z invite holymoon t4r rogue meleedps default human",
        -- Group 2
        ".z invite holymana t5r warrior tank default human",
        ".z invite tigerbow t4r hunter rangedps default nightelf",
        ".z invite holymoon t4r warrior meleedps default human",
        ".z invite security t4r warrior meleedps default human",
        -- Group 3
        ".z invite holymana t5r warrior tank default human",
        ".z invite tigerbow t4r hunter rangedps default nightelf",
        ".z invite holymoon t4r warrior meleedps default human",
        ".z invite security t4r warrior meleedps default human",
        -- Group 4
        ".z invite holymana t5r warrior tank default human",
        ".z invite tigerbow t4r hunter rangedps default nightelf",
        ".z invite holymoon t4r warrior meleedps default human",
        ".z invite security t4r warrior meleedps default human",        
        -- Group 5
        ".z invite holynova t4r priest healer default dwarf",
        ".z invite holyfreeze t4r paladin healer default dwarf",
        ".z invite holybow t2r mage rangedps default gnome",
        ".z invite holystones t2r warlock rangedps default gnome",
        -- Group 6
        ".z invite holynova t4r priest healer default dwarf",
        ".z invite holyfreeze t4r paladin healer default dwarf",
        ".z invite holybow t2r mage rangedps default gnome",
        ".z invite holystones t2r warlock rangedps default gnome",
        -- Group 7
        ".z invite holynova t4r priest healer default dwarf",
        ".z invite holyfreeze t4r paladin healer default dwarf",
        ".z invite holybow t2r mage rangedps default gnome",
        ".z invite holystones t2r warlock rangedps default gnome",
        -- Group 8
        ".z invite holynova t4r priest healer default dwarf",
        ".z invite holyfreeze t4r druid healer default nightelf",
        ".z invite holybow t2r mage rangedps default gnome",
        ".z invite holystones t2r warlock rangedps default gnome",
    },
    -- Preset 2
    ["bwl"] = {
        ".z add rogue dps",
        ".z add mage dps",
    },
    -- Preset 3
    ["aq40"] = {
        ".z add rogue dps",
        ".z add mage dps",
    },
    -- Preset 4
    ["naxx"] = {
        ".z add rogue dps",
        ".z add mage dps",
    },
    -- Preset 5
    ["zg"] = {
        ".z add rogue dps",
        ".z add mage dps",
    },
    -- Preset 6
    ["ony"] = {
        ".z add rogue dps",
        ".z add mage dps",
    },
}

local function countTableElements(tbl)
    local count = 0
    for _ in pairs(tbl) do count = count + 1 end
    return count
end

function hire(preset)
    local commands = presets[string.lower(preset)]
    if not commands then
        print("Preset for " .. preset .. " not found.")
        return
    end

    local delay = 500  -- Set Delay
    local index = 0
    local elapsed = 0
    local totalCommands = countTableElements(commands)

    local indicatorFrame = CreateFrame("Frame", nil, UIParent)
    indicatorFrame:SetScript("OnUpdate", function(self)

        elapsed = elapsed + 1        
        if elapsed >= delay or index == 0 then
            index = index + 1

            if index <= totalCommands then
                SendChatMessage(elapsed)
                SendChatMessage(commands[index])
                elapsed = 0
            else
                indicatorFrame:SetScript("OnUpdate", nil)
            end
        end
    end)
end