_localcmd.c

tmi2_fluffos_v2/lib/cmds/wiz/_localcmd.c · 831 B

From the archive tmi2_fluffos_v2.zip

Download the archive   « Back to the archive contents

// _commands.c (/bin/dev/command)
// dev command to find out all local commands
// author: wayfarer
// Help added by Mobydick, 11-21-92. BEAT CAL!

#include <mudlib.h>

inherit DAEMON ;

int cmd_localcmd (string arg)
{
  mixed * cmds;
  int i;
  string ob;

  ob = "";
   cmds = (mixed *)previous_object()->user_commands();
  for (i = 0; i < sizeof(cmds); i++)
    {
      if (file_name(cmds[i][2]) != ob)
	{
	  if (ob != "")
	    write ("\n");
	  ob = file_name(cmds[i][2]);
	  write ("["+ob+"]\n  ");
	}
      write (cmds[i][0]+" ");
    }

  write ("\n");

  return 1;

}

int help() {
	write ("Usage: localcmd\n\n"+
"This command will show you what commands are defined by objects in your\n"+
"inventory or environment. For commands in your path, use \"pathcmd\",\n"+
"and for soul commands use \"semote\".\n") ;
	return 1 ;
}

Site Stats

Snippets: 1791
Codebases: 571