whoop.c

skylib_mudos_v1/mudlib/cmds/admin/whoop.c · 2.6 KB

From the archive skylib_mudos_v1.tar.gz

Download the archive   « Back to the archive contents

/*
 * Whoop - Shaydz
 *
 */

#include <playerinfo.h>

inherit COMMAND_BASE;

varargs void pimp_shout( string words, object avoid ) {
   object thing, *things;
   things = users();
   foreach( thing in things ) {
      if ( ( thing != avoid ) && !thing->check_earmuffs( "shout" ) )
            thing->event_say( previous_object(), words, ({ }) );
   }
} /* pimp_shout() */

mixed cmd( string words ) {
   string player, reason;
   object ob;

   if ( !words || sscanf( words, "%s %s", player, reason ) != 2)
      return notify_fail( "Usage: whoop <player> <reason>\n" );
   ob = find_player( this_player()->expand_nickname( player ) );
   if ( !ob )
      return notify_fail( player +" not found!\n" );

   if(ob->query_name() == "shaydz")
     return notify_fail("You cannot whoop the king of whoopass, you ignorant bastard!\n");


  PLAYERINFO_HANDLER->add_entry(TP,
                                ob->query_name(),
                                "whoop",
                                reason);

   log_file( "NUKE", ctime( time() )+": "+this_player()->query_short()+
        " whooped "+ob->query_short()+": "+reason+"\n");
   pimp_shout("You notice an amazingly huge %^BOLD%^%^RED%^can%^RESET%^ of %^BOLD%^%^GREEN%^WHOOPASS%^RESET%^ up in the sky.\n");
   write("Whooping player "+ob->query_name()+".\n");
   call_out("nuke2", 2, ob);
   return 1;
}
void nuke2(object ob) {
  pimp_shout("The %^BOLD%^%^RED%^can%^RESET%^ of %^BOLD%^%^GREEN%^WHOOPASS%^RESET%^ flies down toward the ground.\n");
  call_out("nuke3", 5, ob);
}

void nuke3(object ob) {
  pimp_shout("The %^BOLD%^%^RED%^can%^RESET%^ of %^BOLD%^%^GREEN%^WHOOPASS%^RESET%^ stops and hovers just above the ground.\n");
  tell_object(ob, "Right over your head, in fact.\n");
  call_out("nuke4", 5, ob);
}

void nuke4(object ob) {
  string name_thing, objective_thing, pronoun_thing;
  name_thing = ob->query_cap_name();
  objective_thing = ob->query_objective();
  pronoun_thing = ob->query_pronoun();

  tell_object(ob, "The %^BOLD%^%^RED%^can%^RESET%^ of %^BOLD%^%^GREEN%^WHOOPASS%^RESET%^ "+
    "swings forward, its nozzle pointing straight at you (uhhoh).  "+
    "Suddenly, it squirts a large vortex of %^BOLD%^%^GREEN%^WHOOPASS%^RESET%^, "+
    "flinging your now-ripped-apart body parts far and wide.\nWasn't that nice?\n");

  ob->save();
  ob->quit();

  pimp_shout("The %^BOLD%^%^RED%^can%^RESET%^ of %^BOLD%^%^GREEN%^WHOOPASS%^RESET%^ "+
    "swings forward, its nozzle pointing straight at "+name_thing+
    ".  Suddenly, it squirts a large vortex of %^BOLD%^%^GREEN%^WHOOPASS%^RESET%^, "+
    "completely pulverising "+objective_thing+".\n"+name_thing+" has been "+
    "whooped.  "+capitalize(pronoun_thing)+" is no more.\n",ob);
}

Site Stats

Snippets: 1791
Codebases: 571