WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   [Help] Invite ALL Guild (https://www.wowinterface.com/forums/showthread.php?t=42662)

Caetan0 02-20-12 03:21 PM

[Help] Invite ALL Guild
 
Hello friends WOWInterface,

I'm trying to create a macro to invite all members to level 80 to 85 of my guild for my Raid, I came to this command line.

/run for i=1,GetNumGuildMembers(true) do local name,_,_,level = GetGuildRosterInfo(i); if level >= 85 and level <= 85 then InviteUnit(name); end end

This macro invites even those who are offline, is to change it?
Is right or there's something that should be changed or can be improved?

SDPhantom 02-20-12 03:35 PM

The 9th value from GetGuildRosterInfo() should return whether or not they're online. Also the level cap is already 85, so you only need to check if they're 80+.

Code:

/run for i=1,GetNumGuildMembers(true) do local name,_,_,level,_,_,_,_,online=GetGuildRosterInfo(i); if online and level>=80 then InviteUnit(name); end


All times are GMT -6. The time now is 10:36 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI