chat.c

mud/2.4.5/obj/chat.c · 697 B

From the archive 2.4.5-for-1.1.tgz

Download the archive   « Back to the archive contents

object next;
object monster;
string chat_str;

/*
short() { return chat_str; }
*/

link(ob) {
    next = ob;
}

load_chat(str) {
    chat_str = str;
}

set_monster(m) {
    monster = m;
}

chat(nr) {
    object room;

    if (nr == 0){
	room = environment(monster);
	if(room)
	    return tell_room(room,chat_str);
    }
    nr -= 1;
    if (next)
	return call_other(next, "chat", nr);
    else
	return 0;
}

remove_chat(str) {
    if (str == chat_str) {
	destruct(this_object());
	return next;
    }
    if (next)
	next = call_other(next, "remove_chat", str);
    return this_object();
}

collaps()
{
    if(next)
	call_other(next, "collaps");
    destruct(this_object());
}

drop() { return 1; }

Site Stats

Snippets: 1791
Codebases: 571