WoW: A few Lua Macros to save time and clicks

At level 69 you can use a Riding Crop to get a mounted speed bonus. Since my main is finally level 69 I've been eying the Auction House. I just lucked out and found one for only 41 gold. On my server they're usually over 80 so I snapped it up right away. Of course then I have the issue of switching trinkets so can have the Riding Crop while mounted and go back to my other trinkets when I dismount. This got me looking at macros again and since macros are written with Lua in WoW, I thought this ties in nicely with the Lua interpreter stuff I've been writing about lately. Today I'll share the macros I've been using for a while now to smooth the rough edges off the World of Warcraft interface. I didn't write most of them but I've tweaked them to meet my needs.

My Current Macros
These are the macros that I use currently. I actually have all these in use as of today so there's no guesswork and they're all up to date as of today. I've wasted time before with macros that broke with client changes, the worst was one that ended up deleting money that showed up from the AH.
Mailbox
Take items or money from your mailbox. Open the mailbox then use this macro. The one place it hangs up is with the new auction house feature that sends you a letter without the money in it yet. Maybe this will be less important after the mailbox changes in the patch next week but it's been a big time saver for me so far.

/script if GetInboxItem(1) then  TakeInboxItem(1) else TakeInboxMoney(1) end

Vendor Trash
This one I got off the WoW forums, it sells grey items. Careful not to use it unless you've got a vendor window open otherwise you'll end up with greys equipped.

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Selling "..name); UseContainerItem(bag,slot) end; end; end

I see a the function GetMerchantItemInfo() that might improve this macro but I haven't been able to fit it in the 255 character limit.
Quick Coordinates
This one came from a helpful Thottbot user. If you don't have any addons that give you coordinates then this will work in a pinch. I keep it because sometimes I don't update TitanPanel immediately after I get a new patch. Put this one on a button bar and click it to get your current coordinates to show up in the chat window.
/script px,py=GetPlayerMapPosition("player")
/script DEFAULT_CHAT_FRAME:AddMessage(format("[ %s ] %s , %s",GetZoneText(),(px*100 ),(py*100)));

I have a target macro that I use to help me find quest NPCs. When I know I'm in the right area but can't see them I just click this one over and over as I ride around. When I'm close enough they'll be targeted. Of course I have to go in to the macro interface to set the name every time.
/target talvash

Other Macro Ideas
The WoWWiki has a nice guide to macros. I'm going to add a few to my collection from there. These ones I haven't tried extensively but I'm going to start using some of them today.

Mount and Riding Crop
Since I'm only level 69 I've got no flying mount yet. When I get one I'll want the macro to be ready. There are a few on WoWWiki that have important features for me. I like the No Dismount While Flying, the Mount / Hearthstone combo and the one that equips the Riding Crop but handles an override modifier key. The problem is with the tight 255 character limit and the fact that if you get dismounted without the macro you'll still have the riding crop equipped. I think an add-on is in order here. Oddly enough, with the Titan Panel add-on that I already use, I found there's something included called TitanRider that works for me. Basically I just had to turn it on by right-clicking a blank spot on the bars that Titan Panel adds and dig through the menu to find it. When you're mounted it equips the Riding Crop and when you dismount it re-equips whatever trinket you had on before.

Mage Macros
It's always bugged me that all the class-specific macros I see aren't useful until high levels but that kind of makes sense. Otherwise you have to change your macros every few levels as your available spells change. Now that I'm getting up there though I see a lot of helpful stuff in the Mage Macros page at WoWWiki.

Even though I recently respecced to mostly frost, I still need scorch sometimes and I sometimes open with a pyroblast. So I saved an action bar space with this combination

/cast [nocombat] Pyroblast; Scorch

If out of combat it casts Pyroblast, in combat it's a Scorch.

I haven't tried this one yet but it should help with something I often do. Target one mob, sheep it, then target the other mob. The trick to using this one is that it looks like you have to target the one you don't want to sheep first, then target the one you do, then trigger the macro.

#show Polymorph
/target focus
/cast Polymorph
/targetlasttarget

I guess that's enough for me for now. This must be why after a year and a half of playing WoW I still haven't gotten to max level (max was 60 when I started).

2.976
Your rating: None Average: 3 (125 votes)