/* * Hammer - Based on meteor - 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: hammer <player> <reason>\n" ); ob = find_player( this_player()->expand_nickname( player ) ); if ( !ob ) return notify_fail( player +" not found!\n" ); PLAYERINFO_HANDLER->add_entry(TP, ob->query_name(), "hammer", reason); log_file( "NUKE", ctime( time() )+": "+this_player()->query_short()+ " hammered "+ob->query_short()+": "+reason+"\n"); pimp_shout("You see a very large %^YELLOW%^hammer%^RESET%^ up in the sky.\n"); write("Nuking player "+ob->query_name()+".\n"); call_out("nuke2", 2, ob, words); return 1; } void nuke2(object ob, string str) { pimp_shout("The %^YELLOW%^hammer%^RESET%^ rushes towards the ground.\n"); tell_object(ob, "It looks like it's heading for you.\n"); call_out("nuke3", 5, ob, str); } void nuke3(object ob, string str) { tell_object(ob, "The %^YELLOW%^hammer%^RESET%^ hits you ......"+ "%^RED%^WALLOP.%^RESET%^\n"); pimp_shout(ob->query_cap_name()+" has been nuked "+ implode(explode(str, " ")[1..sizeof(explode(str, " "))], " ")+".\n"+ capitalize(ob->query_pronoun())+" is no more.\n",ob); ob->save(); ob->quit(); }