Exemple #1
0
void do_event(struct char_data *ch, const char *argument, int cmd)
{
    static const char                      *event_list[] = {
	NULL,
	"rats - Rats invade whatever zone you are standing in. [1+]",
	"undead - The undead rise and devour the zone you are in. [4-10]",
	"xenthia - The Lady of the Dead rises and enters the world. [10-15]",
	"goodies - Goodies fall to earth, with a few bandits too. [2-15]",
	NULL
    };
    static const funcp                      event_code[] = {
	NULL,
	(funcp)event_rats_invade_zone,
	(funcp)event_undead_invade_zone,
	(funcp)event_zombie_master,
	(funcp)event_scatter_goodies,
	NULL
    };
    int                                     i = 0;
    char                                    buf[MAX_INPUT_LENGTH] = "\0\0\0\0\0\0\0";
    int                                     found = FALSE;

    if (DEBUG)
	log_info("called %s with %s, %s, %d", __PRETTY_FUNCTION__, SAFE_NAME(ch),
		 VNULL(argument), cmd);

    if (IS_NPC(ch))
	return;
    only_argument(argument, buf);
    if (!*buf) {
	cprintf(ch, "usage:  event { list | <event name> }\r\n");
	return;
    }
    if (!strcasecmp(buf, "list")) {
	cprintf(ch, "The following events are defined:\r\n");
	for (i = 1; event_list[i]; i++) {
	    cprintf(ch, "    %s\r\n", event_list[i]);
	}
	return;
    }
    for (i = 1; event_list[i]; i++) {
	if (!strncasecmp(buf, event_list[i], strlen(buf))) {
	    found = i;
	    break;
	}
    }
    if (!found)
	return;
    cprintf(ch, "Doing Event [#%d] %s\r\n", found, event_list[found]);
    log_info("%s does Event [#%d] %s", GET_NAME(ch), found, event_list[found]);
    event_code[found] (ch, argument);
}
Exemple #2
0
void random_error_message(struct char_data *ch)
{
    static const char                      *oops[] = {
	"Pardon?",
	"I didn't quite catch that one...",
	"I'm sorry Dave, I'm afraid I can't let you do that.",
	"Quixadhal will spank you for typing that!",
	"Connection closed by foreign host",
	"NO CARRIER",
	"Ummmm.. go away, we already got one.",
	"Huh huh huh, what a dork!",
	"You WISH you could type...",
	"Just type it and get it over with.",
	"No.",
	"Maybe later...",
	"Arglebargle, glop-glyf!?!",
	"Quixadhal snickers 'You think THAT will stop me?'",
	"The keyboard refuses to let go.",
	"Ouch!  Not that key!  Damnit, that one hurts!",
	"Stop calling me buttknocker!!!",
	"Muidnar cackles 'Nice typo!  Muahahahahaha!!!'",
	"I hope YOU understood that, I certainly didn't.",
	"Now where did I put that punchcard with the Highstaff macro on it?",
	"Muth sighs 'Wiley was alot harder back in MY days.'",
	"Isn't the X-Files on or something?",
	"I'll pretend you didn't type that.",
	"Blah blah blah blah, blah blah, blah...",
	"Uhhhh..... Shutup!",
	"Yeah, right.",
	"I will have to kill you for that!",
	"You have insulted the honour of the keyboard!",
	"If I talked to you that way, you'd be upset wouldn't you?",
	"You hear a faint click behind you.",
	"Eli steps up and whispers, 'Use the HOMEROW next time...'",
	"I bet you heard that in an AOL commercial.",
	"Klackety-Klack-klack-klack-klack-ClickClickClick-klack--klack",
	"NOBODY expects the Spammish Inquisition!",
	NULL
    };
    static int                              howmany = 34;

    if (DEBUG > 2)
	log_info("called %s with %s", __PRETTY_FUNCTION__, SAFE_NAME(ch));

    cprintf(ch, "%s\r\n", oops[number(1, howmany) - 1]);
}
Exemple #3
0
static void event_rats_invade_zone(struct char_data *ch, char *arg)
{
    struct event_mob_set                    mobset[11] = {
/* vnum, hp: xdy+z, exp: xdy+z, gold: xdy+z, object %, obj vnum */
	{4618, 6, 8, 8, 1, 6, 4, 2, 6, 0, 2, 4602},	       /* special large rat */
	{4618, 4, 6, 5, 1, 6, 4, 1, 6, 0, 0, -1},	       /* large rat */
	{4618, 4, 6, 3, 1, 6, 4, 1, 4, 0, 0, -1},	       /* large rat */
	{3432, 3, 6, 1, 1, 6, 4, 1, 2, -1, 0, -1},	       /* disgusting rat */
	{3432, 2, 6, 1, 1, 6, 4, 0, 0, 0, 0, -1},	       /* disgusting rat */
	{3432, 2, 6, 1, 1, 6, 4, 0, 0, 0, 0, -1},	       /* disgusting rat */
	{3432, 2, 6, 1, 1, 6, 4, 0, 0, 0, 0, -1},	       /* disgusting rat */
	{3433, 4, 6, 1, 1, 6, 4, 1, 4, -1, 0, -1},	       /* giant rat */
	{3433, 4, 6, 1, 1, 6, 4, 1, 4, -1, 0, -1},	       /* giant rat */
	{3433, 4, 6, 5, 1, 6, 4, 1, 4, -1, 0, -1},	       /* giant rat */
	{5056, 3, 8, 5, 2, 6, 10, 1, 2, -1, 0, -1}	       /* black cat */
    };
    struct event_mob_in_zone                mobs = { 0, 0, 60, 1, 8, 11, mobset };
    int                                     zone = 0;
    struct room_data                       *rp = NULL;

    if (DEBUG > 1)
	log_info("called %s with %s, %s", __PRETTY_FUNCTION__, SAFE_NAME(ch), VNULL(arg));

    if ((rp = real_roomp(ch->in_room)))
	zone = rp->zone;
    else
	return;

    mobs.bottom = zone ? (zone_table[zone - 1].top + 1) : 0;
    mobs.top = zone_table[zone].top;
    if (IS_SET(ch->specials.act, PLR_STEALTH))
	zprintf(zone,
		"\r\nYou feel a great surge of power!\r\nYou hear odd scurrying sounds all around you...\r\n\r\n");
    else
	zprintf(zone,
		"\r\nIn a puff of acrid smoke, you see %s snap %s fingers!\r\nYou hear odd scurrying sounds all around you...\r\n\r\n",
		GET_NAME(ch), HSHR(ch));
    mob_count = 0;
    hash_iterate(&room_db, (funcp)event_fill_zone_with_mobs, &mobs);
    cprintf(ch, "You just added %d rats to %s [#%d].\r\n", mob_count,
	    zone_table[zone].name, zone);
    log_info("%s added %d rats to %s [#%d].", GET_NAME(ch), mob_count, zone_table[zone].name,
	     zone);
}
Exemple #4
0
void random_magic_failure(struct char_data *ch)
{
    static const char                      *oops[] = {
	"Bylle Grylle Grop Gryf???",
	"Olle Bolle Snop Snyf?",
	"Olle Grylle Bolle Bylle?!?",
	"Gryffe Olle Gnyffe Snop???",
	"Bolle Snylle Gryf Bylle?!!?",
	"A dragon appears and WHAPS you for trying to cast that!",
	"You try to cast, but it makes no sense...",
	"Did you mean cast it in bronze?",
	"Cast away matee's!  The tide's a turnin'!",
	NULL
    };
    static int                              howmany = 9;

    if (DEBUG > 2)
	log_info("called %s with %s", __PRETTY_FUNCTION__, SAFE_NAME(ch));

    cprintf(ch, "%s\r\n", oops[number(1, howmany) - 1]);
}
Exemple #5
0
void random_miscast(struct char_data *ch, const char *name)
{
    static const char                      *oops[] = {
	"You just can't seem to concentrate on %s...\r\n",
	"Your %s refuses to work without back-pay.\r\n",
	"You cast your %s aside and decide to go home.\r\n",
	"You proudly watch your %s spell fly away into the sky.\r\n",
	"Quixadhal walks up and grabs your %s, muttering 'Fools!'\r\n",
	"Your %s falls to the ground and shatters!\r\n",
	"I don't remember any %s?  D'oh!\r\n",
	"The warrenty on your %s spell has expired.\r\n",
	"That last spell didn't LOOK like %s...\r\n",
	NULL
    };
    static int                              howmany = 9;

    if (DEBUG > 2)
	log_info("called %s with %s, %s", __PRETTY_FUNCTION__, SAFE_NAME(ch), VNULL(name));

    cprintf(ch, oops[number(1, howmany) - 1], name);
}
Exemple #6
0
static void event_scatter_goodies(struct char_data *ch, char *arg)
{
    int                                     the_objects[] =
	{ 5023, 6131, 5932, 15011, 7010, 5937, 1901, 9015 };
    int                                     the_mobs[] =
	{ 1200, 9618, 1400, 5441, 5054, 5055, 15047, 9620, 1202, 9601 };
    struct event_goodies                    junk = {
	0, 0, 50, 4, 6, -3,
	7, 8, the_objects,
	11, 10, the_mobs
    };
    int                                     zone = 0;
    struct room_data                       *rp = NULL;

    if (DEBUG > 1)
	log_info("called %s with %s, %s", __PRETTY_FUNCTION__, SAFE_NAME(ch), VNULL(arg));

    if ((rp = real_roomp(ch->in_room)))
	zone = rp->zone;
    else
	return;

    junk.bottom = zone ? (zone_table[zone - 1].top + 1) : 0;
    junk.top = zone_table[zone].top;
    if (IS_SET(ch->specials.act, PLR_STEALTH))
	zprintf(zone,
		"\r\nSuddenly, you fell the winds HOWL into being!\r\nYou can hear the sounds of things FALLING all around you!\r\n\r\n");
    else
	zprintf(zone,
		"\r\nYou hear %s chanting, and suddenly a wind HOWLS in from %s direction!\r\nYou can hear the sounds of things FALLING all around you!\r\n\r\n",
		GET_NAME(ch), HSHR(ch));
    mob_count = obj_count = gold_count = 0;
    hash_iterate(&room_db, (funcp)event_scatter_goodies_zone, &junk);
    cprintf(ch, "You just added %d critters, %d things, and %d gold to %s [#%d].\r\n",
	    mob_count, obj_count, gold_count, zone_table[zone].name, zone);
    log_info("%s added %d critters, %d things, and %d gold to %s [#%d].\r\n", GET_NAME(ch),
	     mob_count, obj_count, gold_count, zone_table[zone].name, zone);
}
Exemple #7
0
static void event_zombie_master(struct char_data *ch, char *arg)
{
    struct room_data                       *rp = NULL;
    struct char_data                       *master = NULL;
    struct char_data                       *mob = NULL;
    int                                     i = 0;
    int                                     j = 0;

    if (DEBUG > 1)
	log_info("called %s with %s, %s", __PRETTY_FUNCTION__, SAFE_NAME(ch), VNULL(arg));

    if ((rp = real_roomp(ch->in_room))) {
	master = read_mobile(666, VIRTUAL);		       /* xenthia, lady of the dead */
	j = dice(1, 4) + 3;
	if (IS_SET(ch->specials.act, PLR_STEALTH))
	    allprintf
		("\r\nYou feel a darkening of the land.\r\nYou hear a low moaning wind arise nearby...\r\n\r\n");
	else
	    allprintf
		("\r\n%s begins a low incantation, and a bolt of ebon lightning strikes %s upraised hands!\r\nYou hear a low moaning wind arise nearby...\r\n\r\n",
		 GET_NAME(ch), HSHR(ch));
	for (i = 0; i < j; i++) {
	    mob = read_mobile(100, VIRTUAL);		       /* zombie */
	    char_to_room(mob, ch->in_room);
	    SET_BIT(mob->specials.affected_by, AFF_CHARM);
	    GET_EXP(mob) = number(300, 500);
	    add_follower(mob, master);
	    mob->points.max_hit = dice(4, 10) + 10;
	    mob->points.hit = mob->points.max_hit;
	    AddHatred(master->followers->follower, OP_VNUM, ZM_NEMESIS);
	    SET_BIT(master->followers->follower->specials.act, ACT_GUARDIAN);
	    SET_BIT(master->followers->follower->specials.act, ACT_USE_ITEM);
	    SET_BIT(master->followers->follower->specials.affected_by, AFF_FLYING);
	}
	char_to_room(master, ch->in_room);
    }
}
Exemple #8
0
void do_unban(struct char_data *ch, const char *argument, int cmd)
{
    char                                    ban_type[MAX_STRING_LENGTH] = "\0\0\0";
    char                                    buf[MAX_STRING_LENGTH] = "\0\0\0\0\0\0\0";
    int                                     i = 0;

    if (DEBUG)
	log_info("called %s with %s, %s, %d", __PRETTY_FUNCTION__, SAFE_NAME(ch),
		 VNULL(argument), cmd);

    if (IS_NPC(ch)) {
	cprintf(ch, "You're a mob, you can't unban anyone.\r\n");
	return;
    }
    if (argument && *argument) {
	argument = one_argument(argument, ban_type);
	only_argument(argument, buf);
	if (*ban_type) {
	    if (!str_cmp(ban_type, "name")) {
		if (*buf) {
		    /*
		     * First, we need to make sure it isn't already a mob or player. then we can try adding it to the
		     * ban table. 
		     */
		    if (!banned_name(buf)) {
			cprintf(ch, "%s is not banned.\r\n", buf);
			return;
		    }
                    for (i = 0; i < banned_names_count; i++) {
                        if (!str_cmp(banned_names[i], buf)) {
                            char **tmp_foo = calloc(banned_names_count - 1, sizeof(char *));
                            int j = 0;
                            for( j = 0; j < i; j++ ) {
                                tmp_foo[j] = banned_names[j];
                            }
                            for( j = i + 1; j < banned_names_count; j++ ) {
                                tmp_foo[j-1] = banned_names[j];
                            }
                            free(banned_names[i]);
                            banned_names_count--;
                            free(banned_names);
                            banned_names = tmp_foo;
                            cprintf(ch, "%s is no longer banned!\r\n", buf);
                            log_auth(ch, "BAN %s has been unbanned by %s!", buf, GET_NAME(ch));
                            save_bans();
                            return;
                        }
                    }
		    return;
		} else {
		    cprintf(ch, "Banned names:\r\n");
		    for (i = 0; i < banned_names_count; i++) {
			cprintf(ch, "%-20s\r\n", banned_names[i]);
		    }
		    return;
		}
	    } else if (!str_cmp(ban_type, "ip") || !str_cmp(ban_type, "address")
		       || !str_cmp(ban_type, "site")) {
		if (*buf) {
		    /*
		     * No banning localhost! 
		     */
		    if (!banned_ip(buf)) {
			cprintf(ch, "%s is not banned.\r\n", buf);
			return;
		    }
                    for (i = 0; i < banned_names_count; i++) {
                        if (!str_cmp(banned_ips[i], buf)) {
                            char **tmp_foo = calloc(banned_ips_count - 1, sizeof(char *));
                            int j = 0;
                            for( j = 0; j < i; j++ ) {
                                tmp_foo[j] = banned_ips[j];
                            }
                            for( j = i + 1; j < banned_ips_count; j++ ) {
                                tmp_foo[j-1] = banned_ips[j];
                            }
                            free(banned_ips[i]);
                            banned_ips_count--;
                            free(banned_ips);
                            banned_ips = tmp_foo;
                            cprintf(ch, "%s is no longer banned!\r\n", buf);
                            log_auth(ch, "BAN %s has been unbanned by %s!", buf, GET_NAME(ch));
                            save_bans();
                            return;
                        }
                    }
		    return;
		} else {
		    cprintf(ch, "Banned IP addresses:\r\n");
		    for (i = 0; i < banned_ips_count; i++) {
			cprintf(ch, "%-20s\r\n", banned_ips[i]);
		    }
		    return;
		}
	    }
	}
    }
    cprintf(ch, "Usage: unban < name|ip > [ name|address ]\r\n");
}
Exemple #9
0
void do_ban(struct char_data *ch, const char *argument, int cmd)
{
    char                                    ban_type[MAX_STRING_LENGTH] = "\0\0\0\0\0\0\0";
    char                                    buf[MAX_STRING_LENGTH] = "\0\0\0\0\0\0\0";
    int                                     i = 0;

    if (DEBUG)
	log_info("called %s with %s, %s, %d", __PRETTY_FUNCTION__, SAFE_NAME(ch),
		 VNULL(argument), cmd);

    if (IS_NPC(ch)) {
	cprintf(ch, "You're a mob, you can't ban anyone.\r\n");
	return;
    }
    if (argument && *argument) {
	argument = one_argument(argument, ban_type);
	only_argument(argument, buf);
	if (*ban_type) {
	    if (!str_cmp(ban_type, "name")) {
		if (*buf) {
		    /*
		     * First, we need to make sure it isn't already a mob or player. then we can try adding it to the
		     * ban table. 
		     */
		    if (!acceptable_name(buf)) {
			cprintf(ch, "%s is already an invalid choice.\r\n", buf);
			return;
		    }

		    banned_names_count++;
		    banned_names = realloc(banned_names, banned_names_count * sizeof(char *));
		    banned_names[banned_names_count - 1] = strdup(buf);
		    cprintf(ch, "%s is now banned!\r\n", buf);
		    log_auth(ch, "BAN %s has been banned by %s!", buf, GET_NAME(ch));
		    save_bans();
		    return;
		} else {
		    cprintf(ch, "Banned names:\r\n");
		    for (i = 0; i < banned_names_count; i++) {
			cprintf(ch, "%-20s\r\n", banned_names[i]);
		    }
		    return;
		}
	    } else if (!str_cmp(ban_type, "ip") || !str_cmp(ban_type, "address")
		       || !str_cmp(ban_type, "site")) {
		if (*buf) {
		    /*
		     * No banning localhost! 
		     */
		    if (str_cmp("127.0.0.1", buf)) {
			cprintf(ch, "You cannot ban localhost!\r\n");
			return;
		    }
		    banned_ips_count++;
		    banned_ips = realloc(banned_ips, banned_ips_count * sizeof(char *));
		    banned_ips[banned_ips_count - 1] = strdup(buf);
		    cprintf(ch, "%s is now banned!\r\n", buf);
		    log_auth(ch, "BAN %s has been banned by %s!", buf, GET_NAME(ch));
		    save_bans();
		    return;
		} else {
		    cprintf(ch, "Banned IP addresses:\r\n");
		    for (i = 0; i < banned_ips_count; i++) {
			cprintf(ch, "%-20s\r\n", banned_ips[i]);
		    }
		    return;
		}
	    }
	}
    }
    cprintf(ch, "Usage: ban < name|ip > [ name|address ]\r\n");
}
Exemple #10
0
char *
check_client_encoding(const pgNAME conn_settings)
{
	const char *cptr, *sptr = NULL;
	char   *rptr;
	BOOL	allowed_cmd = TRUE, in_quote = FALSE;
	int	step = 0;
	size_t	len = 0;

	if (NAME_IS_NULL(conn_settings))
		return NULL;
	for (cptr = SAFE_NAME(conn_settings); *cptr; cptr++)
	{
		if (in_quote)
		{
			if (LITERAL_QUOTE == *cptr)
			{
				in_quote = FALSE;
				continue;
			}
		}
		if (';' == *cptr)
		{
			allowed_cmd = TRUE;
			step = 0;
			continue;
		}
		if (!allowed_cmd)
			continue;
		if (isspace((unsigned char) *cptr))
			continue;
		switch (step)
		{
			case 0:
				if (0 != strnicmp(cptr, "set", 3))
				{
					allowed_cmd = FALSE;
					continue;
				}
				step++;
				cptr += 3;
				break;
			case 1:
				if (0 != strnicmp(cptr, "client_encoding", 15))
				{
					allowed_cmd = FALSE;
					continue;
				}
				step++;
				cptr += 15;
				break;
			case 2:
				if (0 != strnicmp(cptr, "to", 2))
				{
					allowed_cmd = FALSE;
					continue;
				}
				step++;
				cptr += 2;
				break;
			case 3:
				if (LITERAL_QUOTE == *cptr)
				{
					cptr++;
					for (sptr = cptr; *cptr && *cptr != LITERAL_QUOTE; cptr++) ;
				}
				else
				{
					for (sptr = cptr; *cptr && !isspace((unsigned char) *cptr); cptr++) ;
				}
				len = cptr - sptr;
				step++;
				break;
		}
	}
	if (!sptr)
		return NULL;
	rptr = malloc(len + 1);
	if (!rptr)
		return NULL;
	memcpy(rptr, sptr, len);
	rptr[len] = '\0';
	mylog("extracted a client_encoding '%s' from conn_settings\n", rptr);
	return rptr;
}
Exemple #11
0
static void event_undead_invade_zone(struct char_data *ch, char *arg)
{
    struct event_mob_set                    mobset[64] = {
/* vnum, hp: xdy+z, exp: xdy+z, gold: xdy+z, object %, obj vnum */
	{9002, 9, 8, 40, 7, 8, 6, 0, 0, 0, 0, -1},	       /* ghoul */
	{9002, 8, 8, 30, 5, 8, 6, 0, 0, 0, 0, -1},	       /* ghoul */
	{9001, 8, 8, 20, 3, 6, 4, 0, 0, 0, 0, -1},	       /* juju zombie */
	{9001, 7, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* juju zombie */
	{9001, 7, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* juju zombie */
	{9001, 6, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* juju zombie */
	{9002, 5, 8, 20, 4, 8, 6, 0, 0, 0, 0, -1},	       /* ghoul */
	{9002, 5, 8, 0, 4, 8, 6, 0, 0, 0, 0, -1},	       /* ghoul */
	{9002, 4, 8, 20, 4, 8, 6, 0, 0, 0, 0, -1},	       /* ghoul */
	{9002, 4, 8, 20, 4, 8, 6, 0, 0, 0, 0, -1},	       /* ghoul */
	{4616, 7, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* banshee */
	{4616, 6, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* banshee */
	{4616, 6, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* banshee */
	{4616, 5, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* banshee */
	{4616, 5, 8, 20, 2, 6, 4, 0, 0, 0, 0, -1},	       /* banshee */
	{4615, 6, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* shadow */
	{4615, 6, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* shadow */
	{4615, 5, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* shadow */
	{4615, 5, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* shadow */
	{4615, 5, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* shadow */
	{4615, 5, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* shadow */
	{4615, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* shadow */
	{4613, 6, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* poltergeist */
	{4613, 5, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* poltergeist */
	{4613, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* poltergeist */
	{4613, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* poltergeist */
	{4613, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* poltergeist */
	{4613, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* poltergeist */
	{4613, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* poltergeist */
	{9003, 5, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* skeleton */
	{9003, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* skeleton */
	{9003, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* skeleton */
	{9003, 4, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* skeleton */
	{9003, 3, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* skeleton */
	{9003, 3, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* skeleton */
	{9003, 3, 8, 20, 1, 6, 4, 0, 0, 0, 0, -1},	       /* skeleton */
	{5300, 5, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 4, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 3, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 3, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{5300, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* sewer skeleton */
	{4603, 5, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 4, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 3, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 2, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1},	       /* small skeleton */
	{4603, 1, 8, 5, 1, 6, 4, 0, 0, 0, 0, -1}	       /* small skeleton */
    };
    struct event_mob_in_zone                mobs = { 0, 0, 50, 1, 3, 64, mobset };
    int                                     zone = 0;
    struct room_data                       *rp = NULL;

    if (DEBUG > 1)
	log_info("called %s with %s, %s", __PRETTY_FUNCTION__, SAFE_NAME(ch), VNULL(arg));

    if ((rp = real_roomp(ch->in_room)))
	zone = rp->zone;
    else
	return;
/* don't code things like this here.... if a whizz annoys people, it is his
 * job to make it up... but if there is a good reason, he should be able to
 * do ANYTHING.
 *
 *  if((rp->zone == 10)||(rp->zone == 11)) {
 *	cprintf(ch,"You may not load this event into the newbie area.\r\n");
 *	return; }
 *
 */
    mobs.bottom = zone ? (zone_table[zone - 1].top + 1) : 0;
    mobs.top = zone_table[zone].top;
    if (IS_SET(ch->specials.act, PLR_STEALTH))
	zprintf(zone,
		"\r\nSuddenly, the warmth is snatched from the air around you.\r\nYou feel the icy cold touch of the grave as you gasp in anticipation...\r\nThe wind begins to howl around you as things move about.\r\n\r\n");
    else
	zprintf(zone,
		"\r\n%s's voice booms all around you, \"Go forth ancient ones!\r\nKill the puny mortals and feast on their bones!\"\r\nThe air grows still and cold as you feel... things... begin to move.\r\n",
		GET_NAME(ch));
    mob_count = 0;
    hash_iterate(&room_db, (funcp)event_fill_zone_with_mobs, &mobs);
    cprintf(ch, "You just added %d undead spirits to %s [#%d].\r\n", mob_count,
	    zone_table[zone].name, zone);
    log_info("%s added %d undead to %s [#%d].", GET_NAME(ch), mob_count, zone_table[zone].name,
	     zone);
}
Exemple #12
0
void random_death_message(struct char_data *ch, struct char_data *victim)
{
    char                                    tease[MAX_INPUT_LENGTH] = "\0\0\0\0\0\0\0";
    char                                    perp[MAX_INPUT_LENGTH] = "\0\0\0\0\0\0\0";
    int                                     razz = 0;
    int                                     bugcount = 25;
    struct descriptor_data                 *xx = NULL;

    const char                             *bugger[] = {
	"%s shouts '%s is no longer a problem.'\r\n",
	"%s beams to everyone '%s no longer causes lag!'\r\n",
	"%s taunts '%s was too easy!  I need a greater challenge!'\r\n",
	"%s screams 'DIE %s!  So shall ALL perish who dare attack ME!'\r\n",
	"%s asks '%s, is that the BEST you can DO?'\r\n",
	"%s mocks '%s died like a squealing pig!  What a wuss!'\r\n",
	"%s yells 'I spit on the rotting flesh of %s!'\r\n",
	"%s smirks 'So, %s, you come back to lie at my feet again?'\r\n",
	"%s says 'Hope you have a pleasant stay in Hell, %s.'\r\n",
	"%s grins and says 'Good!  I will use %s's intestines for my raft!'\r\n",
	"%s cackles 'Hey %s!  You forgot all your stuff when you DIED!'\r\n",
	"%s grunts 'Ptuey!  %s, your brain is too salty!'\r\n",
	"%s snickers 'Ha!  I bet %s thought a GOD would intervene, eh?'\r\n",
	"%s prays 'Rust in pieces %s.  May your soul be eaten quickly.'\r\n",
	"%s jumps up and down on %s's corpse and shouts 'YES!!!'\r\n",
	"%s licks up the blood of %s and cackles 'You make a wonderful snack!'\r\n",
	"%s sneers 'Oh!  Did you think this was WussyMUD, %s?'\r\n",
	"%s cries 'Sorry %s!  I thought you tried to sell me POISONED salami!'\r\n",
	"%s advises 'Don't quit your day job %s.'\r\n",
	"%s smiles 'Have a nice day %s...'\r\n",
	"%s snickers 'Next time, try HELP CONSIDER %s!'\r\n",
	"%s says 'Damn %s, I thought you were a mosquito!'\r\n",
	"%s smirks 'Get this!  %s tried to KILL me!  Can you believe it?'\r\n",
	"%s laughs 'God!  I didn't even break a sweat %s!\r\n",
	"%s inquires 'Was it a good day to die %s?\r\n",
	NULL
    };
    const char                             *mybugger[] = {
	"You shout '%s is no longer a problem.'\r\n",
	"You beam to everyone '%s no longer causes lag!'\r\n",
	"You taunt '%s was too easy!  I need a greater challenge!'\r\n",
	"You scream 'DIE %s!  So shall ALL perish who dare attack ME!'\r\n",
	"You ask '%s, is that the BEST you can DO?'\r\n",
	"You mock '%s died like a squealing pig!  What a wuss!'\r\n",
	"You yell 'I spit on the rotting flesh of %s!'\r\n",
	"You smirk 'So, %s, you come back to lie at my feet again?'\r\n",
	"You say 'Hope you have a pleasant stay in Hell, %s.'\r\n",
	"You grin and say 'Good!  I will use %s's intestines for my raft!'\r\n",
	"You cackle 'Hey %s!  You forgot all your stuff when you DIED!'\r\n",
	"You grunt 'Ptuey!  %s, your brain is too salty!'\r\n",
	"You snicker 'Ha!  I bet %s thought a GOD would intervene, eh?'\r\n",
	"You pray 'Rust in pieces %s.  May your soul be eaten quickly.\r\n",
	"You jump up and down on %s's corpse and shout 'YES!!!'\r\n",
	"You lick up the blood of %s and cackle 'You make a wonderful snack!'\r\n",
	"You sneer 'Oh!  Did you think this was WussyMUD, %s?\r\n",
	"You cry 'Sorry %s!  I thought you tried to sell me POISONED salami!\r\n",
	"You advise 'Don't quit your day job %s.\r\n",
	"You smile 'Have a nice day %s...\r\n",
	"You snicker 'Next time, try HELP CONSIDER %s!'\r\n",
	"You say 'Damn %s, I thought you were a mosquito!'\r\n",
	"You smirk 'Get this!  %s tried to KILL me!  Can you believe it?'\r\n",
	"You laugh 'God!  I didn't even break a sweat %s!\r\n",
	"You inquire 'Was it a good day to die %s?\r\n",
	NULL
    };

    if (DEBUG > 2)
	log_info("called %s with %s, %s", __PRETTY_FUNCTION__, SAFE_NAME(ch),
		 SAFE_NAME(victim));

    if (ch == victim) {
        strcpy(perp, "Death");
    } else {
        strcpy(perp, NAME(ch));
    }

    sprintf(tease, bugger[razz = number(0, bugcount - 1)], perp, GET_NAME(victim));
    for (xx = descriptor_list; xx; xx = xx->next)
        if (xx->character != ch && !xx->connected &&
            !IS_SET(xx->character->specials.act, PLR_NOSHOUT) &&
            !IS_SET(xx->character->specials.act, PLR_DEAF))
            act("%s", 0, ch, 0, xx->character, TO_VICT, tease);
    cprintf(victim, "%s", tease);

#ifdef I3
    sprintf(tease, bugger[razz], "", GET_NAME(victim));
    i3_npc_chat("wiley", perp, tease);
#endif

    if (ch != victim) {
        sprintf(tease, mybugger[razz], NAME(victim));
        cprintf(ch, "%s", tease);
    }
}