1 object next; 2 object monster; 3 string chat_str; 4 5 /* 6 short() { return chat_str; } 7 */ 8 link(object ob)9void link(object ob) { 10 next = ob; 11 } 12 load_chat(string str)13void load_chat(string str) { 14 chat_str = str; 15 } 16 set_monster(object m)17void set_monster(object m) { 18 monster = m; 19 } 20 chat(int nr)21int chat(int nr) { 22 object room; 23 24 if (nr == 0){ 25 room = environment(monster); 26 if(room) 27 { 28 tell_room(room,chat_str); 29 return 0; 30 } 31 } 32 nr -= 1; 33 if (next) 34 return next->chat(nr); 35 else 36 return 0; 37 } 38 remove_chat(string str)39object remove_chat(string str) { 40 if (str == chat_str) { 41 destruct(this_object()); 42 return next; 43 } 44 if (next) 45 next = next->remove_chat(str); 46 return this_object(); 47 } 48 collaps()49void collaps() 50 { 51 if(next) 52 next->collaps(); 53 destruct(this_object()); 54 } 55 drop()56int drop() { return 1; } 57