Gaming
 
[Kaydeethree]

Kaydeethree 22,087 edits since July 15, 2006

22,087

User:Kaydeethree/Macros

From WoWWiki

Some useful macros to get information from the game. Remember that all of these macros are one line long!

Contents

Item info

This macro will dump the name of the item on the cursor, its ID, and the path to its texture to the chatframe. To use this macro, bind it to a key, pick up an item so the cursor turns blue, then hit the key bound to this macro. Note that this macro only works for items in your inventory/bags.

/run local i,j,k=GetCursorInfo()if i=="item" then ChatFrame1:AddMessage(k..j..GetItemIcon(j)) end

Example output:

[Tigole's Trashbringer]32824Interface\Icons\INV_Sword_48

Vendor info

This macro will dump the name/texture of every item getting sold by the current vendor window, as well as the cost (in copper) and the quantity/itemLink of any loot tokens required.

/run local s,a,b,n,t,p,x='' for i=1,GetMerchantNumItems()do n,t,p,_,_,_,x=GetMerchantItemInfo(i)if x then s='' _,_,x=GetMerchantItemCostInfo(i)for j=1,x do _,a,b=GetMerchantItemCostItem(i,j)s=s..a..b..' 'end end ChatFrame1:AddMessage(n..p..t..' '..s)end

Example output:

Khadgar's Hood of Triumph0Interface\Icons\inv_helmet_146 75[Emblem of Triumph] 1[Trophy of the Crusade]
Khadgar's Gauntlets of Triumph0Interface\Icons\inv_gauntlets_79 45[Emblem of Triumph] 1[Trophy of the Crusade]
Khadgar's Robe of Triumph0Interface\Icons\inv_chest_cloth_75 75[Emblem of Triumph] 1[Trophy of the Crusade]
Khadgar's Leggings of Triumph0Interface\Icons\inv_pants_cloth_33 75[Emblem of Triumph] 1[Trophy of the Crusade]
Khadgar's Shoulderpads of Triumph0Interface\Icons\inv_shoulder_110 45[Emblem of Triumph] 1[Trophy of the Crusade]

Example output with items that cost gold: ( 24s and 6s 40c , respectively)

Blackflight Arrow2400Interface\Icons\INV_Misc_Ammo_Arrow_01
Terrorshaft Arrow2400Interface\Icons\INV_Misc_Ammo_Arrow_01
Ironbite Shell2400Interface\Icons\INV_Misc_Ammo_Bullet_06
Frostbite Bullets2400Interface\Icons\INV_Misc_Ammo_Bullet_06
Blacksteel Throwing Dagger640Interface\Icons\INV_Weapon_ShortBlade_24
Jagged Throwing Axe640Interface\Icons\INV_ThrowingAxe_01

Questlog info

This macro will run through your entire quest log and dump as much information as it can get to the frame.

/run local s,l,t,g,h,d for i=1,GetNumQuestLogEntries()do s,l,t,g,h,_,_,d=GetQuestLogTitle(i)if not h then t=t or'' g=g or'' if g==0 then g='' end d=d or'' s=strsub(GetQuestLink(i),19)..t..g..d end ChatFrame1:AddMessage(s)end

Example output:

Borean Tundra
11897:71[Plug the Sinkholes]
Dragonblight
12462:73[Breaking Off A Piece]
12464:73[My Old Enemy]Group3

Quest rewards

This macro will print out roughly the same info as the item macro above, but only when you're about to choose a quest reward from the NPC.

/run local l,c='',ChatFrame1;c:AddMessage(GetTitleText())for i=1,GetNumQuestChoices()do local n,t=GetQuestLogChoiceInfo(i);t=t or '';l=GetQuestItemLink("choice",i)c:AddMessage(l..' '..tonumber(l:match("item:(%d+)"))..t)end

Example output:

Rescuing the Rescuers
[Earthspike]35809Interface\Icons\INV_Weapon_ShortBlade_05
[Elekk-Horn Crossbow]35811Interface\Icons\INV_Weapon_Crossbow_21
[Pacifying Pummeler]35810Interface\Icons\INV_Mace_67
[Bramblethorn Greatstaff]35807Interface\Icons\INV_Staff_50
[Coldstone Cutlass]35808Interface\Icons\INV_Sword_110
[Cragthumper]35812Interface\Icons\INV_Mace_65

NPC info

Updated for 3.3!

This macro will dump a lot of nearly all of the information you need about the NPC you are both targeting and mousing over (so the tooltip points to the right unit), except for its' lore-based race. (Human, Vrykul, Bat, etc...)

/run local s,t='','target'for i=1,(GameTooltip:NumLines()-1)do local m=_G["GameTooltipTextLeft"..i]s=s..' '..m:GetText()end ChatFrame1:AddMessage(s..' '..UnitSex(t)..UnitCreatureType(t)..tonumber(string.sub(UnitGUID(t),7,10),16)..GetMinimapZoneText())

Example output:

Helga Rumsbane General Goods Level 70 Valiance Expedition PvP3Humanoid24053Fort Wildervar

Explanation:

<Name> <Title> Level <##> <Faction affiliation> <PvP tag><1=Neuter,2=Male,3=Female><Creature type><NPC ID><Location>

Everything after the PvP tag comes from the Unit* calls, the rest comes from scraping the tooltip.

Auto-vend grays

Straight-forward gray item one-click vend macro. Thank you Cogwheel.

/run local l; for b=0,4 do for s=0,GetContainerNumSlots(b) do l = GetContainerItemLink(b, s) if l and select(3, GetItemInfo(l)) == 0 then ChatFrame1:AddMessage("Auto-selling " .. l);ShowMerchantSellCursor(1)UseContainerItem(b, s) end end end