aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet/GrafittiBoard.lsl
diff options
context:
space:
mode:
authorMike Mazur2008-07-18 04:51:36 +0000
committerMike Mazur2008-07-18 04:51:36 +0000
commit2558f8ac3122f2721c9f47500626f781ff548bbe (patch)
treeb38ed2afbb202f164480be3a362b512d6ea8deb9 /bin/assets/ScriptsAssetSet/GrafittiBoard.lsl
parentmasks MySQL password from console startup messages (diff)
downloadopensim-SC-2558f8ac3122f2721c9f47500626f781ff548bbe.zip
opensim-SC-2558f8ac3122f2721c9f47500626f781ff548bbe.tar.gz
opensim-SC-2558f8ac3122f2721c9f47500626f781ff548bbe.tar.bz2
opensim-SC-2558f8ac3122f2721c9f47500626f781ff548bbe.tar.xz
Make scripts LSL compliant.
Diffstat (limited to 'bin/assets/ScriptsAssetSet/GrafittiBoard.lsl')
-rw-r--r--bin/assets/ScriptsAssetSet/GrafittiBoard.lsl58
1 files changed, 29 insertions, 29 deletions
diff --git a/bin/assets/ScriptsAssetSet/GrafittiBoard.lsl b/bin/assets/ScriptsAssetSet/GrafittiBoard.lsl
index 954e3ea..83adfb1 100644
--- a/bin/assets/ScriptsAssetSet/GrafittiBoard.lsl
+++ b/bin/assets/ScriptsAssetSet/GrafittiBoard.lsl
@@ -6,13 +6,40 @@
6 6
7string text = ""; 7string text = "";
8 8
9int LISTENING_CHANNEL = 43; 9integer LISTENING_CHANNEL = 43;
10 10
11// XXX Only putting this here as well to get around OpenSim's int -> string casting oddness 11// XXX Only putting this here as well to get around OpenSim's int -> string casting oddness
12string LISTENING_CHANNEL_STRING = "43"; 12string LISTENING_CHANNEL_STRING = "43";
13 13
14// FIXME: Should be dynamic! 14// FIXME: Should be dynamic!
15int CHARS_WIDTH = 42; 15integer CHARS_WIDTH = 42;
16
17// Add some additional graffiti
18addGraffiti(string message)
19{
20 while (llStringLength(message) > CHARS_WIDTH)
21 {
22 text += "\n\n" + llGetSubString(message, 0, CHARS_WIDTH - 1);
23 message = llDeleteSubString(message, 0, CHARS_WIDTH - 1);
24 }
25
26 text += "\n\n" + message;
27}
28
29// Clear the existing graffiti
30clearGraffiti()
31{
32 text = "";
33}
34
35// Actually fires the graffiti out to the dynamic texture module
36draw()
37{
38 //llSay(0, text);
39 string drawList = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text " + text + ";";
40
41 osSetDynamicTextureData("", "vector", drawList, "1024", 0);
42}
16 43
17default 44default
18{ 45{
@@ -45,30 +72,3 @@ default
45 draw(); 72 draw();
46 } 73 }
47} 74}
48
49// Add some additional graffiti
50void addGraffiti(string message)
51{
52 while (llStringLength(message) > CHARS_WIDTH)
53 {
54 text += "\n\n" + llGetSubString(message, 0, CHARS_WIDTH - 1);
55 message = llDeleteSubString(message, 0, CHARS_WIDTH - 1);
56 }
57
58 text += "\n\n" + message;
59}
60
61// Clear the existing graffiti
62void clearGraffiti()
63{
64 text = "";
65}
66
67// Actually fires the graffiti out to the dynamic texture module
68void draw()
69{
70 //llSay(0, text);
71 string drawList = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text " + text + ";";
72
73 osSetDynamicTextureData("", "vector", drawList, "1024", 0);
74}