lagout.h

lagout.h · 913 B

From the archive lag.zip

Download the archive   « Back to the archive contents

/* Ok, if you downloaded the fakequit snippet
* just add this to that and the tables.c
* or you can just leave it in this file and
* and the command 'lagout' to the tables.c
*/

void do_lagout(CHAR_DATA *ch, char *argument)
{

	CHAR_DATA *victim;
	char arg1[MAX_STRING_LENGTH];
	int x;

	argument = one_argument(argument, arg1);

	if (arg1[0] == '\0')
	{
		send_to_char("Syntax: Lagout <victim> <amount>\n\r", ch);
		return;
	}

	if ((victim = get_char_world(ch, arg1)) == NULL)
	{
		send_to_char("They're not here.\n\r", ch);
		return;
	}

	if ((x = atoi(argument)) <= 0)
	{
		send_to_char("So your giving them 0 lag?\n\r", ch);
		return;
	}

	if (x > 1000)
	{
		send_to_char("That # is too high.\n\r", ch);
		return;
	}

	send_to_char("Your getting some lag right about now...\n\r", victim);
	WAIT_STATE(victim, x);
	send_to_char("Adding lag...\n\r", ch);
	return;
}

Site Stats

Snippets: 1791
Codebases: 571