more coming later
TODO - maybe it's best to host ideas in a github repository.
This is badly out of date and is just here for reference for now. I'll be cleaning things up and writing a better guide of some sort.. one day.
World of Warcraft macros are written in their own "language".
See also:
TODO - I could/should have my macros imported and spilled into various files, and then assembled for use in-game via _devpad, super duper macro, etc.
My old shadowfiend macro:
#showtooltip Shadowfiend /cast [nopet,harm] [nopet,target=targettarget,harm] Shadowfiend /petattack [harm] [target=targettarget,harm] /cast [harm] [target=targettarget,harm] Shadowcrawl
/cast [modifier:alt,@player] Penance; [@mouseover,help] Penance; [help] Penance; [@targettarget,help] Penance; [@player] Penance; => /cast [mod:alt,@player] [@mouseover,help] [@target,help] [@targettarget,help] [@player] Penance
SuperDuper Macro can do stuff with tradeskills:
#showtooltip (This is just if you want the Jewelcrafting tooltip and icon to show) /cast Jewelcrafting /script Prof1 = GetTradeSkillListLink(); /cast Jewelcrafting /cast Enchanting /script Prof2 = GetTradeSkillListLink(); /cast Enchanting /script SendChatMessage(Prof1..Prof2 , "CHANNEL", nil, "2")
[Thanks to an post on the old wow europe forums]
A cool idea is to change the texture being used in the tracker, based on the skill level of tracking! So for herbalism:
#showtooltip /cast Find Herbs /run local tex="Interface\\Icons\\Ability_Druid_Flourish"if MiniMapTrackingIcon:GetTexture() ~= tex then MiniMapTrackingIcon:SetTexture(tex)MiniMapTrackingShineFadeIn()end
Next I would want to change the tracking type based on skill level:
To get the rank you can use GetSpellInfo("tradeskill name")
where the second return will be your rank. If you want the exact level you'll have to go through all the skill lines:
function GetSkillLevel(profession) local skillName, header, isExpanded, skillRank for i=1, GetNumSkillLines() do skillName, header, isExpanded, skillRank = GetSkillLineInfo(i) if skillName == profession then return skillRank end end end
Example usage:
local rank = GetSkillLevel("Tailoring")
/run if UnitClass("player")=="Shaman" then DEFAULT_CHAT_FRAME:AddMessage("works!") end
/run DEFAULT_CHAT_FRAME:AddMessage( tostring(GetRealZoneText()).." - "..tostring(GetSubZoneText()).." - "..tostring(GetZoneText()).." - "..GetZonePVPInfo() )
- GetMinimapZoneText() - Returns the zone text, that is displayed over the minimap.
- GetRealZoneText() - Returns either instance name or zone name
- GetSubZoneText() - Returns the subzone text (e.g. "The Canals").
- GetZonePVPInfo() - Returns PVP info for the current zone.
-
GetZoneText() - Returns the zone text (e.g. "Stormwind City").
/run local pvpType,isFFA,faction = GetZonePVPInfo(); DEFAULT_CHAT_FRAME:AddMessage(tostring(pvpType)..tostring(isFFA) ..tostring(faction))
When in an instance, returns the real name of the instance, not the name in the Minimap. (e.g. returns "The Stockade" whereas GetZoneText() returns "Stormwind Stockade"). Otherwise is identical to GetZoneText
/script SendChatMessage(GetRealZoneText())
Returns the localized name of the zone the player is in.
/script SendChatMessage(GetZoneText())
/script SendChatMessage(GetSubZoneText())
/script SendChatMessage(GetMinimapZoneText())
/script DEFAULT_CHAT_FRAME:AddMessage(GetMinimapZoneText())
GetRealZoneText()=="Dalaran"
GetSubZoneText() ~="Krasus' Landing"
GetZoneText()=="Wintergrasp"
IsFlyableArea()
Checks to see what you sound currently is set to (enabled or disabled), disables it for the error, and then sets it back where you had it. (ex: if your sound was already off, it will prevent the text error without turning your sound on at the end)
Obsoleted by (addon name)
/run sfx=GetCVar("Sound_EnableSFX"); /console Sound_EnableSFX 0 /cast ExampleTrinket1 /cast ExampleSpell2 /run UIErrorsFrame:Clear() /run SetCVar("Sound_EnableSFX",sfx);
I need to have intelligence in my macros to abort if the target is fucking flagged PvP
Use the MoveAnything addon (or ~) to find the correct frame reference for the /click command
- Implement a mouseover shield feature [@mouseover] and make sure it does not self-cast!!
- Find those macros for dailies, probably on the wowwiki macros list.
-
Update my clique macros so that they do nothing if out of range / invalid.. I turned self-casting off.
/script if(IsUsableAction(#TOTT#) and GetActionCooldown(#TOTT#)==0 and UnitInRange("focus")) then SendChatMessage("{square} Tricks of the Trade {square} on YOU!", "WHISPER", nil, UnitName("focus")); end /cast [@focus] Tricks of the Trade
neato! API_IsUsableAction
/click PetActionButton3 /click PetActionButton2 /cast [pet:Succubus] Seduction /cast [pet:Voidwalker] Sacrifice /cast [pet:Felhunter] Spell Lock /cast [pet:Felguard] Intercept
This macro works perfectly, but requires a small amount of setting up. This macro allows you to put your pet on target A, and if you choose, use spell lock/intercept on a different target without having the pet stop attacking target A. The pet will simply use the spell on target B and go back to attacking target A. The trick to this macro is that you have to swap around a couple buttons on your felhunter and felguard petbars. What this macro will do for succubus is click the petstay button then click the petfollow button then seduce target. When you have a felhunter or felguard out, swap the petstay and petfollow buttons for unimportant petspells from the pet spellbook, then remove then from the bars(making pet action bar slots 2 and 3 blank). That way when the macro tries to click buttons 2/3 it wont do anything when you have a felhunter or felguard out, it will simply do the spell lock or intercept and go back to attacking the target it was on. I personally put Tainted Blood and Paranoia in slots 2/3 then removed them from the slots and left them on autotoggle from the spellbook.
If you are used to using cntrl+1/2/3 for petattack/follow/stay, all you have to do is make a simple macro for those commands and bind them to cntrl+1/2/3 then you can still use those binds to control your pet's movement, while using this macro.
Here is also a focus version of this macro. Allows you to have pet on target A and use spell lock/intercept/seduce on focus target without breaking their attack on target A.
/click PetActionButton3 /click PetActionButton2 /cast [@focus, pet:Succubus] Seduction /cast [@focus, pet:Felhunter] Spell Lock /cast [@focus, pet:Felguard] Intercept
And finally, wow this is extremely long and for that, Im sorry, but I felt this deserved a good explanation as to why it is superior to a lot of the more simple macros out there that allow the basic use of petspells, but are lacking in versatility. Anyways, enjoy.
another one:
/petstay [pet:Succubus] /petfollow [pet:Succubus] /cast [pet:Imp] Fire Shield; [pet:Voidwalker] Sacrifice; [pet:Succubus, @focus,exists,nodead] Seduction; [pet:Succubus, @target] Seduction; [pet:Felhunter] Spell Lock; [pet:Felguard] Intercept
if you have an enemy targeted, it will spell lock. If you have a friendly targeted it will devour magic. If you have nothing targeted, it will devour magic off yourself
/cast [harm] Spell Lock [help] Devour Magic [@player] Devour Magic
/script EditMacro(GetMacroIndexByName("Assist it"),"Assist it", nil,"/assist "..UnitName("target"), 1)
- Create a macro and include the script above.
- Create another empty macro and name it "Assist it".
- Now click on the first macro and select the target you want to assit (do that each time you want to change assistant).
-
Bind a key to the second macro and on click, it will pick your chosen assistant.
Print a random Welcoming word along with the target's racial and class type .
/script local c, E ="EMOTE", {"Greetings","Hi","Hello","Welcome"}; if(not UnitIsPlayer("target")) then return; end; SendChatMessage(E[math.random(#E)].." "..UnitRace("target").." "..UnitClass("target"), c)
Is there a macro to cast mining then cast mount to make it one click of the mouse instead of two ?
/run local f=AtH or CreateFrame("Frame","AtH") f:SetScript("OnEvent",function() CallCompanion("MOUNT",1) end) f:RegisterEvent("LOOT_CLOSED")
Change the 1
in CallCompanion
to the numbered mount you want. Make sure auto loot and dismount on skill use are enabled. Until you log out or reload the UI, right-clicking a node will mount once you're done looting.
This macro should enable automount:
This macro will trigger on EVERY loot.. whoa
I'd need to make a global variable and be able to turn this thing off by modifying it. So I enter into gathering mode and I can exit it to have normal looting again.
Note that you cannot have class-specific casts like this.. casting is protected, and so are Lua cast functions.
/run if UnitClass("player")=="Paladin" then cast [nomounted] !Devotion Aura end
Props to Maldivia-(no realm: renamed/deleted, thread was lost with the old europe forums)
However, it's possible to create an addon with this type of code:
local frame = CreateFrame("Button", "PortalUC", nil, "SecureActionButtonTemplate") frame:SetAttribute("type", "spell"); frame:SetAttribute("spell", "Portal: Undercity")
And then the slash command would be:
/click PortalUC
So I could create a universal spellcast macro which would accept a parameter, perhaps like so:
/run FunctionName("Spell Name") /click SomeKeyword
See also SecureActionButtonTemplate
Is there an issue with using that kind of reusable code multiple times? How do I destroy an existing frame so it's not used when I make a new one?
Auction House One-Click Buyout:
/click BrowseBuyoutButton /click StaticPopup1Button1
Auction House One-Click Bid:
/click BrowseBidButton /click StaticPopup1Button1
The old way?:
/run local f = GetMouseFocus(); if f then DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end
Last updated 2020-01-08 at 21:31:35