fling.c

./lib/players/mirak/open/fling.c · 997 B

From the archive h7v3.0a.tar.gz

Download the archive   « Back to the archive contents

#include <mudlib.h>
inherit "/inherit/base/base_obj.c";

string who,str;
object ob;


void init () {

    add_action("_toss","toss");
}

int _toss(string str) {
    if (!str || sscanf(str, "%s",who) !=1) {
	write ("syntax: toss <target>\n");
	return 1;
    }
    ob = find_living(lower_case(who));
    if (!ob) {
	write("No one is on by that name.\n");
	return 1;
    }
    tell_object(ob,(capitalize((string)this_player()->query_player_real_name()))+
      "smacks a snowball right against your head!\n");
    tell_room(ob,(captialize((string)this_player()->query_player_real_name()))+
      " smacks "+(capitalize(who))+" with a snowball!\n");
    write {
	"You smack "+capitalize(who))+" with a snowball!\n");
this_object()->move(ob);
return 1;
}

void reset(status arg) {
    ::reset(arg);
    if(arg) return;

    set_short("A Magic Snowball");
    set_long(
      "Its a snowball that wont melt.\n");
    set_info("Can be thrown at someone, at incredible distances!\n");
    set_value(1);
}

Site Stats

Snippets: 1791
Codebases: 571