Psyche Posted August 21, 2017 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 123 Reputation: 6 Joined: 03/12/13 Last Seen: June 7, 2023 Share Posted August 21, 2017 Hello I want to ask about @who modification. Now we know that @who command gives a information about Player's Name, Party, and Guild. How if i am disable the list of player's name. so if i run @who command, it will be final result only (XX players found). Thanks Quote Link to comment Share on other sites More sharing options...
0 anacondaq Posted August 21, 2017 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 1096 Reputation: 348 Joined: 02/26/12 Last Seen: May 30, 2023 Share Posted August 21, 2017 2 hours ago, Psyche said: Hello I want to ask about @who modification. Now we know that @who command gives a information about Player's Name, Party, and Guild. How if i am disable the list of player's name. so if i run @who command, it will be final result only (XX players found). Thanks /who ? Quote Link to comment Share on other sites More sharing options...
0 HD Scripts Posted August 22, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 184 Reputation: 15 Joined: 06/10/12 Last Seen: 14 hours ago Share Posted August 22, 2017 existing /w Quote Link to comment Share on other sites More sharing options...
0 Psyche Posted August 22, 2017 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 123 Reputation: 6 Joined: 03/12/13 Last Seen: June 7, 2023 Author Share Posted August 22, 2017 12 hours ago, Anacondaqq said: /who ? 7 hours ago, HD Scripts said: existing /w Yeah, but i wanted to enable who features only with several group id. so the player with group id 1 cannot see the players online. I know that it was /who, but it forced to be used for all group id/players. Quote Link to comment Share on other sites More sharing options...
0 Jonne Posted August 23, 2017 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 153 Reputation: 33 Joined: 12/24/11 Last Seen: September 30, 2024 Share Posted August 23, 2017 I changed the @who commands to accomodate your wishes. Basically I added @who4/@whomap4 which work exactly like the current @who und @who works as you wished it to diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d8d52b9..ffd2d78 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -621,15 +621,16 @@ ACMD_FUNC(who) { int level = 0; StringBuf buf; /** - * 1 = @who : Player name, [Title], [Party name], [Guild name] + * 1 = @who : Count * 2 = @who2 : Player name, [Title], BLvl, JLvl, Job * 3 = @who3 : [CID/AID] Player name [Title], Map, X, Y + * 4 = @who4 : Player name, [Title], [Party name], [Guild name] */ int display_type = 1; int map_id = -1; nullpo_retr(-1, sd); - + if (strstr(command, "map") != NULL) { char map_name[MAP_NAME_LENGTH_EXT] = ""; if (sscanf(message, "%15s %23s", map_name, player_name) < 1 || (map_id = map_mapname2mapid(map_name)) < 0) @@ -637,12 +638,14 @@ ACMD_FUNC(who) { } else { sscanf(message, "%23s", player_name); } - + if (strstr(command, "2") != NULL) display_type = 2; else if (strstr(command, "3") != NULL) display_type = 3; - + else if (strstr(command, "4") != NULL) + display_type = 4; + level = pc_get_group_level(sd); StringBuf_Init(&buf); @@ -670,7 +673,7 @@ ACMD_FUNC(who) { StringBuf_Printf(&buf, msg_txt(sd,348), mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); // "| Location: %s %d %d" break; } - default: { + case 4: { struct party_data *p = party_search(pl_sd->status.party_id); struct guild *g = pl_sd->guild; @@ -683,6 +686,10 @@ ACMD_FUNC(who) { StringBuf_Printf(&buf, msg_txt(sd,346), g->name); // " | Guild: '%s'" break; } + default: { + count++; // Just count + continue; // and don't list player infos + } } clif_displaymessage(fd, StringBuf_Value(&buf)); StringBuf_Clear(&buf); @@ -9996,9 +10003,11 @@ void atcommand_basecommands(void) { ACMD_DEF(who), ACMD_DEF2("who2", who), ACMD_DEF2("who3", who), + ACMD_DEF2("who4", who), ACMD_DEF2("whomap", who), ACMD_DEF2("whomap2", who), ACMD_DEF2("whomap3", who), + ACMD_DEF2("whomap4", who), ACMD_DEF(whogm), ACMD_DEF(save), ACMD_DEF(load), 1 Quote Link to comment Share on other sites More sharing options...
Question
Psyche
Hello
I want to ask about @who modification. Now we know that @who command gives a information about Player's Name, Party, and Guild.
How if i am disable the list of player's name. so if i run @who command, it will be final result only (XX players found).
Thanks
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.