This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Trade chat profession macro
Post Reply
Return to board index
Post by
6023
This post was from a user who has deleted their account.
Post by
Kairn
/run local s,g=SendChatMessage,GetSpellLink s("Offering "..select(2,g("Jewelcrafting")).." and","CHANNEL",nil,GetChannelName("Trade - City"))s(select(2,g("Blacksmithing")).." for mats + tips .","CHANNEL",nil,GetChannelName("Trade - City"))
Just replace Blacksmithing with Enchanting for your case and edit the text to your likings.
This will print:
Offering and
for mats + tips
Note: due technical limitations of profession links you have to work with two lines.
Post by
Sheridan
I use a much simpler macro that just has a link from my professions screen.
It's like "/1 450 JC /pst"
I'm not sure what benefit your script has over mine.
Post by
6023
This post was from a user who has deleted their account.
Post by
Kairn
I use a much simpler macro that just has a link from my professions screen.
It's like "/1 450 JC /pst"
I'm not sure what benefit your script has over mine.
Now that you mention it.
A simple method (wich is also used to get itemlinks in macros) might work for this purpose too,
only downfall as said above, you will need to spread your profession links over two lines and I do not know how to initiate a linebreak in the "CreateMacro" command.
Anyway since somebody might know how to, here's how to get links in your macros:
/script CreateMacro("macro name", 6, "TEXT blah blah", 1, 0)
Notes: macro name = macro name (duh), 6 is the position where the macro will be placed, the itemlink has to be linked while executing this command.
Post by
RedwoodElf
newline in a string is \n
Shorter version:
/run local s,g,n=SendChatMessage,GetSpellLink s("Offering "..select(2,g("Jewelcrafting")).." and","CHANNEL",nil,n)s(select(2,g("Blacksmithing")).." for mats + tips .","CHANNEL",nil,n)
(Edited to "Two line" version)
Post by
HighFive
The profession links are quite long and the SendChatMessage function only accepts a <=255 character string (truncates longer ones), hence the requirement of running it once for each profession.
Another thing is that the SendChatMessage function removes anything beyond a newline character (including it, of course). Interestingly, when you execute SendChatMessage'\n' you emote "says something unintelligible.".
@Kairn: Stop torturing yourself and use get this.
Post by
Kairn
The profession links are quite long and the SendChatMessage function only accepts a <=255 character string (truncates longer ones), hence the requirement of running it once for each profession.
Another thing is that the SendChatMessage function removes anything beyond a newline character (including it, of course). Interestingly, when you execute SendChatMessage'\n' you emote "says something unintelligible.".
@Kairn: Stop torturing yourself and use get this.
Yeah well, the createmacro way wouldn't work anyway since you would have to link both professions in one line to create a macro wich has it spread over two.
I assumend porfession were not linkable like items in macros, guess I was wrong.
Also thanks for the link, will try it.
Post by
6023
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.