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
Chat ChatLoggerScript  

ChatLoggerScript

Chat-Logger-Script.lsl

Category: Chat
By : Patch
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for ChatLoggerScript
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. ChatLoggerScript_1.lsl
1
2
3 list names;
4 list speech;
5 list colours=["002EB8","FF6633","006600","660066","660033","663300","1A9900","FF14B1","001A99","#B88A00"];
6 list unique_names;
7
8 default
9 {
11 {
12 llSetText("This is a chat logger - currently only for testing",<0,0,0>,1.0);
13 integer i;
14 integer c;
15 for (i=0;i<llGetListLength(names);i++)
16 {
17 c = llListFindList(unique_names,llList2List(names,i,i) );
18 while(c >= llGetListLength(colours)) // dont crash if I run out of colours
19 c -= llGetListLength(colours);
20 llSetObjectName("[color=#" + llList2String(colours,c)
21 + "]" + llList2String(names,i) );
22 llOwnerSay( llList2String(speech,i) + "[/color]" );
23 }
24 names = [];
25 speech = [];
26 unique_names = [];
27 llSetObjectName("Patch's Funky Chat Logger");
28 }
29
31 {
33 }
34
35 touch_start(integer total_number)
36 {
38 {
39 llSay(0, "logging on!.");
40 state logging_chat;
41 }
42 }
43 }
44
45 state logging_chat
46 {
48 {
49 llListen(0,"",NULL_KEY,"");
50 }
51
53 {
54 llOwnerSay("Logging still on! Touch to get playback");
55 }
56
57 touch_start(integer total_number)
58 {
60 {
61 llSay(0, "chat logging now off - replaying log!.");
62 state default;
63 }
64 }
65
66 listen(integer channel, string name, key id, string message)
67 {
68 if(llListFindList(unique_names,[name]) == -1)
69 {
70 unique_names += name;
71 }
72 names += name;
73 speech += message;
74 }
75 } // end

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