Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
IM Anonymous_messaging_to_anyone  

Anonymous_messaging_to_anyone

An SL Script that will allow you to send a message to anyone in world as any name.. Simply create a prim and name it whatever you want the message to come from. Add this script to it.. I wear mine on a hud so it's always available as long as scripts are enabled in the sim you're in.

The name2key function is from w-hat.com..

The command is: /111 UserFirstName UserLastName Message you wish to send to them.. Updated to check to make sure the person is online. If they were offline, and had their IM's forwarded to e-mail, it would tell them who it came from.. (Or perhaps from the owner of the prim)..

Category: IM
By : Psycotic
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Anonymous_messaging_to_anyone
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Anonymous_messaging_to_anyone_1.lsl
1 string NAME; // name to look up
2 string URL = "http://w-hat.com/name2key"; // name2key url
3 key reqid; // http request id
4 string Message;
5 integer x;
6 key onlineReq;
7 key avatarId;
8 integer channel=111;
9 default
10 {
12 {
13 llSetText("",<0,0,0>,0);
14 llListen(channel,"",llGetOwner(),"");
15 }
16 on_rez(integer start_param)
17 {
19 }
20 touch_start(integer num_detected)
21 {
22 llOwnerSay("Type: /" + (string)channel + " FirstName LastName Message to send to the person");
23 }
24 listen(integer channel,string name, key id, string message)
25 {
26 Message = "";
27 list templist = llParseString2List(message, [" "],[]);
28 integer length = llGetListLength(templist);
29 for (x=2;x<length;x++)
30 {
31 Message = Message + llList2String(templist,x) + " ";
32 }
33 NAME = llList2String(templist,0) + " " + llList2String(templist,1);
34 if(Message == "")
35 {
36 llOwnerSay("You must enter a message to send");
37 }
38 else
39 {
40 reqid = llHTTPRequest( URL + "?terse=1&name=" +llEscapeURL(NAME), [], "" );
41 }
42 }
43 http_response(key id, integer status, list meta, string body) {
44 if( id != reqid )
45 return;
46 if( status == 499 )
47 llOwnerSay("name2key request timed out");
48 else if( status != 200 )
49 llOwnerSay("the internet exploded!!");
50 else if( (key)body == NULL_KEY )
51 llOwnerSay(NAME + " not found");
52 else
53 {
54 avatarId = (key)body;
55 onlineReq = llRequestAgentData((key)body,DATA_ONLINE);
56 }
57 }
58 dataserver(key queryid, string data)
59 {
60 if( queryid != onlineReq )
61 return;
62 if( (integer)data )
63 {
64 llInstantMessage(avatarId, Message);
65 llOwnerSay("[" + NAME + "] " + Message);
66 llSetText(NAME + "\n" + Message,<1.0,0.0,0.0>,1.0);
67 }
68 else
69 llOwnerSay(NAME + " is not online");
70 }
71 }

Back to the Best Free Tools in Second Life and OpenSim.