Chat Macros
Chat messages
Print a string of your current target to chat log
/run DEFAULT_CHAT_FRAME:AddMessage("Hello world! my target name is "..GetUnitName("target"))
Send chat message
/run local s,m,c,=SendChatMessage,"<My Message Here>";if UnitInRaid("player")then c="RAID" elseif UnitExists("party1")then c="PARTY" end;s(m,c)
whisper
If your current target is a player then send a chat whisper to him/her
/run if UnitExists("target") then SendChatMessage("This is a test but insert whatever you are casting here","WHISPER",nil,UnitName("target")) end
Whisper hi! to target (doesn't whisper yourself)
/run if not UnitIsUnit("player","target") then SendChatMessage("hi!","WHISPER",nil,UnitName("target"))end
Current location
Send your current location into PARTY chat:
/run local x,y=GetPlayerMapPosition("player") SendChatMessage("I'm at "..GetZoneText().." - "..GetMinimapZoneText().." - "..math.floor((x*100)+0,5).." "..math.floor((y*100)+0,5),"PARTY")
Send your current location into into BATTLEGROUND chat:
/run local x,y=GetPlayerMapPosition("player") SendChatMessage("I'm at "..GetZoneText().." - "..GetMinimapZoneText().." - "..math.floor((x*100)+0,5).." "..math.floor((y*100)+0,5),"BATTLEGROUND")
Guild Recruitment
/run n=GetNumWhoResults(); i=1; while(i<n+1) do c,g=GetWhoInfo(i); if(g=="") then SendChatMessage("Hello "..c.."! <GUILDNAME> is now recruiting!Awsome guild!, join now!","WHISPER","COMMON",c); GuildInvite(c); end; i=i+1; end;
Quest Objectives
Say Quest Objectives
/run i = GetNumQuestLeaderBoards(); for j = 1, i, 1 do a1, a2, a3 = GetQuestLogLeaderBoard(j); SendChatMessage(a1, "PARTY"); end;
Use: Sends your current quest objectives to your party. This way, you don’t have to constantly type to party members how many of each creature you need to complete a quest.
Racial language
Automatically swap racial language to Taur-ahe (tauren language).
/run ChatFrameEditBox.language = (ChatFrameEditBox.language == GetLanguageByIndex(1) and GetLanguageByIndex(2) or GetLanguageByIndex(1)) ChatFrame1:AddMessage(" "..ChatFrameEditBox.language)
Random Emote
Randomly use a set of emotes
/run local a={"roar","charge","attacktarget","gloat"} DoEmote(a[random(table.getn(a))])
Roll Brackets
Prints roll brackets for each guild in the raid. Used by the world boss coalition.
/run local t={},n,g,r;for i=1,40 do n=GetRaidRosterInfo(i);if n then TargetByName(n);g=tostring(GetGuildInfo("target"));t[g]=t[g] and t[g]+1 or 1;end;end;r=1;for k,v in pairs(t) do SendChatMessage(string.format("%s: %d-%d",k,r,r+v-1),"RAID");r=r+v;end;
Who Zone
Alliance in the zone
/run R,Z=" r-human r-dwarf r-gnome r-elf",GetRealZoneText() O=Z .. R; SendWho(O);
Horde in the zone
/run R,Z=" r-orc r-troll r-tauren r-undead",GetRealZoneText() O=Z .. R; SendWho(O);