Macro Collection

  • Please be careful not to double-post macros, to keep the thread clear as possible

    Hi Guys, there i have a few helpful Macros.

    1. Feed your Pet


    Code
    /script for r=1,99 do FeedPet(x); end;


    x= slot from your Pet




    2. call and remove your Pet faster

    Code
    /script if(IsPetSummoned(x) == false) then SummonPet(x) else ReturnPet(x) end


    x= slot from your Pet




    3. Check the Title-ID from a selected Title


    Code
    /run DEFAULT_CHAT_FRAME:AddMessage("Title Number = "..GetCurrentTitle())



    4. Siegewar Skills



    Code
    /script SetTitleRequest(xxxxxx);
    /wait 0.3
    /script CastSpellByName("yyyyyy");
    /wait 0.3
    /script SetTitleRequest(xxxxxx);

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

    Edited 9 times, last by Nadaná ().

  • **Sigils**

    Code
    /run TargetUnit("Self")
    /wait .1
    /Use (Name of Sigil)




    **Auto Shot**

    Code
    /run enemy = UnitCanAttack("player","target") and (not UnitIsDeadOrGhost("target")); a1,a2,a3,a4,a5,AS = GetActionInfo(3); if enemy and (not AS) then CastSpellByName("Autoshot") end





    **Tikal 1st Boss**

    Code
    /p <BOSS>
    /p 3 4 5
    /p 2 T 6
    /p 1 8 7
    /p <PARTY>


    **Cancel Buff such as Champion transformation or PK mode**

    Code
    /script i= 1; while UnitBuff("player", i) ~= nil do if UnitBuff("player",i) == "(Name of Buff)" then CancelPlayerBuff(i); end; i=i+1; end





    **Dalanis Nightmare Boss Event (Fireeaters)

    Code
    /run a,b,c,d=UnitBuff("target",1); if (d~=506690) then TargetNearestEnemy() end





    Regards,
    antiDevil :!:

  • **Cancel Buff such as Champion transformation or PK mode**
    /script i= 1; while UnitBuff("player", i) ~= nil do if UnitBuff("player",i) == "(Name of Buff)" then CancelPlayerBuff(i); end; i=i+1; end

    you can also use this to disable Buffs >

    Code
    /run a = function(b) local i = 0 repeat i = i + 1 local d = UnitBuff("player",i) if d == b then break end until d == nil return i end
    CancelPlayerBuff(a("xxxxxx"))


    x= name of the Buff


    if it spams something in the chat > check the Linebreak

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

    Edited once, last by Nadaná ().

  • for faster daily quests where you have to use an item on NPCs


    Code
    /script TargetNearestFriend()
    /run UseItemByName("x")


    x = Item you want to use

  • Better use this macro for sigils. After using it, you will have the same target as before.


    Code
    /script FocusUnit(1,"target");
    /script TargetUnit("player")
    /use "Name of Sigil"
    /script TargetUnit("focus1")
    /script FocusUnit(1,"");



    For the Dalanis event you can use this one. Instead of having to spam the macro, it will tab a 100 times or until it found the right monster.


    Code
    /run for i=1,100 do TargetNearestEnemy(IsShiftKeyDown()) a,b,c,d=UnitBuff("target",1) if (d==506690) then break end end



    This macro swaps to the next equipment slot (or 1 when you are at last slot) and returns the pet at the same time.


    Code
    /script SwapEquipmentItem(GetEuipmentNumber()%x)
    /script ReturnPet(y)


    x = max number of equipment slots (for example you have 3 slots, then x = 3, if you have 6 slots, then x = 6)
    y = slot number of your pet



    For feeding your pet, you can also use this version. Here you don't have to select the stack every time.


    Code
    /script for i=1,180 do a,b,name,count = GetBagItemInfo(i) if (name== "x") then PickupBagItem(GetBagItemInfo(i)); break; end end;
    /script ClickPetFeedItem();
    /script for r=1,99 do FeedPet(y); end;


    x = name of item you want to feed
    y = slot number of pet you want to feed



    Macro to cast placeable skills like Thunderstorm with one click.


    Code
    /script CastSpellByName("x")
    /wait 0.1
    /script SpellTargetUnit("target")


    x = name of the skill



    This macro only tabs players. Only useful in pvp so you can use it there to ignore pets. If no player was found after 10 times tabbing, you will have the last monster found in target. So you can still farm the monsters in SW.


    Code
    /run for i=1,10 do TargetNearestEnemy(IsShiftKeyDown()) if UnitIsPlayer("target") then break end end



    This macro binds the tab key to an actionbar place. You can use it in combination with the macro just before.


    Code
    /script SetBindingKey("ACTIONBARXBUTTONY", "TAB");


    The X and Y in "ACTIONBARXBUTTONY" have to be replaced.
    X is the number of actionbar (1-4) and Y is the number of the slot in that actionbar (1-20). You can just try a few times to get the right place.



    This macro binds the tab key back to the normal tab function.


    Code
    /script SetBindingKey("TARGETNEARESTENEMY", "TAB");
  • **Sigils**

    Code
    /run TargetUnit("Self")
    /wait .1
    /Use (Name of Sigil)




    "Self" is not usable, if you want to target yourself you have to use "player". When you use a wrong parameter, you just delete the current target.

  • Code
    /run mytitles = {XXXXXX, YYYYYY, ZZZZZZ} 
    /run mytitleindex = mytitleindex or 0 mytitleindex = (mytitleindex + 1)  SetTitleRequest(mytitles[mytitleindex % #mytitles + 1])


    Title swap macro. Allows you to enter any number of your favorite titles and swap between them with just a click!
    X, Y, Z = title ID's (easy to retrieve using macros already listed in this thread)


    Code
    /run local w=0 for i=1,100 do local _,_,_,d=UnitBuff("player",i) if d==500675 then CancelPlayerBuff(i) w=1 break end end if w==0 then CastSpellByName("Hide") end


    Hide macro (fer the rogues).NOT SURE IF THIS IS USEFUL. Turns the "Hide" skill into toggle (like it was on earlier versions, e.g. Insomnia style). In other words, it enables you to activate and disable "hide" with the same icon.


    Code
    /run for i=1,10 do TargetNearestEnemy(IsShiftKeyDown()) if not UnitMaster("target") then break end end
    /run if UnitMaster("target") then TargetUnit("") end


    Target macro. For sure many have this already. Targets no pets but instead turns to pet masters only (useful in PVP when those darn wardens are five or six tabs away).


    Code
    /script local n=0;while PartnerFrame_GetPartnerInfo(2,n+1)~="" do n=n+1 end;PartnerFrame_CallPartner(2,math.random(n))


    FOR FUN! In case you have multiple mounts in your partner bag this macro will summon one at random for you, making you look more versatile!


    Cheers! :D

  • I am no macro pro but here are a few I used or have modified for my use


    Code
    /run for i=1,100 do n,_,_,id=UnitBuff("player",i) if id==500871 then CancelPlayerBuff(i) break end end/wait .5
    /run for i=1,100 do n,_,_,id=UnitBuff("player",i) if id==506451 then CancelPlayerBuff(i) break end end


    This cancels out Blood arrow and the item set skill "Archers Glory" if it's buff is active.


    Code
    /run LBW = false; for i=1,40 do if UnitBuff("player", i) == "Lightning Burn Weapon" then LBW = true break end end if (LBW) then CastSpellByName("Attack") else CastSpellByName("Lightning Burn Weapon") end


    For W/M checks if Lightning Burn Weapon is active. If not uses LBW. Great for if your phoenix has gone off to quickly re-enable weapon skill.


    Code
    /run SP = false; for i=1,40 do if UnitDebuff("target", i) == "Shadow Prison" then SP = true break end end if (not SP) then CastSpellByName("Shadow Prison") end


    Cast Shadow Prison on target if target is not already under the effect of Shadow Prison


    Code
    /run if GC_GetMouseMoveEnable() then GC_SetMouseMoveEnable(false) else GC_SetMouseMoveEnable(true) end


    Toggles click to move on or off.


    Code
    /script FramerateText:ClearAllAnchors(); FramerateText:SetAnchor("TOPLEFT", "TOPLEFT", WorldFrame, 40, 18); FramerateText:Show();


    Moves the location of the FPS/ZoneID/Ping frame (to top left of screen with current settings)
    can alter location by changing the 40, 18 values


    Code
    /run OpenMail()


    Opens portable mailbox


    Code
    /run OpenAuction()


    Opens portable auction house


    Code
    /run OpenBank()


    Opens Portable Bank


    Code
    /run InviteRideMount("target")


    Invite Target for ride on mount


    Code
    /run MoveRaidMember(6,12)


    Swap raid member via macro. Change 6,12 values to change raid positions you want to swap

  • I'd like to recommend 2 small (and old but still working fine) addons that give you new macro commands to use.


    The first one is calles CancelBuff


    When you have this Addon you can just delete a buff, like Blood Arrow with this macro


    Code
    /uncast Buffname


    An example would be


    Code
    /uncast Blood Arrow


    It obviously is a lot shorter than actually using the normal command, even though the addon only uses the normal macro.




    The next addon is called Titles


    It gives you new macro commands to change titles and setskills.


    You can see the list of macro commands in the link, but I will give you an overview about how it would work with SW skills.


    Code
    /settitle Titlename
    /wait .2
    /cast Skillname
    /lasttitle


    This macro changes to the SW title, uses the skill and then changes back to the title equiped before. So another benefit of using this addon is, that you don't have to choose a specific title to change back to after using a SW skill. And: you don't need to know the ID, yeah.



    Normally when changing setskills with a macro, you would have to delete the setskilltable, then equip all 5 slots again. But when using Titles, you can change setskill slots individual, without affecting the other slots.


    Code
    /setskill x y


    x = slotnumber
    y = setskillname



    Note that all these macros ONLY work, when using the mentioned addons.


  • I've never had trouble with the hide buttons but I do love the target macros, especially like you said with wardens

  • Pet Experience/Training Charm Macro


    Code
    /script local duraValue, duraMax, itemName, duraV, duraM = GetInventoryItemDurable("player", 18 ); if duraValue == 100 and itemName == "Begleitererfahrungsamulett" then UseEquipmentItem( 18 ); end; if not itemName then UseItemByName("Begleitererfahrungsamulett"); end



    german "Begleitererfahrungsamulett" = english "Pet Experience Charm"



    if you wanna use it for Training charms change the Itemname from "Pet Experience Charm" into "Pet Training Charm" and the duraValue from 100 into 10.

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

  • some Macro´s which works with the Raid-Focus.


    Hit/Focus Tank Target

    Code
    /run for i=1,36 do if UnitExists("raid"..i) and UnitIsRaidMainTank("raid"..i) then AssistUnit("raid"..i) end end


    Apply Debuff to Tank-Target without losing your Target, in cases you dont have Boss/Mobs as Target

    Code
    /run for i=1,36 do if UnitExists("raid"..i) and UnitIsRaidMainTank("raid"..i) then FocusUnit(11,"target") AssistUnit("raid"..i) CastSpellByName("Withering Seed") TargetUnit("focus11") FocusUnit(11,"") end end

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

  • i assume there is one, but I am macro noob. I really hate buy pots with gold eggs because its a major pain doing all the clicking. is there a macro to talk to pet vendor, click golden egg, then click enchantment pot? thanks for any help

  • i assume there is one, but I am macro noob. I really hate buy pots with gold eggs because its a major pain doing all the clicking. is there a macro to talk to pet vendor, click golden egg, then click enchantment pot? thanks for any help

    You can use this Macro for exchange Gold-Egg into Enchancement Potion

    Code
    /script UseSkill(1,1)
    /wait 0.2
    /script ChoiceOption(3)
    /wait 0.2
    /script ChoiceOption(2)


    and this one for exchange Gold-Egg into Awakening Potion

    Code
    /script UseSkill(1,1)
    /wait 0.2
    /script ChoiceOption(3)
    /wait 0.2
    /script ChoiceOption(3)

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

  • Title-Interface-Macro


    Code
    /run SetATF_Title(xxxxxx);SetATF_Title(xxxxxx);SetATF_Title(xxxxxx);SetATF_Title(xxxxxx)


    x= Title-ID


    pretty nice if you switch between more classes and you dont wanna search the titles everytime.



    Macro to switch between 2 Titles

    Code
    /script local a,b=530659,531905;if GetCurrentTitle()==a then a=b;end;SetTitleRequest(a);


    i like to use the macro to switch between %movement-speed and %dmg


    switch your Skin

    Code
    /run CoolSuit_SetPageID(x)


    x=Costume-setting slot

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

    Edited 2 times, last by Nadaná ().

  • Why does not it work? :love:


    Code
    function Slayer_UseSiegel(Siegel)
    	local WaitTimer = LibStub("WaitTimer")
    	local FocusSlot = 1
    	WaitTimer.Delay(0.1, function () FocusUnit(FocusSlot,"target") end)
    	WaitTimer.Delay(0.2, function () TargetUnit("player") end)
    	WaitTimer.Delay(0.4, function () UseItemByName(Siegel) end)
    	WaitTimer.Delay(0.5, function () TargetUnit("focus1") end)
    	WaitTimer.Delay(0.6, function () FocusUnit(FocusSlot,"") end)
      end


    call in Slayers_Makro


    Code
    if Grotte_Saeule or Krypta_Knochen or Trollfeste_Rabenherz then
      	Skill = {
             {
            	name = "Function:Slayer_UseSiegel",
            	use = erlaubt and Boss and not pBuffs["Siegel des Angriffs"] and G_UseSiegel_des_Angriffs, params = {"Siegel des Angriffs"}
             },
    	...


    can some help me? Nadana? :D

  • can some help me? Nadana? :D

    ein simples Siegel-Makro tut es auch :thumbup:


    z.b

    Code
    /script FocusUnit(1,"target");
    /script TargetUnit("player")
    /use "Name of Sigil"
    /script TargetUnit("focus1")
    /script FocusUnit(1,"");

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

  • can some help me? Nadana? :D

    ein simples Siegel-Makro tut es auch :thumbup:


    z.b

    Code
    /script FocusUnit(1,"target");
    /script TargetUnit("player")
    /use "Name of Sigil"
    /script TargetUnit("focus1")
    /script FocusUnit(1,"");

    Klar, ich kenne dieses Makro, aber darum gehts mir nicht. Mir gehts darum, wie packt man so was prinzipiell in eine Funktion. Dieses Siegel-Makro fungiert nur als Beispiel.


    Ausgehend von dem Siegelmakro würde eine einfache Lua-Function ohne irgendwelche Zeittrickserei so ausschauen:


    Code
    funktion Siegel_nehmen(Name of Sigil)
        FocusUnit(1,"target");
    	TargetUnit("player")
        UseItemByName(Name of Sigil)
    	TargetUnit("focus1")
        FocusUnit(1,"");
    end


    Diese kann ich per Kommandozeile aufrufen und das Siegel übergeben. Im Spiel würde das per Sagen-Chat so aussehen:


    Code
    /run Siegel_nehmen("Siegel des Angriffs")


    Sollte eigentlich funktionieren, tut es aber nicht.


    Ich dachte dann, es liege womöglich ein Zeitproblem vor und hab deswegen McBens Waittimer-Bib ins Boot geholt. Hat aber auch nichts gebracht.


    So und jetzt bist du dran - wie könnte man so was umschreiben, dass es mit einem Tastendruck funktioniert?

  • Ausgehend von dem Siegelmakro würde eine einfache Lua-Function ohne irgendwelche Zeittrickserei so ausschauen:

    alles wo "/skript" oder "/run" vorsteht sind bereits lua Funktionen.

    wie könnte man so was umschreiben, dass es mit einem Tastendruck funktioniert?

    über das Siegel-Makro ist es per Tastendruck möglich.

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

    Edited once, last by Nadaná ().

  • I've become lost with cenedril macros and any help will be awesome. I'm trying to figure out a couple of things and got confused.


    1. What's the best cenedril combination for the following classes:
    a. rogue/mague
    b. scout/warden
    c. warden/scout
    d. warrior/scout


    Following on from the above, is there a macro so when i click it, it automatically picks the best cenedrils for the class I've chosen, eg, a macro that says hey, you're a scout warden, so I choose cenedril x and y


    2. Cenedril switch for buff
    Based on the above, is there a second macro to give you the cenedril skill for your current class by switching cenedrils, using the skill, then switching back to the best cenedril combination for your class?


    I've gone through https://mods.curse.com/addons/rom/cenedril-helper and it helps to a point.


    3. To understand it a little more so I can play, how can I find out a slot number, eg, from what I'm wearing, from a backpack, or from action bar/extra action bar?

  • 1.) I would suggest you look at the Values from each Cenedril and decide which one you want to equip. For Example as Rogue/Mage i would choose Solar and Mayi only for the Values.


    2.) So you choose your pref Cenedrils and if you want to use the Comboskill you can use this Macro

    Code
    /run CenedrilHelper.UseComboSkill(SkillNumber,ActionNumber) 
    /wait 0.40 
    /run CenedrilHelper.UseComboSkill(SkillNumber,ActionNumber)


    SkillNumber= (1) physical Skill (2) magical (3) healing
    ActionNumber= is the Slotnumber on your Actionbar


    3.) SlotNumber from Actionbar
    lower Actionbar= 1-20
    upper Actionbar= 21-40
    right Actionbar= 41-60
    left Actionbar= 61-80


    here you can find your equipslotnumber

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.

  • if someone is interested in writing his own macros, then you can find here a list of all functions :thumbup:

    Never underestimate what you do for others.

    Things that seem small, even meaningless or pointless to you,

    might mean everything to the person you interact with.