This site makes extensive use of JavaScript.
Please
enable JavaScript
in your browser.
Live
PTR
Beta
Classic
TBC
Insert Spell Link
Post Reply
Return to board index
Post by
izumisano
Is there a way to insert a spell link when using this method?
(Meaning, change to an actual spell link, not just text)
SendChatMessage(string.format("%s used !", sourceName), "PARTY")
I know how to do it in this way, if it can't be dont in the above format.
SendChatMessage(""..sourceName.." used "..GetSpellLink("Mana Tide Totem").."!", "PARTY")
Post by
550132
This post was from a user who has deleted their account.
Post by
Wanderingfox
Technically, it's a leading concatenated empty string :P
Post by
izumisano
The two are functionally the same. If the second works, why do you want to use string.format? All it does it take up more space and CPU time.
It was more me wondering if there was a way to do it, rather than "needing it to work that way".
Just curious is all, and I don't have much knowledge of scripting, so I'm asking here.
Post by
Wanderingfox
Not in the sense that you're looking for. All the blocks of text are are compressed forms of the returned information from GetSpellLink. In other words, is just a display convenience. For example, if you were to shift click one into the text field of a macro, you can look at the character count and see what I mean. Even though the text is only a dozen or so characters, the shift-clicked link will eat much more.
With that said... I believe you could also do it like this, but as router54 stated, it would be functionally the same.
SendChatMessage(string.format("%s used %s!", sourceName, GetSpellLink("Mana Tide Totem")), "PARTY")
Post by
550132
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.
© 2021 Fanbyte