Sending item links in a macro
Moderators: Fridmarr, Worldie, Aergis, _Chloe
11 posts
• Page 1 of 1
Sending item links in a macro
So I'm completely unfamiliar with lua, and I'm trying to figure out how to make a macro to say that I'm buying or selling something
So far, I've worked out how to send a message in /say
but reading through http://www.wowwiki.com/API_SendChatMessage I can't seem to figure out how to send the message in trade
can someone help me out with this?
So far, I've worked out how to send a message in /say
- Code: Select all
/script SendChatMessage("Buying all \124cff1eff00\124Hitem:35624:0:0:0:0:0:0:0:0\124h[Eternal Earth]\124h\124r 5 gold each, please CoD ");
but reading through http://www.wowwiki.com/API_SendChatMessage I can't seem to figure out how to send the message in trade
can someone help me out with this?
-

Arnock - Posts: 3478
- Joined: Tue Apr 08, 2008 6:36 pm
- Location: Everywhere and nowhere
Re: Sending item links in a macro
Easy:
Basically replace the 2 with whatever channel number trade is.
- Code: Select all
SendChatMessage("Buying all \124cff1eff00\124Hitem:35624:0:0:0:0:0:0:0:0\124h[Eternal Earth]\124h\124r 5 gold each, please CoD ", nil, nil, 2);
Basically replace the 2 with whatever channel number trade is.
-

_Chloe - Moderator
- Posts: 945
- Joined: Fri Dec 07, 2007 6:36 pm
Re: Sending item links in a macro
Is it possible to insert text into open chat boxes? Like if I wanted to PM someone who I hadn't previously spoken to.
Amirya wrote:some bizarre lovechild of Hawking, Einstein, and Theck
-

majiben - Moderator
- Posts: 6999
- Joined: Fri Aug 22, 2008 4:37 pm
- Location: Retired
Re: Sending item links in a macro
Actually I can't get any of this to work,and even copy and pastes of their "hello world" examples.
EDIT:
seems /run was needed and was found through some google though the wowwiki link neglected to mention this >.<
Still the one you linked chole doesn't say the message in trade chat, just in /s
EDIT:
seems /run was needed and was found through some google though the wowwiki link neglected to mention this >.<
Still the one you linked chole doesn't say the message in trade chat, just in /s
Amirya wrote:some bizarre lovechild of Hawking, Einstein, and Theck
-

majiben - Moderator
- Posts: 6999
- Joined: Fri Aug 22, 2008 4:37 pm
- Location: Retired
Re: Sending item links in a macro
After some more poking and copying/splicing this macro worked for me
- Code: Select all
/script SendChatMessage("Buying all \124cff1eff00\124Hitem:35624:0:0:0:0:0:0:0:0\124h[Eternal Earth]\124h\124r 5 gold each, please CoD ", "CHANNEL", nil, 2);
Amirya wrote:some bizarre lovechild of Hawking, Einstein, and Theck
-

majiben - Moderator
- Posts: 6999
- Joined: Fri Aug 22, 2008 4:37 pm
- Location: Retired
Re: Sending item links in a macro
The code for linking items is quite long, can it be shorted to fit more than 2 in a macro? or am I out of luck? Also I was having trouble finding a data base for finding item codes. So far thottbot has worked but I need to add an additional :0 and change some of the letters at the beginning to copy the format used in message arnock posted.
Amirya wrote:some bizarre lovechild of Hawking, Einstein, and Theck
-

majiben - Moderator
- Posts: 6999
- Joined: Fri Aug 22, 2008 4:37 pm
- Location: Retired
-

Panzerdin - Posts: 5502
- Joined: Sat May 24, 2008 2:51 pm
- Location: On a picket line, protesting against the changes to Maintankadin
Re: Sending item links in a macro
Thanks, I didn't realize I had to put in "nil" where the chat type and language modifiers were
zomg 1k posts
zomg 1k posts
Last edited by Arnock on Sun May 31, 2009 10:17 am, edited 1 time in total.
-

Arnock - Posts: 3478
- Joined: Tue Apr 08, 2008 6:36 pm
- Location: Everywhere and nowhere
Re: Sending item links in a macro
Majiben wrote:The code for linking items is quite long, can it be shorted to fit more than 2 in a macro? or am I out of luck? Also I was having trouble finding a data base for finding item codes. So far thottbot has worked but I need to add an additional :0 and change some of the letters at the beginning to copy the format used in message arnock posted.
I used the wowhead "link" tool, just copied the item code rather than the whole script
I.e.
/script DEFAULT_CHAT_FRAME:AddMessage("Shift-click this to place a link into a chat message: \124cffa335ee\124Hitem:45251:0:0:0:0:0:0:0:0\124h[Shoulderplates of the Deconstructor]\124h\124r");
-

Arnock - Posts: 3478
- Joined: Tue Apr 08, 2008 6:36 pm
- Location: Everywhere and nowhere
Re: Sending item links in a macro
You don't need to screw around with making the links yourself with the item IDs, you can make the game fill them in for you:
http://wiki.bwerp.net/World_of_Warcraft_macros
Basically, type out in your chat window (ie NOT in a macro):
And instead of BLAH above, shift click your item link in before hitting enter. The CreateMacro funciton will create a macro with the appropriate code to have an item link.
You can then go to your macros list and do whatever you want with the macro (change name/icon/text). Length restrictions still apply though, and item links take up a lot more characters than they display, so you only get to link about 3 items before a macro fills up.
Change that last 1 to "nil" if you want the macro to be per-account instead of per character.
http://wiki.bwerp.net/World_of_Warcraft_macros
Basically, type out in your chat window (ie NOT in a macro):
- Code: Select all
/script CreateMacro("macro name", 6, "/2 Selling 5xBLAH 4g!", 1, 0)
And instead of BLAH above, shift click your item link in before hitting enter. The CreateMacro funciton will create a macro with the appropriate code to have an item link.
You can then go to your macros list and do whatever you want with the macro (change name/icon/text). Length restrictions still apply though, and item links take up a lot more characters than they display, so you only get to link about 3 items before a macro fills up.
Change that last 1 to "nil" if you want the macro to be per-account instead of per character.
-

fafhrd - Posts: 5430
- Joined: Fri Aug 31, 2007 2:31 pm
Re: Sending item links in a macro
I use Fizzwidget Linkerator. It auto-inserts links to items or spells as you type, or as you copy/paste. It also has a neat feature for linking items to yourself.
/link Thunder
would return me Thunderfury, Deep Thunder, and probably the Shaman spell "Thunder".
/shrug, if you're only making one macro it's probably not worth it, but if you link items occasionally, it's nice.
/link Thunder
would return me Thunderfury, Deep Thunder, and probably the Shaman spell "Thunder".
/shrug, if you're only making one macro it's probably not worth it, but if you link items occasionally, it's nice.
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
11 posts
• Page 1 of 1
Return to Add-ons, UI, and Macros
Who is online
Users browsing this forum: No registered users and 3 guests


