World of Warcraft > Guides and Walkthroughs

Macro Guide = Post a Message to Party or Raid Automatically

(1/1)

Shadowwolf:
So you want a Macro that notifies the Party or Raid you're in automatically when you execute it but dont want 2 different ones for /party and /raid. Easy enough.

The below code will allow the macro to detect if you are in a party or raid and send the message to the right channel accordingly.

This is the code I use for my Ritual of Summoning on my Warlock to post a message to the chat of who im summoning, where to and ask for assistance.


/script local C; if(GetNumRaidMembers()==0) then C = "PARTY" else C = "RAID" end SendChatMessage("Velyn's Lazyperson Taxi - Summoning %t to << "..GetMinimapZoneText().." >>. Please click the portal to assist.", C)
/cast Ritual of Summoning

The text in Red is what will be displayed exactly as typed in the appropriate chat channel. The script will check to see if you are in a party, if it sees you are a part of a raid it will post to the raid channel instead.

The Green text of "%t" will replace that with your current target. If you have a player targeted, thier name will appear in that spot. This works for things like ressurections, etc, but if the targets name can not be determined, it will use "<no target>". This happens on things that are not targetable, such as ressurecting a players body that has released as a corpse can not be targeted in the same way a player can.

I went a little more complicated with mine in this macro where the portion in Blue will get the name of my location and post that in the message. The result of the message is as follows:

[Party] Velyn: Velyn's Lazyperson Taxi - Summoning Player to << Feathermoon Stronghold >>. Please click the portal to assist.

Depending on your location at the time you initiate this macro, the name of it will be updated automatically no matter where you are.

Your macro should then be followed with the command to perform whatever task you want after this such as /cast Ritual of Summoning and look like this:

 [ Invalid Attachment ]

Thats all there is to it. =)

un4:
Oooh!  Nice!  Thanks for sharing - sapping will never be the same again!

Muridin:
i tried to get my resurecting macro to work after you logged, and i got someone to help, but they couldnt see the error in my code, but when i get home ( im at my grandparents's for a chrissy do ) ill copy the code and see if i can get it right

Navigation

[0] Message Index

Go to full version