Macros & Scripts FAQ – READ

#0 - Aug. 24, 2006, 9:56 p.m.
Blizzard Post
Top 10 Way-Too-Frequently Asked Questions Credit:Multiple Community Members

1. How do I wait in a macro to cast a spell later?
- You can't.

2. How do I use a trinket in a macro?
- /script UseInventoryItem(13) or /script UseInventoryItem(14)

3. How do I switch main hand to offhand weapon?
- /script PickupInventoryItem(16) PickupInventoryItem(17)

4. How do I swap whatever is in bag slot 0,1 with whatever is in mainhand?
- /script PickupContainerItem(0,1) PickupInventoryItem(16)

5. How do I swap whatever is in bag slot 0,2 with whatever is in offhand?
- /script PickupContainerItem(0,2) PickupInventoryItem(17)

6. How do I swap whatever is in bag slot 0,1 with whatever is mainhand and whatever is in bag slot 0,2 with whatever is in offhand?
- /script PickupContainerItem(0,1) PickupInventoryItem(16) PickupContainerItem(0,2) PickupInventoryItem(17)

7. How do I swap between 2h and dual wield, with whatever is in bag slots 0,1 (mainhand or 2h) and 0,2 (offhand or empty for 2h)?
- /script local PI,PC=PickupInventoryItem, PickupContainerItem if GetInventoryItemLink("player",17) then PI(17) PC(0,2) PI(16) PC(0,1) else PC(0,1) PI(16) PC(0,2) PI(17) end

8. How do I cast a spell/use an item on myself without losing my target?

Self-cast (the 'true' parameter means "on self" and can be replaced with 1 to save space):
/run CastSpellByName("Name of spell", true)Self-use (for an item-bag is 0-4 right-to-left, slot starts at 1 in the top-left of the bag):
/run UseContainerItem(bag, slot, true)
9. ?

10. ?


Please DO NOT post questions in this thread. Post them in the forum.

See this thread for the Mods FAQ: http://forums.worldofwarcraft.com/thread.html?topicId=11381215&sid=1


Contents

1. What? (Definitions)
- 1.1 Macros
- 1.2 Scripts
2. Where? (Where can I learn more about macros / scripting?)
3. How? (How do I use?)
- 3.1 General
- 3.2 Spells, Abilities and Buffs
- 3.3 Interacting with the World
4. Addendum on chaining spells
#53 - Dec. 17, 2006, 8:45 p.m.
Blizzard Post
Out of date, unstickied. :)
#68 - Jan. 21, 2009, 5:14 p.m.
Blizzard Post
I have detected this thread is no longer relevant!