a chat macro with an item link?

  • Is it possible to create a macro that will chat (to a friend or a channel) text with a link to an item?


    Something like

    Code
    1. /g Anyone interested in [item]? Giving out for free!

    where everyone could click on the item link in square brackets. What to type in a macro instead of [item]?


    (I know how to link an item from backpack if I type it all manually, the question is how to do this in macro, so that I can repeat it from time to time.)


    PS: I guess the question has two parts:

    * is it possible for simple items where id is enough to identify it?

    * is it possible for equipment (which has dura, stats etc.)?

    ------------- NAWIA - najlepszy polski serwer! ;) -------------

  • /run SendChatMessage("Anyone interested in " .. GetBagItemLink(GetBagItemInfo(1)) .. "? Giving out for free!","GUILD")

    1 means you are linking the item in the very first slot or your backpack. Use 2 for the second etc.

    Generating a link by id may be not as trivial as you think. If you do need this please describe the exact use case you have in mind.

  • To get an item link for a macro I often use http://www.rom-welten.de/database/ . If that is not possible, or I want a real item with detailed stats or other attributes, then I often use a bug of the whisper function to get the link:


    First I link the item in the input line for the chat, but do not submit. Then I press "POS1" to get before the item link. Then I enter "/w ", which is in detail: slash and w, followed by space. This is where the whisper function breaks the link, and your input line looks somehow like this (German example):



    You can then copy the second part of the item link, which is 22 170e66 d7a3d730 d78cd7a0 d7bcd562 7f1b6 7f48d 7f389 7f1de 2745 e4|h[Schwingen der Göttlichen Inkarnation]|h


    But you need to add the first part by hand, which is in this case "|Hitem:36eda", to get the full link:


    Code
    1. |Hitem:36eda 22 170e66 d7a3d730 d78cd7a0 d7bcd562 7f1b6 7f48d 7f389 7f1de 2745 e4|h[Schwingen der Göttlichen Inkarnation]|h

    You can copy that to your chat line and it works, and you can also use it in macros. It doesn't have its original color, but it is a quick way to get a working link of a real item.


    The first part of the item link is always the ID given as hexadecimal number: For example Schwingen der Göttlichen Inkarnation ID: 224986 (dec) is 36eda (hex) .

  • I still cannot get what exactly are you trying to do.


    There are several link formats. And if you are generating it manually you'll have to calculate the has yourself too. See https://runesofmagic.gamepedia.com/ItemLink for details.


    And if you want to get the link you described in a macro then look again at the above example. Put a proper slot number into GetBagItemLink(GetBagItemInfo(1)) and you'll get the link to the specified backpack item.

  • Great, thank you!



    Utu, GetBagItemLink(GetBagItemInfo(1)) does not preserve properties like dura, stats etc. So it's not really an option for gear (is good enough for simple items like pots etc.). However here, I got a nice item on an alt but wanted to advertise it in the guild from the main.


    So meisjustme's solution turned out more practical. If anyone wants to use it: note that the first part (|Hitem:36eda in the meisjustme's example) is different for each item and you have to type it in by hand. Still, the link from Utu explains nicely what is the meaning of different parts.


    It doesn't have its original color,

    Since you have to type the first part by hand anyway: just add "|cffc805f8" after the first "|h", so for your example it would be:


    Code
    1. |Hitem:36eda 22 170e66 d7a3d730 d78cd7a0 d7bcd562 7f1b6 7f48d 7f389 7f1de 2745 e4|h|cffc805f8[Schwingen der Göttlichen Inkarnation]|h


    Thanks again! :D



    PS:

    Sorry to say that is call spam if wana put time use and repeat, in guild chanel use mesage board,

    but in zone or world chat is SPAM read more details rules

    Well, since you can e.g. have a helper to write a specific fixed text to a channel, I'm not sure how including a link to an item or not makes it any different. It's all about moderation. :) And, sure, for guild - checked on TS first that ppl might at all be interested etc.


    (And no, you cannot have item links in guild's board (I think) so it is not an alternative at all.)

    ------------- NAWIA - najlepszy polski serwer! ;) -------------

  • Ah, my bad. I remembered the default parameter value wrong. GetBagItemLink(GetBagItemInfo(1), false) gives the intact link for the item with all its stats, plussing etc

  • Sorry to say that is call spam if wana put time use and repeat, in guild chanel use mesage board,

    but in zone or world chat is SPAM read more details rules

    I'm going to guess you were the one that told me I was spamming when I asked in chat if someone was willing to port me to a specific spot in Moorlands if I provided the portal rune and paying 1.5M when I said it a second time after previously saying 5 minutes before......

  • Jinsoyun

    Closed the thread.