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 Chat_Logger_Script  

Chat_Logger_Script

Chat Logger Script.lsl

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

the Zip file

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

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