Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:Useful macros
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Trading, Bags and Money == === Print money & currency to chat === Print Money and Currencies to Chat Frame /script local cu = GetMoney(); print(GetCoinTextureString(cu,"12")) /stopmacro [btn:1] /script yy = GetNumWatchedTokens(); for xx = 1, yy,1 do aa, bb, cc, dd, ee = GetBackpackCurrencyInfo(xx); print(bb, aa) end * Left click to display your total money in the chat window. * Click any other way to display your money and all your watched currencies. * Works in 3.3.2 === Sell all grey items === <!--/run local p,N,c,n=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do n=GetContainerItemLink(b,s) if n and string.find(n,"9d9d9d") then N={GetItemInfo(n)} c=GetItemCount(n) p=p+(N[11]*c)UseContainerItem(b,s) print(n) end end end print(GetCoinText(p)) * Use: sells all grey items, shows what was sold and how much money was made from selling * Works in 3.3.5 Note: The problem with the above script arises on multiple stacks. GetItemCount counts total. And this macro appears to do this on each stack. As an example, have 2 stacks of single junk with each selling for 1 gold. You would expect it to say 2gold profit once it ends. It actually outputs 4g, due to the 2 stacks. And the count seems to not get updated after one stack sells... Or it might just be my miscalculations. Whichever, the point being it is better to determine the price per stack, which is shown below. --~~~~ --> /run local c,i,n,v=0;for b=0,4 do for s=1,GetContainerNumSlots(b)do i={GetContainerItemInfo(b,s)}n=i[7]if n and string.find(n,"9d9d9d")then v={GetItemInfo(n)}q=i[2]c=c+v[11]*q;UseContainerItem(b,s)print(n,q)end;end;end;print(GetCoinText(c)) * Use: sells all grey items, shows what was sold and how much money was made from selling * Works in 4.0.3a === Destroy all grey items === /run local i,n=0;for b=0,4 do for s=1,GetContainerNumSlots(b) do ClearCursor();i={GetContainerItemInfo(b,s)};n=i[7];if n and string.find(n,"9d9d9d") then PickupContainerItem(b,s); DeleteCursorItem() end end end * Use: destroy all grey items '''without''' confirmation * Works in 4.0.6 === Item Link === /run local s={"10000"} for i=1,#s do DEFAULT_CHAT_FRAME:AddMessage("\124c00ffffff\Item Link: \124c00FF0033\124Hitem:"..s[i]..":0:0:0:0:0:0:0:0\124h[ID: "..s[i].."]\124h\124r\124c00ffffff - Click ID for item info.")end * Use: Displays an item link in the default chat frame. * Replace "10000" with the desired item ID #. * Works in 3.3.2 === Spell Link === /run local s={"10000"} for i=1,#s do DEFAULT_CHAT_FRAME:AddMessage("\124c00ffffff\Spell Link: \124c00ff0033\[ID: "..s[i].."] \124c00ffffff\- "..GetSpellLink(""..s[i])..".")end * Use: Displays a spell link in the default chat frame. * Replace "10000" with the desired spell ID #. * Works in 3.3.2
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)