omni.txt
snippets · 1.1 KB · 2010-03-30
Omni: a tiny snippet to see who is fighting or doing what before a rescue.
Download « Back to the snippets list
/* This very small snippet was used on Visions of Eternity MUD and is useful for seeing who's fighting
or doing what, before doing a restore, world peace, or copyover, or just being nosey. Remember to add it to the command
list and interpreter. This is the section for act_wizard.c */
ACMD(do_omni)
{
struct descriptor_data *d;
int found = 0;
send_to_char(ch, "Name Level Room Position Hps%% Manas%% Moves%%\r\n");
send_to_char(ch, "--------------- ------ ----- --------- ----- ------ ------\r\n");
for (d = descriptor_list; d; d = d->next) {
if (STATE(d) != CON_PLAYING)
continue;
if (GET_INVIS_LEV(d->character) <= GET_LEVEL(ch)) {
send_to_char(ch, "%-15s %-6d %-5d %-9s %-5d %-5d %-5d\r\n",
GET_NAME(d->character), GET_LEVEL(d->character), GET_ROOM_VNUM(IN_ROOM(d->character)),
position_types[(int)GET_POS(d->character)], (GET_HIT(d->character)*100)/GET_MAX_HIT(d->character),
(GET_MANA(d->character)*100)/GET_MAX_MANA(d->character), (GET_MOVE(d->character)*100)/GET_MAX_MOVE(d->character));
found++;
}
}
if (!found)
send_to_char(ch, "No one is online.\r\n");
}