View Single Post
Unread 09-23-12, 12:19 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,587
tinyu: that's not how SendChatMessage() works, nor is it what GuildControlGetRankName() is for.

makaka: This is untested, but really should work.
Code:
/run for i=1,select(2,GetNumGuildMembers()) do local n,r=GetGuildRosterInfo(i) if r="Newbie" then SendChatMessage("TEXT MESSAGE","WHISPER",nil,n) end end
GetGuildRosterInfo has many returns. The first is name, and the second is rank. As your script goes through the loop, it assigns that member's name to the variable n and their rank to the variable r. If the rank is "Newbie" (or whatever you want to replace that with) then it will send the message. I also tightened it up a little bit more. As written, if your rank name is "Newbie" or another 6-letter name, you have 114 characters to use for your message.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

Seerah is offline   Reply With Quote