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
XY Text Chat_Listen_Script  

Chat_Listen_Script

1 part of XY Text

Category: XY Text
By : fratserke
Created: 2010-11-09 Edited: 2010-11-09
Worlds: Second Life

the Zip file

Download all files for Chat_Listen_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Chat_Listen_Script_1.lsl
1 ////////////////////////////////////////////
2 // Hello World! Script
3 //
4 // Written by Xylor Baysklef
5 ////////////////////////////////////////////
6
7 /////////////// CONSTANTS ///////////////////
8 // XyText Message Map.
9 integer DISPLAY_STRING = 204000;
10 ///////////// END CONSTANTS ////////////////
11
12 show_line(string line, integer num)
13 {
14 string part1 = llGetSubString(line, 0, 5);
15 string part2 = llGetSubString(line, 6, 11);
16 string part3 = llGetSubString(line, 12, 17);
17
18 llMessageLinked(2+(num*3), DISPLAY_STRING, part1, "");
19 llMessageLinked(3+(num*3), DISPLAY_STRING, part2, "");
20 llMessageLinked(4+(num*3), DISPLAY_STRING, part3, "");
21 }
22
23 default {
24 state_entry() {
25 llListen(0, "", llGetOwner(), "");
26 }
27
28 listen(integer channel, string name, key id, string message)
29 {
30 // split chat into lines
31 string line1 = llGetSubString(message, 0, 17);
32 string line2 = llGetSubString(message, 18, 35);
33 string line3 = llGetSubString(message, 36, 53);
34 string line4 = llGetSubString(message, 54, 71);
35 show_line(line1, 0);
36 show_line(line2, 1);
37 show_line(line3, 2);
38 show_line(line4, 3);
39 }
40 }

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