[go: up one dir, main page]

Menu

[897c37]: / mlib / lib / alert.lpc  Maximize  Restore  History

Download this file

36 lines (31 with data), 573 Bytes

/* 
 * Emergency Alert Code
 * Used by LPC functions
 *
 * see /std/vi_daemon->query_destruct() as an example use
 */

reset(arg) 
{
}

/*
 * siren() continously sends a message to all 
 *  players currently on.
 * currently, dest this object to turn it off
 */ 

/*
 * Variable time implementation added by Calthron.  15/8/92.
 */
siren(string mesg,int t)
{
    array u;
    int i;
    int time;
	u = users();

	if (t) time = t;
    else time = 5;
	for (i = 0; i < sizeof(u); i ++)
	{
		tell_object(u[i], "WARNING: "+mesg+"\n");
	}
	call_out("siren", time, mesg, time);
}