Welcome to the Builder Academy

Question Show number of mortals and immortals on who list

More
21 Apr 2024 00:22 - 21 Apr 2024 00:23 #10391 by Fubar


In do_who:
Code:
// at the tope with all the other int's int Wizards = 0, Mortals = 0; // in the first for descriptor list         if (GET_LEVEL(tch) >= 100)         {             Wizards++;         }         else if (GET_LEVEL(tch) <= 99)         {             Mortals++;         } // near the bottom     if (short_list && num_can_see % 4)         send_to_char(ch, "\r\n");     if (!num_can_see)         send_to_char(ch, "Nobody at all!\r\n");     else if (num_can_see == 1)         send_to_char(ch, "ONE is the loniest number that ever was...\r\n");     else         send_to_char(ch, "There %s %d superuser%s%s", (Wizards == 1 ? "is" : "are"), Wizards, (Wizards == 1 ? "" : "s"), (Mortals ? " and there " : "."));     if (Mortals)         send_to_char(ch, "%s%s %d user%s.", (Wizards ? buf : "There "), (Mortals == 1 ? "is" : "are"), Mortals, (Mortals == 1 ? "" : "s"));         send_to_char(ch, "  Total of %d user%s online.\r\n", num_can_see, (num_can_see == 1 ? "" : "s"));
Last edit: 21 Apr 2024 00:23 by Fubar. Reason: lefty out some code
The following user(s) said Thank You: thomas

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds