2,434
edits
(Cleanup) |
m (Move page script moved page API GetContainerItemLink to WoW:API GetContainerItemLink without leaving a redirect) |
||
(One intermediate revision by one other user not shown) | |||
Line 38: | Line 38: | ||
====Result==== | ====Result==== | ||
Searches through your bags and uses the first item found that contains the provided string in its name. | Searches through your bags and uses the first item found that contains the provided string in its name. | ||
== Example == | |||
<pre>/run link=GetContainerItemLink(0,1);printable=gsub(link, "\124", "\124\124");ChatFrame1:AddMessage("Here's the item code for item in Bag slot 0,1: \"" .. printable .. "\"");</pre> | |||
====Result==== | |||
Returns the [[ItemLink]] of the item located in bag 0, slot 1. | |||
== Example == | |||
<pre>/run _,_,itemLink=string.find(GetContainerItemLink(0,1),"(item:%d+)"); message(itemLink);</pre> | |||
====Result==== | |||
Returns the abbreviated [[ItemLink]] of the item located in bag 0, slot 1 (itemId only, useful for macros like "/use item:31339"). | |||
====Info==== | ====Info==== |
edits