WoW:API GuildUninvite: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(GuildKick makro)
 
No edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
{{protectedapi|7.3.0|}}
Removes a member of the guild.
Removes a member of the guild.
  GetNumGuildMembers(player);
  GetNumGuildMembers(player);


==Parameters==
==Parameters==
:;player : String - The name of one member of the guild  
:;player
:: String - The name of one member of the guild


==Examples==
==Examples==
Line 38: Line 41:
Open guild roster and sort for "Last Online" before starting the makro.
Open guild roster and sort for "Last Online" before starting the makro.
  /script i=99;while(i>0)do c,_,r,l,_,_,t,o,n=GetGuildRosterInfo(i);if(not n)then _,_,d,h=GetGuildRosterLastOnline(i);if(l<81 and r==6 and d>8 and t=="" and o=="")then GuildUninvite(c);end;end;i=i-1;end;
  /script i=99;while(i>0)do c,_,r,l,_,_,t,o,n=GetGuildRosterInfo(i);if(not n)then _,_,d,h=GetGuildRosterLastOnline(i);if(l<81 and r==6 and d>8 and t=="" and o=="")then GuildUninvite(c);end;end;i=i-1;end;
[[Category:World of Warcraft API/Protected Functions]]

Revision as of 11:28, 20 May 2018

WoW API < GuildUninvite


Removes a member of the guild.

GetNumGuildMembers(player);

Parameters

player
String - The name of one member of the guild

Examples

Kick Joe

Makro to kick the member "Joe":

/script GuildUninvite("Joe");

Kick inactive

Code for kicking inactiv long offline players

GuildRoster();
local i=1;
while ( i < 1000 ) do 
  local player,rank,rankIndex,level,class,zone,gnote,offinote,online,status,
        classFileName,achievementPoints,achievementRank,isMobile = GetGuildRosterInfo(i);
  if(not online)then 
    local year,month,day,hour=GetGuildRosterLastOnline(i);
    if(level<59 and rankIndex>8 and year>6 and gnote=="" and offinote=="")then
      GuildUninvite(player);
      i=i-1;
    end;
  end;
  i=i+1;
end;

Kick Makro

Makro for searching the first 99 displayed members in the GuildRoster and kick all that fullfill all the following conditions:

  • below level 81
  • GuildRankIndex is 6
  • long offline since more than 8 days
  • no guild note
  • no officer note

Open guild roster and sort for "Last Online" before starting the makro.

/script i=99;while(i>0)do c,_,r,l,_,_,t,o,n=GetGuildRosterInfo(i);if(not n)then _,_,d,h=GetGuildRosterLastOnline(i);if(l<81 and r==6 and d>8 and t=="" and o=="")then GuildUninvite(c);end;end;i=i-1;end;