Skip to content

Instantly share code, notes, and snippets.

@t00n t00n/My WoW macros
Last active Sep 28, 2017

Embed
What would you like to do?
--- sends a message on several channels at once ---
--- channels can be either a name or a number ---
/script m,cs="what you want to send",{"1","world","LookingForGroup"};
/script for _,c in ipairs(cs) do i,n=GetChannelName(c);SendChatMessage(m,"CHANNEL",nil,i);end
--- toggles join/leave a channel ---
/script c="channel_name";i,n=GetChannelName(c);if i==0 then JoinChannelByName(c);ChatFrame_AddChannel(ChatFrame1,c);else LeaveChannelByName(c);end
--- swaps weapons with first 2 slots of last bag, works with 2H,1H+shield, not tested with 2 weapons ---
/script local a,b,c=CursorHasItem,PickupInventoryItem,PickupContainerItem;CloseMerchant();b(17);if (not a()) then c(4,1);b(16);c(4,2);b(17);else c(4,2);b(16);c(4,1);end
--- cast several spells when clicked several times. number is the position of the spell in the spell book ---
/script function c(l) s,d,e=GetSpellCooldown(l, "BOOKTYPE_SPELL");if d == 0 then CastSpell(l,"spell") end end
/script c(27);c(4)
-- cast several spells or use items when clicked several times ---
--- l is the position of the spell in the spell book or the inventory slot id
--- t is 1 if spell else item
/script function c(l,t) if t ==1 then CastSpell(l,"spell") else UseInventoryItem(l) end end
/script c(27,1);c(4,1);c(14,0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.