blob: 6b6d5c934808bb0a94222ec56474038f644f4797 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
Zesstra715ec202025-07-09 22:18:31 +02002 void tell_object(object|string ob, string str)
3 void tell_object(object|string ob,
Zesstra5481d492021-04-08 20:07:06 +02004 mixed *|mapping|struct|object|lwobject msg)
MG Mud User88f12472016-06-24 23:31:02 +02005
Zesstra715ec202025-07-09 22:18:31 +02006DESCRIPTION
7 Send a message str to object ob (which is looked up and if necessary
8 loaded if given by name).
9
10 If the second argument is a string, the message will be printed
11 to <ob> if it is an interactive user, otherwise it will be passed to
12 the lfun catch_tell() of the target living.
MG Mud User88f12472016-06-24 23:31:02 +020013
Zesstra715ec202025-07-09 22:18:31 +020014 If the second argument is an array/mapping/struct/object, it will be
15 passed to the lfun catch_msg() in the target.
MG Mud User88f12472016-06-24 23:31:02 +020016
Zesstra715ec202025-07-09 22:18:31 +020017EXAMPLES
18 object who;
19 who=find_player("wessex");
20 tell_object(who, "Hi!\n");
MG Mud User88f12472016-06-24 23:31:02 +020021
Zesstra715ec202025-07-09 22:18:31 +020022 Just tell Wessex a simple "Hi!".
MG Mud User88f12472016-06-24 23:31:02 +020023
MG Mud User88f12472016-06-24 23:31:02 +020024
Zesstra715ec202025-07-09 22:18:31 +020025 Object 1 (living with the name "dummymonster"):
26 void catch_tell(string str) {
27 write("Received: "+str+"\n");
28 }
29 Object 2:
30 void func() {
31 object who;
32 who=find_living("dummymonster");
33 tell_object(who, "Follow me, mortal one!\n");
34 ...
35 }
MG Mud User88f12472016-06-24 23:31:02 +020036
Zesstra715ec202025-07-09 22:18:31 +020037 This examples shows how tell_object() together with
38 catch_tell() works.
MG Mud User88f12472016-06-24 23:31:02 +020039
Zesstra715ec202025-07-09 22:18:31 +020040HISTORY
41 LDMud 3.2.11 introduced the 'mixed *' form for symmetry reasons.
42 LDMud 3.3.686 added the use of a mapping/struct/object as second
43 argument.
MG Mud User88f12472016-06-24 23:31:02 +020044
Zesstra715ec202025-07-09 22:18:31 +020045SEE ALSO
Zesstrab6ac9f62020-01-21 11:11:16 +010046 write(E), say(E), catch_tell(A), catch_msg(A)