Jump to content
  • 0

View guild members


TiMz

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  192
  • Reputation:   9
  • Joined:  05/08/13
  • Last Seen:  

Hello. Can someone help me make an NPC that will show a list of all member names of guild_id==100? Just a simple npc with just that.

 

Thank you!

 

 

Hoping it will look something like this.

 

[Poring Guild]    //which is guild_id 100

Members:

Aba

Baba

Caba

Edited by Isaiah
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Added the Getguildmember command in eba1539. Please update (or cherry-pick the commit) to be able to use the command.

set .@gid, 100;

mes "[ " + getguildname(.@gid) + " ]";
mes "Members:";
getguildmember .@gid;
if ($@guildmembercount == 0)
	mes "- none - ";
else {
	for (.@i = 0; .@i < $@guildmembercount; .@i++)
		mes $@guildmembername$[.@i];
}
close;
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  192
  • Reputation:   9
  • Joined:  05/08/13
  • Last Seen:  

@euphy Thanks for responding. I can't seem to compile with the new code. I'm guessing my svn is far too outdated for it. (attached error screenie)

 

Thanks though!

post-17297-0-91477100-1392163173_thumb.png

Edited by Isaiah
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


.@guild_id = 100;

query_sql( "SELECT `name`,`position` FROM `guild_member` WHERE `guild_id` = "+.@guild_id+" ORDER BY `position` ",.@name$,.@position );

.@name_size = getarraysize( .@name$ );

for( .@i = 0; .@i < .@name_size; .@i++ )

mes .@name$[.@i]+" | Position: "+.@position[.@i];

close;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...