ACMD(do_finger)
{
const char *immlevels[LVL_IMPL - (LVL_IMMORT-1)] = {
"Wizard", /* highest mortal level +1 */
"Senior Wizard", /* highest mortal level +2 */
"Arch Wizard", /* highest mortal level +3 */
"God", /* highest mortal level +4 */
};
struct time_info_data playing_time;
struct char_data *victim = 0;
skip_spaces(&argument);
if (!*argument) {
send_to_char(ch, "Who?\r\n");
} else {
CREATE(victim, struct char_data, 1);
clear_char(victim);
CREATE(victim->player_specials, struct player_special_data, 1);
playing_time = *real_time_passed((time(0) - ch->player.time.logon) + ch->player.time.played, 0);
if (load_char(argument, victim) >= 0) {
if (GET_LEVEL(victim) >= LVL_IMMORT)
send_to_char(ch, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r\n %s %s\r\n Status: %s\r\n Married to: N/A\r\n Clan enrollment: N/A\r\n Age : %d day%s %d hour%s\r\n Last logged at: N/A\r\n Email address: N/A\r\n Player has (no) unread mail.\r\n Player is not logged on.\r\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r\n", GET_NAME(victim), GET_TITLE(victim), immlevels[GET_LEVEL(victim)-LVL_IMMORT], playing_time.day, playing_time.day == 1 ? "" : "s", playing_time.hours, playing_time.hours == 1 ? "" : "s");
else
send_to_char(ch, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r\n %s %s\r\n Status: %d %d\r\n Married to: N/A\r\n Clan enrollment: N/A\r\n Age : %d day%s %d hour%s\r\n Last logged at: N/A\r\n Email address: N/A\r\n Player has (no) unread mail.\r\n Player is not logged on.\r\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r\n", GET_NAME(victim), GET_TITLE(victim), GET_CLASS(victim), GET_LEVEL(victim), playing_time.day, playing_time.day == 1 ? "" : "s", playing_time.hours, playing_time.hours == 1 ? "" : "s");
} else {
send_to_char(ch, "There is no such player.\r\n");
}
free(victim);
}
}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Foobar the Swordpupil
Status: Death Knight 99 <—(THIS Class / LEVEL)
Married to: Birgitte
Clan enrollment: The Saints
Age : 0 days 5 hours
Last logged at: Sun Dec 31 03:41:57 2011 from: c-??-???-???-??.hsd1.tx.comcast.net
Email address: ???????@????.???
He has no unread mail.
He is not logged on.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Foobar the Swordpupil
Status: 9 99 <—(THIS Class / LEVEL(shows class number instead of class name))
Married to: Birgitte
Clan enrollment: The Saints
Age : 0 days 5 hours
Last logged at: Sun Dec 31 03:41:57 2011 from: c-??-???-???-??.hsd1.tx.comcast.net
Email address: ???????@????.???
He has no unread mail.
He is not logged on.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
This code keeps crashing the mud. :ghostface: