blob: 28f18d268787d5db69ddbac11169a93112be4713 [file] [log] [blame]
Zesstrab6ac9f62020-01-21 11:11:16 +01001SYNOPSIS
Zesstra715ec202025-07-09 22:18:31 +02002 void tell_room(string|object ob, string str)
3 void tell_room(string|object ob, string str, object *exclude)
MG Mud User88f12472016-06-24 23:31:02 +02004
Zesstra715ec202025-07-09 22:18:31 +02005 void tell_room(string|object ob,
Zesstra5481d492021-04-08 20:07:06 +02006 mixed *|mapping|struct|object|lwobject msg)
Zesstra715ec202025-07-09 22:18:31 +02007 void tell_room(string|object ob,
Zesstra5481d492021-04-08 20:07:06 +02008 mixed *|mapping|struct|object|lwobject msg,
9 object *exclude)
MG Mud User88f12472016-06-24 23:31:02 +020010
Zesstra715ec202025-07-09 22:18:31 +020011DESCRIPTION
12 Send a message <str> to all living objects in the room ob. ob
13 can also be the name of the room given as a string. If a
14 receiving object is not a interactive user the lfun
15 catch_tell() of the object will be invoked with the message as
16 argument. If living objects define catch_tell(), the string
17 will also be sent to that instead of being written to the
18 user. If the object is given as its filename, the driver
19 looks up the object under that name, loading it if necessary.
20 If array *exclude is given, all objects contained in
21 *exclude are excluded from the message str.
MG Mud User88f12472016-06-24 23:31:02 +020022
Zesstra715ec202025-07-09 22:18:31 +020023 If the second arg is an array/mapping/struct/object, catch_msg() will
24 be called in all listening livings.
MG Mud User88f12472016-06-24 23:31:02 +020025
Zesstra715ec202025-07-09 22:18:31 +020026EXAMPLES
27 tell_object(environment(this_player()), "Hi!\n");
MG Mud User88f12472016-06-24 23:31:02 +020028
Zesstra715ec202025-07-09 22:18:31 +020029 Just send a simple "Hi!" to all livings in the current.
MG Mud User88f12472016-06-24 23:31:02 +020030
Zesstra715ec202025-07-09 22:18:31 +020031 Object 1 (living):
32 void catch_tell(string str) {
33 write("Received: "+str+"\n");
34 }
35 Object 2:
36 void func() {
37 ...
38 tell_room(environment(this_player()), "HiHo!\n");
39 ...
40 }
MG Mud User88f12472016-06-24 23:31:02 +020041
Zesstra715ec202025-07-09 22:18:31 +020042 This examples shows how tell_room() together with catch_tell() works.
MG Mud User88f12472016-06-24 23:31:02 +020043
Zesstra715ec202025-07-09 22:18:31 +020044HISTORY
45 LDMud 3.3.686 added the use of a mapping/struct/object as second
46 argument.
MG Mud User88f12472016-06-24 23:31:02 +020047
Zesstra715ec202025-07-09 22:18:31 +020048SEE ALSO
Zesstrab6ac9f62020-01-21 11:11:16 +010049 write(E), say(E), tell_object(E), catch_tell(A), catch_msg(A)