Jump to content
  • 0

View guild members


Question

Posted (edited)

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

3 answers to this question

Recommended Posts

Posted

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
Posted (edited)

@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
Posted


.@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;

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...