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
Random Random_Sentences  

Random_Sentences

Random_Sentences

Category: Random
By : Davy Maltz
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Random_Sentences
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Random_Sentences_1.lsl
1 list verbs = ["shanked","burned","deleted","killed","punched","washed","ate","raped","shot","stole","craped on","cut
2 up","electrocuted","bled on","has a fetish for","laughs at","would like to have sexual relations with"];
3 list nouns = ["toenails","pants","computer","doctor","mother","couch","donkey","toilet","knife","cake","password",
4 "penguin","keyboard","lightbulb","pillow"];
5 integer verb;
6 integer noun;
7 integer agent_1;
8 integer agent_2;
9 default
10 {
12 {
14 }
15 touch_start(integer total_number)
16 {
17 llSensor("","",AGENT,20,PI);
18 }
19 timer()
20 {
21 llSensor("","",AGENT,20,PI);
22 }
23 sensor(integer num_detected)
24 {
25 if(num_detected > 1)
26 {
27 verb = (integer)llFrand(llGetListLength(verbs));
28 noun = (integer)llFrand(llGetListLength(nouns));
29 agent_1 = (integer)llFrand(num_detected);
30 agent_2 = (integer)llFrand(num_detected);
31 if(agent_1 == agent_2)
32 {
33 agent_1 = agent_1 - 1;
34 if(agent_1 < 0)
35 {
36 agent_1 = agent_1 + 2;
37 }
38 }
39 string name_1 = llDetectedName(agent_1);
40 string name_2 = llDetectedName(agent_2);
41 string sentence = name_1+" "+llList2String(verbs,verb)+" "+name_2+"'s "+llList2String(nouns,noun)+".";
42 llSay(0,sentence);
43 llSetText(sentence+"\n . "+"\n . "+"\n . "+"\n . ",<1,1,1>,1.0);
44 }
45 else
46 {
47 llSetText("Not Enough Agents Detected...",<1,0,0>,1.0);
48 }
49 }
50 }

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