dsIIr4/bin/
dsIIr4/extra/creremote/
dsIIr4/extra/wolfpaw/
dsIIr4/lib/cmds/admins/
dsIIr4/lib/cmds/common/
dsIIr4/lib/cmds/creators/include/
dsIIr4/lib/cmds/creators/include/SCCS/
dsIIr4/lib/daemon/services/
dsIIr4/lib/doc/
dsIIr4/lib/domains/Ylsrim/
dsIIr4/lib/domains/Ylsrim/adm/
dsIIr4/lib/domains/Ylsrim/armor/
dsIIr4/lib/domains/Ylsrim/broken/
dsIIr4/lib/domains/Ylsrim/fish/
dsIIr4/lib/domains/Ylsrim/meal/
dsIIr4/lib/domains/Ylsrim/npc/
dsIIr4/lib/domains/Ylsrim/virtual/
dsIIr4/lib/domains/Ylsrim/weapon/
dsIIr4/lib/domains/campus/adm/
dsIIr4/lib/domains/campus/etc/
dsIIr4/lib/domains/campus/meals/
dsIIr4/lib/domains/campus/npc/
dsIIr4/lib/domains/campus/save/
dsIIr4/lib/domains/campus/txt/
dsIIr4/lib/domains/campus/txt/ai/charles/
dsIIr4/lib/domains/campus/txt/ai/charles/bak2/
dsIIr4/lib/domains/campus/txt/ai/charles/bak2/bak1/
dsIIr4/lib/domains/campus/txt/ai/charly/
dsIIr4/lib/domains/campus/txt/ai/charly/bak/
dsIIr4/lib/domains/campus/txt/jenny/
dsIIr4/lib/domains/default/creator/
dsIIr4/lib/domains/default/doors/
dsIIr4/lib/domains/default/etc/
dsIIr4/lib/domains/default/virtual/
dsIIr4/lib/domains/default/weap/
dsIIr4/lib/domains/town/virtual/
dsIIr4/lib/lib/comp/
dsIIr4/lib/lib/lvs/
dsIIr4/lib/lib/user/
dsIIr4/lib/lib/virtual/
dsIIr4/lib/log/
dsIIr4/lib/obj/book_source/
dsIIr4/lib/obj/include/
dsIIr4/lib/realms/template/
dsIIr4/lib/realms/template/adm/
dsIIr4/lib/realms/template/area/armor/
dsIIr4/lib/realms/template/area/npc/
dsIIr4/lib/realms/template/area/obj/
dsIIr4/lib/realms/template/area/room/
dsIIr4/lib/realms/template/area/weap/
dsIIr4/lib/realms/template/bak/
dsIIr4/lib/realms/template/cmds/
dsIIr4/lib/save/
dsIIr4/lib/save/kills/o/
dsIIr4/lib/secure/cfg/classes/
dsIIr4/lib/secure/cmds/creators/include/
dsIIr4/lib/secure/cmds/players/
dsIIr4/lib/secure/cmds/players/include/
dsIIr4/lib/secure/daemon/include/
dsIIr4/lib/secure/lib/
dsIIr4/lib/secure/lib/include/
dsIIr4/lib/secure/lib/net/include/
dsIIr4/lib/secure/lib/std/
dsIIr4/lib/secure/modules/
dsIIr4/lib/secure/npc/
dsIIr4/lib/secure/obj/include/
dsIIr4/lib/secure/room/
dsIIr4/lib/secure/save/
dsIIr4/lib/secure/save/boards/
dsIIr4/lib/secure/save/players/g/
dsIIr4/lib/secure/tmp/
dsIIr4/lib/secure/verbs/creators/
dsIIr4/lib/shadows/
dsIIr4/lib/spells/
dsIIr4/lib/std/board/
dsIIr4/lib/std/lib/
dsIIr4/lib/tmp/
dsIIr4/lib/verbs/admins/include/
dsIIr4/lib/verbs/common/
dsIIr4/lib/verbs/common/include/
dsIIr4/lib/verbs/creators/include/
dsIIr4/lib/verbs/players/include/SCCS/
dsIIr4/lib/verbs/rooms/
dsIIr4/lib/verbs/rooms/include/
dsIIr4/lib/www/
dsIIr4/v22.2b14-dsouls2/
dsIIr4/v22.2b14-dsouls2/ChangeLog.old/
dsIIr4/v22.2b14-dsouls2/Win32/
dsIIr4/v22.2b14-dsouls2/compat/
dsIIr4/v22.2b14-dsouls2/compat/simuls/
dsIIr4/v22.2b14-dsouls2/include/
dsIIr4/v22.2b14-dsouls2/mudlib/
dsIIr4/v22.2b14-dsouls2/testsuite/
dsIIr4/v22.2b14-dsouls2/testsuite/clone/
dsIIr4/v22.2b14-dsouls2/testsuite/command/
dsIIr4/v22.2b14-dsouls2/testsuite/data/
dsIIr4/v22.2b14-dsouls2/testsuite/etc/
dsIIr4/v22.2b14-dsouls2/testsuite/include/
dsIIr4/v22.2b14-dsouls2/testsuite/inherit/
dsIIr4/v22.2b14-dsouls2/testsuite/inherit/master/
dsIIr4/v22.2b14-dsouls2/testsuite/log/
dsIIr4/v22.2b14-dsouls2/testsuite/single/
dsIIr4/v22.2b14-dsouls2/testsuite/single/tests/compiler/
dsIIr4/v22.2b14-dsouls2/testsuite/single/tests/efuns/
dsIIr4/v22.2b14-dsouls2/testsuite/single/tests/operators/
dsIIr4/v22.2b14-dsouls2/testsuite/u/
dsIIr4/v22.2b14-dsouls2/tmp/
dsIIr4/win32/
/*    /secure/cmds/admins/stupidemote.c
 *    From the Dead Souls V Object Library
 *    Adds lame emotes
 *    Created by Descartes of Borg 961214
 *    Version: @(#) stupidemote.c 1.4@(#)
 *    Last modified: 96/12/15
 */

#include <lib.h>
#include <daemons.h>

inherit LIB_DAEMON;

mixed cmd(string args) {
    string array rules = ({ "", "STR" });
    string array adverbs;
    string emote, xtra, prep;

    if( !args || args == "" ) {
	return "Add which emote?";
    }
    if( sscanf(args, "%s %s", emote, xtra) != 2 ) {
	emote = args;
	xtra = 0;
    }
    if( xtra ) {
	if( xtra == "LIV" || xtra == "LVS" ) {
	    prep = 0;
	}
	else {
	    string token;

	    if( strlen(xtra) < 5 ) {
		return "The expression " + xtra + " makes no sense.";
	    }
	    prep = xtra[0..<5];
	    token = xtra[<3..];
	    if( member_array(prep, master()->parse_command_prepos_list()) ==
	      -1 ) {
		return "The preposition " + prep + " is not a valid.";
	    }
	    if( member_array(token, ({ "LIV", "LVS" })) == -1 ) {
		return "The token " + token + " is invalid.";
	    }
	    rules = ({ rules..., token });
	}
	rules = ({ rules..., xtra, "STR " + xtra, xtra + " STR" });
    }
    else {
	prep = 0;
    }
    if( !SOUL_D->AddVerb(emote, capitalize(emote) + " how?") ) {
	previous_object()->eventPrint("Failed to create emote.");
	return 1;
    }
    foreach(string rule in rules) {
	string msg;

	if( rule == "" ) {
	    msg = "$agent_name $agent_verb.";
	    adverbs = 0;
	}
	else if( rule == "STR" ) {
	    msg = "$agent_name $agent_verb $adverb.";
	    adverbs = ({ "-" });
	}
	else if( rule == "LIV" || rule == "LVS" || rule == xtra ) {
	    if( prep ) {
		msg = "$agent_name $agent_verb " + prep + " $target_name.";
	    }
	    else {
		msg = "$agent_name $agent_verb $target_name.";
	    }
	}
	else {
	    if( prep ) {
		msg = "$agent_name $agent_verb $adverb " + prep +
		" $target_name.";
	    }
	    else {
		msg = "$agent_name $agent_verb $target_name $adverb.";
	    }
	}
	if( adverbs ) {
	    SOUL_D->AddRule(emote, rule, ({ ({ emote }), msg }), adverbs);
	}
	else {
	    SOUL_D->AddRule(emote, rule, ({ ({ emote }), msg }));
	}
    }
    previous_object()->eventPrint("Stupid emote added.");
    return 1;
}

string GetHelp(string args) {
    return ("Syntax: <stupidemote EMOTE>\n"
      "        <stupidemote EMOTE RULE>\n"
      "This command allows you to add the most common kinds of "
      "emote straight from the command line.  Using the first syntax, "
      "You can add a simple, untargetted emote.  For example, "
      "if you did <stupidemote cheese>, this would create an emote "
      "that would allow people to do <cheese> and <cheese adverb> "
      "with a message that looks like \"Descartes cheeses.\"\n"
      "The second syntax is for targetted emotes.  You specify a "
      "targetting rule.  Targetting rules can be one of the following:\n"
      "\t* LIV\n"
      "\t* LVS\n"
      "\t* preposition LIV\n"
      "\t* preposition LVS\n"
      "The difference between LIV and LVS just determines whether the "
      "emote can be targetted at a single living being or one or more "
      "living beings.  So, to add the \"smile\" emote, you would "
      "do:\n"
      "> stupidemote smile at LVS\n"
      "and that would give you all the functionality of the \"smile\" "
      "emote that exists on this mudlib.\n\n"
      "See also: addadverb, addemote, removeadverb, removeemote");
}