This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Linking Spells and Items in a Macro [Methods Shown]
Post Reply
Return to board index
Post by
Drexxis
Please note that in order for this method to work you must
have the spell in your spellbook
. It will not work if you try to link the abilities of another class.
Also note, there is some methods going around that say you have to use a macro to build the linking macro. This is not true, you can just type the text in.
#1
This code format will link a spell in party, say, or guild chats. I'm using a Priests "Power Infusion" spell for this example.
/run SendChatMessage("I just gave you " .. GetSpellLink("Power Infusion"), "PARTY")
/run SendChatMessage("I just gave you " .. GetSpellLink("Power Infusion"), "SAY")
/run SendChatMessage("I just gave you " .. GetSpellLink("Power Infusion"), "GUILD")
*The
double dot
separates the GetSpellLink from the input before it. It's also used to separate different GetSpellLink's and to continue text after the link. Both will be demonstrated below.*
They will appear as:
: I just gave you
says: I just gave you
: I just gave you
... with their colours and the link will be light blue and display the spell mini-window.
To continue text after the link you use the double dot and open a quote. Note that having a space between the quotes on the link side will leave a speace between the link and the text:
/run SendChatMessage("I just gave you " .. GetSpellLink("Power Infusion") .. ". So be happy!", "PARTY")
It will appear as:
: I just gave you
. So be happy!
-----------------------------------------------------------------------
#2
This code format will whisper a unit. Using the same class and spell as last example.
/cast Power Infusion
/run SendChatMessage("I just gave you " .. GetSpellLink("Power Infusion"), "WHISPER", nil, UnitName("target"))
You cast Power Infusion on your target and whisper that target. as
target
is inside the quotes in the specitic area. It will display as:
whispers: I just gave you
... with it's colour being purple (by default).
#2.1
You can use the same method and whisper a specific player too, just replacing
target
with the players name.
/cast Power Infusion
/run SendChatMessage("I just gave you " .. GetSpellLink("Power Infusion"), "WHISPER", nil, UnitName("Drexxis"))
Post by
Drexxis
#3
I'll use Paladin buffing as an example for this next part. This is putting more links in one line.
Say you're a Paladin. You want to know what buffs everyone wants but don't want to look for the abbreviations in the maze of text. You can do something like this.
/p Please link in PARTY the buff you would like:
/run SendChatMessage(GetSpellLink("Blessing of Light") .. GetSpellLink("Blessing of Might") .. GetSpellLink("Blessing of Wisdom"), "PARTY")
This would probably take up most of the allowed space in the macro. You can just make a second macro and repeat the process but without the initial party statement and switching out the spell names.
As it is up there, it would be displayed as:
: Please link in PARTY the buff you would like:
:
-----------------------------------------------------------------------
Post by
Toldry
I vote sticky!
Now if I only knew how to link items on a macro.
Post by
Drexxis
Since you requested. I will tell.
For this method you must be
holding the item in a container or in your inventory
.
You can use the same ideals as above but change the macro around to fit items. For the items method you switch out GetSpellLink with GetContainerItemLink() or GetInvetoryItemLink(). Here is an excited player linking his newly acquired (equipped) headpiece to his guild, via macro:
*I will be using random items for the examples*
/run SendChatMessage("Hey everyone! Guess what I just got!!! " .. GetInventoryItemLink("player",1), "GUILD")
This will appear as:
: Hey everyone! Guess what I just got!!!
-----------------------------------------------------------------------
Now our friend has just found another headpiece (in container id 0 which is the backpack and in slot 1) and links it to his guild:
/run SendChatMessage("Hmm, I just got this. " .. GetContainerItemLink(0,1), "GUILD")
This will show as:
: Hmm, I just got this.
... and now want to do a comparision:
/run SendChatMessage("What should I use? " .. GetContainerItemLink(0,1) .. " or " .. GetInventoryItemLink("player",1) .. "?", "GUILD")
This will display as:
: What should I use?
or
?
-----------------------------------------------------------------------
You can note that the spell linking and item linking follow the same principals. So you can use the whispering, party, say, trade channel, multiple in one line linking methods
as long as you possess the spell or item
!
I have given you this for convenience. Please DO NOT spam with it!
Post by
83344
This post was from a user who has deleted their account.
Post by
83344
This post was from a user who has deleted their account.
Post by
evilbyter
This was great, thank you.
Post by
pelf
Reported for addition to the sticky post. Also, add in some stuff about profession linking and this thread is golden. We can start referring people to here and the other spots where we've got that information.
Post by
purus
Any idea how to get the link for Rank 2 spells like Fast Track? Using this method only links the level 1 version.
Post by
HighFive
Try using the Id instead of the name.
Post by
pelf
Nuh nuh nuh necrooooo.
Post by
HighFive
It was a rez, not a necro.
Post by
GTMistral
Necro rez?
Post by
HighFive
A necro is when the post shouldn't have gone in this thread of at all.
A rez is when it's fine.
I don't know whether anyone but me uses this terminology.
Post by
GTMistral
That wasn't a question silly. :p More like a combination of the two? ^^
Post by
HighFive
Quantum Entanglement Post?
edit: Wait, no. I was thinking about Superposition.
Post by
pelf
I'd say there was no value attaching that response to this thread.
Post by
858542
This post was from a user who has deleted their account.
Post by
GTMistral
You tried what?
/run SendChatMessage(GetSpellLink(id#).." activated!","PARTY");
You have the very same thing in the very first post.
Post by
858542
This post was from a user who has deleted their account.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.