From aa5c107625f536e2e85b89dabd78f611db40dd9f Mon Sep 17 00:00:00 2001 From: Fred Beckhusen Date: Mon, 25 Apr 2016 11:15:59 -0500 Subject: [PATCH] Sync with outworldz database --- Gaussian Random/Gaussian Random.sol | 3 + .../720px-Normal_Distribution_PDF.svg.png | Bin 0 -> 50964 bytes .../Gaussian Random/Gaussian Random.prj | 6 + .../Gaussian Random/Object/Test Script.lsl | 66 ++ Gaussian Random/Run of 300.png | Bin 0 -> 9045 bytes Land to Sculpt Maker/Land to Sculpt Maker.sol | 3 + .../Land to Sculpt Maker.prj | 6 + .../Land to Sculpt Maker/Object/Script.lsl | 87 ++ .../NPC Appearance Sorter.sol | 3 + .../NPC Appearance Sorter.prj | 6 + .../NPC Appearance Sorter/Object/Script.lsl | 268 +++++++ .../OpenSimWorld NPC Controller.sol | 3 + .../Object/LICENCE.txt | 688 ++++++++++++++++ .../Object/README.txt | 228 ++++++ .../OpenSimWorld NPC Controller.prj | 8 + .../Paramour Builder's Buddy.sol | 3 - .../Paramour Builders Buddy.lsl | 188 ----- .../Paramour Builder's Buddy.prj | 12 - .../Paramour Builders Buddy.sol | 3 + .../Paramour Builders Buddy Instructions.txt | 0 .../Paramour Builders Buddy.lsl | 188 +++++ .../Two prim HUD.jpg | Bin .../Paramour Builders Buddy HUD}/buddy.png | Bin .../buddy_no_tex.png | Bin .../Paramour Builders Buddy.prj | 14 + .../Particle_Garden__Grows_slowly_rando.sol | 3 + .../Particle_Garden__Grows_slowly_rando_1.lsl | 118 +++ .../Particle_Garden__Grows_slowly_rando.prj | 6 + .../Renes Free Lighting System.sol | 3 + .../Renes Free Lighting System}/Features.pdf | Bin .../Renes Free Lighting System.prj | 2 +- .../User Manual.pdf | Bin .../_Main/Config_default.txt | 5 +- .../_Main/Config_default.txt.bak | 64 ++ .../_Main/light.lsl | 189 +++++ .../_Main/light.lsl.bak | 0 .../_Main/light_region.lsl | 187 +++++ .../_Main/light_region.lsl.bak | 0 .../_Main/switch.lsl | 724 +++++++++++++++++ .../_Main/switch.lsl.bak | 0 .../_Main/switch_region.lsl | 719 +++++++++++++++++ .../_Main/switch_region.lsl.bak | 0 .../controls/config_control.lsl | 138 ++++ .../controls/config_control.lsl.bak | 0 .../controls/ext_config_control.lsl | 162 ++++ .../controls/ext_config_control.lsl.bak | 0 .../controls/ext_switch_control.lsl | 117 +++ .../controls/ext_switch_control.lsl.bak | 0 .../controls/light_control.lsl | 98 +++ .../controls/light_control.lsl.bak | 0 .../controls/link_control.lsl | 76 ++ .../controls/link_control.lsl.bak | 0 .../controls/link_receiver.lsl | 71 ++ .../controls/link_receiver.lsl.bak | 0 .../controls/network_control.lsl | 188 +++++ .../controls/network_control.lsl.bak | 0 .../controls/network_control_region.lsl | 188 +++++ .../controls/network_control_region.lsl.bak | 0 .../controls/network_receiver.lsl | 100 +++ .../controls/network_receiver.lsl.bak | 0 .../controls/network_receiver_region.lsl | 101 +++ .../controls/network_receiver_region.lsl.bak | 0 .../controls/remote_control.lsl | 75 ++ .../controls/remote_control.lsl.bak | 0 .../controls/remote_receiver.lsl | 71 ++ .../controls/remote_receiver.lsl.bak | 0 .../controls/switch_control.lsl | 115 +++ .../controls/switch_control.lsl.bak | 0 .../Renes Free Lighting System}/history.txt | 0 .../Renes Free Lighting System}/license.txt | 0 .../plugins - light/particle_bling.lsl | 188 +++++ .../plugins - light/particle_bling.lsl.bak | 0 .../particle_candle_dirty_wick.lsl | 187 +++++ .../particle_candle_dirty_wick.lsl.bak | 0 .../particle_candle_sensual.lsl | 187 +++++ .../particle_candle_sensual.lsl.bak | 0 .../particle_candle_simple.lsl | 188 +++++ .../particle_candle_simple.lsl.bak | 0 .../plugins - light/particle_fire.lsl | 184 +++++ .../plugins - light/particle_fire.lsl.bak | 0 .../plugins - light/particle_halo.lsl | 186 +++++ .../plugins - light/particle_halo.lsl.bak | 0 .../plugins - light/particle_starbling.lsl | 187 +++++ .../particle_starbling.lsl.bak | 0 .../plugins - light/particle_starburst.lsl | 187 +++++ .../particle_starburst.lsl.bak | 0 .../plugins - switch/nightlight.lsl | 48 ++ .../plugins - switch/nightlight.lsl.bak | 0 .../plugins - switch/proximity.lsl | 59 ++ .../plugins - switch/proximity.lsl.bak | 0 .../Renes Free Lighting System}/readme.txt | 0 .../textures/glow_large.png | Bin .../textures/glow_medium.png | Bin .../textures/glow_small.png | Bin .../textures/pixie_large.png | Bin .../textures/pixie_medium.png | Bin .../textures/pixie_small.png | Bin .../textures/star.png | Bin .../tools/color_converter.lsl | 82 ++ .../tools/color_converter.lsl.bak | 0 .../tools/face_picker.lsl | 27 + .../tools/face_picker.lsl.bak | 0 .../tools/remove_floating_text.lsl | 26 + .../tools/remove_floating_text.lsl.bak | 0 .../Rene's Free Lighting System.sol | 3 - Skirt Builder/Skirt Builder.sol | 3 + Skirt Builder/Skirt Builder/Skirt Builder.prj | 10 + .../Skirt Builder/pose stand script.lsl | 492 ++++++++++++ .../Skirt Plate/positioning control.lsl | 751 ++++++++++++++++++ Skirt Builder/manual.txt | 236 ++++++ Skirt Builder/waist.png | Bin 0 -> 15541 bytes .../Waypoint Recorder and Display.sol | 3 + .../Object/Waypoint Script.lsl | 185 +++++ .../Waypoint Recorder and Display.prj | 6 + 114 files changed, 8519 insertions(+), 209 deletions(-) create mode 100644 Gaussian Random/Gaussian Random.sol create mode 100644 Gaussian Random/Gaussian Random/720px-Normal_Distribution_PDF.svg.png create mode 100644 Gaussian Random/Gaussian Random/Gaussian Random.prj create mode 100644 Gaussian Random/Gaussian Random/Object/Test Script.lsl create mode 100644 Gaussian Random/Run of 300.png create mode 100644 Land to Sculpt Maker/Land to Sculpt Maker.sol create mode 100644 Land to Sculpt Maker/Land to Sculpt Maker/Land to Sculpt Maker.prj create mode 100644 Land to Sculpt Maker/Land to Sculpt Maker/Object/Script.lsl create mode 100644 NPC Appearance Sorter/NPC Appearance Sorter.sol create mode 100644 NPC Appearance Sorter/NPC Appearance Sorter/NPC Appearance Sorter.prj create mode 100644 NPC Appearance Sorter/NPC Appearance Sorter/Object/Script.lsl create mode 100644 OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.sol create mode 100644 OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/LICENCE.txt create mode 100644 OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/README.txt create mode 100644 OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.prj delete mode 100644 Paramour Builder's Buddy/Paramour Builder's Buddy.sol delete mode 100644 Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Paramour Builders Buddy.lsl delete mode 100644 Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy.prj create mode 100644 Paramour Builders Buddy/Paramour Builders Buddy.sol rename Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Paramour Builder's Buddy Instructions.txt => Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Paramour Builders Buddy Instructions.txt (100%) create mode 100644 Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Paramour Builders Buddy.lsl rename {Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD => Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD}/Two prim HUD.jpg (100%) rename {Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD => Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD}/buddy.png (100%) rename {Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD => Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD}/buddy_no_tex.png (100%) create mode 100644 Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy.prj create mode 100644 Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando.sol create mode 100644 Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Object/Particle_Garden__Grows_slowly_rando_1.lsl create mode 100644 Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Particle_Garden__Grows_slowly_rando.prj create mode 100644 Rene Free Lighting System/Renes Free Lighting System.sol rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/Features.pdf (100%) rename Rene's Free Lighting System/Rene's Free Lighting System/Rene's Free Lighting System.prj => Rene Free Lighting System/Renes Free Lighting System/Renes Free Lighting System.prj (97%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/User Manual.pdf (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/_Main/Config_default.txt (97%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/_Main/Config_default.txt.bak create mode 100644 Rene Free Lighting System/Renes Free Lighting System/_Main/light.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/_Main/light.lsl => Rene Free Lighting System/Renes Free Lighting System/_Main/light.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/_Main/light_region.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/_Main/light_region.lsl => Rene Free Lighting System/Renes Free Lighting System/_Main/light_region.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/_Main/switch.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/_Main/switch.lsl => Rene Free Lighting System/Renes Free Lighting System/_Main/switch.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/_Main/switch_region.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/_Main/switch_region.lsl => Rene Free Lighting System/Renes Free Lighting System/_Main/switch_region.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/config_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/config_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/config_control.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/ext_config_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/ext_config_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/ext_config_control.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/ext_switch_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/ext_switch_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/ext_switch_control.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/light_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/light_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/light_control.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/link_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/link_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/link_control.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/link_receiver.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/link_receiver.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/link_receiver.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/network_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/network_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/network_control.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/network_control_region.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/network_control_region.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/network_control_region.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/network_receiver.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver_region.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/network_receiver_region.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver_region.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/remote_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/remote_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/remote_control.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/remote_receiver.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/remote_receiver.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/remote_receiver.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/controls/switch_control.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/controls/switch_control.lsl => Rene Free Lighting System/Renes Free Lighting System/controls/switch_control.lsl.bak (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/history.txt (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/license.txt (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_bling.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_bling.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_bling.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_sensual.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_sensual.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_sensual.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_simple.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_simple.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_simple.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_fire.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_fire.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_fire.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_halo.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_halo.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_halo.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starbling.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_starbling.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starbling.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starburst.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_starburst.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starburst.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - switch/nightlight.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - switch/nightlight.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - switch/nightlight.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/plugins - switch/proximity.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/plugins - switch/proximity.lsl => Rene Free Lighting System/Renes Free Lighting System/plugins - switch/proximity.lsl.bak (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/readme.txt (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/textures/glow_large.png (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/textures/glow_medium.png (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/textures/glow_small.png (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/textures/pixie_large.png (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/textures/pixie_medium.png (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/textures/pixie_small.png (100%) rename {Rene's Free Lighting System/Rene's Free Lighting System => Rene Free Lighting System/Renes Free Lighting System}/textures/star.png (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/tools/color_converter.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/tools/color_converter.lsl => Rene Free Lighting System/Renes Free Lighting System/tools/color_converter.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/tools/face_picker.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/tools/face_picker.lsl => Rene Free Lighting System/Renes Free Lighting System/tools/face_picker.lsl.bak (100%) create mode 100644 Rene Free Lighting System/Renes Free Lighting System/tools/remove_floating_text.lsl rename Rene's Free Lighting System/Rene's Free Lighting System/tools/remove_floating_text.lsl => Rene Free Lighting System/Renes Free Lighting System/tools/remove_floating_text.lsl.bak (100%) delete mode 100644 Rene's Free Lighting System/Rene's Free Lighting System.sol create mode 100644 Skirt Builder/Skirt Builder.sol create mode 100644 Skirt Builder/Skirt Builder/Skirt Builder.prj create mode 100644 Skirt Builder/Skirt Builder/Skirt Builder/pose stand script.lsl create mode 100644 Skirt Builder/Skirt Builder/Skirt Plate/positioning control.lsl create mode 100644 Skirt Builder/manual.txt create mode 100644 Skirt Builder/waist.png create mode 100644 Waypoint Recorder and Display/Waypoint Recorder and Display.sol create mode 100644 Waypoint Recorder and Display/Waypoint Recorder and Display/Object/Waypoint Script.lsl create mode 100644 Waypoint Recorder and Display/Waypoint Recorder and Display/Waypoint Recorder and Display.prj diff --git a/Gaussian Random/Gaussian Random.sol b/Gaussian Random/Gaussian Random.sol new file mode 100644 index 00000000..f37c620b --- /dev/null +++ b/Gaussian Random/Gaussian Random.sol @@ -0,0 +1,3 @@ + + + diff --git a/Gaussian Random/Gaussian Random/720px-Normal_Distribution_PDF.svg.png b/Gaussian Random/Gaussian Random/720px-Normal_Distribution_PDF.svg.png new file mode 100644 index 0000000000000000000000000000000000000000..d1120c789cfd9f009d2f377c35254709e8f2137a GIT binary patch literal 50964 zcmbTeWmr|+_BXugZlwf~M#2E;M!J!16(m(sP#OtAN?HV@l?Dmv5EMj2LP8p(rKB6) zu{i%e&w1kI{=ntFVYAj;bB^(=u|qZ06^QU@@lhxgk&>e99TW<^2ZciWj*AVi92cZb z!#C{vDhjfwGvvSYhWD{3)D@JHthCP4l$G&kIy(Bb0)O9gG^68xLc@}k(sUHCqf>ks zkY>>rTGaNs(MB{`$nxRM7}?RtAr_l(`O()V6fdTpgb3UZC%5?Grf5V&`|}EM?iCJ> z=e%5BbQX>RjB^$)XiG~ETzxxfR5)OrcCTr{CZ~Kiv|D{X*bNQT??P1sQxL`QhC{zDMKz(+ev+^nUzzI4&d*`y;=? zEkzn=R5FcwOABLX>1TT%qbBq3wClq$!{ye-BA86c&6u^=&#%0mv))}9-f662bTare zF~8f0flc_z^!xGFT$+QLZ{yAhU&8XyHy*2rPS0l!a~ii#4~niO)ZRx|lZ7u!bhaMk zyDZyXbTv!qFskd1^-jpi$cEu{y&wH==ythEe3+S;lXaWAR=X2V%FK5=eTGY(?2c-x zriUUIsoISB2KoLK^S`{H_)duI6}-m#T59x04dwihzKf^1iW+7`-2CoB=U(L_FZ0p1 zy-M%@@+<%SJ+9PY)@Ej+t0Zvyr>4?N9Icd#jF&$i7s15F&XfzITpX$7`sgq@@l^}1 zl`OibtjZPjuG(dR_;k7Hl)%u?P?IzMNv-wIcWMR|He`B5MnSJ$k=op%RZSKkdi?k? zwW!-eW(8H`zCX(A;cZ9Ki%v~X`v>5VWIh`GSZ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P|-wzoA308Lpb_PplmQx z`AJq*whe?t5QxbA83Ay>{doA|VV8ij3-0}|zTbT?;KLfO_r_g;fUJFkzXhG)?Keb- zO3}m<4>y$td|4xx^y$RZsXR6v#xX)6!ag?!KtXVD{W*jrM9k8X=?Q%X+`!7+^(p9V z7HL2wUHt3`LS1^%yn+H_V14D9EFcmIQ8>YbkYl4fDZ)Z}zPN&M*_2KZw1VgVG!LKW z8RIW)R)|4+0Fs*UR{d5+pe#K+MDS)iS5{6=Oj}z!unT}!TKwht{)+)Y7=8YK1ik-% go?8&=hLJr`eV7bJ(#fGMhk$=_Qc9Ag;syc#4{mnhpa1{> literal 0 HcmV?d00001 diff --git a/Gaussian Random/Gaussian Random/Gaussian Random.prj b/Gaussian Random/Gaussian Random/Gaussian Random.prj new file mode 100644 index 00000000..69455e43 --- /dev/null +++ b/Gaussian Random/Gaussian Random/Gaussian Random.prj @@ -0,0 +1,6 @@ + + + + + diff --git a/Gaussian Random/Gaussian Random/Object/Test Script.lsl b/Gaussian Random/Gaussian Random/Object/Test Script.lsl new file mode 100644 index 00000000..c9bc1f21 --- /dev/null +++ b/Gaussian Random/Gaussian Random/Object/Test Script.lsl @@ -0,0 +1,66 @@ +// :SHOW: +// :CATEGORY:Utility Functions +// :NAME:Gaussian Random +// :AUTHOR:GMLscripts.com +// :KEYWORDS: +// :CREATED:2016-02-26 16:49:01 +// :EDITED:2016-02-26 15:49:01 +// :ID:1100 +// :NUM:1885 +// :REV:1 +// :WORLD:Second Life +// :DESCRIPTION: +// DESCRIPTION: []::returns a pseudo-random number with Gaussian or normal distribution +// :CODE: +//:License: Copyright (c) 2007-2015, GMLscripts.com +//DESCRIPTION: +// This script returns a pseudo-random number with Gaussian or normal distribution, meaning the values returned tend to cluster around a given average or mean value. This could be useful if one needed a random behavior or outcome where deviations from the desired target become more rare as the magnitude of the deviation increases. + +/// An example use might be an enemy AI whose skill is represented by the degree of error in its aiming ability. If a target is at 90 degrees, aim = gauss(90,5) would return a firing direction with a small degree of error. This degree of error (or deviation) is controlled by the second argument. In this case, the value returned would be within 5 degrees (one standard deviation) of the desired direction (the mean) about 68% of the time, and within 10 degrees (two standard deviations) about 95% of the time. The lower the given deviation, the greater chance the returned value will be near the given mean, and the more accurate the aim of the AI would be. + +// just call gauss(mean,deviation) with e value and the error around it +// +// Returns a pseudo-random number with an exact Gaussian distribution. +// +// mean mean value of the distribution, real +// deviation standard deviation of distribution, real + + +// Originally from http://www.gmlscripts.com/script/gauss +// Copyright (c) 2007-2015, GMLscripts.com +// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +float x1; +float x2; +float w; + +float rand(float mean, float deviation) +{ + + do { + x1 = llFrand(2) - 1; + x2 = llFrand(2) - 1; + w = x1*x1 + x2*x2; + } while (0 >= w || w >= 1); + + w = llSqrt(-2 * llLog(w)/w); + return mean + deviation * x1 * w; +} + +default +{ + // sample test program to prioduce 100 gun rounds aimed at 90 degrees. + touch_start(integer total_number) + { + integer i = 100; + while (i-- > 0) { + // In the case of the gun shooting at a 90 degree angle, the value returned would be within 5 degrees (one standard deviation) of the desired direction (the mean) about 68% of the time, and within 10 degrees (two standard deviations) about 95% of the time. + llSay(0,(string) rand(90,5)); + } + } +} diff --git a/Gaussian Random/Run of 300.png b/Gaussian Random/Run of 300.png new file mode 100644 index 0000000000000000000000000000000000000000..a885d0b831d6c3abe8c58a61bab275bb20477472 GIT binary patch literal 9045 zcmeHNcT`jPwmy~-XG9qbLO{SaqJt0=5v8h#fH){!L4u$JL?rY8A%xK@s7Mnj0s#e) zCPZMUAt0h4B{0%k=tW8rYC=qVzc6#(_}0AjW_)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{YK!7TChLWjr1#b#k74fbPO kazEq$J$^4VKJZt0&h1sPlTE)4riS!&3{U5tx^nA30GG1;Y5)KL literal 0 HcmV?d00001 diff --git a/Land to Sculpt Maker/Land to Sculpt Maker.sol b/Land to Sculpt Maker/Land to Sculpt Maker.sol new file mode 100644 index 00000000..66d948e7 --- /dev/null +++ b/Land to Sculpt Maker/Land to Sculpt Maker.sol @@ -0,0 +1,3 @@ + + + diff --git a/Land to Sculpt Maker/Land to Sculpt Maker/Land to Sculpt Maker.prj b/Land to Sculpt Maker/Land to Sculpt Maker/Land to Sculpt Maker.prj new file mode 100644 index 00000000..e62ec0e0 --- /dev/null +++ b/Land to Sculpt Maker/Land to Sculpt Maker/Land to Sculpt Maker.prj @@ -0,0 +1,6 @@ + + + + + diff --git a/Land to Sculpt Maker/Land to Sculpt Maker/Object/Script.lsl b/Land to Sculpt Maker/Land to Sculpt Maker/Object/Script.lsl new file mode 100644 index 00000000..a1c45cec --- /dev/null +++ b/Land to Sculpt Maker/Land to Sculpt Maker/Object/Script.lsl @@ -0,0 +1,87 @@ +// :SHOW: +// :CATEGORY:Terrain +// :NAME:Land to Sculpt Maker +// :AUTHOR:Unknown +// :KEYWORDS: +// :CREATED:2016-01-23 15:14:38 +// :EDITED:2016-01-23 14:14:38 +// :ID:1098 +// :NUM:1883 +// :REV:1 +// :WORLD:Opensim +// :DESCRIPTION: +// Makes a 32 X 32 sculpt fo the the terrain under the prim. +// :CODE: +string int2hex(integer x) +{ + string hex="0123456789ABCDEF"; + return llGetSubString(hex, (x >> 4), (x >> 4)) + + llGetSubString(hex, x & 0xF, x & 0xF); +} +default +{ + on_rez(integer mm) + { + llResetScript(); + } + state_entry() + { + llOwnerSay("Script running"); + } + touch_end(integer touched) + { + if (llDetectedKey(0) == llGetOwner()) + { + llOwnerSay("Starting..."); + float mapX = 0.0; + float mapY = 0.0; + float mapZ = 0.0; + integer x = 0; + integer y = 0; + integer z = 0; + integer offsetX = 0; + integer offsetY = 0; + string colorX = ""; + string colorY = ""; + string colorZ = ""; + string draw = osSetPenSize("", 1); + vector pos = llGetPos(); + for (; y < 64; y++) + { + draw = osMovePen(draw, 0, y); + offsetX = 0; + if (y == 63) offsetY = 1; + for (x = 0; x < 64; x++) + { + if (x == 63) offsetX = 1; + mapX = ((float)x + offsetX) / 2.0 - 16.0; + mapY = ((float)y + offsetY) / 2.0 - 16.0; + mapZ = llGround(); + if (mapZ > (pos.z + 16.0)) z = 255; + else if (mapZ < (pos.z - 16.0)) z = 0; + else { z = llRound((mapZ - (pos.z - 16.0)) * 8.0); } + if (x == 63) colorX = "FF"; + else colorX = int2hex(x * 4); + if (y == 63) colorY = "FF"; + else colorY = int2hex(y * 4); + if (z == 256) colorZ = "FF"; + else colorZ = int2hex(z); + draw = osSetPenColor(draw, "FF" + colorX + colorY + colorZ); + draw = osDrawLine(draw, x, y, x + 1, y); + } + } + osSetDynamicTextureDataBlendFace("", "vector", draw, "width:64,height:64", FALSE, 2, 0, 255, 1); + llSetPrimitiveParams([PRIM_SIZE, <32.0, 32.0, 32.0>, PRIM_TYPE, PRIM_TYPE_SCULPT, llGetTexture(1),PRIM_SCULPT_TYPE_PLANE | PRIM_SCULPT_FLAG_INVERT]); + state done; + } + } +} +state done +{ + state_entry() + { + llSetClickAction(CLICK_ACTION_NONE); + llOwnerSay("Done."); + //llRemoveInventory(llGetScriptName()); + } +} diff --git a/NPC Appearance Sorter/NPC Appearance Sorter.sol b/NPC Appearance Sorter/NPC Appearance Sorter.sol new file mode 100644 index 00000000..748765c6 --- /dev/null +++ b/NPC Appearance Sorter/NPC Appearance Sorter.sol @@ -0,0 +1,3 @@ + + + diff --git a/NPC Appearance Sorter/NPC Appearance Sorter/NPC Appearance Sorter.prj b/NPC Appearance Sorter/NPC Appearance Sorter/NPC Appearance Sorter.prj new file mode 100644 index 00000000..5a0cf6df --- /dev/null +++ b/NPC Appearance Sorter/NPC Appearance Sorter/NPC Appearance Sorter.prj @@ -0,0 +1,6 @@ + + + + + diff --git a/NPC Appearance Sorter/NPC Appearance Sorter/Object/Script.lsl b/NPC Appearance Sorter/NPC Appearance Sorter/Object/Script.lsl new file mode 100644 index 00000000..bb96079e --- /dev/null +++ b/NPC Appearance Sorter/NPC Appearance Sorter/Object/Script.lsl @@ -0,0 +1,268 @@ +// :SHOW: +// :CATEGORY:NPC +// :NAME:NPC Appearance Sorter +// :AUTHOR:Aine Caoimhe (Mata Hari) +// :KEYWORDS: +// :CREATED:2016-02-26 16:49:31 +// :EDITED:2016-02-26 15:49:31 +// :ID:1101 +// :NUM:1886 +// :REV:1 +// :WORLD:Opensim +// :DESCRIPTION: +// Preview a series of NPC appearance notecards. +// :CODE: +//UTILITY SCRIPT: NPC Appearance Sorter +//I had a request from someone for a simple script to let you look through NPC appearance notecards to figure out what they were so I wrote this little utility which could be useful for others. + +//To use it: +//Rez a prim in a region where NPCs and the necessary OSSL functions are enabled +//Add one or more appearance notecards to the prim +//(Optional) add an animation to the prim -- otherwise the NPC will play the default SL stand. +//Add a new script and copy the script, below, into it, and save +//Touch the prim to begin +//* * * * * * * COPY EVERYTHING BELOW HERE INTO THE SCRIPT * * * * * * * + +// PARAMOUR NPC SORTER +// by Aine Caoimhe (Mata Hari)(c. LACM) February 2016 +// Provided under Creative Commons Attribution-Non-Commercial-ShareAlike 4.0 International license. +// Please be sure you read and adhere to the terms of this license: https://creativecommons.org/licenses/by-nc-sa/4.0/ +// +// *** THIS SCRIPT REQUIRES (AND WILL ONLY WORK) IN REGIONS WHERE THE SCRIPT OWNER HAS NPC ENABLED AND OSSL FUNCTION PERMISSIONS *** +// +// This is a simple script for previewing a series of NPC appearance notecards. +// The NPC is rezzed and sits on the object containing the script. Using the dialog you can scroll through appearances and (optionally) delete any you don't want. +// +// INSTRUCTIONS +// +// - Place this script in a prim (I use a generic prim sphere) +// - Add appearance notecards to its inventory (names don't matter...just don't add any notecards that aren't appearances) +// - Optional: add one animation to the prim that you want the NPC to play...if you don't, it will use the generic SL "stand" instead +// - Touch the prim and follow the dialog instructions +// - Adding a new appearance notecard or changing the animation inside it requires a script reset to pick up the changes +// +// KNOWN BUG: +// There is a known bug currently in Opensim (I reported it in Sept 2014 http://opensimulator.org/mantis/view.php?id=7325) where NPCs will often not display +// the animation until some time after told to. They will eventually display it if you wait, or you can also trigger it by changing them to a different appearance. +// There are other work-arounds but for this script I kept it simple. +// +// * * * * * * * * * +// USER SETTINGS +// * * * * * * * * * +integer ownerOnly=TRUE; // TRUE = only owner can activate it...FALSE = anyone can...I recommend restricting to owner so nobody else can delete any of your notecards +vector sitPos=<0.0, 0.0, 2.0>; // sit target offset to use..adjust to whatever suits the object +float dialogTimeout=120.0; // time (in seconds) to wait before removing the dialog listener if no response has been received +integer showFloatyText=TRUE; // TRUE = display the current appearance name as floaty text above the prim...FALSE = only show it in the dialog menu +vector textColour=<0.0,1.0,0.0>; // vector colour to use for the floaty text (if being used) +// +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// DON'T CHANGE ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +key user; +key npc; +integer myChannel; +integer handle; +string anim; +list appear=[]; +integer ind; + +showMenu() +{ + handle=llListen(myChannel,"",user,""); + llSetTimerEvent(dialogTimeout); + string txtDia="Currently showing: "+llList2String(appear,ind)+"\n("+(string)(ind+1)+" of "+(string)llGetListLength(appear)+")"; + list butDia=["< PREV","DONE","NEXT >"]; + if (npc==NULL_KEY) + { + txtDia="\n\nREZ rezzes an NPC"; + butDia=[]+butDia+["REZ"]; + } + else + { + txtDia+="\n\nKILL removes the NPC"; + butDia=[]+butDia+["KILL"]; + } + txtDia+="\n\nDELETE will delete the current appearance notecard and advance to the next one\n\nGIVE hands you a copy of the appearance notecard"; + butDia=[]+butDia+["DELETE","GIVE"]; + llDialog(user,txtDia,butDia,myChannel); +} +rezNpc() +{ + string show=llList2String(appear,ind); + if (show=="") + { + llRegionSayTo(user,0,"ERROR! There are no apperanaces in inventory!"); + user=NULL_KEY; + return; + } + npc=osNpcCreate("NPC","Model",llGetPos()+<0,0,2>,show,8); //flag 8 = access perms compatible with both Opensim 0,9 parcel perm changes and all previous Opensim versions + llSleep(0.25); // ugly but necessary delay before sitting...give NPC time to register properly + osNpcSit(npc,llGetKey(),OS_NPC_SIT_NOW); +} +setAppearance() +{ + if (osIsNpc(npc)) osNpcLoadAppearance(npc,llList2String(appear,ind)); + llSetText(llList2String(appear,ind)+"\n("+(string)(ind+1)+" of "+(string)llGetListLength(appear)+")",textColour,(float)showFloatyText); +} +startAnimation() +{ + if (!osIsNpc(npc)) return; + llSleep(0.25); // need to sleep for 0.25 just to give the sit animation a chance to register, but this may still not be long enough to work around the long-standing Opensim bug + list anToStop=llGetAnimationList(npc); + osAvatarPlayAnimation(npc,anim); + integer stop=llGetListLength(anToStop); + while (--stop>=0) { osAvatarStopAnimation(npc,llList2String(anToStop,stop));} +} +buildAppear() +{ + appear=[]; + ind = llGetInventoryNumber(INVENTORY_NOTECARD); + while (--ind>=0) { appear = []+[llGetInventoryName(INVENTORY_NOTECARD,ind)]+appear;} + if (llGetListLength(appear)) ind=0; + else ind=-1; +} +default +{ + state_entry() + { + if (llGetInventoryNumber(INVENTORY_ANIMATION)>0) anim=llGetInventoryName(INVENTORY_ANIMATION,0); + else anim="stand"; + llSetClickAction(CLICK_ACTION_TOUCH); + myChannel=0x80000000 | (integer)("0x"+(string)llGetKey()); + user=NULL_KEY; + buildAppear(); + if (ind==-1) + { + llOwnerSay("WARNING: No appearance notecards found in inventory. Disabling script."); + return; + } + if (sitPos==ZERO_VECTOR) sitPos=<0,0,0.00001>; + llSitTarget(sitPos,ZERO_ROTATION); + // if NPC found sitting, make this my NPC + npc=llAvatarOnSitTarget(); + if (npc!=NULL_KEY) + { + if (!osIsNpc(npc)) + { + llRegionSayTo(npc,0,"Sorry, this item is for NPCs to sit on only"); + llUnSit(npc); + npc=NULL_KEY; + } + else + { + setAppearance(); + startAnimation(); + } + } + } + timer() + { + llSetTimerEvent(0.0); + llRegionSayTo(user,0,"Dialog timed out."); + llListenRemove(handle); + user=NULL_KEY; + } + on_rez(integer foo) + { + llResetScript(); + } + changed(integer change) + { + if (change & CHANGED_OWNER) llResetScript(); + else if (change & CHANGED_REGION_START) llResetScript(); + } + touch_start(integer num) + { + key who=llDetectedKey(0); + if (ownerOnly && (who!=llGetOwner())) llRegionSayTo(who,0,"Sorry, only the owner can use this"); + else if (ind==-1) llRegionSayTo(who,0,"ERROR: no appearance notecards found. Please add some, then reset the script."); + else if (user!=NULL_KEY) + { + if (who==user) showMenu(); + else llRegionSayTo(who,0,"Sorry, this item is already in use."); + } + else + { + user=who; + if (npc==NULL_KEY) + { + rezNpc(); + startAnimation(); + } + if (user!=NULL_KEY) showMenu(); // can become null key if no appearance were found in inventory + } + } + listen (integer channel,string name, key who, string message) + { + llListenRemove(handle); + llSetTimerEvent(0.0); + if (message=="DONE") + { + user=NULL_KEY; + return; + } + if (message=="REZ") + { + rezNpc(); + if (user==NULL_KEY) return; // user becomes null key when no appearances exist + } + else if (message=="KILL") + { + if (osIsNpc(npc)) osNpcRemove(npc); + npc=NULL_KEY; + } + else if (message=="GIVE") + { + string card=llList2String(appear,ind); + if ((card=="") || (llGetInventoryType(card)!=INVENTORY_NOTECARD)) + { + llRegionSayTo(user,0,"ERROR: unable to find the expected card...resetting the script to pick up the necessary inventory changes"); + llResetScript(); + return; + } + llRegionSayTo(user,0,"Give you the appearance notecard: "+card+"\nYou will find it in your notecards folder or your suitcase's notecard folder depending on whether you're in your home grid or not"); + llGiveInventory(user,card); + } + else if (message=="DELETE") + { + string card=llList2String(appear,ind); + if ((card=="") || (llGetInventoryType(card)!=INVENTORY_NOTECARD)) + { + llRegionSayTo(user,0,"ERROR: unable to find the expected card...resetting the script to pick up the necessary inventory changes"); + llResetScript(); + return; + } + llRemoveInventory(card); + llRegionSayTo(user,0,"Appearance notecard deleted: "+card); + appear=[]+llDeleteSubList(appear,ind,ind); + if (llGetListLength(appear)==0) + { + llRegionSayTo(user,0,"There are no more appearance notecards in inventory. Removing NPC (if any) and resetting script"); + if (osIsNpc(npc)) osNpcRemove(npc); + npc=NULL_KEY; + llResetScript(); + return; + } + if (ind>=llGetListLength(appear)) ind=0; + setAppearance(); + } + else + { + if (llGetListLength(appear)==1) llRegionSayTo(user,0,"There is only one appearance in inventory...can't change appearance"); + else + { + if (message=="< PREV") ind--; + else if (message=="NEXT >") ind++; + else + { + llOwnerSay("ERROR! Unexpected menu response: "+message); + return; + } + if (ind<0) ind=llGetListLength(appear)-1; + else if (ind>=llGetListLength(appear)) ind=0; + setAppearance(); + } + } + showMenu(); + } +} diff --git a/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.sol b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.sol new file mode 100644 index 00000000..4b0496df --- /dev/null +++ b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.sol @@ -0,0 +1,3 @@ + + + diff --git a/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/LICENCE.txt b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/LICENCE.txt new file mode 100644 index 00000000..e7a826d2 --- /dev/null +++ b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/LICENCE.txt @@ -0,0 +1,688 @@ +// :SHOW: +// :CATEGORY:Destination Guide +// :NAME:OpenSimWorld NPC Controller +// :AUTHOR:Opensim World +// :KEYWORDS: +// :CREATED:2016-02-26 16:50:44 +// :EDITED:2016-02-26 15:50:44 +// :ID:1102 +// :NUM:1887 +// :REV:1 +// :WORLD:Second Life +// :DESCRIPTION: +// Opensim World script to sense avatars and fill in their web site +// :CODE: + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/README.txt b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/README.txt new file mode 100644 index 00000000..1aa8919f --- /dev/null +++ b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/Object/README.txt @@ -0,0 +1,228 @@ +// :SHOW: +// :CATEGORY:NPC +// :NAME:OpenSimWorld NPC Controller +// :AUTHOR:OpensimWorld +// :KEYWORDS: +// :CREATED:2016-02-26 16:51:34 +// :EDITED:2016-02-26 15:51:34 +// :ID:1102 +// :NUM:1888 +// :REV:1 +// :WORLD:OpenSim +// :DESCRIPTION: +// Fuill featured NPC controller for multiple NPC's +// :CODE: +# OpenSimWorld NPC Controller + +This is a full-featured controller for creating interactive NPCs, scripting them (through notecards) and creating waypoints of your region so that the NPCs can roam around. The controller is lightweight (a single script manages all the NPCs) and the NPCs are interactive (i.e. you can give them commands through the local chat). + +You can get the latest OSWNPC package from the OpenSimWorld region in OSGrid, where you can also see them in action: + + hg.osgrid.org:80:OpenSimWorld + +(move down near the bunker to find the package) + + +# Installation + +The controller requires OSSL functions to work. Apart from the osNpc*() functions you should also enable osListeRegex(), osGetNotecard(), osMessageAttachments(). The controller uses channel 68 for all its functions. + +In order to set the names of your NPCs , edit the __npc_names notecard, and add the *first* names of your NPCs , one at a line. The last name of your NPCs will always be (NPC). + +*After making configuration changes in notecards, reset the NPC controller scripts, or click on it and select "ReConfig"*. + +To create an NPC, first wear the "Listener" object in your RIGHT PEC. The listener is an object that all your NPCs must wear. It listens to the local chat for commands and sends them to the NPC controller for processing. After wearing the listener, move within 20 meters near the controller, click on the controller, select SaveNPC and then the name of the NPC you wish to create. You should see a message "Appearance saved to APP_xxxx" . This means your appearance has been saved in a notecard inside the controller. Your NPCs can have multiple appearances (more on this later). + +You can now load your NPC. Click the controller, click LoadNPC, then click the name of the NPC to load. If all has gone well, your NPC should now respond to commands. Try "[name] come" or "[name] follow me" to test it. There are many commands you can use to have your NPCs do things (see section below). + + + + +# NPC supported commands + +The NPCs support a number of commands. You give these commands through the public chat when the NPC is near you. The syntax is: + + [npc-firstname] [command] + +For example, assuming our NPC is called Bob: +``` + Bob come + Bob leave + Bob follow me + ... + etc. +``` +You can have the NPCs execute these commands whenever they reach a waypoint by creating a "scenario" notecard. A scenario is just a list of commands, one per line, that is executed by the all NPCs whenever they reach that waypoint (Read the next section for waypoints). + +For more complex behavior, the following control commands are supported in notecards: if, if-not, jump + +Example of a notecard: +``` + if name-is Bob Alice + say hi + say I am either Bob or Alice + jump @outofhere + end-if + say i am not bob or alice + @outofhere + if-not name-is Bob + say I am definitely not Bob + end-if + say ... and i 'm now leaving + leave +``` + +This example shows how to use if blocks, the jump command and how to create labels like @outofhere + +As you see, in notecards, the name of the NPC is omitted. It is replaced with the name of the NPC automatically, for example when Bob runs this notecards "say hi" becomes "Bob say hi". + +In order to add a scenario to a waypoint, create a notecard with the name format: "_[waypoint-number].scr" and drop it in the controller object. + +For example the _10.scr notecard will be executed at waypoint #10, _11.scr at waypoint #11 and so on. Waypoints start at #0. You can find the waypoint number on top of the pegs when editing waypoints (Read below). + + +# List of NPC commands + +These commands must be preceded by the name of the NPC. Here we assume our NPC is called "Bob" +``` + Bob come = "Come here ". Bob will come move close to you + + Bob moveto 23 : walk towards waypoint #23 + + Bob movetov <23,24,25> : walk towards point with coordinates <23,24,25> + + Bob flytov <23,24,25> : fly towards point <23,24,25> in region + + Bob movetovr <23,24,25> <33,34,25> : walk to a random point between the points <23,24,25> <33,34,25> + + runtovr <23,24,25> <33,34,25> : same as above, but run + + ** Note: never leave spaces in coordinate vectors, i.e. <23,24,25> NOT <23, 24, 25> ** +``` +## Sit commands + +The NPC can sit on objects. The way it works is as follows: +``` +Bob use chair : Bob will attempt to find an object named "chair" (Object Name) near him and try to sit on it if its transparency (alpha) is less than 100%. Since by convention poseballs turn transparent when users sit on them, this ensures that Bob will not sit on an already-occupied poseball. + +Bob stand : Bob will stand up if he is sitting +``` +## Variables +Variables can be used with IF commands for more complex scenarios +``` +setvar foo 13 : set variable foo to be 13 . Only string variables are supported. Variables can be used in if blocks + +setvar foo : set variable foo to the empty string. The empty string is the default value if a variable does not exist +``` + +## Flow control with IF commands +There is support for multiple levels of IF blocks. blocks end with "end-if". There is no "else" command, but you can usually achieve the same effect with "jump" commands + +``` +if name-is bob alice : if the npc's name is Bob or alice + use dance : Sit on the poseball object named "dance" +end-if : always end IF blocks with end-if. You can nest if blocks + +if-not name-is Bob : Example of negative if + +if-prob 0.3 : if with random probabilty 0.3 (the if block will be executed 30% of the time) + +if var-is party 1 : Will execute the if variable party is "1" +``` + +Jump command. You can use the syntax @label to create labels in your notecards. The syntax is: +``` +jump myLabel : like "jump" in LSL or "goto" in other languages. the label should be on a line by itself prefixed with '@' like this: +@myLabel +``` + +## Useful script commands +``` +wait 200 : wait 200 seconds + +waitvar foo 13 : wait until the variable foo gets the value 13 + +waitvar foo : wait until the variable foo is empty. +``` + + +## Pathfinding commands + +The NPCs can find the paths between waypoints and walk from point A to point B. Because this is computationally intensive, only paths with less than 10 waypoints between are supported. The following pathfinding commands are supported: + +``` +Bob go to Bar : this uses pathfinding to go to the waypoint with the name "Bar" +Bob go to : without an argument, bob will print the names of waypoints where it can go +Bob goto 13 : go to waypoint #13 +``` + +## Other commands +``` +Bob say hi : Says "hi" on public channel +Bob saych 90 blablah : say "blablah" on channel 90 +``` +``` +Bob msgatt attachment_command 12 13 14 15 +``` +Uses osMessageAttachements to send the message "attachment_command" to attachments at attach points 12 13 14 15. +This can be useful for scripting NPC attachments. Read the OSSL docs of osMessageAttachments() for more. + +``` +Bob lookat me : attempts to look at you +Bob lookat : look towards point x,y,z +Bob lookat Bar : look towards the waypoint named "Bar" + +Bob anim dance : play animation "dance" . the animation must be in the inventory of the controller object + +Bob light : turn on/off a light the NPCs have on them + +Bob follow me : self-explanatory + +Bob follow Alice : follow alice around. Only the first name of the other avatar is needed + +Bob fly with me : self-explanatory +Bob fly with alice : fly with another user + +Bob stop : Stops his animation and his movement. and stops following you + +Bob leave : start wandering between waypoints + +Bob run-notecard my_script.scr : execute the contents of the notecard my_script.scr (the notecard must be in the controller inventory + +Bob stop-script : stop executing the notecard script + +Bob dress swimming : You can have multiple appearance notecards per NPC. This will attempt to load the appearance notecard named APP_bob_swimming from the controller's inventory. + +Bob batch say hi ; wait 10; say bye : executes multiple commands , separated by ";" +``` + + + +# Creating waypoints + +You can use the controller to create paths within your region, and the NPCs can wander along those paths. In addition, you can have them do interesting actions whenever they reach specific points by creating "scenario" notecards. + +To create a map, wear the WaypointEditor HUD. The HUD works by rezzing a number of "traffic cone" pegs around your region, which represent the waypoints that your NPCs follow. You can use the HUD to edit those points and create links between them. + +You begin by clicking RezPegs on the HUD. If you have an existing map, this will rez pegs in each waypoint, otherwise you will not see any pegs. + +To add a waypoint, move your avatar to the desired position, and select "AddPeg" from the HUD. To create a second waypoint, move to another position, and AddPeg again. + +To link two waypoints, click on the first one, then click on the second one and select "LinkPegs" from the popup. + +To unlink two waypoints, click on the first one, then click on the second one and select "UninkPegs" from the popup. + + +To set a name for a waypoint, click the peg , select "SetName", and ender the name (E.g. "Bar") + +You can use the standard edit tools to move around the waypoints. Be careful, after you move a peg, you MUST select "ScanPegs" from the HUD or your changes will be lost. + +To save the changes in the controller notecards, select "SaveCards" from the HUD. To test if all went well, clear the pegs and rez them again. + +After creating the map, it is possible to have the NPCs walk to specific waypoints. For example, if you have a waypoint named "Bar" , you can ask an NPC to go there (but only if it is up to 10 hops away), like this: "Bob go to Bar" + + +## Extensions + +You can create extensions with your own commands. Extensions are scripts that are placed in child objects linked to the controller. The default NPC controller object already contains an extension (the little green box). The script in it shows how extensions parse the data sent from the controller (through link_message) and how they can respond. + diff --git a/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.prj b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.prj new file mode 100644 index 00000000..1684f71c --- /dev/null +++ b/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller/OpenSimWorld NPC Controller.prj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Paramour Builder's Buddy/Paramour Builder's Buddy.sol b/Paramour Builder's Buddy/Paramour Builder's Buddy.sol deleted file mode 100644 index 2ab1f531..00000000 --- a/Paramour Builder's Buddy/Paramour Builder's Buddy.sol +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Paramour Builders Buddy.lsl b/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Paramour Builders Buddy.lsl deleted file mode 100644 index dc9a8e46..00000000 --- a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Paramour Builders Buddy.lsl +++ /dev/null @@ -1,188 +0,0 @@ -// :SHOW: -// :CATEGORY:Building -// :NAME:Paramour Builder's Buddy -// :AUTHOR:Aine Caoimhe -// :KEYWORDS: -// :CREATED:2015-11-24 20:37:09 -// :EDITED:2015-11-24 19:37:09 -// :ID:1092 -// :NUM:1867 -// :REV:1 -// :WORLD:OpenSim -// :DESCRIPTION: -// Paramour Builder's Buddy v1.0 -// :CODE: -// -// by Aine Caoimhe (LACM) Nov. 2015 -// Provided under Creative Commons Attribution-Non-Commercial-ShareAlike 4.0 International license. -// Please be sure you read and adhere to the terms of this license: https://creativecommons.org/licenses/by-nc-sa/4.0/ -// -// USER SETTINGS -// normally you shouldn't need to change these -key blankTexture="buddy_no_tex"; // builder's buddy face texture for no face...should be in the prim's inventory -string builderTexture="buddy"; // builder's buddy buttons texture name...should be in the prim's inventory -float timeOut=60.0; // how many seconds to wait for a target key to be supplied before closing the listener -// -// DON'T CHANGE ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU'RE DOING! -integer tPrim=1; -integer bPrim=2; -key target; -list faces; -integer FACE_SET_TARGET=0; -integer FACE_RESET_FACES=1; -integer FACE_GET_TEXTURES=2; -integer FACE_SET_TEXTURES=3; -integer FACE_NONE=5; -integer myChannel; -integer handle; - -getTextures() -{ - if (!confirmTarget()) return; - integer f; - while (f<8) - { - if (llListFindList(faces,[f])>-1) - { - list data=osGetPrimitiveParams(target,[ - PRIM_TEXTURE,f, - PRIM_COLOR,f, - PRIM_BUMP_SHINY,f, - PRIM_FULLBRIGHT,f, - PRIM_GLOW,f - ]); - data=[]+[PRIM_TEXTURE,f]+llList2List(data,0,3)+[PRIM_COLOR,f]+llList2List(data,4,5)+[PRIM_BUMP_SHINY,f]+llList2List(data,6,7)+[PRIM_FULLBRIGHT,f,llList2Integer(data,8),PRIM_GLOW,f,llList2Float(data,9)]; - llSetLinkPrimitiveParamsFast(tPrim,data); - } - f++; - } - llOwnerSay("Textures retrieved"); -} -setTextures() -{ - if (!confirmTarget()) return; - integer l=llGetListLength(faces); - while (--l>-1) - { - integer f=llList2Integer(faces,l); - list data=llGetLinkPrimitiveParams(tPrim,[ - PRIM_TEXTURE,f, - PRIM_COLOR,f, - PRIM_BUMP_SHINY,f, - PRIM_FULLBRIGHT,f, - PRIM_GLOW,f - ]); - data=[]+[PRIM_TEXTURE,f]+llList2List(data,0,3)+[PRIM_COLOR,f]+llList2List(data,4,5)+[PRIM_BUMP_SHINY,f]+llList2List(data,6,7)+[PRIM_FULLBRIGHT,f,llList2Integer(data,8),PRIM_GLOW,f,llList2Float(data,9)]; - osSetPrimitiveParams(target,data); - } - llOwnerSay("Textures set"); -} -integer confirmTarget() -{ - if (llKey2Name(target)=="") - { - llOwnerSay("Cannot locate the target object with key "+(string)target+" in this region. Please set a new target"); - target=NULL_KEY; - return FALSE; - } - else return TRUE; -} -countFaces() -{ - faces=[]; - integer f; - while (f<8) - { - key tex=llList2Key(osGetPrimitiveParams(target,[PRIM_TEXTURE,f]),0); - if (tex!="") faces=[]+faces+[f]; - else llSetLinkPrimitiveParamsFast(tPrim,[ - PRIM_TEXTURE,f,blankTexture,<1,1,0>,ZERO_VECTOR,0.0, - PRIM_COLOR,ALL_SIDES,<1,1,1>,1, - PRIM_BUMP_SHINY,ALL_SIDES,PRIM_SHINY_NONE,PRIM_BUMP_NONE, - PRIM_FULLBRIGHT,ALL_SIDES,FALSE, - PRIM_GLOW,ALL_SIDES,0.0 - ]); - f++; - } - string targetName=llList2String(llGetObjectDetails(target,[OBJECT_NAME]),0); - llOwnerSay("Set target to the prim \""+targetName+"\" which has "+(string)llGetListLength(faces)+" faces"); -} -resetFaces() -{ - llSetLinkPrimitiveParamsFast(tPrim,[ - PRIM_TEXTURE,ALL_SIDES,blankTexture,<1,1,0>,ZERO_VECTOR,0.0, - PRIM_COLOR,ALL_SIDES,<1,1,1>,1, - PRIM_BUMP_SHINY,ALL_SIDES,PRIM_SHINY_NONE,PRIM_BUMP_NONE, - PRIM_FULLBRIGHT,ALL_SIDES,FALSE, - PRIM_GLOW,ALL_SIDES,0.0 - ]); - llSetLinkPrimitiveParamsFast(bPrim,[PRIM_TEXTURE,ALL_SIDES,builderTexture,<1,1,0>,<0,0,0>,0]); - target=NULL_KEY; -} -getTarget() -{ - myChannel=0x80000000 | (integer)("0x"+(string)llGetKey()); - handle=llListen(myChannel,"",llGetOwner(),""); - llTextBox(llGetOwner(),"Paste the key of your desired target object into this text box",myChannel); - llSetTimerEvent(timeOut); -} -default -{ - state_entry() - { - target=NULL_KEY; - } - timer() - { - llOwnerSay("I did not hear a response yet. Closing the listener"); - llListenRemove(handle); - llSetTimerEvent(0.0); - } - touch_start(integer num) - { - key toucher=llDetectedKey(0); - if (toucher!=llGetOwner()) return; - integer prim=llDetectedLinkNumber(0); - integer face=llDetectedTouchFace(0); - if (prim==tPrim) return; - else if (face==FACE_NONE) return; - else if (face==FACE_RESET_FACES) resetFaces(); - else if (target==NULL_KEY) - { - if ((prim==bPrim)&&(face==FACE_SET_TARGET)) getTarget(); - else llRegionSayTo(toucher,0,"No target set"); - return; - } - else if (face==FACE_GET_TEXTURES) getTextures(); - else if (face==FACE_SET_TEXTURES) setTextures(); - } - changed(integer change) - { - if (change & CHANGED_OWNER) llResetScript(); - else if (change & CHANGED_REGION_START) llResetScript(); - } - on_rez(integer foo) - { - llResetScript(); - } - listen(integer channel, string name, key who, string message) - { - llListenRemove(handle); - llSetTimerEvent(0.0); - message=""+llStringTrim(message,STRING_TRIM); - if (message!="") - { - if (osIsUUID(message)) - { - if (llGetAgentSize((key)message)==ZERO_VECTOR) - { - target=(key)message; - if (confirmTarget()) countFaces(); - } - else llOwnerSay("You can't use this on an avatar"); - } - else llOwnerSay("The key \""+message+"\" is not a valid UUID"); - } - else llOwnerSay("Can't set an empty string as the target"); - } -} diff --git a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy.prj b/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy.prj deleted file mode 100644 index 41928fba..00000000 --- a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy.prj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/Paramour Builders Buddy/Paramour Builders Buddy.sol b/Paramour Builders Buddy/Paramour Builders Buddy.sol new file mode 100644 index 00000000..0f221ab1 --- /dev/null +++ b/Paramour Builders Buddy/Paramour Builders Buddy.sol @@ -0,0 +1,3 @@ + + + diff --git a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Paramour Builder's Buddy Instructions.txt b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Paramour Builders Buddy Instructions.txt similarity index 100% rename from Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Paramour Builder's Buddy Instructions.txt rename to Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Paramour Builders Buddy Instructions.txt diff --git a/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Paramour Builders Buddy.lsl b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Paramour Builders Buddy.lsl new file mode 100644 index 00000000..9b293916 --- /dev/null +++ b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Paramour Builders Buddy.lsl @@ -0,0 +1,188 @@ +// :SHOW:1 +// :CATEGORY:Building +// :NAME:Paramour Builders Buddy +// :AUTHOR:Aine Caoimhe +// :KEYWORDS: +// :CREATED:2015-11-24 20:37:09 +// :EDITED:2016-03-30 20:22:59 +// :ID:1092 +// :NUM:1867 +// :REV:1 +// :WORLD:OpenSim +// :DESCRIPTION: +// Paramour Builder's Buddy v1.0 +// :CODE: +// +// by Aine Caoimhe (LACM) Nov. 2015 +// Provided under Creative Commons Attribution-Non-Commercial-ShareAlike 4.0 International license. +// Please be sure you read and adhere to the terms of this license: https://creativecommons.org/licenses/by-nc-sa/4.0/ +// +// USER SETTINGS +// normally you shouldn't need to change these +key blankTexture="buddy_no_tex"; // builder's buddy face texture for no face...should be in the prim's inventory +string builderTexture="buddy"; // builder's buddy buttons texture name...should be in the prim's inventory +float timeOut=60.0; // how many seconds to wait for a target key to be supplied before closing the listener +// +// DON'T CHANGE ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU'RE DOING! +integer tPrim=1; +integer bPrim=2; +key target; +list faces; +integer FACE_SET_TARGET=0; +integer FACE_RESET_FACES=1; +integer FACE_GET_TEXTURES=2; +integer FACE_SET_TEXTURES=3; +integer FACE_NONE=5; +integer myChannel; +integer handle; + +getTextures() +{ + if (!confirmTarget()) return; + integer f; + while (f<8) + { + if (llListFindList(faces,[f])>-1) + { + list data=osGetPrimitiveParams(target,[ + PRIM_TEXTURE,f, + PRIM_COLOR,f, + PRIM_BUMP_SHINY,f, + PRIM_FULLBRIGHT,f, + PRIM_GLOW,f + ]); + data=[]+[PRIM_TEXTURE,f]+llList2List(data,0,3)+[PRIM_COLOR,f]+llList2List(data,4,5)+[PRIM_BUMP_SHINY,f]+llList2List(data,6,7)+[PRIM_FULLBRIGHT,f,llList2Integer(data,8),PRIM_GLOW,f,llList2Float(data,9)]; + llSetLinkPrimitiveParamsFast(tPrim,data); + } + f++; + } + llOwnerSay("Textures retrieved"); +} +setTextures() +{ + if (!confirmTarget()) return; + integer l=llGetListLength(faces); + while (--l>-1) + { + integer f=llList2Integer(faces,l); + list data=llGetLinkPrimitiveParams(tPrim,[ + PRIM_TEXTURE,f, + PRIM_COLOR,f, + PRIM_BUMP_SHINY,f, + PRIM_FULLBRIGHT,f, + PRIM_GLOW,f + ]); + data=[]+[PRIM_TEXTURE,f]+llList2List(data,0,3)+[PRIM_COLOR,f]+llList2List(data,4,5)+[PRIM_BUMP_SHINY,f]+llList2List(data,6,7)+[PRIM_FULLBRIGHT,f,llList2Integer(data,8),PRIM_GLOW,f,llList2Float(data,9)]; + osSetPrimitiveParams(target,data); + } + llOwnerSay("Textures set"); +} +integer confirmTarget() +{ + if (llKey2Name(target)=="") + { + llOwnerSay("Cannot locate the target object with key "+(string)target+" in this region. Please set a new target"); + target=NULL_KEY; + return FALSE; + } + else return TRUE; +} +countFaces() +{ + faces=[]; + integer f; + while (f<8) + { + key tex=llList2Key(osGetPrimitiveParams(target,[PRIM_TEXTURE,f]),0); + if (tex!="") faces=[]+faces+[f]; + else llSetLinkPrimitiveParamsFast(tPrim,[ + PRIM_TEXTURE,f,blankTexture,<1,1,0>,ZERO_VECTOR,0.0, + PRIM_COLOR,ALL_SIDES,<1,1,1>,1, + PRIM_BUMP_SHINY,ALL_SIDES,PRIM_SHINY_NONE,PRIM_BUMP_NONE, + PRIM_FULLBRIGHT,ALL_SIDES,FALSE, + PRIM_GLOW,ALL_SIDES,0.0 + ]); + f++; + } + string targetName=llList2String(llGetObjectDetails(target,[OBJECT_NAME]),0); + llOwnerSay("Set target to the prim \""+targetName+"\" which has "+(string)llGetListLength(faces)+" faces"); +} +resetFaces() +{ + llSetLinkPrimitiveParamsFast(tPrim,[ + PRIM_TEXTURE,ALL_SIDES,blankTexture,<1,1,0>,ZERO_VECTOR,0.0, + PRIM_COLOR,ALL_SIDES,<1,1,1>,1, + PRIM_BUMP_SHINY,ALL_SIDES,PRIM_SHINY_NONE,PRIM_BUMP_NONE, + PRIM_FULLBRIGHT,ALL_SIDES,FALSE, + PRIM_GLOW,ALL_SIDES,0.0 + ]); + llSetLinkPrimitiveParamsFast(bPrim,[PRIM_TEXTURE,ALL_SIDES,builderTexture,<1,1,0>,<0,0,0>,0]); + target=NULL_KEY; +} +getTarget() +{ + myChannel=0x80000000 | (integer)("0x"+(string)llGetKey()); + handle=llListen(myChannel,"",llGetOwner(),""); + llTextBox(llGetOwner(),"Paste the key of your desired target object into this text box",myChannel); + llSetTimerEvent(timeOut); +} +default +{ + state_entry() + { + target=NULL_KEY; + } + timer() + { + llOwnerSay("I did not hear a response yet. Closing the listener"); + llListenRemove(handle); + llSetTimerEvent(0.0); + } + touch_start(integer num) + { + key toucher=llDetectedKey(0); + if (toucher!=llGetOwner()) return; + integer prim=llDetectedLinkNumber(0); + integer face=llDetectedTouchFace(0); + if (prim==tPrim) return; + else if (face==FACE_NONE) return; + else if (face==FACE_RESET_FACES) resetFaces(); + else if (target==NULL_KEY) + { + if ((prim==bPrim)&&(face==FACE_SET_TARGET)) getTarget(); + else llRegionSayTo(toucher,0,"No target set"); + return; + } + else if (face==FACE_GET_TEXTURES) getTextures(); + else if (face==FACE_SET_TEXTURES) setTextures(); + } + changed(integer change) + { + if (change & CHANGED_OWNER) llResetScript(); + else if (change & CHANGED_REGION_START) llResetScript(); + } + on_rez(integer foo) + { + llResetScript(); + } + listen(integer channel, string name, key who, string message) + { + llListenRemove(handle); + llSetTimerEvent(0.0); + message=""+llStringTrim(message,STRING_TRIM); + if (message!="") + { + if (osIsUUID(message)) + { + if (llGetAgentSize((key)message)==ZERO_VECTOR) + { + target=(key)message; + if (confirmTarget()) countFaces(); + } + else llOwnerSay("You can't use this on an avatar"); + } + else llOwnerSay("The key \""+message+"\" is not a valid UUID"); + } + else llOwnerSay("Can't set an empty string as the target"); + } +} diff --git a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Two prim HUD.jpg b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Two prim HUD.jpg similarity index 100% rename from Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/Two prim HUD.jpg rename to Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/Two prim HUD.jpg diff --git a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/buddy.png b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/buddy.png similarity index 100% rename from Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/buddy.png rename to Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/buddy.png diff --git a/Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/buddy_no_tex.png b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/buddy_no_tex.png similarity index 100% rename from Paramour Builder's Buddy/Paramour Builder's Buddy/Paramour Builder's Buddy HUD/buddy_no_tex.png rename to Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy HUD/buddy_no_tex.png diff --git a/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy.prj b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy.prj new file mode 100644 index 00000000..95f288c9 --- /dev/null +++ b/Paramour Builders Buddy/Paramour Builders Buddy/Paramour Builders Buddy.prj @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando.sol b/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando.sol new file mode 100644 index 00000000..2e7c3ce8 --- /dev/null +++ b/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando.sol @@ -0,0 +1,3 @@ + + + diff --git a/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Object/Particle_Garden__Grows_slowly_rando_1.lsl b/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Object/Particle_Garden__Grows_slowly_rando_1.lsl new file mode 100644 index 00000000..d7e820d4 --- /dev/null +++ b/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Object/Particle_Garden__Grows_slowly_rando_1.lsl @@ -0,0 +1,118 @@ +// :CATEGORY:Particles +// :NAME:Particle_Garden__Grows_slowly +// :AUTHOR:Zara Vale +// :CREATED:2010-01-10 05:20:56.000 +// :EDITED:2013-09-18 15:38:59 +// :ID:610 +// :NUM:834 +// :REV:1.0 +// :WORLD:Second Life +// :DESCRIPTION: +// Particle Garden - Grows slowly, random textures by Zara Vale.lsl +// :CODE: + +//******************************************************** +//This Script was pulled out for you by YadNi Monde from the SL FORUMS at http://forums.secondlife.com/forumdisplay.php?f=15, it is intended to stay FREE by it s author(s) and all the comments here in ORANGE must NOT be deleted. They include notes on how to use it and no help will be provided either by YadNi Monde or it s Author(s). IF YOU DO NOT AGREE WITH THIS JUST DONT USE!!! +//******************************************************** + + + + + + + +//Particle Garden - Grows slowly, random textures by Zara Vale +//Hello everyone, +// +//This is my first post in here so I hope I'm doing it right. Took me forever to learn how to put the code thing in. Anyway on behalf of Tina Vale and myself I would like to present the particle garden script that I use in my classes. +// +//What does it do? +//- It shows a particle picture of what ever texture that is in the object randomly. +//- The flowers grow slowly +//- It is visible from all angles like all particles +// +//How do you use it? +//- Rez an Object +//- Change the ROTATION X=90, Y=0, Z=0 (Under the OBJECT tab for the object) +//- You put this script into an object (Click on New Script in the object's contents and copy the code below to this object and save) +//- Put any other flowers, gnomes, tree textures you want inside it. +//- Click to start / stop + + + + +float MAX_RADIUS = 2.5; +float RADIUS_INTERVAL = 0.5; + +// Modified values +integer IS_ON = FALSE; +float RADIUS = 2; +string TEXTURE = "f42bcc2b-20c8-9df7-cf1c-69566e377fd8"; + +garden() { + llParticleSystem([ + PSYS_PART_FLAGS, 0 | PSYS_PART_EMISSIVE_MASK | + PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK, + PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_ANGLE_CONE, + + // Texture / Size / Alpha / Color + PSYS_SRC_TEXTURE, TEXTURE, + PSYS_PART_START_SCALE,<0.2000, 0.2000, 0.0000>, + PSYS_PART_END_SCALE,<0.5000, 0.5000, 0.0000>, + PSYS_PART_START_ALPHA,0.000000, + PSYS_PART_END_ALPHA,1.000000, + PSYS_PART_START_COLOR, <1.0,1.0,1.0>, + PSYS_PART_END_COLOR, <1.0,1.0,1.0>, + + // Flow + PSYS_PART_MAX_AGE,1000.0000, + PSYS_SRC_BURST_RATE,1.000000, + PSYS_SRC_BURST_PART_COUNT,1, + PSYS_SRC_MAX_AGE,0.000000, + + // Rez position + PSYS_SRC_BURST_RADIUS,RADIUS, + PSYS_SRC_INNERANGLE,1.550000, + PSYS_SRC_OUTERANGLE,1.550000, + PSYS_SRC_OMEGA,<0.00000, 0.00000, 4>, + PSYS_SRC_BURST_SPEED_MIN,0.000000, + PSYS_SRC_BURST_SPEED_MAX,0.000000 + ]); +} + +stop() { + llParticleSystem([]); +} + +default { + state_entry() { + if(IS_ON) { + llSetTimerEvent(RADIUS_INTERVAL); + garden(); + } else { + stop(); + } + } + + touch_start(integer num_detected) { + if(IS_ON) { + llSetTimerEvent(0.0); + stop(); + llWhisper(0, "Garden has stopped"); + } else { + llSetTimerEvent(RADIUS_INTERVAL); + garden(); + llWhisper(0, "Garden has started"); + } + IS_ON = !IS_ON; + } + + timer() { + integer max_inventory = llGetInventoryNumber(INVENTORY_TEXTURE); + if(max_inventory > 0) { + TEXTURE = llGetInventoryName(INVENTORY_TEXTURE, (integer)llFrand(max_inventory)); + } + RADIUS = llFrand(MAX_RADIUS); + garden(); + } +} // END // diff --git a/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Particle_Garden__Grows_slowly_rando.prj b/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Particle_Garden__Grows_slowly_rando.prj new file mode 100644 index 00000000..26c8ff84 --- /dev/null +++ b/Particle to Viictim/Particle_Garden__Grows_slowly/Particle_Garden__Grows_slowly_rando/Particle_Garden__Grows_slowly_rando.prj @@ -0,0 +1,6 @@ + + + + + diff --git a/Rene Free Lighting System/Renes Free Lighting System.sol b/Rene Free Lighting System/Renes Free Lighting System.sol new file mode 100644 index 00000000..c46706a2 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System.sol @@ -0,0 +1,3 @@ + + + diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/Features.pdf b/Rene Free Lighting System/Renes Free Lighting System/Features.pdf similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/Features.pdf rename to Rene Free Lighting System/Renes Free Lighting System/Features.pdf diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/Rene's Free Lighting System.prj b/Rene Free Lighting System/Renes Free Lighting System/Renes Free Lighting System.prj similarity index 97% rename from Rene's Free Lighting System/Rene's Free Lighting System/Rene's Free Lighting System.prj rename to Rene Free Lighting System/Renes Free Lighting System/Renes Free Lighting System.prj index 88990899..7bcd935c 100644 --- a/Rene's Free Lighting System/Rene's Free Lighting System/Rene's Free Lighting System.prj +++ b/Rene Free Lighting System/Renes Free Lighting System/Renes Free Lighting System.prj @@ -1,4 +1,4 @@ - + diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/User Manual.pdf b/Rene Free Lighting System/Renes Free Lighting System/User Manual.pdf similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/User Manual.pdf rename to Rene Free Lighting System/Renes Free Lighting System/User Manual.pdf diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/_Main/Config_default.txt b/Rene Free Lighting System/Renes Free Lighting System/_Main/Config_default.txt similarity index 97% rename from Rene's Free Lighting System/Rene's Free Lighting System/_Main/Config_default.txt rename to Rene Free Lighting System/Renes Free Lighting System/_Main/Config_default.txt index 18960f2a..8b2980d7 100644 --- a/Rene's Free Lighting System/Rene's Free Lighting System/_Main/Config_default.txt +++ b/Rene Free Lighting System/Renes Free Lighting System/_Main/Config_default.txt @@ -1,10 +1,10 @@ // :SHOW:1 // :CATEGORY:Light -// :NAME:Rene's Free Lighting System +// :NAME:Rene Free Lighting System // :AUTHOR:Rene10957 Resident // :KEYWORDS: light // :CREATED:2015-06-11 14:41:40 -// :EDITED:2015-06-12 12:30:32 +// :EDITED:2016-03-30 20:29:27 // :ID:1079 // :NUM:1781 // :REV:2.1 @@ -12,6 +12,7 @@ // :DESCRIPTION: // Configuration notecard for Lighting System // :CODE: + // :LICENSE: CC0 (Public Domain) // License: CC0 (Public Domain). diff --git a/Rene Free Lighting System/Renes Free Lighting System/_Main/Config_default.txt.bak b/Rene Free Lighting System/Renes Free Lighting System/_Main/Config_default.txt.bak new file mode 100644 index 00000000..a302093e --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/_Main/Config_default.txt.bak @@ -0,0 +1,64 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Renes Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light +// :CREATED:2015-06-11 14:41:40 + +// :ID:1079 +// :NUM:1781 +// :REV:2.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Configuration notecard for Lighting System +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +# Configuration notecard for Lighting System +# +# Date: 31-05-2015 +# Version: 2.1 + +verbose = YES # show more/less info during startup +switchAccess = PUBLIC # access level for switch (PUBLIC, GROUP, OWNER, GROUP+OWNER) +menuAccess = PUBLIC # access level for menu (PUBLIC, GROUP, OWNER, GROUP+OWNER) +menuPercent = 10 # increase/decrease percentage for +/- buttons +changePrimColor = YES # YES = prim color changes with light color +changeParticleColor = YES # YES = particle color changes with light color +particleTexture = # texture UUID for particle effect +particleMenu = NO # YES = "On/Off" replaced by "Particles" (particle menu) +notecardMenu = NO # YES = "On/Off" replaced by "Presets" (notecard menu) +lightGroups = NO # YES = use prim description for light groups, NO = ignore prim description +faces = -1 # color/glow/fullbright on all faces (-1), one face or comma-separated list +baseIntensity = 100 # base percentage for light intensity + +# Menu defaults + +colorOn = < 100, 100, 100 > # color percentage (red, green, blue) when ON +colorOff = < 100, 100, 100 > # color percentage (red, green, blue) when OFF +alphaOn = 100 # alpha percentage when ON +alphaOff = 100 # alpha percentage when OFF +intensity = 100 # light intensity percentage +radius = 50 # light radius percentage +falloff = 40 # light falloff percentage +glow = 0 # glow percentage +fullbright = YES # fullbright when ON (YES or NO) +particleSize = 20 # size percentage for particle effect + +# Link messages: in + +msgNumber = 10957 # number part of incoming link messages +msgSwitch = switch # string part of incoming link message: switch (on/off) +msgOn = on # string part of incoming link message: switch on +msgOff = off # string part of incoming link message: switch off +msgMenu = menu # string part of incoming link message: show menu + +# Link messages: out + +extButton = # "On/Off" replaced by button text (sends link message) +extNumber = 10958 # number part of outgoing link message diff --git a/Rene Free Lighting System/Renes Free Lighting System/_Main/light.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/light.lsl new file mode 100644 index 00000000..da186427 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/_Main/light.lsl @@ -0,0 +1,189 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:42 +// :EDITED:2016-03-30 20:29:27 +// :ID:1079 +// :NUM:1782 +// :REV:2.0 +// :WORLD:Opensim +// :DESCRIPTION: +// Light Bulb for Menu-controlled lighting system with many features +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Light Bulb +// +// Author: Rene10957 Resident +// Date: 31-05-2015 + +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + +string title = "Light Bulb"; // title +string version = "2.0"; // version +integer linkSet = TRUE; // LINKSET mode +integer silent = TRUE; // silent startup + +// Constants + +integer switchChannel = -10957; // switch channel +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel + +// Variables + +key owner; // object owner +string particleMsg; // message for particle plugin (on/off, color, size) + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + integer lightGroups = (integer)llList2String(msgList, 16); + + if (lightGroups && llToLower(llList2String(msgList, 0)) != llToLower(getGroup())) return; + + integer on = (integer)llList2String(msgList, 1); + vector color = (vector)llList2String(msgList, 2); + float intensity = (float)llList2String(msgList, 3); + float radius = (float)llList2String(msgList, 4); + float falloff = (float)llList2String(msgList, 5); + float alpha = (float)llList2String(msgList, 6); + float glow = (float)llList2String(msgList, 7); + integer fullbright = (integer)llList2String(msgList, 8); + vector primColor = (vector)llList2String(msgList, 9); + vector particleColor = (vector)llList2String(msgList, 10); + float particleSize = (float)llList2String(msgList, 11); + float particleInc = (float)llList2String(msgList, 12); + string particleTexture = llList2String(msgList, 13); + integer particlesOn = (integer)llList2String(msgList, 14); + string faces = llList2String(msgList, 15); + // Placeholder for 16 (see above) + + // Forward 10 (particleColor), 11 (particleSize), 12 (particleInc), 13 (particleTexture) and 14 (particlesOn) + // to particle script (same prim) + + if (particleMsg == "") particleInc = 999; // first message after script reset: set particle size to default + list pList = [particlesOn, particleColor, particleSize, particleInc, particleTexture]; + particleMsg = llList2CSV(pList); // global variable + llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); + + // Set light and prim properties + + list faceList = llParseString2List(faces, ["<", ",", " ", ">"], []); + integer length = llGetListLength(faceList); + integer face; + integer i; + + llSetLinkPrimitiveParamsFast(LINK_THIS, [ + PRIM_POINT_LIGHT, on, color, intensity, radius, falloff]); + + for (i = 0; i < length; ++i) { + face = (integer)llList2String(faceList, i); + llSetLinkPrimitiveParamsFast(LINK_THIS, [ + PRIM_COLOR, face, primColor, alpha, + PRIM_GLOW, face, glow, + PRIM_FULLBRIGHT, face, fullbright]); + } +} + +resetParticleSize(string msg) +{ + list msgList = llCSV2List(msg); + list pList = llListReplaceList(msgList, [999], 3, 3); + particleMsg = llList2CSV(pList); // global variable + llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); +} + +default +{ + state_entry() + { + owner = llGetOwner(); + if (linkSet) state sLinkSet; + else state sRegion; + } +} + +state sLinkSet +{ + state_entry() + { + if (!silent) llWhisper(0, title + " " + version + "-LINKSET ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == switchChannel) { + unpackMessage(msg); + } + else if (number == feedbackChannel) { + if (msg == "READY") { + llSleep(0.2); // give new particle script time to reset + if (particleMsg) resetParticleSize(particleMsg); // start particles with default size + } + } + } + + changed(integer change) + { + if (change & CHANGED_INVENTORY) { + llParticleSystem([]); // stop particles in case particle script was removed + if (particleMsg) llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); // start particles + } + } +} + +state sRegion +{ + state_entry() + { + llListen(switchChannel, "", "", ""); + if (!silent) llWhisper(0, title + " " + version + "-REGION ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + listen(integer channel, string name, key id, string msg) + { + if (channel == switchChannel) if (llGetOwnerKey(id) == owner) unpackMessage(msg); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number != feedbackChannel) return; + + if (msg == "READY") { + llSleep(0.2); // give new particle script time to reset + if (particleMsg) resetParticleSize(particleMsg); // start particles with default size + } + } + + changed(integer change) + { + if (change & CHANGED_INVENTORY) { + llParticleSystem([]); // stop particles in case particle script was removed + if (particleMsg) llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); // start particles + } + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/_Main/light.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/light.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/_Main/light.lsl rename to Rene Free Lighting System/Renes Free Lighting System/_Main/light.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/_Main/light_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/light_region.lsl new file mode 100644 index 00000000..3a5bfbce --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/_Main/light_region.lsl @@ -0,0 +1,187 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:43 +// :EDITED:2016-03-30 20:29:27 +// :ID:1079 +// :NUM:1783 +// :REV:2.9 +// :WORLD:Opensim +// :DESCRIPTION: +// Light Bulb for Menu-controlled lighting system with many features +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Author: Rene10957 Resident +// Date: 31-05-2015 + +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + +string title = "Light Bulb"; // title +string version = "2.0"; // version +integer linkSet = FALSE; // REGION mode +integer silent = TRUE; // silent startup + +// Constants + +integer switchChannel = -10957; // switch channel +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel + +// Variables + +key owner; // object owner +string particleMsg; // message for particle plugin (on/off, color, size) + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + integer lightGroups = (integer)llList2String(msgList, 16); + + if (lightGroups && llToLower(llList2String(msgList, 0)) != llToLower(getGroup())) return; + + integer on = (integer)llList2String(msgList, 1); + vector color = (vector)llList2String(msgList, 2); + float intensity = (float)llList2String(msgList, 3); + float radius = (float)llList2String(msgList, 4); + float falloff = (float)llList2String(msgList, 5); + float alpha = (float)llList2String(msgList, 6); + float glow = (float)llList2String(msgList, 7); + integer fullbright = (integer)llList2String(msgList, 8); + vector primColor = (vector)llList2String(msgList, 9); + vector particleColor = (vector)llList2String(msgList, 10); + float particleSize = (float)llList2String(msgList, 11); + float particleInc = (float)llList2String(msgList, 12); + string particleTexture = llList2String(msgList, 13); + integer particlesOn = (integer)llList2String(msgList, 14); + string faces = llList2String(msgList, 15); + // Placeholder for 16 (see above) + + // Forward 10 (particleColor), 11 (particleSize), 12 (particleInc), 13 (particleTexture) and 14 (particlesOn) + // to particle script (same prim) + + if (particleMsg == "") particleInc = 999; // first message after script reset: set particle size to default + list pList = [particlesOn, particleColor, particleSize, particleInc, particleTexture]; + particleMsg = llList2CSV(pList); // global variable + llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); + + // Set light and prim properties + + list faceList = llParseString2List(faces, ["<", ",", " ", ">"], []); + integer length = llGetListLength(faceList); + integer face; + integer i; + + llSetLinkPrimitiveParamsFast(LINK_THIS, [ + PRIM_POINT_LIGHT, on, color, intensity, radius, falloff]); + + for (i = 0; i < length; ++i) { + face = (integer)llList2String(faceList, i); + llSetLinkPrimitiveParamsFast(LINK_THIS, [ + PRIM_COLOR, face, primColor, alpha, + PRIM_GLOW, face, glow, + PRIM_FULLBRIGHT, face, fullbright]); + } +} + +resetParticleSize(string msg) +{ + list msgList = llCSV2List(msg); + list pList = llListReplaceList(msgList, [999], 3, 3); + particleMsg = llList2CSV(pList); // global variable + llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); +} + +default +{ + state_entry() + { + owner = llGetOwner(); + if (linkSet) state sLinkSet; + else state sRegion; + } +} + +state sLinkSet +{ + state_entry() + { + if (!silent) llWhisper(0, title + " " + version + "-LINKSET ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == switchChannel) { + unpackMessage(msg); + } + else if (number == feedbackChannel) { + if (msg == "READY") { + llSleep(0.2); // give new particle script time to reset + if (particleMsg) resetParticleSize(particleMsg); // start particles with default size + } + } + } + + changed(integer change) + { + if (change & CHANGED_INVENTORY) { + llParticleSystem([]); // stop particles in case particle script was removed + if (particleMsg) llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); // start particles + } + } +} + +state sRegion +{ + state_entry() + { + llListen(switchChannel, "", "", ""); + if (!silent) llWhisper(0, title + " " + version + "-REGION ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + listen(integer channel, string name, key id, string msg) + { + if (channel == switchChannel) if (llGetOwnerKey(id) == owner) unpackMessage(msg); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number != feedbackChannel) return; + + if (msg == "READY") { + llSleep(0.2); // give new particle script time to reset + if (particleMsg) resetParticleSize(particleMsg); // start particles with default size + } + } + + changed(integer change) + { + if (change & CHANGED_INVENTORY) { + llParticleSystem([]); // stop particles in case particle script was removed + if (particleMsg) llMessageLinked(LINK_THIS, particleChannel, particleMsg, ""); // start particles + } + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/_Main/light_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/light_region.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/_Main/light_region.lsl rename to Rene Free Lighting System/Renes Free Lighting System/_Main/light_region.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/_Main/switch.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/switch.lsl new file mode 100644 index 00000000..96ebfd8a --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/_Main/switch.lsl @@ -0,0 +1,724 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:45 +// :EDITED:2016-03-30 20:29:27 +// :ID:1079 +// :NUM:1784 +// :REV:2.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Light Switch +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Light Switch +// +// Author: Rene10957 Resident +// Date: 31-05-2015 + +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + +string title = "Light Switch"; // title +string version = "2.1"; // version +integer linkSet = TRUE; // LINKSET mode + +// Constants + +integer _PUBLIC_ = 1; // public access bit +integer _GROUP_ = 2; // group access bit +integer _OWNER_ = 4; // owner access bit +integer _GRPOWN_ = 6; // group + owner +integer switchChannel = -10957; // switch channel +float maxRed = 1.0; // max. red +float maxGreen = 1.0; // max. green +float maxBlue = 1.0; // max. blue +float maxRadius = 20.0; // max. light radius +float maxFalloff = 2.0; // max. light falloff +float maxGlow = 1.0; // max. prim glow +float maxAlpha = 1.0; // max. prim alpha +string configPrefix = "config"; // prefix for configuration notecards +string configSeparator = ":"; // separator between prefix and name +string defNotecard = "Default"; // default notecard + +// Notecard variables + +integer verbose = FALSE; // show more/less info during startup +integer switchAccess; // access level for switch +integer menuAccess; // access level for menu +integer msgNumber; // number part of incoming link messages +string msgSwitch; // string part of incoming link message: switch (on/off) +string msgOn; // string part of incoming link message: switch on +string msgOff; // string part of incoming link message: switch off +string msgMenu; // string part of incoming link message: show menu +integer percent; // increase/decrease percentage for +/- buttons +integer changePrimColor = FALSE; // TRUE = prim color changes with light color, FALSE = white +integer changeParticleColor = FALSE; // TRUE = particle color changes with light color, FALSE = white +integer particleInc; // increase/decrease percentage for particle effect (menu) +string particleTexture; // texture UUID for particle effect +integer particleMenu = FALSE; // TRUE = "On/Off" replaced by "Particles" (particle menu) +integer notecardMenu = FALSE; // TRUE = "On/Off" replaced by "Presets" (notecard menu) +string extButton; // "On/Off" replaced by button text (sends link message) +integer extNumber; // number part of outgoing link message +integer lightGroups = FALSE; // TRUE = use prim description for light groups, FALSE = ignore prim description +string faces; // color/glow/fullbright on all faces (ALL_SIDES = -1), one face or CSV list +integer baseIntensity; // base for light intensity + +// Notecard variables: menu defaults + +vector defColor; // default color (R,G,B) +vector defColorOff; // default color (R,G,B) when OFF +integer defAlpha; // default prim alpha +integer defAlphaOff; // default prim alpha when OFF +integer defIntensity; // default light intensity +integer defRadius; // default light radius +integer defFalloff; // default light falloff +integer defGlow; // default prim glow +integer defFullbright = FALSE; // default fullbright +integer defParticleSize; // default particle size + +// Variables + +key owner; // object owner +key user; // key of last avatar to touch object +list notecardButtons; // list of notecards in inventory +string notecard; // notecard name +integer line; // notecard line +integer loading = FALSE; // notecard loading +integer menuChannel; // main menu channel +integer colorChannel; // color menu channel +integer particleChannel; // particle menu channel +integer notecardChannel; // notecard menu channel +integer menuHandle; // handle for main menu listener +integer colorHandle; // handle for color menu listener +integer particleHandle; // handle for particle menu listener +integer notecardHandle; // handle for notecard menu listener +integer on = FALSE; // on-off switch +integer particles = TRUE; // particles on/off +integer perRed; // percent red +integer perGreen; // percent green +integer perBlue; // percent blue +integer perAlpha; // percent prim alpha +integer perRedOff; // percent red when OFF +integer perGreenOff; // percent green when OFF +integer perBlueOff; // percent blue when OFF +integer perAlphaOff; // percent prim alpha when OFF +integer perIntensity; // percent light intensity +integer perRadius; // percent light radius +integer perFalloff; // percent light falloff +integer perGlow; // percent prim glow +integer fullbright = TRUE; // fullbright + +// Functions + +list orderButtons(list buttons) +{ + return llList2List(buttons, -3, -1) + llList2List(buttons, -6, -4) + llList2List(buttons, -9, -7) + + llList2List(buttons, -12, -10); +} + +discoverNotecards() +{ + llSetText("Discovering notecards...", <1,1,1>, 1.0); + + notecardButtons = []; + integer i; + integer pos; + integer number = llGetInventoryNumber(INVENTORY_NOTECARD); + string name; + string prefix; + string suffix; + + for (i = 0; i < number; ++i) { + name = llGetInventoryName(INVENTORY_NOTECARD, i); + pos = llSubStringIndex(name, configSeparator); + if (pos > -1) { + prefix = llGetSubString(name, 0, pos - 1); + suffix = llGetSubString(name, pos + 1, -1); + if (prefix == configPrefix && suffix != defNotecard && llGetListLength(notecardButtons) < 10) + notecardButtons += suffix; + } + } + + notecardButtons = llListSort(notecardButtons, 1, TRUE); // sort ascending + if (llGetInventoryType(configPrefix + configSeparator + defNotecard) == INVENTORY_NOTECARD) + notecardButtons += defNotecard; + + if (llGetListLength(notecardButtons) > 0) { + notecardButtons += "Main menu"; + notecardButtons = orderButtons(notecardButtons); // reverse row order + } + + llSetText("", ZERO_VECTOR, 0.0); +} + +integer accessGranted(key user, integer access) +{ + integer bitmask = _PUBLIC_; + if (user == owner) bitmask += _OWNER_; + if (llSameGroup(user)) bitmask += _GROUP_; + return (bitmask & access); +} + +integer checkAccess(string par, string val) +{ + if (llToLower(val) == "public") return _PUBLIC_; + if (llToLower(val) == "group") return _GROUP_; + if (llToLower(val) == "owner") return _OWNER_; + if (llToLower(val) == "group+owner") return _GRPOWN_; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to PUBLIC"); + return _PUBLIC_; +} + +integer checkInt(string par, integer val, integer min, integer max) +{ + if (val < min || val > max) { + if (val < min) val = min; + else if (val > max) val = max; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to " + (string)val); + } + return val; +} + +vector checkVector(string par, vector val) +{ + if (val == ZERO_VECTOR) { + val = <100,100,100>; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to " + (string)val); + } + return val; +} + +integer checkYesNo(string par, string val) +{ + if (llToLower(val) == "yes") return TRUE; + if (llToLower(val) == "no") return FALSE; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to NO"); + return FALSE; +} + +string checkKey(string par, string val) +{ + if ((key)val) return val; + if (val == "") return val; + llWhisper(0, "[Notecard] " + par + " out of range (not a valid key)"); + return ""; +} + +string truncMenuButton(string par, string val) +{ + string trunc = llBase64ToString(llGetSubString(llStringToBase64(val), 0, 31)); + if (val != trunc) llWhisper(0, "[Notecard] " + par + " will be truncated to 24 bytes"); + return trunc; +} + +loadNotecard() +{ + verbose = TRUE; + switchAccess = _PUBLIC_; + menuAccess = _PUBLIC_; + msgNumber = 10957; + msgSwitch = "switch"; + msgOn = "on"; + msgOff = "off"; + msgMenu = "menu"; + percent = 10; + changePrimColor = TRUE; + changeParticleColor = TRUE; + particleTexture = ""; + particleMenu = FALSE; + notecardMenu = FALSE; + extButton = ""; + extNumber = 10958; + lightGroups = FALSE; + faces = "-1"; + baseIntensity = 100; + defColor = <100,100,100>; + defColorOff = <100,100,100>; + defAlpha = 100; + defAlphaOff = 100; + defIntensity = 100; + defRadius = 50; + defFalloff = 40; + defGlow = 0; + defFullbright = TRUE; + defParticleSize = 20; + line = 0; + + if (llGetInventoryType(notecard) == INVENTORY_NOTECARD) { + loading = TRUE; + llSetText("Loading notecard...", <1,1,1>, 1.0); + llGetNotecardLine(notecard, line); + } + else { + reset(); + particleInc = 999; // reset particle size in plugin script + sendMessage(getGroup()); + if (verbose) { + llWhisper(0, "Notecard \"" + notecard + "\" not found or empty, using defaults"); + llWhisper(0, "Touch to turn light on or off"); + llWhisper(0, "Long touch to show menu"); + if (linkSet) llWhisper(0, title + " " + version + "-LINKSET ready"); + else llWhisper(0, title + " " + version + "-REGION ready"); + } + } +} + +readNotecard (string ncLine) +{ + string ncData = llStringTrim(ncLine, STRING_TRIM); + + if (llStringLength(ncData) > 0 && llGetSubString(ncData, 0, 0) != "#") { + list ncList = llParseString2List(ncData, ["=","#"], []); // split into parameter, value, comment + string par = llStringTrim(llList2String(ncList, 0), STRING_TRIM); + string val = llStringTrim(llList2String(ncList, 1), STRING_TRIM); + string lcpar = llToLower(par); + if (lcpar == "verbose") verbose = checkYesNo(par, val); + else if (lcpar == "switchaccess") switchAccess = checkAccess(par, val); + else if (lcpar == "menuaccess") menuAccess = checkAccess(par, val); + else if (lcpar == "msgnumber") msgNumber = (integer)val; + else if (lcpar == "msgswitch") msgSwitch = truncMenuButton(par, val); + else if (lcpar == "msgon") msgOn = truncMenuButton(par, val); + else if (lcpar == "msgoff") msgOff = truncMenuButton(par, val); + else if (lcpar == "msgmenu") msgMenu = truncMenuButton(par, val); + else if (lcpar == "menupercent") percent = checkInt(par, (integer)val, 1, 100); + else if (lcpar == "changeprimcolor") changePrimColor = checkYesNo(par, val); + else if (lcpar == "changeparticlecolor") changeParticleColor = checkYesNo(par, val); + else if (lcpar == "particletexture") particleTexture = checkKey(par, val); + else if (lcpar == "particlemenu") particleMenu = checkYesNo(par, val); + else if (lcpar == "notecardmenu") notecardMenu = checkYesNo(par, val); + else if (lcpar == "extbutton") extButton = truncMenuButton(par, val); + else if (lcpar == "extnumber") extNumber = (integer)val; + else if (lcpar == "lightgroups") lightGroups = checkYesNo(par, val); + else if (lcpar == "faces") faces = truncMenuButton(par, val); + else if (lcpar == "baseintensity") baseIntensity = checkInt(par, (integer)val, 1, 100); + else if (lcpar == "coloron") defColor = checkVector(par, (vector)val); + else if (lcpar == "coloroff") defColorOff = checkVector(par, (vector)val); + else if (lcpar == "alphaon") defAlpha = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "alphaoff") defAlphaOff = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "intensity") defIntensity = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "radius") defRadius = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "falloff") defFalloff = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "glow") defGlow = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "fullbright") defFullbright = checkYesNo(par, val); + else if (lcpar == "particlesize") defParticleSize = checkInt(par, (integer)val, 1, 100); + else llWhisper(0, "Unknown parameter in notecard line " + (string)(line + 1) + ": " + par); + } + + line++; + llGetNotecardLine(notecard, line); +} + +menuDialog (key id) +{ + string strOn = "OFF"; if (on) strOn = "ON"; + string strLinkSet = "REGION"; if (linkSet) strLinkSet = "LINKSET"; + string strFullbright = "NO"; if (fullbright) strFullbright = "YES"; + string strButton = "On/Off"; if (particleMenu) strButton = "Particles"; + else if (notecardMenu) strButton = "Presets"; + else if (extButton) strButton = extButton; + menuChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(menuHandle); + menuHandle = llListen(menuChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + llDialog(id, title + " " + version + + "\n\nIntensity: " + (string)perIntensity + "%\t\tState: " + strOn + + "\nRadius: " + (string)perRadius + "%\t\tFullbright: " + strFullbright + + "\nFalloff: " + (string)perFalloff + "%\t\tMode: " + strLinkSet + + "\nGlow: " + (string)perGlow + "%\t\tGroup: " + getGroup(), [ + "-Glow", "+Glow", strButton, + "-Falloff", "+Falloff", "Reset", + "-Radius", "+Radius", "Fullbright", + "-Intensity", "+Intensity", "Color" ], + menuChannel); +} + +colorDialog (key id) +{ + colorChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(colorHandle); + colorHandle = llListen(colorChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + if (on) { + llDialog(id, "Color & Alpha when ON" + + "\n\nRed: " + (string)perRed + "%" + + "\nGreen: " + (string)perGreen + "%" + + "\nBlue: " + (string)perBlue + "%" + + "\nAlpha: " + (string)perAlpha + "%", [ + "-Alpha", "+Alpha", "Main menu", + "-Blue", "+Blue", "B min/max", + "-Green", "+Green", "G min/max", + "-Red", "+Red", "R min/max" ], + colorChannel); + } + else { + llDialog(id, "Color & Alpha when OFF" + + "\n\nRed: " + (string)perRedOff + "%" + + "\nGreen: " + (string)perGreenOff + "%" + + "\nBlue: " + (string)perBlueOff + "%" + + "\nAlpha: " + (string)perAlphaOff + "%", [ + "-Alpha", "+Alpha", "Main menu", + "-Blue", "+Blue", "B min/max", + "-Green", "+Green", "G min/max", + "-Red", "+Red", "R min/max" ], + colorChannel); + } +} + +particleDialog (key id) +{ + string strLightOn = "OFF"; if (on) strLightOn = "ON"; + string strParticlesOn = "OFF"; if (particles) strParticlesOn = "ON"; + particleChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(particleHandle); + particleHandle = llListen(particleChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + llDialog(id, "Particle effect" + + "\n\nLight: " + strLightOn + + "\nParticles: " + strParticlesOn, [ + "Min", "Max", "Main menu", + "-10%", "+10%", "Reset", + "-5%", "+5%", "Part. on/off", + "-1%", "+1%", "Light on/off" ], + particleChannel); +} + +notecardDialog (key id) +{ + string name = llGetSubString(notecard, llStringLength(configPrefix) + llStringLength(configSeparator), -1); + notecardChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(notecardHandle); + notecardHandle = llListen(notecardChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + llDialog(id, "Configuration notecards\n\nLoaded notecard: " + name, notecardButtons, notecardChannel); +} + +string getGroup() +{ + if (!lightGroups) return "None"; + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +float percentage (integer per, float num) +{ + return num / 100.0 * (float)per; +} + +integer min (integer x, integer y) +{ + if (x < y) return x; else return y; +} + +integer max (integer x, integer y) +{ + if (x > y) return x; else return y; +} + +reset() +{ + perRed = (integer)defColor.x; + perGreen = (integer)defColor.y; + perBlue = (integer)defColor.z; + perRedOff = (integer)defColorOff.x; + perGreenOff = (integer)defColorOff.y; + perBlueOff = (integer)defColorOff.z; + perAlpha = defAlpha; + perAlphaOff = defAlphaOff; + perIntensity = defIntensity; + perRadius = defRadius; + perFalloff = defFalloff; + perGlow = defGlow; + fullbright = defFullbright; +} + +sendMessage(string group) +{ + vector color; + vector colorOn; + vector colorOff; + float intensity; + float radius; + float falloff; + float alpha; + float glow; + integer fullbr; + vector primColor; + vector particleColor; + integer particlesOn; + + colorOn.x = percentage(perRed, maxRed); + colorOn.y = percentage(perGreen, maxGreen); + colorOn.z = percentage(perBlue, maxBlue); + colorOff.x = percentage(perRedOff, maxRed); + colorOff.y = percentage(perGreenOff, maxGreen); + colorOff.z = percentage(perBlueOff, maxBlue); + + if (on) { + color = colorOn; + intensity = percentage(perIntensity, (float)baseIntensity / 100.0); + radius = percentage(perRadius, maxRadius); + falloff = percentage(perFalloff, maxFalloff); + alpha = percentage(perAlpha, maxAlpha); + glow = percentage(perGlow, maxGlow); + fullbr = fullbright; + if (changePrimColor) primColor = color; + else primColor = colorOff; + if (changeParticleColor) particleColor = color; + else particleColor = colorOff; + particlesOn = particles; + } + else { + color = colorOff; + alpha = percentage(perAlphaOff, maxAlpha); + glow = 0.0; + fullbr = FALSE; + primColor = color; + particlesOn = FALSE; + } + + list msgList = [group, on, color, intensity, radius, falloff, alpha, glow, fullbr, + primColor, particleColor, defParticleSize, particleInc, particleTexture, particlesOn, + "<" + faces + ">", lightGroups]; + string msg = llList2CSV(msgList); + particleInc = 0; + + if (linkSet) llMessageLinked(LINK_SET, switchChannel, msg, ""); + else llRegionSay(switchChannel, msg); +} + +default +{ + state_entry() + { + owner = llGetOwner(); + notecard = configPrefix + configSeparator + defNotecard; + discoverNotecards(); + loadNotecard(); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + llResetTime(); + } + + touch_end(integer total_number) + { + if (loading) { + llWhisper(0, "Notecard is still loading"); + return; + } + + user = llDetectedKey(0); + + if (llGetTime() > 1.0) { + if (accessGranted(user, menuAccess)) menuDialog(user); + else llInstantMessage(user, "[Menu] Access denied"); + } + else { + if (accessGranted(user, switchAccess)) { + on = !on; + sendMessage(getGroup()); + } + else llInstantMessage(user, "[Switch] Access denied"); + } + } + + listen(integer channel, string name, key id, string msg) + { + llSetTimerEvent(0); + + if (channel == menuChannel) { + llListenRemove(menuHandle); + if (msg == "-Intensity") perIntensity = max(perIntensity - percent, 0); + else if (msg == "-Radius") perRadius = max(perRadius - percent, 0); + else if (msg == "-Falloff") perFalloff = max(perFalloff - percent, 0); + else if (msg == "-Glow") perGlow = max(perGlow - percent, 0); + else if (msg == "+Intensity") perIntensity = min(perIntensity + percent, 100); + else if (msg == "+Radius") perRadius = min(perRadius + percent, 100); + else if (msg == "+Falloff") perFalloff = min(perFalloff + percent, 100); + else if (msg == "+Glow") perGlow = min(perGlow + percent, 100); + else if (msg == "Color") colorDialog(id); + else if (msg == "Fullbright") fullbright = !fullbright; + else if (msg == "Reset") reset(); + else if (msg == "On/Off") on = !on; + else if (msg == "Particles") particleDialog(id); + else if (msg == "Presets") { + if (llGetListLength(notecardButtons) > 0) notecardDialog(id); + else llWhisper(0, "No configuration notecards found"); + } + else if (msg == extButton) llMessageLinked(LINK_SET, extNumber, msg, id); + if (msg != "Color" && msg != "Particles" && msg != "Presets" && msg != extButton) { + sendMessage(getGroup()); + menuDialog(id); + } + } + else if (channel == colorChannel) { + llListenRemove(colorHandle); + if (on) { + if (msg == "-Red") perRed = max(perRed - percent, 0); + else if (msg == "-Green") perGreen = max(perGreen - percent, 0); + else if (msg == "-Blue") perBlue = max(perBlue - percent, 0); + else if (msg == "-Alpha") perAlpha = max(perAlpha - percent, 0); + else if (msg == "+Red") perRed = min(perRed + percent, 100); + else if (msg == "+Green") perGreen = min(perGreen + percent, 100); + else if (msg == "+Blue") perBlue = min(perBlue + percent, 100); + else if (msg == "+Alpha") perAlpha = min(perAlpha + percent, 100); + else if (msg == "R min/max") { if (perRed) perRed = 0; else perRed = 100; } + else if (msg == "G min/max") { if (perGreen) perGreen = 0; else perGreen = 100; } + else if (msg == "B min/max") { if (perBlue) perBlue = 0; else perBlue = 100; } + else if (msg == "Main menu") menuDialog(id); + } + else { + if (msg == "-Red") perRedOff = max(perRedOff - percent, 0); + else if (msg == "-Green") perGreenOff = max(perGreenOff - percent, 0); + else if (msg == "-Blue") perBlueOff = max(perBlueOff - percent, 0); + else if (msg == "-Alpha") perAlphaOff = max(perAlphaOff - percent, 0); + else if (msg == "+Red") perRedOff = min(perRedOff + percent, 100); + else if (msg == "+Green") perGreenOff = min(perGreenOff + percent, 100); + else if (msg == "+Blue") perBlueOff = min(perBlueOff + percent, 100); + else if (msg == "+Alpha") perAlphaOff = min(perAlphaOff + percent, 100); + else if (msg == "R min/max") { if (perRedOff) perRedOff = 0; else perRedOff = 100; } + else if (msg == "G min/max") { if (perGreenOff) perGreenOff = 0; else perGreenOff = 100; } + else if (msg == "B min/max") { if (perBlueOff) perBlueOff = 0; else perBlueOff = 100; } + else if (msg == "Main menu") menuDialog(id); + } + if (msg != "Main menu") { + sendMessage(getGroup()); + colorDialog(id); + } + } + else if (channel == particleChannel) { + llListenRemove(particleHandle); + if (msg == "-1%") particleInc = -1; + else if (msg == "+1%") particleInc = 1; + else if (msg == "-5%") particleInc = -5; + else if (msg == "+5%") particleInc = 5; + else if (msg == "-10%") particleInc = -10; + else if (msg == "+10%") particleInc = 10; + else if (msg == "Min") particleInc = -100; + else if (msg == "Max") particleInc = 100; + else if (msg == "Light on/off") on = !on; + else if (msg == "Part. on/off") particles = !particles; + else if (msg == "Reset") particleInc = 999; // reset particle size + else if (msg == "Main menu") menuDialog(id); + if (msg != "Main menu") { + sendMessage(getGroup()); + particleDialog(id); + } + } + else if (channel == notecardChannel) { + llListenRemove(notecardHandle); + if (msg == "Main menu") menuDialog(id); + else { + notecard = configPrefix + configSeparator + msg; + loadNotecard(); + } + } + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number != msgNumber) return; + + if (loading) { + llWhisper(0, "Notecard is still loading"); + return; + } + + if (id) user = id; + else { + llWhisper(0, "A valid avatar key must be provided in the link message"); + return; + } + + if (msg == msgSwitch) { + if (accessGranted(id, switchAccess)) { + on = !on; + sendMessage(getGroup()); + } + else llInstantMessage(id, "[Switch] Access denied"); + } + else if (msg == msgOn) { + if (accessGranted(id, switchAccess)) { + if (!on) { + on = TRUE; + sendMessage(getGroup()); + } + } + else llInstantMessage(id, "[Switch] Access denied"); + } + else if (msg == msgOff) { + if (accessGranted(id, switchAccess)) { + if (on) { + on = FALSE; + sendMessage(getGroup()); + } + } + else llInstantMessage(id, "[Switch] Access denied"); + } + else if (msg == msgMenu) { + if (accessGranted(id, menuAccess)) menuDialog(id); + else llInstantMessage(id, "[Menu] Access denied"); + } + } + + dataserver(key req, string data) + { + if (data == EOF) { + defColor.x = checkInt("ColorOn (RED)", (integer)defColor.x, 0, 100); + defColor.y = checkInt("ColorOn (GREEN)", (integer)defColor.y, 0, 100); + defColor.z = checkInt("ColorOn (BLUE)", (integer)defColor.z, 0, 100); + defColorOff.x = checkInt("ColorOff (RED)", (integer)defColorOff.x, 0, 100); + defColorOff.y = checkInt("ColorOff (GREEN)", (integer)defColorOff.y, 0, 100); + defColorOff.z = checkInt("ColorOff (BLUE)", (integer)defColorOff.z, 0, 100); + reset(); + particleInc = 999; // reset particle size in plugin script + sendMessage(getGroup()); + if (verbose) if (user) {} else { + llWhisper(0, "Touch to turn light on or off"); + llWhisper(0, "Long touch to show menu"); + if (linkSet) llWhisper(0, title + " " + version + "-LINKSET ready"); + else llWhisper(0, title + " " + version + "-REGION ready"); + } + loading = FALSE; + llSetText("", ZERO_VECTOR, 0.0); + if (user) notecardDialog(user); + } + else { + readNotecard(data); + } + } + + changed(integer change) + { + if (change & CHANGED_INVENTORY) { + user = ""; + discoverNotecards(); + loadNotecard(); + } + } + + timer() + { + llSetTimerEvent(0); + llListenRemove(menuHandle); + llListenRemove(colorHandle); + llListenRemove(particleHandle); + llListenRemove(notecardHandle); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/_Main/switch.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/switch.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/_Main/switch.lsl rename to Rene Free Lighting System/Renes Free Lighting System/_Main/switch.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/_Main/switch_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/switch_region.lsl new file mode 100644 index 00000000..a48f4708 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/_Main/switch_region.lsl @@ -0,0 +1,719 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:50 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1785 +// :REV:2.1 +// :WORLD:Opensim +// :DESCRIPTION: + // Light Switch for region +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Rene's Free Lighting System - Light Switch +// +// Author: Rene10957 Resident +// Date: 31-05-2015 + +string title = "Light Switch"; // title +string version = "2.1"; // version +integer linkSet = FALSE; // REGION mode + +// Constants + +integer _PUBLIC_ = 1; // public access bit +integer _GROUP_ = 2; // group access bit +integer _OWNER_ = 4; // owner access bit +integer _GRPOWN_ = 6; // group + owner +integer switchChannel = -10957; // switch channel +float maxRed = 1.0; // max. red +float maxGreen = 1.0; // max. green +float maxBlue = 1.0; // max. blue +float maxRadius = 20.0; // max. light radius +float maxFalloff = 2.0; // max. light falloff +float maxGlow = 1.0; // max. prim glow +float maxAlpha = 1.0; // max. prim alpha +string configPrefix = "config"; // prefix for configuration notecards +string configSeparator = ":"; // separator between prefix and name +string defNotecard = "Default"; // default notecard + +// Notecard variables + +integer verbose = FALSE; // show more/less info during startup +integer switchAccess; // access level for switch +integer menuAccess; // access level for menu +integer msgNumber; // number part of incoming link messages +string msgSwitch; // string part of incoming link message: switch (on/off) +string msgOn; // string part of incoming link message: switch on +string msgOff; // string part of incoming link message: switch off +string msgMenu; // string part of incoming link message: show menu +integer percent; // increase/decrease percentage for +/- buttons +integer changePrimColor = FALSE; // TRUE = prim color changes with light color, FALSE = white +integer changeParticleColor = FALSE; // TRUE = particle color changes with light color, FALSE = white +integer particleInc; // increase/decrease percentage for particle effect (menu) +string particleTexture; // texture UUID for particle effect +integer particleMenu = FALSE; // TRUE = "On/Off" replaced by "Particles" (particle menu) +integer notecardMenu = FALSE; // TRUE = "On/Off" replaced by "Presets" (notecard menu) +string extButton; // "On/Off" replaced by button text (sends link message) +integer extNumber; // number part of outgoing link message +integer lightGroups = FALSE; // TRUE = use prim description for light groups, FALSE = ignore prim description +string faces; // color/glow/fullbright on all faces (ALL_SIDES = -1), one face or CSV list +integer baseIntensity; // base for light intensity + +// Notecard variables: menu defaults + +vector defColor; // default color (R,G,B) +vector defColorOff; // default color (R,G,B) when OFF +integer defAlpha; // default prim alpha +integer defAlphaOff; // default prim alpha when OFF +integer defIntensity; // default light intensity +integer defRadius; // default light radius +integer defFalloff; // default light falloff +integer defGlow; // default prim glow +integer defFullbright = FALSE; // default fullbright +integer defParticleSize; // default particle size + +// Variables + +key owner; // object owner +key user; // key of last avatar to touch object +list notecardButtons; // list of notecards in inventory +string notecard; // notecard name +integer line; // notecard line +integer loading = FALSE; // notecard loading +integer menuChannel; // main menu channel +integer colorChannel; // color menu channel +integer particleChannel; // particle menu channel +integer notecardChannel; // notecard menu channel +integer menuHandle; // handle for main menu listener +integer colorHandle; // handle for color menu listener +integer particleHandle; // handle for particle menu listener +integer notecardHandle; // handle for notecard menu listener +integer on = FALSE; // on-off switch +integer particles = TRUE; // particles on/off +integer perRed; // percent red +integer perGreen; // percent green +integer perBlue; // percent blue +integer perAlpha; // percent prim alpha +integer perRedOff; // percent red when OFF +integer perGreenOff; // percent green when OFF +integer perBlueOff; // percent blue when OFF +integer perAlphaOff; // percent prim alpha when OFF +integer perIntensity; // percent light intensity +integer perRadius; // percent light radius +integer perFalloff; // percent light falloff +integer perGlow; // percent prim glow +integer fullbright = TRUE; // fullbright + +// Functions + +list orderButtons(list buttons) +{ + return llList2List(buttons, -3, -1) + llList2List(buttons, -6, -4) + llList2List(buttons, -9, -7) + + llList2List(buttons, -12, -10); +} + +discoverNotecards() +{ + llSetText("Discovering notecards...", <1,1,1>, 1.0); + + notecardButtons = []; + integer i; + integer pos; + integer number = llGetInventoryNumber(INVENTORY_NOTECARD); + string name; + string prefix; + string suffix; + + for (i = 0; i < number; ++i) { + name = llGetInventoryName(INVENTORY_NOTECARD, i); + pos = llSubStringIndex(name, configSeparator); + if (pos > -1) { + prefix = llGetSubString(name, 0, pos - 1); + suffix = llGetSubString(name, pos + 1, -1); + if (prefix == configPrefix && suffix != defNotecard && llGetListLength(notecardButtons) < 10) + notecardButtons += suffix; + } + } + + notecardButtons = llListSort(notecardButtons, 1, TRUE); // sort ascending + if (llGetInventoryType(configPrefix + configSeparator + defNotecard) == INVENTORY_NOTECARD) + notecardButtons += defNotecard; + + if (llGetListLength(notecardButtons) > 0) { + notecardButtons += "Main menu"; + notecardButtons = orderButtons(notecardButtons); // reverse row order + } + + llSetText("", ZERO_VECTOR, 0.0); +} + +integer accessGranted(key user, integer access) +{ + integer bitmask = _PUBLIC_; + if (user == owner) bitmask += _OWNER_; + if (llSameGroup(user)) bitmask += _GROUP_; + return (bitmask & access); +} + +integer checkAccess(string par, string val) +{ + if (llToLower(val) == "public") return _PUBLIC_; + if (llToLower(val) == "group") return _GROUP_; + if (llToLower(val) == "owner") return _OWNER_; + if (llToLower(val) == "group+owner") return _GRPOWN_; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to PUBLIC"); + return _PUBLIC_; +} + +integer checkInt(string par, integer val, integer min, integer max) +{ + if (val < min || val > max) { + if (val < min) val = min; + else if (val > max) val = max; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to " + (string)val); + } + return val; +} + +vector checkVector(string par, vector val) +{ + if (val == ZERO_VECTOR) { + val = <100,100,100>; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to " + (string)val); + } + return val; +} + +integer checkYesNo(string par, string val) +{ + if (llToLower(val) == "yes") return TRUE; + if (llToLower(val) == "no") return FALSE; + llWhisper(0, "[Notecard] " + par + " out of range, corrected to NO"); + return FALSE; +} + +string checkKey(string par, string val) +{ + if ((key)val) return val; + if (val == "") return val; + llWhisper(0, "[Notecard] " + par + " out of range (not a valid key)"); + return ""; +} + +string truncMenuButton(string par, string val) +{ + string trunc = llBase64ToString(llGetSubString(llStringToBase64(val), 0, 31)); + if (val != trunc) llWhisper(0, "[Notecard] " + par + " will be truncated to 24 bytes"); + return trunc; +} + +loadNotecard() +{ + verbose = TRUE; + switchAccess = _PUBLIC_; + menuAccess = _PUBLIC_; + msgNumber = 10957; + msgSwitch = "switch"; + msgOn = "on"; + msgOff = "off"; + msgMenu = "menu"; + percent = 10; + changePrimColor = TRUE; + changeParticleColor = TRUE; + particleTexture = ""; + particleMenu = FALSE; + notecardMenu = FALSE; + extButton = ""; + extNumber = 10958; + lightGroups = FALSE; + faces = "-1"; + baseIntensity = 100; + defColor = <100,100,100>; + defColorOff = <100,100,100>; + defAlpha = 100; + defAlphaOff = 100; + defIntensity = 100; + defRadius = 50; + defFalloff = 40; + defGlow = 0; + defFullbright = TRUE; + defParticleSize = 20; + line = 0; + + if (llGetInventoryType(notecard) == INVENTORY_NOTECARD) { + loading = TRUE; + llSetText("Loading notecard...", <1,1,1>, 1.0); + llGetNotecardLine(notecard, line); + } + else { + reset(); + particleInc = 999; // reset particle size in plugin script + sendMessage(getGroup()); + if (verbose) { + llWhisper(0, "Notecard \"" + notecard + "\" not found or empty, using defaults"); + llWhisper(0, "Touch to turn light on or off"); + llWhisper(0, "Long touch to show menu"); + if (linkSet) llWhisper(0, title + " " + version + "-LINKSET ready"); + else llWhisper(0, title + " " + version + "-REGION ready"); + } + } +} + +readNotecard (string ncLine) +{ + string ncData = llStringTrim(ncLine, STRING_TRIM); + + if (llStringLength(ncData) > 0 && llGetSubString(ncData, 0, 0) != "#") { + list ncList = llParseString2List(ncData, ["=","#"], []); // split into parameter, value, comment + string par = llStringTrim(llList2String(ncList, 0), STRING_TRIM); + string val = llStringTrim(llList2String(ncList, 1), STRING_TRIM); + string lcpar = llToLower(par); + if (lcpar == "verbose") verbose = checkYesNo(par, val); + else if (lcpar == "switchaccess") switchAccess = checkAccess(par, val); + else if (lcpar == "menuaccess") menuAccess = checkAccess(par, val); + else if (lcpar == "msgnumber") msgNumber = (integer)val; + else if (lcpar == "msgswitch") msgSwitch = truncMenuButton(par, val); + else if (lcpar == "msgon") msgOn = truncMenuButton(par, val); + else if (lcpar == "msgoff") msgOff = truncMenuButton(par, val); + else if (lcpar == "msgmenu") msgMenu = truncMenuButton(par, val); + else if (lcpar == "menupercent") percent = checkInt(par, (integer)val, 1, 100); + else if (lcpar == "changeprimcolor") changePrimColor = checkYesNo(par, val); + else if (lcpar == "changeparticlecolor") changeParticleColor = checkYesNo(par, val); + else if (lcpar == "particletexture") particleTexture = checkKey(par, val); + else if (lcpar == "particlemenu") particleMenu = checkYesNo(par, val); + else if (lcpar == "notecardmenu") notecardMenu = checkYesNo(par, val); + else if (lcpar == "extbutton") extButton = truncMenuButton(par, val); + else if (lcpar == "extnumber") extNumber = (integer)val; + else if (lcpar == "lightgroups") lightGroups = checkYesNo(par, val); + else if (lcpar == "faces") faces = truncMenuButton(par, val); + else if (lcpar == "baseintensity") baseIntensity = checkInt(par, (integer)val, 1, 100); + else if (lcpar == "coloron") defColor = checkVector(par, (vector)val); + else if (lcpar == "coloroff") defColorOff = checkVector(par, (vector)val); + else if (lcpar == "alphaon") defAlpha = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "alphaoff") defAlphaOff = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "intensity") defIntensity = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "radius") defRadius = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "falloff") defFalloff = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "glow") defGlow = checkInt(par, (integer)val, 0, 100); + else if (lcpar == "fullbright") defFullbright = checkYesNo(par, val); + else if (lcpar == "particlesize") defParticleSize = checkInt(par, (integer)val, 1, 100); + else llWhisper(0, "Unknown parameter in notecard line " + (string)(line + 1) + ": " + par); + } + + line++; + llGetNotecardLine(notecard, line); +} + +menuDialog (key id) +{ + string strOn = "OFF"; if (on) strOn = "ON"; + string strLinkSet = "REGION"; if (linkSet) strLinkSet = "LINKSET"; + string strFullbright = "NO"; if (fullbright) strFullbright = "YES"; + string strButton = "On/Off"; if (particleMenu) strButton = "Particles"; + else if (notecardMenu) strButton = "Presets"; + else if (extButton) strButton = extButton; + menuChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(menuHandle); + menuHandle = llListen(menuChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + llDialog(id, title + " " + version + + "\n\nIntensity: " + (string)perIntensity + "%\t\tState: " + strOn + + "\nRadius: " + (string)perRadius + "%\t\tFullbright: " + strFullbright + + "\nFalloff: " + (string)perFalloff + "%\t\tMode: " + strLinkSet + + "\nGlow: " + (string)perGlow + "%\t\tGroup: " + getGroup(), [ + "-Glow", "+Glow", strButton, + "-Falloff", "+Falloff", "Reset", + "-Radius", "+Radius", "Fullbright", + "-Intensity", "+Intensity", "Color" ], + menuChannel); +} + +colorDialog (key id) +{ + colorChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(colorHandle); + colorHandle = llListen(colorChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + if (on) { + llDialog(id, "Color & Alpha when ON" + + "\n\nRed: " + (string)perRed + "%" + + "\nGreen: " + (string)perGreen + "%" + + "\nBlue: " + (string)perBlue + "%" + + "\nAlpha: " + (string)perAlpha + "%", [ + "-Alpha", "+Alpha", "Main menu", + "-Blue", "+Blue", "B min/max", + "-Green", "+Green", "G min/max", + "-Red", "+Red", "R min/max" ], + colorChannel); + } + else { + llDialog(id, "Color & Alpha when OFF" + + "\n\nRed: " + (string)perRedOff + "%" + + "\nGreen: " + (string)perGreenOff + "%" + + "\nBlue: " + (string)perBlueOff + "%" + + "\nAlpha: " + (string)perAlphaOff + "%", [ + "-Alpha", "+Alpha", "Main menu", + "-Blue", "+Blue", "B min/max", + "-Green", "+Green", "G min/max", + "-Red", "+Red", "R min/max" ], + colorChannel); + } +} + +particleDialog (key id) +{ + string strLightOn = "OFF"; if (on) strLightOn = "ON"; + string strParticlesOn = "OFF"; if (particles) strParticlesOn = "ON"; + particleChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(particleHandle); + particleHandle = llListen(particleChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + llDialog(id, "Particle effect" + + "\n\nLight: " + strLightOn + + "\nParticles: " + strParticlesOn, [ + "Min", "Max", "Main menu", + "-10%", "+10%", "Reset", + "-5%", "+5%", "Part. on/off", + "-1%", "+1%", "Light on/off" ], + particleChannel); +} + +notecardDialog (key id) +{ + string name = llGetSubString(notecard, llStringLength(configPrefix) + llStringLength(configSeparator), -1); + notecardChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(notecardHandle); + notecardHandle = llListen(notecardChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(300); + llDialog(id, "Configuration notecards\n\nLoaded notecard: " + name, notecardButtons, notecardChannel); +} + +string getGroup() +{ + if (!lightGroups) return "None"; + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +float percentage (integer per, float num) +{ + return num / 100.0 * (float)per; +} + +integer min (integer x, integer y) +{ + if (x < y) return x; else return y; +} + +integer max (integer x, integer y) +{ + if (x > y) return x; else return y; +} + +reset() +{ + perRed = (integer)defColor.x; + perGreen = (integer)defColor.y; + perBlue = (integer)defColor.z; + perRedOff = (integer)defColorOff.x; + perGreenOff = (integer)defColorOff.y; + perBlueOff = (integer)defColorOff.z; + perAlpha = defAlpha; + perAlphaOff = defAlphaOff; + perIntensity = defIntensity; + perRadius = defRadius; + perFalloff = defFalloff; + perGlow = defGlow; + fullbright = defFullbright; +} + +sendMessage(string group) +{ + vector color; + vector colorOn; + vector colorOff; + float intensity; + float radius; + float falloff; + float alpha; + float glow; + integer fullbr; + vector primColor; + vector particleColor; + integer particlesOn; + + colorOn.x = percentage(perRed, maxRed); + colorOn.y = percentage(perGreen, maxGreen); + colorOn.z = percentage(perBlue, maxBlue); + colorOff.x = percentage(perRedOff, maxRed); + colorOff.y = percentage(perGreenOff, maxGreen); + colorOff.z = percentage(perBlueOff, maxBlue); + + if (on) { + color = colorOn; + intensity = percentage(perIntensity, (float)baseIntensity / 100.0); + radius = percentage(perRadius, maxRadius); + falloff = percentage(perFalloff, maxFalloff); + alpha = percentage(perAlpha, maxAlpha); + glow = percentage(perGlow, maxGlow); + fullbr = fullbright; + if (changePrimColor) primColor = color; + else primColor = colorOff; + if (changeParticleColor) particleColor = color; + else particleColor = colorOff; + particlesOn = particles; + } + else { + color = colorOff; + alpha = percentage(perAlphaOff, maxAlpha); + glow = 0.0; + fullbr = FALSE; + primColor = color; + particlesOn = FALSE; + } + + list msgList = [group, on, color, intensity, radius, falloff, alpha, glow, fullbr, + primColor, particleColor, defParticleSize, particleInc, particleTexture, particlesOn, + "<" + faces + ">", lightGroups]; + string msg = llList2CSV(msgList); + particleInc = 0; + + if (linkSet) llMessageLinked(LINK_SET, switchChannel, msg, ""); + else llRegionSay(switchChannel, msg); +} + +default +{ + state_entry() + { + owner = llGetOwner(); + notecard = configPrefix + configSeparator + defNotecard; + discoverNotecards(); + loadNotecard(); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + llResetTime(); + } + + touch_end(integer total_number) + { + if (loading) { + llWhisper(0, "Notecard is still loading"); + return; + } + + user = llDetectedKey(0); + + if (llGetTime() > 1.0) { + if (accessGranted(user, menuAccess)) menuDialog(user); + else llInstantMessage(user, "[Menu] Access denied"); + } + else { + if (accessGranted(user, switchAccess)) { + on = !on; + sendMessage(getGroup()); + } + else llInstantMessage(user, "[Switch] Access denied"); + } + } + + listen(integer channel, string name, key id, string msg) + { + llSetTimerEvent(0); + + if (channel == menuChannel) { + llListenRemove(menuHandle); + if (msg == "-Intensity") perIntensity = max(perIntensity - percent, 0); + else if (msg == "-Radius") perRadius = max(perRadius - percent, 0); + else if (msg == "-Falloff") perFalloff = max(perFalloff - percent, 0); + else if (msg == "-Glow") perGlow = max(perGlow - percent, 0); + else if (msg == "+Intensity") perIntensity = min(perIntensity + percent, 100); + else if (msg == "+Radius") perRadius = min(perRadius + percent, 100); + else if (msg == "+Falloff") perFalloff = min(perFalloff + percent, 100); + else if (msg == "+Glow") perGlow = min(perGlow + percent, 100); + else if (msg == "Color") colorDialog(id); + else if (msg == "Fullbright") fullbright = !fullbright; + else if (msg == "Reset") reset(); + else if (msg == "On/Off") on = !on; + else if (msg == "Particles") particleDialog(id); + else if (msg == "Presets") { + if (llGetListLength(notecardButtons) > 0) notecardDialog(id); + else llWhisper(0, "No configuration notecards found"); + } + else if (msg == extButton) llMessageLinked(LINK_SET, extNumber, msg, id); + if (msg != "Color" && msg != "Particles" && msg != "Presets" && msg != extButton) { + sendMessage(getGroup()); + menuDialog(id); + } + } + else if (channel == colorChannel) { + llListenRemove(colorHandle); + if (on) { + if (msg == "-Red") perRed = max(perRed - percent, 0); + else if (msg == "-Green") perGreen = max(perGreen - percent, 0); + else if (msg == "-Blue") perBlue = max(perBlue - percent, 0); + else if (msg == "-Alpha") perAlpha = max(perAlpha - percent, 0); + else if (msg == "+Red") perRed = min(perRed + percent, 100); + else if (msg == "+Green") perGreen = min(perGreen + percent, 100); + else if (msg == "+Blue") perBlue = min(perBlue + percent, 100); + else if (msg == "+Alpha") perAlpha = min(perAlpha + percent, 100); + else if (msg == "R min/max") { if (perRed) perRed = 0; else perRed = 100; } + else if (msg == "G min/max") { if (perGreen) perGreen = 0; else perGreen = 100; } + else if (msg == "B min/max") { if (perBlue) perBlue = 0; else perBlue = 100; } + else if (msg == "Main menu") menuDialog(id); + } + else { + if (msg == "-Red") perRedOff = max(perRedOff - percent, 0); + else if (msg == "-Green") perGreenOff = max(perGreenOff - percent, 0); + else if (msg == "-Blue") perBlueOff = max(perBlueOff - percent, 0); + else if (msg == "-Alpha") perAlphaOff = max(perAlphaOff - percent, 0); + else if (msg == "+Red") perRedOff = min(perRedOff + percent, 100); + else if (msg == "+Green") perGreenOff = min(perGreenOff + percent, 100); + else if (msg == "+Blue") perBlueOff = min(perBlueOff + percent, 100); + else if (msg == "+Alpha") perAlphaOff = min(perAlphaOff + percent, 100); + else if (msg == "R min/max") { if (perRedOff) perRedOff = 0; else perRedOff = 100; } + else if (msg == "G min/max") { if (perGreenOff) perGreenOff = 0; else perGreenOff = 100; } + else if (msg == "B min/max") { if (perBlueOff) perBlueOff = 0; else perBlueOff = 100; } + else if (msg == "Main menu") menuDialog(id); + } + if (msg != "Main menu") { + sendMessage(getGroup()); + colorDialog(id); + } + } + else if (channel == particleChannel) { + llListenRemove(particleHandle); + if (msg == "-1%") particleInc = -1; + else if (msg == "+1%") particleInc = 1; + else if (msg == "-5%") particleInc = -5; + else if (msg == "+5%") particleInc = 5; + else if (msg == "-10%") particleInc = -10; + else if (msg == "+10%") particleInc = 10; + else if (msg == "Min") particleInc = -100; + else if (msg == "Max") particleInc = 100; + else if (msg == "Light on/off") on = !on; + else if (msg == "Part. on/off") particles = !particles; + else if (msg == "Reset") particleInc = 999; // reset particle size + else if (msg == "Main menu") menuDialog(id); + if (msg != "Main menu") { + sendMessage(getGroup()); + particleDialog(id); + } + } + else if (channel == notecardChannel) { + llListenRemove(notecardHandle); + if (msg == "Main menu") menuDialog(id); + else { + notecard = configPrefix + configSeparator + msg; + loadNotecard(); + } + } + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number != msgNumber) return; + + if (loading) { + llWhisper(0, "Notecard is still loading"); + return; + } + + if (id) user = id; + else { + llWhisper(0, "A valid avatar key must be provided in the link message"); + return; + } + + if (msg == msgSwitch) { + if (accessGranted(id, switchAccess)) { + on = !on; + sendMessage(getGroup()); + } + else llInstantMessage(id, "[Switch] Access denied"); + } + else if (msg == msgOn) { + if (accessGranted(id, switchAccess)) { + if (!on) { + on = TRUE; + sendMessage(getGroup()); + } + } + else llInstantMessage(id, "[Switch] Access denied"); + } + else if (msg == msgOff) { + if (accessGranted(id, switchAccess)) { + if (on) { + on = FALSE; + sendMessage(getGroup()); + } + } + else llInstantMessage(id, "[Switch] Access denied"); + } + else if (msg == msgMenu) { + if (accessGranted(id, menuAccess)) menuDialog(id); + else llInstantMessage(id, "[Menu] Access denied"); + } + } + + dataserver(key req, string data) + { + if (data == EOF) { + defColor.x = checkInt("ColorOn (RED)", (integer)defColor.x, 0, 100); + defColor.y = checkInt("ColorOn (GREEN)", (integer)defColor.y, 0, 100); + defColor.z = checkInt("ColorOn (BLUE)", (integer)defColor.z, 0, 100); + defColorOff.x = checkInt("ColorOff (RED)", (integer)defColorOff.x, 0, 100); + defColorOff.y = checkInt("ColorOff (GREEN)", (integer)defColorOff.y, 0, 100); + defColorOff.z = checkInt("ColorOff (BLUE)", (integer)defColorOff.z, 0, 100); + reset(); + particleInc = 999; // reset particle size in plugin script + sendMessage(getGroup()); + if (verbose) if (user) {} else { + llWhisper(0, "Touch to turn light on or off"); + llWhisper(0, "Long touch to show menu"); + if (linkSet) llWhisper(0, title + " " + version + "-LINKSET ready"); + else llWhisper(0, title + " " + version + "-REGION ready"); + } + loading = FALSE; + llSetText("", ZERO_VECTOR, 0.0); + if (user) notecardDialog(user); + } + else { + readNotecard(data); + } + } + + changed(integer change) + { + if (change & CHANGED_INVENTORY) { + user = ""; + discoverNotecards(); + loadNotecard(); + } + } + + timer() + { + llSetTimerEvent(0); + llListenRemove(menuHandle); + llListenRemove(colorHandle); + llListenRemove(particleHandle); + llListenRemove(notecardHandle); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/_Main/switch_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/_Main/switch_region.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/_Main/switch_region.lsl rename to Rene Free Lighting System/Renes Free Lighting System/_Main/switch_region.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/config_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/config_control.lsl new file mode 100644 index 00000000..eae95f02 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/config_control.lsl @@ -0,0 +1,138 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:37:37 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1770 +// :REV:1.0.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Configuration Control: Menu-controlled lighting system with many features +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Configuration Control +// +// Author: Rene10957 Resident +// Date: 24-08-2014 +// +// Drop this in every light bulb, instead of the light script +// Make sure the switch is in a separate prim (not root) +// Remove after use +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +////////////////////////////////////////// +// Please read user manual before using // +////////////////////////////////////////// + +string title = "Configuration Control"; // title +string version = "1.0.1."; // version + +// Constants + +integer pluginChannel = 10957; // plugin channel +integer switchChannel = -10957; // switch channel + +// Variables + +list onList; +list offList; +vector color; +vector primColor; +string intensity; +string radius; +string falloff; +string alpha; +string glow; +string fullbright; +string red; +string green; +string blue; +string primRed; +string primGreen; +string primBlue; + +// Functions + +string roundDecimals(float number, float decimals) +{ + integer intNumber = llRound(number * llPow(10, decimals)); // move decimal point to the right and round + float fltNumber = (float)intNumber / llPow(10, decimals); // move it back to the left + string strNumber = (string)fltNumber; // cast to string + string end = llGetSubString(strNumber, -1, -1); + while (end == "0") { // remove trailing zeroes + strNumber = llDeleteSubString(strNumber, -1, -1); + end = llGetSubString(strNumber, -1, -1); + } + if (end == ".") { + return llGetSubString(strNumber, 0, -2); + } + else { + if (llGetSubString(strNumber, 0, 0) == "0") return llGetSubString(strNumber, 1, -1); + else return strNumber; + } +} + +storeData(string msg) +{ + list msgList = llCSV2List(msg); + integer on = (integer)llList2String(msgList, 1); + color = (vector)llList2String(msgList, 2); + intensity = roundDecimals((float)llList2String(msgList, 3), 2); + radius = roundDecimals((float)llList2String(msgList, 4), 2); + falloff = roundDecimals((float)llList2String(msgList, 5), 2); + alpha = roundDecimals((float)llList2String(msgList, 6), 2); + glow = roundDecimals((float)llList2String(msgList, 7), 2); + fullbright = llList2String(msgList, 8); + primColor = (vector)llList2String(msgList, 9); + + red = roundDecimals(color.x, 2); + green = roundDecimals(color.y, 2); + blue = roundDecimals(color.z, 2); + + primRed = roundDecimals(primColor.x, 2); + primGreen = roundDecimals(primColor.y, 2); + primBlue = roundDecimals(primColor.z, 2); + + llSetPrimitiveParams([ + PRIM_POINT_LIGHT, on, color, (float)intensity, (float)radius, (float)falloff, + PRIM_COLOR, ALL_SIDES, primColor, (float)alpha, + PRIM_GLOW, ALL_SIDES, (float)glow, + PRIM_FULLBRIGHT, ALL_SIDES, (integer)fullbright]); + + if (on) onList = [red, green, blue, intensity, radius, falloff, alpha, glow, fullbright, + primRed, primGreen, primBlue]; + else offList = [red, green, blue, alpha]; + + if (llGetListLength(onList) > 0 && llGetListLength(offList) > 0) { + string desc = llDumpList2String(["#LS#"] + onList + offList, ";"); + llSetObjectDesc(desc); + } +} + +default +{ + state_entry() + { + if (llGetSubString(llGetObjectDesc(), 0, 3) == "#LS#") llSetObjectDesc("(No Description)"); + llMessageLinked(LINK_ALL_OTHERS, pluginChannel, "off", llGetOwner()); // request information from switch + llWhisper(0, title + " " + version + " ready"); + llOwnerSay("Please remove the script after use"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == switchChannel) storeData(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/config_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/config_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/config_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/config_control.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/ext_config_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/ext_config_control.lsl new file mode 100644 index 00000000..69824648 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/ext_config_control.lsl @@ -0,0 +1,162 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:38:41 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1770 +// :REV:1.0.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Extended Configuration Control +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Extended Configuration Control +// +// Author: Rene10957 Resident +// Date: 24-08-2014 +// +// Drop this in a separate prim (not root) together with the switch +// Remove after use +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +////////////////////////////////////////// +// Please read user manual before using // +////////////////////////////////////////// + +string title = "Extended Configuration Control"; // title +string version = "1.0.1"; // version + +// Constants + +integer pluginChannel = 10957; // plugin channel +integer switchChannel = -10957; // switch channel + +// Variables + +list onList; +list offList; +vector color; +vector primColor; +vector particleColor; +string intensity; +string radius; +string falloff; +string alpha; +string glow; +string fullbright; +string particleSize; +string particleTexture; +string red; +string green; +string blue; +string primRed; +string primGreen; +string primBlue; +string partRed; +string partGreen; +string partBlue; + +// Functions + +string roundDecimals(float number, float decimals) +{ + integer intNumber = llRound(number * llPow(10, decimals)); // move decimal point to the right and round + float fltNumber = (float)intNumber / llPow(10, decimals); // move it back to the left + string strNumber = (string)fltNumber; // cast to string + string end = llGetSubString(strNumber, -1, -1); + while (end == "0") { // remove trailing zeroes + strNumber = llDeleteSubString(strNumber, -1, -1); + end = llGetSubString(strNumber, -1, -1); + } + if (end == ".") { + return llGetSubString(strNumber, 0, -2); + } + else { + if (llGetSubString(strNumber, 0, 0) == "0") return llGetSubString(strNumber, 1, -1); + else return strNumber; + } +} + +storeData(string msg) +{ + list msgList = llCSV2List(msg); + integer on = (integer)llList2String(msgList, 1); + color = (vector)llList2String(msgList, 2); + intensity = roundDecimals((float)llList2String(msgList, 3), 2); + radius = roundDecimals((float)llList2String(msgList, 4), 2); + falloff = roundDecimals((float)llList2String(msgList, 5), 2); + alpha = roundDecimals((float)llList2String(msgList, 6), 2); + glow = roundDecimals((float)llList2String(msgList, 7), 2); + fullbright = llList2String(msgList, 8); + primColor = (vector)llList2String(msgList, 9); + particleColor = (vector)llList2String(msgList, 10); + particleSize = llList2String(msgList, 11); + particleTexture = llList2String(msgList, 13); + + red = roundDecimals(color.x, 2); + green = roundDecimals(color.y, 2); + blue = roundDecimals(color.z, 2); + + primRed = roundDecimals(primColor.x, 2); + primGreen = roundDecimals(primColor.y, 2); + primBlue = roundDecimals(primColor.z, 2); + + partRed = roundDecimals(particleColor.x, 2); + partGreen = roundDecimals(particleColor.y, 2); + partBlue = roundDecimals(particleColor.z, 2); + + // Since the description differs from other prims, switch-to-light communication will fail. + // Solution: fake the switch message and pretend this is the default group. + + list sendList = ["Default", on, color, intensity, radius, falloff, alpha, glow, fullbright, + primColor, particleColor, particleSize, 999, particleTexture, on]; + string sendMsg = llList2CSV(sendList); + llMessageLinked(LINK_ALL_OTHERS, switchChannel, sendMsg, ""); + + if (on) onList = [red, green, blue, intensity, radius, falloff, alpha, glow, fullbright, + primRed, primGreen, primBlue, partRed, partGreen, partBlue, particleSize, particleTexture]; + else offList = [red, green, blue, alpha]; + + if (llGetListLength(onList) > 0 && llGetListLength(offList) > 0) { + string desc = llDumpList2String(["#LS#"] + onList + offList, ";"); + llSetObjectDesc(desc); + } +} + +default +{ + state_entry() + { + integer i; + integer number = llGetNumberOfPrims(); + list descList; + string desc; + + for (i = number; i >= 0; --i) { + descList = llGetLinkPrimitiveParams(i, [PRIM_DESC]); + desc = llList2String(descList, 0); + if (llGetSubString(desc, 0, 3) == "#LS#") llSetLinkPrimitiveParamsFast(i, [PRIM_DESC,"(No Description)"]); + } + + llMessageLinked(LINK_THIS, pluginChannel, "off", llGetOwner()); // request information from switch + llWhisper(0, title + " " + version + " ready"); + llOwnerSay("Please remove the script after use"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == switchChannel) storeData(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/ext_config_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/ext_config_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/ext_config_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/ext_config_control.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/ext_switch_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/ext_switch_control.lsl new file mode 100644 index 00000000..666eba8a --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/ext_switch_control.lsl @@ -0,0 +1,117 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:39:48 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1770 +// :REV:1.0 +// :WORLD:Opensim +// :DESCRIPTION: +// Drop in any prim and touch for on/off +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Extended Switch Control +// +// Author: Rene10957 Resident +// Date: 21-03-2014 +// +// Drop in any prim and touch for on/off +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +////////////////////////////////////////// +// Please read user manual before using // +////////////////////////////////////////// + +string title = "Extended Switch Control"; // title +string version = "1.0"; // version +integer silent = TRUE; // silent startup + +// Constants + +integer switchChannel = -10957; // switch channel + +// Variables + +integer on = FALSE; // on-off switch + +// Functions + +switchLight() +{ + vector color; + vector primColor; + vector particleColor; + float intensity; + float radius; + float falloff; + float alpha; + float glow; + integer fullbright; + integer particleSize; + string particleTexture; + string desc = llGetObjectDesc(); + + if (llGetSubString(desc, 0, 3) == "#LS#") { + list configList = llParseStringKeepNulls(desc, [";"], []); + if (on) { + color.x = (float)llList2String(configList, 1); + color.y = (float)llList2String(configList, 2); + color.z = (float)llList2String(configList, 3); + intensity = (float)llList2String(configList, 4); + radius = (float)llList2String(configList, 5); + falloff = (float)llList2String(configList, 6); + alpha = (float)llList2String(configList, 7); + glow = (float)llList2String(configList, 8); + fullbright = (integer)llList2String(configList, 9); + primColor.x = (float)llList2String(configList, 10); + primColor.y = (float)llList2String(configList, 11); + primColor.z = (float)llList2String(configList, 12); + particleColor.x = (float)llList2String(configList, 13); + particleColor.y = (float)llList2String(configList, 14); + particleColor.z = (float)llList2String(configList, 15); + particleSize = (integer)llList2String(configList, 16); + particleTexture = llList2String(configList, 17); + } + else { + color.x = (float)llList2String(configList, 18); + color.y = (float)llList2String(configList, 19); + color.z = (float)llList2String(configList, 20); + alpha = (float)llList2String(configList, 21); + glow = 0.0; + fullbright = FALSE; + primColor = color; + } + + list sendList = ["Default", on, color, intensity, radius, falloff, alpha, glow, fullbright, + primColor, particleColor, particleSize, 999, particleTexture, on]; + string sendMsg = llList2CSV(sendList); + llMessageLinked(LINK_ALL_OTHERS, switchChannel, sendMsg, ""); + } +} + +default +{ + state_entry() + { + switchLight(); + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + on = !on; + switchLight(); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/ext_switch_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/ext_switch_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/ext_switch_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/ext_switch_control.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/light_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/light_control.lsl new file mode 100644 index 00000000..fbbd75b9 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/light_control.lsl @@ -0,0 +1,98 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:08 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1771 +// :REV:1.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Light Control (light without bulbs) +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Light Control (light without bulbs) +// +// Author: Rene10957 Resident +// Date: 21-03-2014 +// +// Use together with switch and drop in the same prim +// No other scripts are needed +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +////////////////////////////////////////// +// Please read user manual before using // +////////////////////////////////////////// + +string title = "Light Control"; // title +string version = "1.1"; // version +integer silent = TRUE; // silent startup + +// Constants + +integer switchChannel = -10957; // switch channel + +// Functions + +string getGroup(integer link) +{ + list desc = llGetLinkPrimitiveParams(link, [PRIM_DESC]); + string str = llToLower(llStringTrim(llList2String(desc, 0), STRING_TRIM)); + if (str == "(no description)" || str == "") str = "default"; + return str; +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + string group = llToLower(llList2String(msgList, 0)); + integer on = (integer)llList2String(msgList, 1); + vector color = (vector)llList2String(msgList, 2); + float intensity = (float)llList2String(msgList, 3); + float radius = (float)llList2String(msgList, 4); + float falloff = (float)llList2String(msgList, 5); + float alpha = (float)llList2String(msgList, 6); + float glow = (float)llList2String(msgList, 7); + integer fullbright = (integer)llList2String(msgList, 8); + vector primColor = (vector)llList2String(msgList, 9); + + integer i; + integer number = llGetNumberOfPrims(); + integer link = llGetLinkNumber(); + + for (i = number; i >= 0; --i) { + if (group == getGroup(i)) { + if (i != link || i < 2) { + llSetLinkPrimitiveParamsFast(i, [ + PRIM_POINT_LIGHT, on, color, intensity, radius, falloff, + PRIM_COLOR, ALL_SIDES, primColor, alpha, + PRIM_GLOW, ALL_SIDES, glow, + PRIM_FULLBRIGHT, ALL_SIDES, fullbright]); + } + } + } +} + +default +{ + state_entry() + { + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == switchChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/light_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/light_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/light_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/light_control.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/link_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/link_control.lsl new file mode 100644 index 00000000..51a7277f --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/link_control.lsl @@ -0,0 +1,76 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:18 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1772 +// :REV:1.2 +// :WORLD:Opensim +// :DESCRIPTION: +// Link control (secondary switch) +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Link control (secondary switch) for Rene's Free Lighting System +// +// Author: Rene10957 Resident +// Date: 24-01-2014 +// +// Drop this in any prim (within the same linkset) you want to use as an extra on/off/menu switch +// Note: only useful if you need multiple switches for the same light group in LINKSET mode +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Link Control"; // title +string version = "1.2"; // version +integer silent = TRUE; // silent startup + +// Constants + +integer msgNumber = -975104; // number part of link message +string separator = ";;"; // separator for link messages + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +default +{ + state_entry() + { + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + llResetTime(); + } + + touch_end(integer total_number) + { + key user = llDetectedKey(0); + string command; + + if (llGetTime() > 1.0) command = "menu"; + else command = "switch"; + + list msgList = [getGroup(), command, user]; + string msgData = llDumpList2String(msgList, separator); + llMessageLinked(LINK_ALL_OTHERS, msgNumber, msgData, ""); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/link_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/link_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/link_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/link_control.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/link_receiver.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/link_receiver.lsl new file mode 100644 index 00000000..801629a2 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/link_receiver.lsl @@ -0,0 +1,71 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:20 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1773 +// :REV:1.2 +// :WORLD:Opensim +// :DESCRIPTION: +// Link receiver for Rene's Free Lighting System +// :CODE: +// :LICENSE: CC0 (Public Domain) + + +// +// Author: Rene10957 Resident +// Date: 24-01-2014 +// +// Drop this into the same prim where the SWITCH is located +// Note: only useful if you are also using the link control script +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Link Receiver"; // title +string version = "1.2"; // version +integer silent = TRUE; // silent startup + +// Constants + +integer msgIn = -975104; // number part of incoming link message +integer msgOut = 10957; // number part of outgoing link message +string separator = ";;"; // separator for link messages + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +default +{ + state_entry() + { + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number != msgIn) return; + + list msgList = llParseString2List(msg, [separator], []); + string group = llList2String(msgList, 0); + string command = llList2String(msgList, 1); + key user = (key)llList2String(msgList, 2); + + if (llToLower(group) == llToLower(getGroup())) llMessageLinked(LINK_THIS, msgOut, command, user); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/link_receiver.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/link_receiver.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/link_receiver.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/link_receiver.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/network_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_control.lsl new file mode 100644 index 00000000..2f879265 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/network_control.lsl @@ -0,0 +1,188 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:21 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1774 +// :REV:2.3.2 +// :WORLD:Opensim +// :DESCRIPTION: +// Drop this in any prim you want to use as a control panel +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Network control for Rene's Free Lighting System +// +// Author: Rene10957 Resident +// Date: 05-10-2014 +// +// Drop this in any prim you want to use as a control panel +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Network Control"; // title +string version = "2.3.2"; // version +integer linkSet = TRUE; // LINKSET mode +integer silent = TRUE; // silent startup + +// Constants + +float cDialogTime = 120.0; // dialog timeout = 2 minutes +float cReplyTime = 1.0; // reply timeout = 1 second +integer remoteChannel = -975103; // remote channel (send) +integer replyChannel = -975105; // reply channel (receive) +string separator = ";;"; // separator for link or region messages + +// Variables + +float time; // timer interval for multiple timers +float vReplyTime; // variable timeout for node discovery, ranging from 1 to 2 sec. +integer dialogChannel; // dialog channel +integer dialogHandle; // handle for dialog listener +integer replyHandle; // handle for reply listener +key owner; // object owner +key user; // key of last avatar to touch object +list networkNodes; // strided list of network nodes (object key, object name) +list menuButtons; // menu buttons (object names) + +// Functions + +list orderButtons(list buttons) +{ + return llList2List(buttons, -3, -1) + llList2List(buttons, -6, -4) + llList2List(buttons, -9, -7); +} + +float setTimer(float sec) +{ + llSetTimerEvent(0.0); + llSetTimerEvent(sec); + return sec; +} + +discoverNodes(key id) +{ + llWhisper(0, "Discovering network nodes..."); + networkNodes = []; + llListenRemove(replyHandle); + replyHandle = llListen(replyChannel, "", "", ""); + float pctlag = 100.0 * (1.0 - llGetRegionTimeDilation()); // try to work around time dilation + vReplyTime = cReplyTime + cReplyTime / 100.0 * pctlag; // (more lag = longer timeout) + time = setTimer(vReplyTime); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, "PING", llGetKey()); + else llRegionSay(remoteChannel, "PING"); +} + +menuDialog (key id) +{ + dialogChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(dialogHandle); + dialogHandle = llListen(dialogChannel, "", "", ""); + time = setTimer(cDialogTime); + llDialog(id, title + " " + version, menuButtons, dialogChannel); +} + +default +{ + state_entry() + { + owner = llGetOwner(); + if (linkSet) version += "-LINKSET"; + else version += "-REGION"; + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + user = llDetectedKey(0); + if (llGetListLength(networkNodes) == 0) discoverNodes(user); + else menuDialog(user); + } + + listen(integer channel, string name, key id, string msg) + { + integer length = llGetListLength(networkNodes) / 2; + + if (channel == replyChannel) { + if (llGetOwnerKey(id) != owner) return; + if (length > 8) return; + string shortName = llGetSubString(msg, 0, 23); + networkNodes += [id, shortName]; + } + else if (channel == dialogChannel) { + llSetTimerEvent(0); + llListenRemove(dialogHandle); + integer i; + integer index; + key target; + list msgList; + string msgData; + if (msg == "On") { + for (i = 0; i < length; ++i) { + target = llList2Key(networkNodes, i * 2); + msgList = [target, "on", id]; // id = user who opened the dialog + msgData = llDumpList2String(msgList, separator); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, msgData, ""); + else llRegionSayTo(target, remoteChannel, msgData); + } + menuDialog(id); + } + else if (msg == "Off") { + for (i = 0; i < length; ++i) { + target = llList2Key(networkNodes, i * 2); + msgList = [target, "off", id]; // id = user who opened the dialog + msgData = llDumpList2String(msgList, separator); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, msgData, ""); + else llRegionSayTo(target, remoteChannel, msgData); + } + menuDialog(id); + } + else if (msg == "Discover") { + discoverNodes(id); + } + else { + index = llListFindList(networkNodes, [msg]); + if (index > -1) { + target = llList2Key(networkNodes, index - 1); + msgList = [target, "menu", id]; // id = user who opened the dialog + msgData = llDumpList2String(msgList, separator); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, msgData, ""); + else llRegionSayTo(target, remoteChannel, msgData); + } + else { + llInstantMessage(id, "Unexpected error during object key lookup"); + menuDialog(id); + } + } + } + } + + timer() + { + llSetTimerEvent(0); + if (time == cDialogTime) { // dialog timeout + llListenRemove(dialogHandle); + } + else if (time == vReplyTime) { // remote timeout (variable!) + integer length = llGetListLength(networkNodes) / 2; + if (length == 1) llWhisper(0, "Node discovery completed (" + (string)length + " node)"); + else llWhisper(0, "Node discovery completed (" + (string)length + " nodes)"); + llListenRemove(replyHandle); + if (length > 0) { + menuButtons = llList2ListStrided(networkNodes, 1, -1, 2); + menuButtons = llListSort(menuButtons, 1, TRUE); // sort ascending + menuButtons = orderButtons(menuButtons); // reverse row order + menuButtons = ["On", "Off", "Discover"] + menuButtons; + if (user) menuDialog(user); + } + } + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/network_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/network_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/network_control.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/network_control_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_control_region.lsl new file mode 100644 index 00000000..48daf75c --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/network_control_region.lsl @@ -0,0 +1,188 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:22 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1775 +// :REV:2.3.2 +// :WORLD:Opensim +// :DESCRIPTION: +// Drop this in any prim you want to use as a control panel +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Network control for Rene's Free Lighting System +// +// Author: Rene10957 Resident +// Date: 05-10-2014 +// +// Drop this in any prim you want to use as a control panel +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Network Control"; // title +string version = "2.3.2"; // version +integer linkSet = FALSE; // REGION mode +integer silent = TRUE; // silent startup + +// Constants + +float cDialogTime = 120.0; // dialog timeout = 2 minutes +float cReplyTime = 1.0; // reply timeout = 1 second +integer remoteChannel = -975103; // remote channel (send) +integer replyChannel = -975105; // reply channel (receive) +string separator = ";;"; // separator for link or region messages + +// Variables + +float time; // timer interval for multiple timers +float vReplyTime; // variable timeout for node discovery, ranging from 1 to 2 sec. +integer dialogChannel; // dialog channel +integer dialogHandle; // handle for dialog listener +integer replyHandle; // handle for reply listener +key owner; // object owner +key user; // key of last avatar to touch object +list networkNodes; // strided list of network nodes (object key, object name) +list menuButtons; // menu buttons (object names) + +// Functions + +list orderButtons(list buttons) +{ + return llList2List(buttons, -3, -1) + llList2List(buttons, -6, -4) + llList2List(buttons, -9, -7); +} + +float setTimer(float sec) +{ + llSetTimerEvent(0.0); + llSetTimerEvent(sec); + return sec; +} + +discoverNodes(key id) +{ + llWhisper(0, "Discovering network nodes..."); + networkNodes = []; + llListenRemove(replyHandle); + replyHandle = llListen(replyChannel, "", "", ""); + float pctlag = 100.0 * (1.0 - llGetRegionTimeDilation()); // try to work around time dilation + vReplyTime = cReplyTime + cReplyTime / 100.0 * pctlag; // (more lag = longer timeout) + time = setTimer(vReplyTime); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, "PING", llGetKey()); + else llRegionSay(remoteChannel, "PING"); +} + +menuDialog (key id) +{ + dialogChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(dialogHandle); + dialogHandle = llListen(dialogChannel, "", "", ""); + time = setTimer(cDialogTime); + llDialog(id, title + " " + version, menuButtons, dialogChannel); +} + +default +{ + state_entry() + { + owner = llGetOwner(); + if (linkSet) version += "-LINKSET"; + else version += "-REGION"; + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + user = llDetectedKey(0); + if (llGetListLength(networkNodes) == 0) discoverNodes(user); + else menuDialog(user); + } + + listen(integer channel, string name, key id, string msg) + { + integer length = llGetListLength(networkNodes) / 2; + + if (channel == replyChannel) { + if (llGetOwnerKey(id) != owner) return; + if (length > 8) return; + string shortName = llGetSubString(msg, 0, 23); + networkNodes += [id, shortName]; + } + else if (channel == dialogChannel) { + llSetTimerEvent(0); + llListenRemove(dialogHandle); + integer i; + integer index; + key target; + list msgList; + string msgData; + if (msg == "On") { + for (i = 0; i < length; ++i) { + target = llList2Key(networkNodes, i * 2); + msgList = [target, "on", id]; // id = user who opened the dialog + msgData = llDumpList2String(msgList, separator); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, msgData, ""); + else llRegionSayTo(target, remoteChannel, msgData); + } + menuDialog(id); + } + else if (msg == "Off") { + for (i = 0; i < length; ++i) { + target = llList2Key(networkNodes, i * 2); + msgList = [target, "off", id]; // id = user who opened the dialog + msgData = llDumpList2String(msgList, separator); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, msgData, ""); + else llRegionSayTo(target, remoteChannel, msgData); + } + menuDialog(id); + } + else if (msg == "Discover") { + discoverNodes(id); + } + else { + index = llListFindList(networkNodes, [msg]); + if (index > -1) { + target = llList2Key(networkNodes, index - 1); + msgList = [target, "menu", id]; // id = user who opened the dialog + msgData = llDumpList2String(msgList, separator); + if (linkSet) llMessageLinked(LINK_ALL_OTHERS, remoteChannel, msgData, ""); + else llRegionSayTo(target, remoteChannel, msgData); + } + else { + llInstantMessage(id, "Unexpected error during object key lookup"); + menuDialog(id); + } + } + } + } + + timer() + { + llSetTimerEvent(0); + if (time == cDialogTime) { // dialog timeout + llListenRemove(dialogHandle); + } + else if (time == vReplyTime) { // remote timeout (variable!) + integer length = llGetListLength(networkNodes) / 2; + if (length == 1) llWhisper(0, "Node discovery completed (" + (string)length + " node)"); + else llWhisper(0, "Node discovery completed (" + (string)length + " nodes)"); + llListenRemove(replyHandle); + if (length > 0) { + menuButtons = llList2ListStrided(networkNodes, 1, -1, 2); + menuButtons = llListSort(menuButtons, 1, TRUE); // sort ascending + menuButtons = orderButtons(menuButtons); // reverse row order + menuButtons = ["On", "Off", "Discover"] + menuButtons; + if (user) menuDialog(user); + } + } + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/network_control_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_control_region.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/network_control_region.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/network_control_region.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver.lsl new file mode 100644 index 00000000..aed00781 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver.lsl @@ -0,0 +1,100 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:24 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1776 +// :REV:2.2.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Drop this into the same prim where the SWITCH is located +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Network receiver for Rene's Free Lighting System +// +// Author: Rene10957 Resident +// Date: 05-10-2014 +// +// Drop this into the same prim where the SWITCH is located +// Note: only useful if you are also using the network control script +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Network Receiver"; // title +string version = "2.2.1"; // version +integer linkSet = TRUE; // LINKSET mode +integer silent = TRUE; // silent startup + +// Constants + +integer remoteChannel = -975103; // remote channel +integer replyChannel = -975105; // reply channel +integer msgNumber = 10957; // number part of link message +string separator = ";;"; // separator for link or region messages + +// Variables + +key owner; // object owner + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +default +{ + state_entry() + { + owner = llGetOwner(); + if (linkSet) { + version += "-LINKSET"; + } + else { + version += "-REGION"; + llListen(remoteChannel, "", "", ""); + } + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number != remoteChannel) return; + if (msg == "PING") { + llRegionSayTo(id, replyChannel, getGroup()); + return; + } + list msgList = llParseString2List(msg, [separator], []); + key target = (key)llList2String(msgList, 0); + string command = llList2String(msgList, 1); + key user = (key)llList2String(msgList, 2); + if (target == llGetKey()) llMessageLinked(LINK_THIS, msgNumber, command, user); + } + + listen(integer channel, string name, key id, string msg) + { + if (channel != remoteChannel) return; + if (llGetOwnerKey(id) != owner) return; + if (msg == "PING") { + llRegionSayTo(id, replyChannel, getGroup()); + return; + } + list msgList = llParseString2List(msg, [separator], []); + string command = llList2String(msgList, 1); + key user = (key)llList2String(msgList, 2); + llMessageLinked(LINK_THIS, msgNumber, command, user); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/network_receiver.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/network_receiver.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver_region.lsl new file mode 100644 index 00000000..87beac9b --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver_region.lsl @@ -0,0 +1,101 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:33 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1777 +// :REV:2.2.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Drop this into the same prim where the SWITCH is located +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Network receiver for Rene's Free Lighting System +// +// Author: Rene10957 Resident +// Date: 05-10-2014 +// +// Drop this into the same prim where the SWITCH is located +// Note: only useful if you are also using the network control script +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Network Receiver"; // title +string version = "2.2.1"; // version +integer linkSet = FALSE; // REGION mode +integer silent = TRUE; // silent startup + +// Constants + +integer remoteChannel = -975103; // remote channel +integer replyChannel = -975105; // reply channel +integer msgNumber = 10957; // number part of link message +string separator = ";;"; // separator for link or region messages + +// Variables + +key owner; // object owner + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +default +{ + state_entry() + { + owner = llGetOwner(); + if (linkSet) { + version += "-LINKSET"; + } + else { + version += "-REGION"; + llListen(remoteChannel, "", "", ""); + } + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number != remoteChannel) return; + if (msg == "PING") { + llRegionSayTo(id, replyChannel, getGroup()); + return; + } + list msgList = llParseString2List(msg, [separator], []); + key target = (key)llList2String(msgList, 0); + string command = llList2String(msgList, 1); + key user = (key)llList2String(msgList, 2); + if (target == llGetKey()) llMessageLinked(LINK_THIS, msgNumber, command, user); + } + + listen(integer channel, string name, key id, string msg) + { + if (channel != remoteChannel) return; + if (llGetOwnerKey(id) != owner) return; + if (msg == "PING") { + llRegionSayTo(id, replyChannel, getGroup()); + return; + } + list msgList = llParseString2List(msg, [separator], []); + string command = llList2String(msgList, 1); + key user = (key)llList2String(msgList, 2); + llMessageLinked(LINK_THIS, msgNumber, command, user); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/network_receiver_region.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver_region.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/network_receiver_region.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/network_receiver_region.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/remote_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/remote_control.lsl new file mode 100644 index 00000000..3efc2f86 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/remote_control.lsl @@ -0,0 +1,75 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:35 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1778 +// :REV:1.1 +// :WORLD:Opensim +// :DESCRIPTION: +// Drop this in an external prim you want to use as an extra on/off/menu switch +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Remote control (secondary switch) for Rene's Free Lighting System +// +// Author: Rene10957 Resident +// Date: 24-01-2014 +// +// Drop this in an external prim you want to use as an extra on/off/menu switch +// Note: only useful if you need multiple switches for the same light group in REGION mode +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Remote Control"; // title +string version = "1.1"; // version +integer silent = TRUE; // silent startup + +// Constants + +integer remoteChannel = -975104; // remote channel +string separator = ";;"; // separator for region messages + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +default +{ + state_entry() + { + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + llResetTime(); + } + + touch_end(integer total_number) + { + key user = llDetectedKey(0); + string command; + + if (llGetTime() > 1.0) command = "menu"; + else command = "switch"; + + list msgList = [getGroup(), command, user]; + string msgData = llDumpList2String(msgList, separator); + llRegionSay(remoteChannel, msgData); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/remote_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/remote_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/remote_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/remote_control.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/remote_receiver.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/remote_receiver.lsl new file mode 100644 index 00000000..1e07b239 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/remote_receiver.lsl @@ -0,0 +1,71 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:37 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1779 +// :REV:1.1 +// :WORLD:Second Life +// :DESCRIPTION: +// Drop this into the same prim where the SWITCH is located +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Remote receiver for Rene's Free Lighting System +// +// Author: Rene10957 Resident +// Date: 24-01-2014 +// +// Drop this into the same prim where the SWITCH is located +// Note: only useful if you are also using the remote control script +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +string title = "Remote Receiver"; // title +string version = "1.1"; // version +integer silent = TRUE; // silent startup + +// Constants + +integer remoteChannel = -975104; // remote channel +integer msgNumber = 10957; // number part of link message +string separator = ";;"; // separator for region messages + +// Functions + +string getGroup() +{ + string str = llStringTrim(llGetObjectDesc(), STRING_TRIM); + if (llToLower(str) == "(no description)" || str == "") str = "Default"; + return str; +} + +default +{ + state_entry() + { + llListen(remoteChannel, "", "", ""); + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + listen(integer channel, string name, key id, string msg) + { + if (channel != remoteChannel) return; + + list msgList = llParseString2List(msg, [separator], []); + string group = llList2String(msgList, 0); + string command = llList2String(msgList, 1); + key user = (key)llList2String(msgList, 2); + + if (llToLower(group) == llToLower(getGroup())) llMessageLinked(LINK_THIS, msgNumber, command, user); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/remote_receiver.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/remote_receiver.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/remote_receiver.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/remote_receiver.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/controls/switch_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/switch_control.lsl new file mode 100644 index 00000000..1f3259f2 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/controls/switch_control.lsl @@ -0,0 +1,115 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:39 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1780 +// :REV:1 +// :WORLD:Second Life +// :DESCRIPTION: +// Drop in any prim and touch for on/off +// :CODE: + +// Each prim in a link set that has a Description of #LS# will become a light. This is the switch + +//:LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Switch Control +// +// Drop in any prim and touch for on/off +// No switch or light scripts are needed +// License: CC0 (Public Domain). +// To the extent possible under law, Rene10957 has waived all copyright and related or neighboring rights. +// For more information, see http://creativecommons.org/publicdomain/zero/1.0/. + + +////////////////////////////////////////// +// Please read user manual before using // +////////////////////////////////////////// + +string title = "Switch Control"; // title +string version = "1.0"; // version +integer silent = TRUE; // silent startup + +// Variables + +integer on = FALSE; // on-off switch + +// Functions + +switchLight() +{ + string desc; + list descList; + list configList; + vector color; + vector primColor; + float intensity; + float radius; + float falloff; + float alpha; + float glow; + integer fullbright; + + integer i; + integer number = llGetNumberOfPrims(); + + for (i = number; i >= 0; --i) { + descList = llGetLinkPrimitiveParams(i, [PRIM_DESC]); + desc = llList2String(descList, 0); + if (llGetSubString(desc, 0, 3) == "#LS#") { + configList = llParseStringKeepNulls(desc, [";"], []); + if (on) { + color.x = (float)llList2String(configList, 1); + color.y = (float)llList2String(configList, 2); + color.z = (float)llList2String(configList, 3); + intensity = (float)llList2String(configList, 4); + radius = (float)llList2String(configList, 5); + falloff = (float)llList2String(configList, 6); + alpha = (float)llList2String(configList, 7); + glow = (float)llList2String(configList, 8); + fullbright = (integer)llList2String(configList, 9); + primColor.x = (float)llList2String(configList, 10); + primColor.y = (float)llList2String(configList, 11); + primColor.z = (float)llList2String(configList, 12); + } + else { + color.x = (float)llList2String(configList, 13); + color.y = (float)llList2String(configList, 14); + color.z = (float)llList2String(configList, 15); + alpha = (float)llList2String(configList, 16); + glow = 0.0; + fullbright = FALSE; + primColor = color; + } + llSetLinkPrimitiveParamsFast(i, [ + PRIM_POINT_LIGHT, on, color, intensity, radius, falloff, + PRIM_COLOR, ALL_SIDES, primColor, alpha, + PRIM_GLOW, ALL_SIDES, glow, + PRIM_FULLBRIGHT, ALL_SIDES, fullbright]); + } + } +} + +default +{ + state_entry() + { + switchLight(); + if (!silent) llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + on = !on; + switchLight(); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/controls/switch_control.lsl b/Rene Free Lighting System/Renes Free Lighting System/controls/switch_control.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/controls/switch_control.lsl rename to Rene Free Lighting System/Renes Free Lighting System/controls/switch_control.lsl.bak diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/history.txt b/Rene Free Lighting System/Renes Free Lighting System/history.txt similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/history.txt rename to Rene Free Lighting System/Renes Free Lighting System/history.txt diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/license.txt b/Rene Free Lighting System/Renes Free Lighting System/license.txt similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/license.txt rename to Rene Free Lighting System/Renes Free Lighting System/license.txt diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_bling.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_bling.lsl new file mode 100644 index 00000000..cda4f44c --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_bling.lsl @@ -0,0 +1,188 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:58 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1791 +// :REV:1.4 +// :WORLD:Opensim +// :DESCRIPTION: +// Particle Plugin "Bling" +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Particle Plugin "Bling" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Bling"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 2.0; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 0.3; // particle lifetime +float rate = 5.0; // particle burst rate +integer count = 1; // particle count +vector startScale = <0.2, 0.04, 0.0>; // particle start size +vector endScale = <0.0, 0.2, 0.0>; // particle end size +float minSpeed = 0.1; // particle min. burst speed +float maxSpeed = 0.1; // particle max. burst speed +float burstRadius = 0.0; // particle burst radius +vector partAccel = <0.0, 0.0, 0.5>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, color, + PSYS_PART_START_ALPHA, 1.0, + PSYS_PART_END_ALPHA, 1.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_BOUNCE_MASK | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_FOLLOW_VELOCITY_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK | + PSYS_PART_TARGET_POS_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_bling.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_bling.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_bling.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_bling.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl new file mode 100644 index 00000000..d6567d8d --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl @@ -0,0 +1,187 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:59 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1792 +// :REV:1.4 +// :WORLD:Opensim +// :DESCRIPTION: +// Particle Plugin "Candle flame dirty wick" +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Rene's Free Lighting System - Particle Plugin "Candle flame dirty wick" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Candle flame dirty wick"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 0.4; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 1.0; // particle lifetime +float rate = 0.01; // particle burst rate +integer count = 1; // particle count +vector startScale = <0.05, 0.1, 0.0>; // particle start size +vector endScale = <0.0, 0.0, 0.0>; // particle end size +float minSpeed = 0.02; // particle min. burst speed +float maxSpeed = 0.25; // particle max. burst speed +float burstRadius = 0.0; // particle burst radius +vector partAccel = <0.0, 0.0, 0.0>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, <1.0, 0.25, 0.0>, + PSYS_PART_START_ALPHA, 0.5, + PSYS_PART_END_ALPHA, 0.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_OMEGA, <0.02, 0.02, 2.0>, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_FOLLOW_SRC_MASK | + PSYS_PART_FOLLOW_VELOCITY_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_dirty_wick.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_sensual.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_sensual.lsl new file mode 100644 index 00000000..91a288b6 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_sensual.lsl @@ -0,0 +1,187 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:42:00 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1793 +// :REV:1.4 +// :WORLD:Opensim +// :DESCRIPTION: +// - Particle Plugin "Candle flame sensual" +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Rene's Free Lighting System - Particle Plugin "Candle flame sensual" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Candle flame sensual"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 0.4; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 1.0; // particle lifetime +float rate = 0.01; // particle burst rate +integer count = 1; // particle count +vector startScale = <0.05, 0.1, 0.0>; // particle start size +vector endScale = <0.0, 0.0, 0.0>; // particle end size +float minSpeed = 0.1; // particle min. burst speed +float maxSpeed = 0.1; // particle max. burst speed +float burstRadius = 0.0; // particle burst radius +vector partAccel = <0.0, 0.0, 0.0>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, <1.0, 0.25, 0.0>, + PSYS_PART_START_ALPHA, 0.5, + PSYS_PART_END_ALPHA, 0.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_OMEGA, <0.02, 0.02, 0.4>, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_FOLLOW_SRC_MASK | + PSYS_PART_FOLLOW_VELOCITY_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_sensual.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_sensual.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_sensual.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_sensual.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_simple.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_simple.lsl new file mode 100644 index 00000000..c15fc72b --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_simple.lsl @@ -0,0 +1,188 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:42:01 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1794 +// :REV:1 +// :WORLD:Opensim +// :DESCRIPTION: +// - Particle Plugin "Candle flame simple" +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Particle Plugin "Candle flame simple" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Candle flame simple"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 0.4; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 1.0; // particle lifetime +float rate = 0.01; // particle burst rate +integer count = 1; // particle count +vector startScale = <0.05, 0.1, 0.0>; // particle start size +vector endScale = <0.0, 0.0, 0.0>; // particle end size +float minSpeed = 0.1; // particle min. burst speed +float maxSpeed = 0.1; // particle max. burst speed +float burstRadius = 0.0; // particle burst radius +vector partAccel = <0.0, 0.0, 0.0>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, <1.0, 0.25, 0.0>, + PSYS_PART_START_ALPHA, 0.5, + PSYS_PART_END_ALPHA, 0.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_OMEGA, <0.01, 0.01, 0.2>, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_FOLLOW_SRC_MASK | + PSYS_PART_FOLLOW_VELOCITY_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_simple.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_simple.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_candle_simple.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_candle_simple.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_fire.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_fire.lsl new file mode 100644 index 00000000..1518e11b --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_fire.lsl @@ -0,0 +1,184 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:42:02 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1795 +// :REV:1 +// :WORLD:Opensim +// :DESCRIPTION: +// - Particle Plugin "Fire" +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Rene's Free Lighting System - Particle Plugin "Fire" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Fire"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 1.0; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 1.0; // particle lifetime +float rate = 0.1; // particle burst rate +integer count = 10; // particle count +vector startScale = <0.1, 0.5, 0.0>; // particle start size +vector endScale = <0.1, 0.5, 0.0>; // particle end size +float minSpeed = 0.0; // particle min. burst speed +float maxSpeed = 0.01; // particle max. burst speed +float burstRadius = 0.1; // particle burst radius +vector partAccel = <0.0, 0.0, 2.5>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, <1.0, 0.0, 0.0>, + PSYS_PART_START_ALPHA, 1.0, + PSYS_PART_END_ALPHA, 0.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_fire.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_fire.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_fire.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_fire.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_halo.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_halo.lsl new file mode 100644 index 00000000..58f5d7a3 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_halo.lsl @@ -0,0 +1,186 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:42:03 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1796 +// :REV:1 +// :WORLD:Opensim +// :DESCRIPTION: +// - Particle Plugin "Halo" +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Particle Plugin "Halo" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Halo"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 4.0; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 1.5; // particle lifetime +float rate = 0.05; // particle burst rate +integer count = 1; // particle count +vector startScale = <0.0, 0.0, 0.0>; // particle start size +vector endScale = <2.0, 2.0, 0.0>; // particle end size +float minSpeed = 0.0; // particle min. burst speed +float maxSpeed = 0.0; // particle max. burst speed +float burstRadius = 0.0; // particle burst radius +vector partAccel = <0.0, 0.0, 0.0>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, color, + PSYS_PART_START_ALPHA, 0.5, + PSYS_PART_END_ALPHA, 0.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_FOLLOW_SRC_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_halo.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_halo.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_halo.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_halo.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starbling.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starbling.lsl new file mode 100644 index 00000000..1b4be9ac --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starbling.lsl @@ -0,0 +1,187 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:42:04 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1797 +// :REV:1 +// :WORLD:Opensim +// :DESCRIPTION: +// - Particle Plugin "Starbling" +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Particle Plugin "Starbling" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Starbling"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 4.0; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 1.0; // particle lifetime +float rate = 5.0; // particle burst rate +integer count = 25; // particle count +vector startScale = <0.1, 1.0, 0.0>; // particle start size +vector endScale = <0.1, 1.0, 0.0>; // particle end size +float minSpeed = 0.1; // particle min. burst speed +float maxSpeed = 0.1; // particle max. burst speed +float burstRadius = 0.0; // particle burst radius +vector partAccel = <0.0, 0.0, 0.0>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, color, + PSYS_PART_START_ALPHA, 0.5, + PSYS_PART_END_ALPHA, 0.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_FOLLOW_SRC_MASK | + PSYS_PART_FOLLOW_VELOCITY_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_starbling.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starbling.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_starbling.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starbling.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starburst.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starburst.lsl new file mode 100644 index 00000000..777a6de3 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starburst.lsl @@ -0,0 +1,187 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:42:06 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1798 +// :REV:1.4 +// :WORLD:Opensim +// :DESCRIPTION: +// Particle Plugin "Starburst" +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - Particle Plugin "Starburst" +// +// Author: Rene10957 Resident +// Date: 21-03-2014 + +//////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the LIGHT is located // +//////////////////////////////////////////////////////////////////////////////// + +string title = "Particle Plugin"; // title +string name = "Starburst"; // name +string version = "1.4"; // version +integer silent = TRUE; // silent startup + +// Constants + +// Note: the official upper limit for particles is 4.0 meters but for more delicate particle effects +// it can be useful to set maxScale to a lower value, in order to achieve more fine-grained control. + +integer particleChannel = -75901; // particle channel +integer feedbackChannel = -57910; // feedback channel +float minScale = 0.03125; // min. startScale or endScale +float maxScale = 4.0; // max. startScale or endScale + +// Particle parameters + +// Note: startScale and endScale are not actual sizes, but more like aspect ratios. +// The real size is determined by particleSize in the notecard, a percentage of maxScale. + +float age = 1.0; // particle lifetime +float rate = 0.1; // particle burst rate +integer count = 5; // particle count +vector startScale = <0.1, 1.0, 0.0>; // particle start size +vector endScale = <0.1, 1.0, 0.0>; // particle end size +float minSpeed = 0.1; // particle min. burst speed +float maxSpeed = 0.1; // particle max. burst speed +float burstRadius = 0.0; // particle burst radius +vector partAccel = <0.0, 0.0, 0.0>; // particle accelleration + +// Variables + +float particleSize; // particle size (percentage) +float defParticleSize; // default particle size (percentage) +float minParticleSize; // minimum particle size (percentage) + +// Functions + +startParticles(vector color, vector start, vector end, float min, float max, float radius, vector push, string txtr) +{ + llParticleSystem([ + PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, + PSYS_PART_START_COLOR, color, + PSYS_PART_END_COLOR, color, + PSYS_PART_START_ALPHA, 0.5, + PSYS_PART_END_ALPHA, 0.0, + PSYS_PART_START_SCALE, start, + PSYS_PART_END_SCALE, end, + PSYS_PART_MAX_AGE, age, + PSYS_SRC_BURST_RATE, rate, + PSYS_SRC_BURST_PART_COUNT, count, + PSYS_SRC_BURST_SPEED_MIN, min, + PSYS_SRC_BURST_SPEED_MAX, max, + PSYS_SRC_BURST_RADIUS, radius, + PSYS_SRC_ACCEL, push, + PSYS_SRC_TEXTURE, txtr, + PSYS_PART_FLAGS, + 0 | + PSYS_PART_EMISSIVE_MASK | + PSYS_PART_FOLLOW_SRC_MASK | + PSYS_PART_FOLLOW_VELOCITY_MASK | + PSYS_PART_INTERP_COLOR_MASK | + PSYS_PART_INTERP_SCALE_MASK ]); +} + +///////////////////////////////////////////////////////////////// +// From this point onwards, every particle script is identical // +///////////////////////////////////////////////////////////////// + +// Particle size = largest dimension across both scale vectors + +float getParticleSize (vector start, vector end) +{ + float max = 0.0; + if (start.x > max) max = start.x; + if (start.y > max) max = start.y; + if (end.x > max) max = end.x; + if (end.y > max) max = end.y; + return max / (maxScale / 100.0); +} + +// Particle size is too small if both start.x and end.x < minScale (0.03125), or... +// both start.y and end.y < minScale (0.03125) + +float getMinSize (vector start, vector end, float size) +{ + float maxX = 0.0; + float maxY = 0.0; + float minXY = 0.0; + + if (start.x < minScale && end.x < minScale) { + if (start.x > end.x) maxX = start.x; + else maxX = end.x; + } + + if (start.y < minScale && end.y < minScale) { + if (start.y > end.y) maxY = start.y; + else maxY = end.y; + } + + if (maxX == 0.0 && maxY == 0.0) return size; + + if (maxX == 0.0) minXY = maxY; + else if (maxY == 0.0) minXY = maxX; + else if (maxX < maxY) minXY = maxX; + else minXY = maxY; + + return (float)llCeil((minScale / minXY) * size); +} + +unpackMessage(string msg) +{ + list msgList = llCSV2List(msg); + + integer on = (integer)llList2String(msgList, 0); // particles on/off + vector color = (vector)llList2String(msgList, 1); // particle color + float size = (float)llList2String(msgList, 2); // particle size (%) from notecard + float inc = (float)llList2String(msgList, 3); // particle increase/decrease (%) from menu + string texture = llList2String(msgList, 4); // particle texture from notecard + + if (inc == 999) particleSize = size; // reset particle size + else particleSize += inc; // increase/decrease particle size + if (particleSize < 1) particleSize = 1; // correct if size < 1% + else if (particleSize > 100) particleSize = 100; // correct if size > 100% + if (particleSize < minParticleSize) particleSize = minParticleSize; // correct undersized particles + + if (on) { + vector start = startScale / defParticleSize * particleSize; // start scale + vector end = endScale / defParticleSize * particleSize; // end scale + float min = minSpeed / defParticleSize * particleSize; // equally resize min. burst speed + float max = maxSpeed / defParticleSize * particleSize; // equally resize max. burst speed + float radius = burstRadius / defParticleSize * particleSize; // equally resize burst radius + vector push = partAccel / defParticleSize * particleSize; // equally resize accelleration + startParticles(color, start, end, min, max, radius, push, texture); + } + else { + llParticleSystem([]); + } +} + +default +{ + state_entry() + { + defParticleSize = getParticleSize(startScale, endScale); // default particle size (percentage) + vector start = startScale / defParticleSize; // start scale = 1% + vector end = endScale / defParticleSize; // end scale = 1% + minParticleSize = getMinSize(start, end, 1.0); // minimum particle size (percentage) + if (!silent) llWhisper(0, title + " \"" + name + "\" " + version + " ready"); + llMessageLinked(LINK_THIS, feedbackChannel, "READY", ""); // request particle info from light script + } + + on_rez(integer start_param) + { + llResetScript(); + } + + link_message(integer sender_number, integer number, string msg, key id) + { + if (number == particleChannel) unpackMessage(msg); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_starburst.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starburst.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - light/particle_starburst.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - light/particle_starburst.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/nightlight.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/nightlight.lsl new file mode 100644 index 00000000..dfcbd970 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/nightlight.lsl @@ -0,0 +1,48 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:56 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1789 +// :REV:1 +// :WORLD:Second Life +// :DESCRIPTION: +// Nightlight switch: drop this script into the same prim where the SWITCH is located +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Night light plugin for Rene's Free Lighting System +// A simple example script for creating your own plugin +// +// Automatically switches on at sunset and off at sunrise + +///////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the SWITCH is located // +///////////////////////////////////////////////////////////////////////////////// + +key owner; // object owner +integer number = 10957; // number part of link message + +default +{ + state_entry() + { + owner = llGetOwner(); + llSetTimerEvent(300); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + timer() + { + vector sun = llGetSunDirection(); + if (sun.z < 0) llMessageLinked(LINK_THIS, number, "on", owner); + else llMessageLinked(LINK_THIS, number, "off", owner); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - switch/nightlight.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/nightlight.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - switch/nightlight.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - switch/nightlight.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/proximity.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/proximity.lsl new file mode 100644 index 00000000..a9cec0ac --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/proximity.lsl @@ -0,0 +1,59 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:57 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1790 +// :REV:1 +// :WORLD:Second Life +// :DESCRIPTION: +// Proximity Switch: drop this script into the same prim where the SWITCH is located +// :CODE: +// :LICENSE: CC0 (Public Domain) +// Proximity light plugin for Rene's Free Lighting System +// A simple example script for creating your own plugin +// +// Automatically switches on when an avatar comes within 10 meters +// Automatically switches off after one minute when no avatars are in range + +///////////////////////////////////////////////////////////////////////////////// +// HOW TO USE: drop this script into the same prim where the SWITCH is located // +///////////////////////////////////////////////////////////////////////////////// + +key owner; // object owner +integer number = 10957; // number part of link message +float range = 10.0; // scan range in meters +float rate = 10.0; // scan rate in seconds + +default +{ + state_entry() + { + owner = llGetOwner(); + llSensorRepeat("", "", AGENT_BY_USERNAME, range, PI, rate); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + sensor(integer total_number) + { + rate = 60.0; + llMessageLinked(LINK_THIS, number, "on", owner); + llSensorRemove(); + llSensorRepeat("", "", AGENT_BY_USERNAME, range, PI, rate); + } + + no_sensor() + { + rate = 10.0; + llMessageLinked(LINK_THIS, number, "off", owner); + llSensorRemove(); + llSensorRepeat("", "", AGENT_BY_USERNAME, range, PI, rate); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/plugins - switch/proximity.lsl b/Rene Free Lighting System/Renes Free Lighting System/plugins - switch/proximity.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/plugins - switch/proximity.lsl rename to Rene Free Lighting System/Renes Free Lighting System/plugins - switch/proximity.lsl.bak diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/readme.txt b/Rene Free Lighting System/Renes Free Lighting System/readme.txt similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/readme.txt rename to Rene Free Lighting System/Renes Free Lighting System/readme.txt diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/textures/glow_large.png b/Rene Free Lighting System/Renes Free Lighting System/textures/glow_large.png similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/textures/glow_large.png rename to Rene Free Lighting System/Renes Free Lighting System/textures/glow_large.png diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/textures/glow_medium.png b/Rene Free Lighting System/Renes Free Lighting System/textures/glow_medium.png similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/textures/glow_medium.png rename to Rene Free Lighting System/Renes Free Lighting System/textures/glow_medium.png diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/textures/glow_small.png b/Rene Free Lighting System/Renes Free Lighting System/textures/glow_small.png similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/textures/glow_small.png rename to Rene Free Lighting System/Renes Free Lighting System/textures/glow_small.png diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/textures/pixie_large.png b/Rene Free Lighting System/Renes Free Lighting System/textures/pixie_large.png similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/textures/pixie_large.png rename to Rene Free Lighting System/Renes Free Lighting System/textures/pixie_large.png diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/textures/pixie_medium.png b/Rene Free Lighting System/Renes Free Lighting System/textures/pixie_medium.png similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/textures/pixie_medium.png rename to Rene Free Lighting System/Renes Free Lighting System/textures/pixie_medium.png diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/textures/pixie_small.png b/Rene Free Lighting System/Renes Free Lighting System/textures/pixie_small.png similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/textures/pixie_small.png rename to Rene Free Lighting System/Renes Free Lighting System/textures/pixie_small.png diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/textures/star.png b/Rene Free Lighting System/Renes Free Lighting System/textures/star.png similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/textures/star.png rename to Rene Free Lighting System/Renes Free Lighting System/textures/star.png diff --git a/Rene Free Lighting System/Renes Free Lighting System/tools/color_converter.lsl b/Rene Free Lighting System/Renes Free Lighting System/tools/color_converter.lsl new file mode 100644 index 00000000..9d381381 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/tools/color_converter.lsl @@ -0,0 +1,82 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:52 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1786 +// :REV:1 +// :WORLD:Second Life +// :DESCRIPTION: +// RGB to LSL color conversion +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Rene's Free Lighting System - RGB to LSL color conversion +// +// Author: Rene10957 Resident +// Date: 12-01-2014 +// +// Rez a cube, drop the script in it and touch it +// Enter the resulting color vector into the notecard next to "colorOn" or "colorOff" + +string title = "Color converter"; // title +string version = "1.0"; // version + +// Variables + +integer boxChannel; // text box channel +integer boxHandle; // handle for text box listener + +default +{ + state_entry() + { + llWhisper(0, title + " " + version + " ready"); + } + + on_rez(integer start_param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + boxChannel = (integer)(llFrand(-1000000000.0) - 1000000000.0); + llListenRemove(boxHandle); + boxHandle = llListen(boxChannel, "", "", ""); + llSetTimerEvent(0); + llSetTimerEvent(120); + llTextBox(llDetectedKey(0), "\nEnter RGB color as \ne.g. <255,0,0> for red", boxChannel); + } + + listen(integer channel, string name, key id, string msg) + { + if (channel != boxChannel) return; + llSetTimerEvent(0); + llListenRemove(boxHandle); + + vector rgb = (vector)msg; + vector lsl = rgb / 255.0; + vector per = lsl * 100.0; + per.x = (float)llRound(per.x); + per.y = (float)llRound(per.y); + per.z = (float)llRound(per.z); + + llOwnerSay("RGB color = " + "< " + (string)((integer)rgb.x) + ", " + + (string)((integer)rgb.y) + ", " + (string)((integer)rgb.z) + " >"); + llOwnerSay("LSL color = " + "< " + (string)lsl.x + ", " + + (string)lsl.y + ", " + (string)lsl.z + " >"); + llOwnerSay("Notecard color = " + "< " + (string)((integer)per.x) + ", " + + (string)((integer)per.y) + ", " + (string)((integer)per.z) + " >"); + } + + timer() + { + llSetTimerEvent(0); + llListenRemove(boxHandle); + llOwnerSay("Text box timeout"); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/tools/color_converter.lsl b/Rene Free Lighting System/Renes Free Lighting System/tools/color_converter.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/tools/color_converter.lsl rename to Rene Free Lighting System/Renes Free Lighting System/tools/color_converter.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/tools/face_picker.lsl b/Rene Free Lighting System/Renes Free Lighting System/tools/face_picker.lsl new file mode 100644 index 00000000..cc06da17 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/tools/face_picker.lsl @@ -0,0 +1,27 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:53 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1787 +// :REV:1 +// :WORLD:Second Life +// :DESCRIPTION: +// Face picker: identify face numbers by touch +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Face picker: identify face numbers by touch + +default +{ + touch_start(integer total_number) + { + integer face = llDetectedTouchFace(0); + if (face == TOUCH_INVALID_FACE) llOwnerSay("Viewer does not support touched faces"); + else llOwnerSay("Face " + (string)face); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/tools/face_picker.lsl b/Rene Free Lighting System/Renes Free Lighting System/tools/face_picker.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/tools/face_picker.lsl rename to Rene Free Lighting System/Renes Free Lighting System/tools/face_picker.lsl.bak diff --git a/Rene Free Lighting System/Renes Free Lighting System/tools/remove_floating_text.lsl b/Rene Free Lighting System/Renes Free Lighting System/tools/remove_floating_text.lsl new file mode 100644 index 00000000..93bbca65 --- /dev/null +++ b/Rene Free Lighting System/Renes Free Lighting System/tools/remove_floating_text.lsl @@ -0,0 +1,26 @@ +// :SHOW:1 +// :CATEGORY:Light +// :NAME:Rene Free Lighting System +// :AUTHOR:Rene10957 Resident +// :KEYWORDS: light,lamp,lighting light +// :CREATED:2015-06-11 14:41:54 +// :EDITED:2016-03-30 20:29:28 +// :ID:1079 +// :NUM:1788 +// :REV:1 +// :WORLD:Opensim +// :DESCRIPTION: +// Removes floating text and then removes itself +// :CODE: +// :LICENSE: CC0 (Public Domain) + +// Removes floating text and then removes itself + +default +{ + state_entry() + { + llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_TEXT, "", ZERO_VECTOR, 0.0]); + llRemoveInventory(llGetScriptName()); + } +} diff --git a/Rene's Free Lighting System/Rene's Free Lighting System/tools/remove_floating_text.lsl b/Rene Free Lighting System/Renes Free Lighting System/tools/remove_floating_text.lsl.bak similarity index 100% rename from Rene's Free Lighting System/Rene's Free Lighting System/tools/remove_floating_text.lsl rename to Rene Free Lighting System/Renes Free Lighting System/tools/remove_floating_text.lsl.bak diff --git a/Rene's Free Lighting System/Rene's Free Lighting System.sol b/Rene's Free Lighting System/Rene's Free Lighting System.sol deleted file mode 100644 index eb25679b..00000000 --- a/Rene's Free Lighting System/Rene's Free Lighting System.sol +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Skirt Builder/Skirt Builder.sol b/Skirt Builder/Skirt Builder.sol new file mode 100644 index 00000000..0a61f7ea --- /dev/null +++ b/Skirt Builder/Skirt Builder.sol @@ -0,0 +1,3 @@ + + + diff --git a/Skirt Builder/Skirt Builder/Skirt Builder.prj b/Skirt Builder/Skirt Builder/Skirt Builder.prj new file mode 100644 index 00000000..0a7cc0cf --- /dev/null +++ b/Skirt Builder/Skirt Builder/Skirt Builder.prj @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/Skirt Builder/Skirt Builder/Skirt Builder/pose stand script.lsl b/Skirt Builder/Skirt Builder/Skirt Builder/pose stand script.lsl new file mode 100644 index 00000000..ce62dc35 --- /dev/null +++ b/Skirt Builder/Skirt Builder/Skirt Builder/pose stand script.lsl @@ -0,0 +1,492 @@ +// +// Copyright (c) 2007 Dalien Talbot and few other folks thanks to whom this exists: +// +// Vint Falken, of course - the inspiration, pushing me to the idea, testing, and finding the software bugs :-) +// LSL wiki - the function reference +// Posing stand code - unknown author +// LoopRez v0.6, by Ged Larsen, 20 December 2006 - the math for placement of the skirt prims +// +// This work is distributed "as-is" with no warranty whatsoever. +// +// +// It is distributed under GPL license. Please have a look at the "EULA" and the "GNU License" notecards in the inventory +// to get familiar with the terms and conditions. +// +// All the derivatives of this work obviously have to comply with the GPL as well. Contact me (Dalien Talbot) if you require alternative licensing. +// +// + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// NOTE: +// Unless you know what you are doing, do NOT change anything below ! +// +// The standard consulting fees mentioned in the manual will apply for the works on fixing the breakages :-) +// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +key mkLoungingAgentKey = NULL_KEY; +integer miPermissionsAcquired = FALSE; +vector vLoungeTarget = <0.00, 0.00, 1.50>; +vector myPos; + +// prim constants +integer PRIM_FIRSTMISC = -10; + +integer PRIM_CONTROL = -10; +integer PRIM_LINKCENTER = -11; +integer PRIM_GEOMETRY = -12; + +// pseudo constant - this is the last misc prim number +integer PRIM_LASTMISC = -12; + +//////////////////////////////////////////////////////////////////////////////// +// CONFIGURATION PARAMETERS for the looprez, these will be changed by the gui editor elements + +string objectName = "prim"; // object to use; will need to be in the inventory of the prim containing this script +integer numObjects = 12; // how many objects +float xRadius = .05; // waist ellipse x-axis radius in meters +float yRadius = .07; // waist ellipse y-axis radius in meters +float flareAngle = 45.0; // how many DEGREES the bottom of object will flare outwards, the "poof" factor +float bendCoefficient = 0.0; // makes a "saddle shape", bends DOWN this number of meters at extremes of X-axis +vector rotOffset = <0.0, 180.0, 0.0>; // rotation offset in DEGREES -- fixes the rotation of ALL objects; for flexi prims, often you will want <180.0, 0.0, 0.0> +vector posOffset = <0.0, 0.0, 1.0>; // position offset + +// channel to talk to the prims +integer commChannelBase = 0; + + +integer CHANNEL = 77; // dialog channel +list MENU_MAIN = ["More", "Less", "Rez...", "News..."]; // the main menu + +// 0: default state, selecting the number of prims/allowing to rez +// 1: objects are rezzing +// 2: objects have rezzed, tweaking + +integer script_state = 0; + +// iterator - runs while rezzing through the whole range, to make the process sequential +integer current_rez_prim_num = 0; + +// string with all the init parameters that are same for all the prims +string init_string = ""; + +show_main_dialog() +{ + list menu = MENU_MAIN; + if (script_state == 2) { + menu = menu + [ "Wipe all...", "Link..." ]; + } + llDialog(llGetOwner(), "Number of prims: " + (string)numObjects, menu, CHANNEL); +} + +rez_one_prim() +{ + + vector pos = llGetPos() + posOffset; + // the master prim + if (current_rez_prim_num == PRIM_CONTROL) { + // control prim + pos+= <0, 1.5, 0.5>; + } else if (current_rez_prim_num == PRIM_LINKCENTER) { + // linkage prim + } else if (current_rez_prim_num == PRIM_GEOMETRY) { + // radius/tilt control prim - on the right + pos = pos + <0, -1.5, 0.5>; + } + + llRezObject(objectName, pos, ZERO_VECTOR, ZERO_ROTATION, commChannelBase); +} + + +make_init_string() +{ + init_string = llDumpList2String([myPos, numObjects, xRadius, yRadius, flareAngle, bendCoefficient, rotOffset, posOffset], ":"); +} + +reposition_all() +{ + + make_init_string(); + //for(i=0; i= PRIM_LASTMISC) { + check_or_rez_next_misc_prim(); + + } else { + // done with rezzing all the prims + llSetTimerEvent(0); + llOwnerSay("Rezzed all " + (string)numObjects + " prims, please edit the prims on the left and right to edit the skirt, when done, click the stand and hit 'Link...'"); + script_state = 2; + // ask the control prims to push their config - in case they were already there... + llSay(commChannelBase - 1, "repost"); + // start sending the keepalives every minute, so the control prims do not die + llSetTimerEvent(60); + + } +} + +wipe_all() { + llSay(commChannelBase - 1, "die"); + script_state = 0; + llOwnerSay("Wiped all elements... touch the platform to get the menu again."); +} + +// check the replies from the dialog +integer check_dialog_replies(string message) +{ + if (message == "More") { + if (numObjects < 30) { + numObjects = numObjects + 2; + } + show_main_dialog(); + return 1; + } else if (message == "Less") { + if (numObjects > 2) { + numObjects = numObjects - 2; + } + show_main_dialog(); + return 1; + } else if (message == "Rez...") { + script_state = 1; + myPos = llGetPos(); + // wipe all the skirt prims + llSay(commChannelBase - 1, "die_skirt"); + llOwnerSay("Rezzing " + (string)numObjects + " prims..."); + llListen(commChannelBase, "", "", ""); + // start with the first prim - the rest will go in a loop + current_rez_prim_num = 0; + make_init_string(); + rez_one_prim(); + return 1; + } else if (message == "Wipe all...") { + wipe_all(); + llOwnerSay("Resetting the script..."); + llResetScript(); + return 1; + } else if (message == "Link...") { + unicast(PRIM_LINKCENTER, "link"); + } else if (message == "News...") { + llLoadURL(llGetOwner(),"Prim skirt builder news @Daltonic blog", "http://daltonic.blogspot.com/search/label/primskirtbuilder"); + } + return 0; +} + + +// we use the description as a "one time run" flag +// it stores the hash of the key of the last owner that ran the script +// if the owner changes - the hash changes too. +run_once() +{ + string hash = llMD5String((string)llGetOwner(), 777); + if (llGetObjectDesc() != hash) { + llOwnerSay("Please read through the Introduction, the license, and the manual before asking any questions."); + llOwnerSay("The author is available for consulting help, the rates are mentioned in the manual."); + llSetObjectDesc(hash); + llGiveInventory(llGetOwner(), "Introduction"); + } +} + + +default +{ + state_entry() + { + //overriden sit target + //lower them a bit + + + rotation rX; + rotation rY; + rotation rZ; + rotation r; + + vector size; + + size = llGetAgentSize(llGetOwner()); + + // approximation.. but still better than nothing + vLoungeTarget.z = size.z / 2.0; + + + //build rotations + //Note: this is broken out like this to simplify the + // process of finding the correct sit angle. I + // use the following form until I have the rotation + // that I want perfect, and then I simply + // hardcode the perfected quaterion and remove + // this mess. + // + rX = llAxisAngle2Rot( <1,0,0>, 0 * DEG_TO_RAD); //cartwheel + rY = llAxisAngle2Rot( <0,1,0>, 0 * DEG_TO_RAD); //sumersault + rZ = llAxisAngle2Rot( <0,0,1>, 0 * DEG_TO_RAD); //turn in place + + //combine rotations + r = rX * rY * rZ; + + //override 'sit' on pie menu + llSetSitText( "Stand" ); + + //override default sit target and rotation on prim + llSitTarget( vLoungeTarget, r ); + llSetRot(ZERO_ROTATION); // align to global coordinates + + llListen(CHANNEL, "", llGetOwner(), ""); + commChannelBase = 100000 + (integer)llFrand(100000000); + // run the stuff that needs to be run once... + run_once(); + + // testing + //mkLoungingAgentKey = llGetOwner(); + //commChannelBase = 123456; + + } + on_rez(integer n) + { + llResetScript(); + } + timer() + { + if (script_state == 1) { + // rezzing on timeout - no echo reply + llSetTimerEvent(0); + rez_one_prim(); + } + // send a keepalive so the others know we are still here + llSay(commChannelBase - 1, "keepalive"); + } + + + changed(integer change) + { + if (change & CHANGED_LINK) + { + key agent = llAvatarOnSitTarget(); + if ( mkLoungingAgentKey == NULL_KEY && agent != NULL_KEY ) + { + + //changed user + //cache new user key and request their permissions + mkLoungingAgentKey = agent; + llRequestPermissions(mkLoungingAgentKey, PERMISSION_TRIGGER_ANIMATION); + // show the dialog + if (agent == llGetOwner()) { + show_main_dialog(); + } else { + llInstantMessage(agent, "The owner now should rez/edit the skirt. You can take your own copy by buying it for L$0."); + } + } + else if ( mkLoungingAgentKey != NULL_KEY && agent == NULL_KEY) + { + + //user is getting up + if ( miPermissionsAcquired ) + { + + //restore anims + llStopAnimation("turn_180"); + + } + mkLoungingAgentKey = NULL_KEY; + //reset the script to release permissions + //llResetScript(); + } + } + } + + run_time_permissions(integer parm) + { + if(parm == PERMISSION_TRIGGER_ANIMATION) + { + + //set permission flag + miPermissionsAcquired = TRUE; + + //cancel the sit anim + llStopAnimation("sit"); + + llStartAnimation("turn_180"); + } + } + + touch_start(integer total_number) + { + key who = llDetectedKey(0); + if (who == llGetOwner()) + { + show_main_dialog(); + } else { + llInstantMessage(who, "Only the owner can edit the skirt. Right-click and buy your copy for L$0 to try it yourself"); + } + + } + + + listen(integer channel, string name, key id, string message) + { + + if (script_state == 0) { + if (channel == CHANNEL) { + check_dialog_replies(message); + } + } else if (script_state == 1) { + if (channel == commChannelBase) { + // newly awaken child comes back to us + if (message == "boot") { + string msg = "init:" + (string)current_rez_prim_num + ":" + init_string; + // need to supply this little boy with his parameters, once it replies - we rez a new one + llSay(commChannelBase, msg); + // debug to see what exactly is in bootmsg + //llOwnerSay("bootmsg: " + msg); + + } else if (message == "echo_reply") { + // one of the control prims we have pinged already exists - so we can just decrement + // to the next one + //llOwnerSay("echo reply!"); + make_next_misc_prim(); + } else if (message == "init_ok") { + // this guy has acked our parameters, has stopped listening on the base channel, + // renamed itself into its number + // and is listening on the commChannelBase + 1 + childNumber + if (current_rez_prim_num >= 0) { + // rezzing normal prims + current_rez_prim_num = current_rez_prim_num + 1; + if (current_rez_prim_num < numObjects) { + rez_one_prim(); + } else { + // start rezzing misc prims + current_rez_prim_num = PRIM_FIRSTMISC; + check_or_rez_next_misc_prim(); + } + + + } else { + // supply misc parameters to control prims... + if (current_rez_prim_num == PRIM_LINKCENTER) { + // turn it into a small ball... + // set shape + unicast(PRIM_LINKCENTER, "lc_prim_params:9:3:0:<0.000000, 1.000000, 0.000000>:0.000000:<0.000000, 0.000000, 0.000000>:<0.000000, 1.000000, 0.000000>"); + // reset flex and set size + unicast(PRIM_LINKCENTER, "lc_prim_params:21:0:2:0.300000:2.000000:0.000000:1.000000:<0.000000, 0.000000, 0.000000>:7:<0.050000, 0.050000, 0.050000>"); + // set texture (none) + unicast(PRIM_LINKCENTER, "lc_prim_params:17:0:5748decc-f629-461c-9a36-a35a221fe21f:<1.000000, 1.000000, 0.000000>:<0.000000, 0.000000, 0.000000>:0.000000"); + } + + if (current_rez_prim_num == PRIM_GEOMETRY) { + string cmds = ""; + + // set shape + unicast(PRIM_GEOMETRY, "gc_prim_params:9:0:0:<0.000000, 1.000000, 0.000000>:0.000000:<0.000000, 0.000000, 0.000000>:<1.000000, 1.000000, 0.000000>:<0.000000, 0.000000, 0.000000>"); + // reset flex + unicast(PRIM_GEOMETRY, "gc_prim_params:21:0:2:0.300000:2.000000:0.000000:1.000000:<0.000000, 0.000000, 0.000000>"); + // size is set at boot... + // :7:<0.010000, 0.600000, 0.400000>"); + // all textures to white + unicast(PRIM_GEOMETRY, "gc_prim_params:17:-1:5748decc-f629-461c-9a36-a35a221fe21f:<1.000000, 1.000000, 0.000000>:<0.000000, 0.000000, 0.000000>:0.000000"); + // waist size texture + unicast(PRIM_GEOMETRY, "gc_prim_params:17:4:3515e3e5-f7c3-ffbe-8eb1-f7ede3bbc831:<1.000000, 1.000000, 0.000000>:<0.000000, 0.000000, 0.000000>:0.000000"); + } + // rezzing misc prims - descending + make_next_misc_prim(); + } + } else { + llOwnerSay("Unknown message '" + message + "'"); + } + + } + } else if (script_state == 2) { + if (channel == commChannelBase) { + list aList = llParseString2List(message, [":"], []); + string command = llList2String(aList, 0); + if (command == "move") { + posOffset = posOffset + (vector)llList2String(aList, 1); + //llOwnerSay("moving by " + llList2String(aList, 1)); + reposition_all(); + } else if (command == "geometry") { + // waist size / bend coeff + vector v = (vector)llList2String(aList, 1); + bendCoefficient = v.x; + yRadius = v.y; + xRadius = v.z; + reposition_all(); + } else if (command == "flare") { + //llOwnerSay("flare set: " + message); + flareAngle = (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "menu") { + show_main_dialog(); + } + + } else if (channel == CHANNEL) { + list aList = llParseString2List(message, [" "], []); + string command = llList2String(aList, 0); + + if (check_dialog_replies(message)) { + // already done all + //llOwnerSay("dialog reply!"); + // the below commands are for debug via the command line + + } else if (command == "reset") { + wipe_all(); + } else if (command == "dz") { + posOffset.z = posOffset.z + (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "dx") { + posOffset.x = posOffset.x + (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "dy") { + posOffset.y = posOffset.y + (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "z") { + posOffset.z = (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "x") { + posOffset.x = (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "y") { + posOffset.y = (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "flare") { + flareAngle = (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "xradius") { + xRadius = (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "yradius") { + yRadius = (float)llList2String(aList, 1); + reposition_all(); + } else if (command == "bend") { + bendCoefficient = (float)llList2String(aList, 1); + reposition_all(); + + } + + + } + } + + } + +} diff --git a/Skirt Builder/Skirt Builder/Skirt Plate/positioning control.lsl b/Skirt Builder/Skirt Builder/Skirt Plate/positioning control.lsl new file mode 100644 index 00000000..ecb60e43 --- /dev/null +++ b/Skirt Builder/Skirt Builder/Skirt Plate/positioning control.lsl @@ -0,0 +1,751 @@ +// +// Copyright (c) 2007 Dalien Talbot and few other folks thanks to whom this exists: +// +// Vint Falken, of course - the inspiration, pushing me to the idea, testing, and finding the software bugs :-) +// LSL wiki - the function reference +// Posing stand code - unknown author +// LoopRez v0.6, by Ged Larsen, 20 December 2006 - the math for placement of the skirt prims +// +// This work is distributed "as-is" with no warranty whatsoever. +// +// +// It is distributed under GPL license. Please have a look at the "EULA" and the "GNU License" notecards in the inventory +// to get familiar with the terms and conditions. +// +// All the derivatives of this work obviously have to comply with the GPL as well. Contact me (Dalien Talbot) if you require alternative licensing. +// +// + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// NOTE: +// Unless you know what you are doing, do NOT change anything below ! +// +// The standard consulting fees mentioned in the manual will apply for the works on fixing the breakages :-) +// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + + + + +// CONFIGURATION PARAMETERS, they get reset from the main script!!! + +integer myNumber = 0; // number of the prim +vector standPos; // position of the mothership +integer numObjects = 12; // how many objects +float xRadius = .16; // ellipse x-axis radius in meters +float yRadius = .22; // ellipse y-axis radius in meters +float flareAngle = 45.0; // how many DEGREES the bottom of object will flare outwards, the "poof" factor +float bendCoefficient = 0.0; // makes a "saddle shape", bends DOWN this number of meters at extremes of X-axis +vector rotOffset = <0.0, 180.0, 0.0>; // rotation offset in DEGREES -- fixes the rotation of ALL objects; for flexi prims, often you will want <180.0, 0.0, 0.0> +vector posOffset = <0.0, 0.0, 1.0>; // position offset + +string prompt = "Edit/move this prim\nto edit/move the skirt"; + +// linking permission acquired +integer miPermissionsAcquired = FALSE; +// current object being linked, when linked... +integer currObject = 0; + +// idle counter - when it increments to 1000, we clean up the control prims. +integer idleCounter = 0; + + +//////////////////////////////////////////////////////////////////////////////// +// No need to mess with anything below here + + +adjust_flare (vector currentPos, rotation currentRot, float flareAngle) { + float rotateAngle = flareAngle; // how much to rotate per iteration (in degrees) + rotation rot = currentRot; + vector scale = llGetScale(); // return the size of the object + vector offset = <0, 0, -scale.z/2>; // rotate the object around the center of its top + vector offsetPosition = <0, 0, -scale.z/2>; // the position should be that of the top + // the two values being the same is a bit coincidental.. + + + vector euler = <0, -1*rotateAngle*DEG_TO_RAD, 0>; // delta rotation expressed as a vector in radians + rotation deltarot = llEuler2Rot(euler); // delta rotation expressed as a rotation + rotation newrot = deltarot * rot; // new rotation for the object + + vector vvv = offset * rot; // current offset of the rotation point vs. the prim center + vector vvv2 = offset * newrot; // new offset of the rotation point vs. the prim center + + //vector currentPos = llGetPos(); // current position + //vector rotPoint = llGetPos() + vvv; // current rotation point, not needed except for visualization + + vector newPos; // new position for the prim + + newPos = currentPos + (vvv - vvv2); // is a current position offsetted by a difference between the rotation point offsets + + //llRezObject("ball", rotPoint, ZERO_VECTOR, ZERO_ROTATION, 0); // visualize the rotation point + + // now we also need to adjust the position - so that the top is always at the same place.. + // the position that we have got is calculated for the center of the prim. + newPos = newPos + offsetPosition; + + llSetPos(newPos); // set the new position + llSetRot(newrot); // and the new rotation +} + + +makeLoop(integer n, vector standPos, integer numObjects, float xRadius, float yRadius, + float flareAngle, float bendCoefficient, vector rotOffset, vector posOffset) + { + //integer n; // which object is being placed + float theta; // angle in radians + vector pos; // position + rotation rot; // rotation in quaternion format + + //for(n = 0; n < numObjects; n++) { + + theta = TWO_PI * ( (float)n / (float)numObjects ); + + pos.x = xRadius * llCos(theta); // ellipse: 2x xRadius meters wide + pos.y = yRadius * llSin(theta); // ellipse: 2x yRadius meters wide + pos.z = -bendCoefficient*llCos(theta)*llCos(theta); // saddle shape, bending downwards on X-axis + pos = pos + standPos + posOffset; + + rot = llEuler2Rot(); // user-chosen rotation offset correction + + + // the following make the objects face outwards properly for an ellipse; using theta alone is only correct for a circle + // the scary formula calculates a unit vector TANGENTIAL to the ellipse, and llRotBetween is used to figure out how much the object needs to rotate to lie parallel to the tangent + rot = rot * llRotBetween(<0.0,1.0,0.0>, <-1.0 * xRadius * llSin(theta) / ( llSqrt ( (yRadius*yRadius * llCos(theta) * llCos(theta)) + (xRadius*xRadius * llSin(theta) * llSin(theta))) ),yRadius * llCos(theta) / ( llSqrt ( (yRadius*yRadius * llCos(theta) * llCos(theta)) + (xRadius*xRadius * llSin(theta) * llSin(theta))) ),0.0>); + if ( n== (numObjects/2) ) // LSL's implementation of llRotBetween at theta = pi radians is reversed at 180 degrees, so this manually corrects it + rot = rot * llEuler2Rot( <0,PI,0> ); + + + //rot = rot * llEuler2Rot(<0, -1*flareAngle*DEG_TO_RAD, 0>); // flare generation (poof) + + //llRezObject(objectName, pos, ZERO_VECTOR, rot, 0); + //llSetPos(pos); + //llSetRot(rot); + + // it will rotate the pieces and set their positions... + adjust_flare(pos, rot, flareAngle); + //} + } + +// are we a control prim (texture/shape/etc.) ? +integer isControlPrim = 0; +// a ball for skirt linkage +integer isLinkCenterPrim = 0; + +// are we a geometry control prim (xradius/yradius/flare/z) ? +integer isGeomControlPrim = 0; +// how much the "real" waist size is different from the geometry control prim +float waistSizeDivizor = 5.0; + + +integer listenHandle = 0; +integer listenHandle2 = 0; +integer commChannelBase = 0; + + +position_geometry_prim() +{ + rotation rot = llEuler2Rot(<0.0, flareAngle * DEG_TO_RAD, 0.0 >); + vector scale; + scale.x = 0.01 + bendCoefficient; + scale.y = yRadius * waistSizeDivizor; + scale.z = xRadius * waistSizeDivizor; + llSetRot(rot); + llSetScale(scale); +} + +new_position() +{ + // do the fancy math foobar only for the "normal" prims + if ( (isControlPrim + isLinkCenterPrim + isGeomControlPrim) == 0) { + makeLoop(myNumber, standPos, numObjects, xRadius, yRadius, flareAngle, bendCoefficient, rotOffset, posOffset); + } + if (isLinkCenterPrim) { + // link center prim will need to be in the center (surprise surprize!) + // since the Z is actually the top of the prims, + // nothing much more to be done here + // we position it here, since it needs to move with the "normal" prims. + vector linkerPos = standPos + posOffset; + llSetPos(linkerPos); + } +} + +position_master_prim() +{ + vector rotOffset = <180,0,0>; + rotation rot = llEuler2Rot(); + // flare angle belongs to the flare control... + //rot = rot * llEuler2Rot(<0, -1*flareAngle*DEG_TO_RAD, 0>); + llSetRot(rot); + +} + + + +//------------------ prim mod slave + + +setParams(list alist) +{ + list res = [ ]; + integer i; + integer len = llGetListLength(alist); + //string aStart = elapsed(""); + //string aElapsed; + string token; + integer slen; + + integer int; + // skip the first token - so start from 1 + for(i=1; i= 30 && slen <= 33) { + // assume vector + res = res + (vector)token; + } else { + // assume integer or float + int = (integer)token; + if (token == (string) int) { + res = res + [ int ]; + } else { + res = res + [ (float) token ]; + } + } + + } + //aElapsed = elapsed(aStart); + + //llOwnerSay("result:" + llDumpList2String(res, ":")); + //llOwnerSay("Time taken: " + aElapsed); + llSetPrimitiveParams(res); +} + + + + +// ------------------------- prim mod master + +list sideTextures = [ ]; +list sideTexgen = [ ]; +list sideColors = [ ]; +list sideAlphas = [ ]; + + +list tokens = [ ]; + +// saved position/rotation for the timer events +vector myLastPos; +vector myLastRot; + + +// the mask for the delayed update processing +// the values are similar to "mask" in the change event + +integer mask = 0; + + +sendCommand(string cmd) +{ + //llOwnerSay(cmd); + llSay(commChannelBase - 1, cmd); +} + +resetSideCaches() +{ + sideTextures = [ ]; + sideTexgen = [ ]; + sideColors = [ ]; + sideAlphas = [ ]; +} + + + +checkTextures() +{ + integer i; + integer num = llGetNumberOfSides(); + list result = llGetPrimitiveParams( [ PRIM_TEXGEN, ALL_SIDES, PRIM_TEXTURE, ALL_SIDES ] ); + list newTextures = [ ]; + + for(i=0;i 0) { + sendCommand("prim_params:" + llDumpList2String(tokens, ":")); + if (mask & CHANGED_SHAPE || mask & CHANGED_SCALE) { + // changing shapes involves recalculation of the position + sendCommand("reposition"); + } + + } + } + + if(isGeomControlPrim) { + // z scale = xradius + // y scale = yradius + // y axis tilt (handled elsewhere) = flare + // x scale - 0.01 = bend coefficient + vector scale = llGetScale(); + scale.x = scale.x - 0.01; + scale.y = scale.y / waistSizeDivizor; + scale.z = scale.z / waistSizeDivizor; + if(mask & CHANGED_SCALE) { + llSay(commChannelBase, "geometry:" + (string)scale); + } + } + + + // reset all the changed notifications - we've done what we had to do... + mask = 0; + +} + +restart_timer() +{ + // stop the timer and restart it + llSetTimerEvent(0); + llSetTimerEvent(1); +} + +// ugggly hack - but since i am reusing the list of global vars... +set_globals_from_list(list aList, integer i) +{ + standPos = (vector)llList2String(aList, i); i=i+1; + numObjects = llList2Integer(aList, i); i=i+1; + xRadius = llList2Float(aList, i); i=i+1; + yRadius = llList2Float(aList, i); i=i+1; + flareAngle = llList2Float(aList, i); i=i+1; + bendCoefficient = llList2Float(aList, i); i=i+1; + rotOffset = (vector)llList2String(aList, i); i=i+1; + posOffset = (vector)llList2String(aList, i); i=i+1; +} + +// tell child to tell back its id so we could link it... +ask_child_to_link() +{ + llSay(commChannelBase + 1 + currObject, "link"); +} + +default +{ + touch_start(integer channel) + { + // ask the stand prim to show the menu, and avoid the spam in the chat + if (commChannelBase != 0) { + if (llDetectedKey(0) == llGetOwner()) { + llSay(commChannelBase, "menu"); + } else { + llInstantMessage(llDetectedKey(0), "Only owner can modify the skirt - get your free copy - right-click the posing stand and buy it for L$0"); + } + } + + } + on_rez(integer channel) { + if (channel == 0) { + if (llGetNumberOfPrims() > 1) { + // need to check if we are linked and if yes - then delete the script... + llRemoveInventory(llGetScriptName()); + } + // if channel = 0 means we have been rezzed by the user - so do not do anything... + return; + } + commChannelBase = channel; + listenHandle = llListen(channel, "", "", ""); + // request the boot parameters + llSay(channel, "boot"); + } + run_time_permissions(integer parm) + { + if (parm & PERMISSION_CHANGE_LINKS) + { + + //set permission flag + miPermissionsAcquired = TRUE; + // reset any pending events... + llSetTimerEvent(0); + // start the linking... + currObject = 0; + llOwnerSay("Linking will take some time, please be patient..."); + ask_child_to_link(); + } else { + llOwnerSay("ERROR: permission was not acquired, can not link..."); + } + } + + + changed(integer changed_mask) + { + if ((changed_mask & CHANGED_LINK) && (!isLinkCenterPrim) && (!isControlPrim) && (!isGeomControlPrim) ) { + if (llGetNumberOfPrims() > 1) { + // need to check if we are linked and if yes - then delete the script... + // the link centre prim will remove the script from itself, + // either on next rez, or when it finishes linking us. + llRemoveInventory(llGetScriptName()); + } + + } else { + if (isControlPrim || isGeomControlPrim) { + // set the appropriate flags + // so that timer event would fix it. + restart_timer(); + mask = mask | changed_mask; + } + } + + } + timer() { + idleCounter = idleCounter + 1; + + if (isControlPrim || isGeomControlPrim) { + if (idleCounter > 1000) { + // the stand is gone and did not remind about itself... go away then. + llOwnerSay("Did not hear from the stand - so it must have been taken away - self-destroying..."); + llDie(); + } + } else { + if (idleCounter > 20) { + // the stand is gone and did not remind about itself... go away then. + llOwnerSay("Did not hear from the stand - so it must have been taken away - self-destroying..."); + llDie(); + } + } + if (isControlPrim) { + // control prim + vector myCurrentPos = llGetPos(); + vector delta = myCurrentPos - myLastPos; + + if ( (mask & CHANGED_SCALE) == 0) { + // if both the scale AND position is changed - do not move + // since when the scale changes via the mouse, the center drifts away... + + if (llVecDist(myLastPos, myCurrentPos) > 0) { + llSay(commChannelBase, "move:" + (string)delta); + //llOwnerSay("moved!"); + } + } + myLastPos = myCurrentPos; + } + if (isGeomControlPrim) { + // geometry control prim - check the tilt, the scale is checked elsewhere + vector myCurrentRot = llRot2Euler(llGetRot()); + if (llVecDist(myLastRot, myCurrentRot) > 0) { + llSay(commChannelBase, "flare:" + (string)(myCurrentRot.y / DEG_TO_RAD)); + } + myLastRot = myCurrentRot; + } + + if (mask != 0) { + // naive attempt at optimization... + check_changed(); + } + } + + + + listen(integer channel, string name, key id, string message) + { + integer i = 1; // first parameter; + //llOwnerSay("message: '" + message + "'"); + if (channel == commChannelBase) { + // init string + // init:myNumber:boot_string + // where boot string is: + // [myPos, numObjects, xRadius, yRadius, flareAngle, bendCoefficient, rotOffset, posOffset] + list aList = llParseString2List(message, [":"], []); + if (llList2String(aList, 0) == "init") { + + llListenRemove(listenHandle); + myNumber = llList2Integer(aList, i); i=i+1; + llSetObjectName((string)myNumber); + + + // object number ranges from 0 to numObjects-1 + // if we have got the number "numObjects" then we are the "control" prim - should not react to position change requests. + + // start listening for mothership only + listenHandle = llListen(commChannelBase + 1 + myNumber, "", "", ""); + listenHandle = llListen(commChannelBase - 1, "", "", ""); + + + // report back to mothership that we are ok to fly on our own so it continues to generate the prims + llSay(commChannelBase, "init_ok"); + + // set the global parameters from the list + set_globals_from_list(aList, i); + + isControlPrim = 0; + isLinkCenterPrim = 0; + isGeomControlPrim = 0; + + // set the keepalive timer for the precaution self-destruction + // in the skirt prims - for the special prims the timer will be faster... + llSetTimerEvent(120); + + + if (myNumber == -10) { + // control prim - change its appearance and it replicates... + isControlPrim = 1; + llSetObjectName("Primskirt builder control prim"); + + llSetText(prompt, <0, 1, 0>, 1.0); + + position_master_prim(); + myLastPos = llGetPos(); + // for move/rotate and delayed prim replication + restart_timer(); + } else if (myNumber == -11) { + // link center prim - a ball to use as a root for the skirt + isLinkCenterPrim = 1; + llSetObjectName("Prim Skirt"); + + + } else if (myNumber == -12) { + // geometry control prim + isGeomControlPrim = 1; + llSetObjectName("Waist size/flare/bend control prim"); + llSetText("X size: bend\nY size: yradius\nZ size: xradius\nY rotate: flare", <0, 1, 0>, 1.0); + // the new position + position_geometry_prim(); + } + + // notify the owner (debug) + //llOwnerSay("got:" + llDumpList2String([myNumber, standPos, numObjects, xRadius, yRadius, flareAngle, bendCoefficient, rotOffset, posOffset], ":")); + // and position ourselves properly + new_position(); + + } else { + llOwnerSay("Unknown init message:'" + message + "'"); + } + } else { + // control messages from the mothership or the control prim + list aList = llParseString2List(message, [":"], []); + string command = llList2String(aList, 0); + integer len = llGetListLength(aList); + i = 1; + // reset the idle counter + idleCounter = 0; + if (command == "echo") { + // reply to those that care + llSay(commChannelBase, "echo_reply"); + } else if (command == "die") { + llDie(); + } else if (isControlPrim == 1) { + // do not respond to change position and all + if (command == "repost") { + // we need to push the prim characteristics + mask = mask | CHANGED_SHAPE | CHANGED_COLOR | CHANGED_SCALE | CHANGED_TEXTURE; + resetSideCaches(); + restart_timer(); + } + } else if (isGeomControlPrim == 1) { + // only allow to modify the shape + // special kind of prim_params + if (command == "gc_prim_params") { + setParams(aList); + } else if (command == "bulk") { + // "bulk" is essentially the same as init, except "myNumber" is not sent. + set_globals_from_list(aList, i); + // position sets the box according to current parameters + new_position(); + } else if (command == "repost") { + // we need to push the prim characteristics + mask = mask | CHANGED_SHAPE | CHANGED_COLOR | CHANGED_SCALE | CHANGED_TEXTURE; + myLastRot = myLastRot * <1,1,1,0.5>; // just to "touch" the rotation so timer updates the things + restart_timer(); + } + } else if (isLinkCenterPrim == 1) { + if (command == "die_skirt") { + // only the ball and the skirt prims obey this + llDie(); + } else if (command == "bulk") { + // bulk works for linkcenter too, but most of it is ignored in processing... + set_globals_from_list(aList, i); + // and position ourselves properly + new_position(); + } else if (command == "lc_prim_params") { + // special kind of prim_params + setParams(aList); + } else if (command == "link") { + llRequestPermissions(llGetOwner(), PERMISSION_CHANGE_LINKS); + } else if (command == "linkme") { + // someone wants to be linked... + //llOwnerSay("linkme rcvd!"); + if (miPermissionsAcquired) { + integer num = currObject + 1; + llOwnerSay("Linking prim " + (string)num + " of " + (string)numObjects + ", please wait..."); + llCreateLink(id, TRUE); + currObject = currObject + 1; + if (currObject < numObjects) { + ask_child_to_link(); + } else { + vector pos = llGetPos() + <-1.0, 1.0, 0.0>; + llSetPos(pos); + llOwnerSay("Finished linking, please pick up your skirt!"); + llOwnerSay("If you enjoy using this tool, feel free to tip the creator Dalien Talbot according to the level of your enjoyment :-)"); + // clean up the script... + llRemoveInventory(llGetScriptName()); + } + } else { + llOwnerSay("ERROR: permissions not acquired, can not link..."); + } + + } + + } else { + if (command == "die_skirt") { + // only the ball and the skirt prims obey this + llDie(); + } else if (command == "link") { + // kind of echo, but for linking... + llSay(commChannelBase + 1 - 11, "linkme"); + //llOwnerSay("linkme!"); + } else if (command == "bulk") { + // "bulk" is essentially the same as init, except "myNumber" is not sent. + set_globals_from_list(aList, i); + // notify the owner (debug) + //llOwnerSay("got:" + llDumpList2String([myNumber, standPos, numObjects, xRadius, yRadius, flareAngle, bendCoefficient, rotOffset, posOffset], ":")); + // and position ourselves properly + new_position(); + } else if (command == "prim_params") { + setParams(aList); + } else if (command == "reposition") { + new_position(); + } else if (command == "scale") { + vector scale = (vector)llList2String(aList, 1); + llSetScale(scale); + } else if (command == "color") { + while(i < len) { + integer side = (integer)llList2String(aList, i); + vector color = (vector)llList2String(aList, i+1); + llSetColor(color, side); + i = i+2; + } + } else if (command == "alpha") { + while(i < len) { + integer side = (integer)llList2String(aList, i); + float alpha = (float)llList2String(aList, i+1); + llSetAlpha(alpha, side); + i = i+2; + } + } + } + + } + } + +} diff --git a/Skirt Builder/manual.txt b/Skirt Builder/manual.txt new file mode 100644 index 00000000..1b8e8526 --- /dev/null +++ b/Skirt Builder/manual.txt @@ -0,0 +1,236 @@ +0. Before you IM me. + +I think it is important to mention it again in the very beginning - if you think this tool is useful, I +would be interested to see how much, +and indeed the tips are much more appreciated than random IMs :-) I also do live music - and +similar to live music, it is not *required* to tip the performer/author. However, your desire to share +some of your cash does express the extent of your satisfaction with the product, so I am making +this experiment to see if this works. + +Once again - this tool is and has to be free as in beer and free as in speech. If someone charged +you for getting it, they violated the GPL - please file an AR and get the +free copy from my location. Where - it is mentioned in the http://daltonic.blogspot.com/ in the +entries with the tag "primskirtbuilder". + +IMPORTANT: REQUESTS FOR HELP. + +I do not have much time at all, and I prefer not to spend it on answering questions. if you have +something specific to ask - drop me an email at dalienta@gmail.com - if the question/bug report +is valid, it will be acted upon and answered on my blog - http://daltonic.blogspot.com, in an entry +with the tag "primskirtbuilder". For those impatient that require the help "right now" - I probably +can help, take a look at the last section of the manual for my consulting fees before IMing me to +ensure that we are in full understanding. If you want an alternative form of licensing or want +unrelated consulting help - drop me an email with the description of what you want, and I will +reply as my time permits. Please do not consider it as any form of hostility - it is just to ensure my +personal time is spent in the most efficient manner. Thanks for your understanding :-) + +1. The contents of the package + +The builder, which looks like a posing stand, contains: + +- EULA +- GNU License (GPL) - read this before making any mods +- Introduction - first time read for the new owners +- pose stand script +- prim (used to create the skirts and control elements) +- Vint's prim skirt builder manual - the manual you are reading +- waist - the texture for the geometry control prim + +Pay attention, that all the skirts it creates, have the same creator as the creator of the "prim" - that +is, me, +Dalien Talbot (or the previous owner, if you grabbed a copy from someone). It may be ok if you +build the clothes for yourself, but if you want to resell your creations, +you might want to change the creator to be you. How this is done is described in the section +"Changing the creator". + +At first feel free to practice, so you are familiar with how the tool works. + + +2. Getting started + +Rez the stand onto the ground, and either click it or stand on it. If you stand on it, you will get into +the "edit appearance" pose, which can be convenient if you want to see how the skirt looks on +yourself. If you do not want that, clicking is exactly the same. + +You will get a dialog, which will say how many prims will the skirt have, and three buttons: "More", +"Less", and "Rez...". + +The "More" and "Less" will increase or decrease the number of prims, and "Rez..." will create the +skirt and control elements. You can go up to 60 prims in the skirt, but this is not very sim-friendly - +some of the calculations are rather intensive, and it may make the things slow. (Also, wearing +such a monster will create a lag for the others - so think twice before creating it). + +Once you have hit "Rez...", wait until the rezzing finishes, it takes some time. + +In the end, you will see the prims in the skirt shape above the platform, a green ball in the center +of it, and two control prims - one on the left, which looks the same as the the prims making up the +skirt - "appearance control" prim, and one on the right, with the circle and the "Waist size" written +on it - "geometry control" prim. + +IMPORTANT: never change the skirt prims directly! All the manipulations are to be done via the +left and right control prims. + +Also, be sure to not do the changes too fast - and especially do not touch anything while the skirt +is being linked - this may have unpredictable effects! + +Both of the control prims have a quick reference in the text above them, but below is a more +verbose description. + +3. Changing the appearance of the skirt prims (using the appearance control prim) + +Simply edit the appearance control prim on the left, and most of the changes will be automatically +replicated to all the skirt prims at once. The changes get replicated in 1-2 seconds - to speed up +the editing, only the last state of the object is transferred. + +"Most of the changes" includes: + +- prim type (box/circle/cylinder/etc. - sculpted prims would NOT work.) +- prim scale (X/Y/Z size) +- flex characteristics - note that e.g. sphere can not be "flex" +- textures/colors/transparency on each of the sides or all of them - same as for "normal" editing. + +One note about the flex objects and size replication - I have noticed that for the flex objects, +changing the sizes on axis other than Z results in no visible effect - it may be a bug in the script, +or, more probably the bug in SL (since when you click those prims subsequently, they get the +correct sizes). + +Another thing is that the flex parameters do not seem to take effect immediately if you change +them - you might want to flip the "flex" setting off, wait for it to replicate, and then turn it on again. +It may be a bug in SL or in the script - maybe I take a look at this later on. + +Note, that also changing the position for the appearance control prim affects the position of the +skirt - by moving it, you will move the whole set of the prims for the to-be skirt at the same +distance. I tried to be smart about changing the size of the prim - since when you change it in the +GUI, the center of the prim also drifts - these changes should not normally cause any movements +of the skirt. + +NOTE: the textures that you use, have to have the "copy" permission set! + +4. Changing the waist size / flare / bend (using the geometry control prim) + +The shape of the circle (or ellipse, in most cases :) with the text "waist size" is exactly the same +as the shape of the imaginary ellipse on the waist line, from which the prims are hanging. The +sizes are proportional - except the geometry control prim is a few times bigger for your +convenience. +So, editing the Y-size or Z-size will allow you to change the shape of the ellipse along which the +prims are positioned. + +The Y-angle represents the flare - how much do the skirt prims ... umm... well... how much do +they "flare" :) the angle is relative the vertical - i.e. "0" would mean they are vertical, "90" degrees +would mean they "grow out" horizontally. Turning off the flex will make the things look more vivid. +When you rotate the geometry control prim using the "green" circle, you can go only up to angle +of 90 degrees. If you manually stick in the bigger values into the editor box, you can get the skirts +looking *upwards* :-) (Not sure why anyone would want to do that, but still thought I'd let you +know.) + +NOTE: the original LoopRez had both the coordinates and the radius and the rotation relative the +center of the prims. I found it inconvenient, so in my scenario all of these are done relative to the +waist line. + +The X-size of the geometry control prim represents the "bend coefficient" - it changes the Z- +position of the prims depending on their place on the virtual ellipse. Allosw for a fancier-looking +skirts, I suppose :-) + +5. Changing the number of prims + +Midway through your work, you might realize that you have taken too few or too many prims - no +problem! click on the stand or the skirt itself, and the menu will popup. +Use the already familiar "More" and "Less" buttons to set the number of prims you need, and then +click "Rez..." - the current skirt will get wiped, and the one with the new number of prims will re- +rez. Again, give it some time, do not hurry ! + +6. Finalizing your work + +Once you are happy with how your skirt looks like, you will want to link it. While it can be done +manually, I do think it is a boring exercise. So, I made the script such that it links it for you! + +Click on the stand (or on the skirt itself) to get the menu. In the menu, click "Link...". You will see +a popup asking you for a permission to link the objects - answer "Yes" (otherwise it would not +work), and wait. When the linking process is finished, the resulting skirt will be moved to the left +and front from the posing stand by 1 meter, +feel free to rename it as you like, take into the inventory and try wearing! :-) + +The only thing you might want to adjust then is its position on your body - you can do it while +hitting "edit" on the skirt itself while wearing it, and moving it up/down. +Since the green ball is the root prim of the linked set, besides the vertical adjustment, normally +there should be no other quirks needed. + +7. Cleaning up + +You can delete all the rezzed prims by clicking the stand, and hitting the "Wipe all..." button. this +will leave only the posing stand, which you can take back into the inventory. + +Also, if you take away the posing stand, and leave the control prims hanging in the air - they will +self-destruct in approximately 1 hour. + +Have fun and enjoy your skirts!! :-) + + + +--------------------------------------------------------------------------------------------------------------------------------- +----------------------------------------- +Advanced/Commercial: Changing the creator for the skirt prims +--------------------------------------------------------------------------------------------------------------------------------- +----------------------------------------- + +Okay, this may be a difficult operation for some... read very very very carefully, and then follow +step by step - PRECISELY. +If it does not work - then repeat it again. If it still does not work - you are probably doing +something wrong. Reread and retry again. + +DISCLAIMER (read carefully before IMing me for help with this part): You can hire me for help if I +am online (no guarantees I will do it though - depends on my availability) - but since this is a +boring activity (and since you will probably be making the money after it), be prepared that I will +charge for this consulting. + L$1500 is the disturbance compensation which includes also 15 minutes of consulting time (it +should not take more than that), all the time spent on top of that that it is L$900 for every other full +15 minutes spent. (Yeah, I am not cheap, but still it is way cheaper than I would cost IRL :) You +can indeed also ask for the help of your friendly scripter - this operation is not complex at all for +someone who has done it, I just want to avoid spending all the time in SL moving the scripts +between the objects :-) + +So, now that you have read the above scary passage, and are determined to save some money +by doing it yourself, here is how to do it: + +1) rez the posing stand from your inventory (since it is full-mod, you now have 2 objects - one in +the inventory which will be the "backup copy", and one rezzed - which will be your working copy). +If you have only one copy - means someone has reset the permissions on the objects - hence +violating the GPL. Go and complain back to them! :) + +2) Right-click on the stand and choose "Edit..." from the pie menu. + +3) in the dialog with "General | Object | Features | Texture | Content" tabs, click on the tab named +"Content" + +4) drag the prim object named "prim" onto the ground. + +5) you will see the dialog change, and in the "Content" tab there will be now the content of this +prim - a single script called "positioning/control" + +6) drag this script into your inventory + +7) create a new prim, which would have the desired characteristics as a starting prim for the skirt +(flex/textures/etc). +NOTE: any textures that you use in this prim HAVE to be copyable, as anyone who will grab a +copy of the tool from you will be using them as a starting point for building. +Also - this prim has to have the full permissions!!! + +8) right-click this prim, select "Edit...", then "Content" tab, and drop the script "positioning/control" +from your inventory into the contents area of the new "prim" prim. + +9) click on the "General" tab, and ensure that your prim is named "prim" + +10) right-click your prim and select "Take" from the pie menu - this will take this new prim into +your inventory + +11) right-click the posing stand, choose "Edit...", then "Contents" tab to display the contents of the +package again + +12) select the "prim" object within the posing stand contents, and hit the "delete" key once (or +right-click that piece, and choose the "Delete" menu item). The prim should disappear from the +posing stand's contents. + +13) find back the new "prim" prim that you have just created and taken into the inventory, drag it +into the contents area of the posing stand, and drop there. + +14) You are done! Close the edit box and test that everything is working. diff --git a/Skirt Builder/waist.png b/Skirt Builder/waist.png new file mode 100644 index 0000000000000000000000000000000000000000..57e9fc2790620114f6040be78449936b498c55e0 GIT binary patch literal 15541 zcmXY2byQUC*PR)FLnUC{4{`UBHcwPCx#eIvHW{ z0K(%UfYtYkH&jx+;K#E2)%4xGud4Rq?)=r#C+}82{{`*FFs-fqv-!Jy-?C4ZS!HYIv$#0R;Mq4~A4haE{6nQHhTc2$LcG^GW+m7z4@@0Efa}+aRK^ z5T*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FEnAET5 sfiT_9W(PhvPodXlGAb^$(}_PMuuw&JZ{2(tEFD7>WmRRWrA&hU4;~xbP5=M^ literal 0 HcmV?d00001 diff --git a/Waypoint Recorder and Display/Waypoint Recorder and Display.sol b/Waypoint Recorder and Display/Waypoint Recorder and Display.sol new file mode 100644 index 00000000..6af0bcfb --- /dev/null +++ b/Waypoint Recorder and Display/Waypoint Recorder and Display.sol @@ -0,0 +1,3 @@ + + + diff --git a/Waypoint Recorder and Display/Waypoint Recorder and Display/Object/Waypoint Script.lsl b/Waypoint Recorder and Display/Waypoint Recorder and Display/Object/Waypoint Script.lsl new file mode 100644 index 00000000..2c14559e --- /dev/null +++ b/Waypoint Recorder and Display/Waypoint Recorder and Display/Object/Waypoint Script.lsl @@ -0,0 +1,185 @@ +// :SHOW: +// :CATEGORY:Recorder +// :NAME:Waypoint Recorder and Display +// :AUTHOR:De Asanta +// :KEYWORDS: +// :CREATED:2016-01-23 15:26:27 +// :EDITED:2016-01-23 14:26:27 +// :ID:1099 +// :NUM:1884 +// :REV:1 +// :WORLD:OpenSim +// :DESCRIPTION: +// Records, Store, Draw, and Return Waypoints that can be used for moving objects or NPCs. +
+ +// :CODE: +// A basic waypoint recorder for scripters to assist them in recording in game waypoints that can can be used in other scripts. Feel free to use / modify to suit your needs. +//From https://sites.google.com/site/dsopensim/inworldtoolkit/waypoint-recorder + + + +list wp; +integer screen; + +AddWaypoint(vector a) +{ + wp=wp+a; +} + +ClearWaypoints() +{ + wp=[]; +} + +DrawWaypoints() +{ + string CommandList = ""; + integer a; + vector b; + + CommandList = osSetPenColor(CommandList, "White"); + CommandList = osSetPenSize(CommandList, 2); + + for(a=0;a0) { b=llList2Vector(wp,a-1); } + CommandList = osDrawLine(CommandList,(integer)b.x, (integer)b.y); + + } + + osSetDynamicTextureDataBlendFace( "", "vector", CommandList, "bgcolour:Black,width:256,height:256", 0, 2 , 0, 0, 0); +} + +SayWaypoints() +{ + string text=""; + string CommandList = ""; + integer a; + vector b; + + for(a=0;a + + + +