nightfire.lsl 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // :SHOW:1
  2. // :CATEGORY:Fire
  3. // :NAME:Realfire by Rene
  4. // :AUTHOR:Rene10957 Resident
  5. // :KEYWORDS: light,lamp,lighting
  6. // :CREATED:2015-06-11 14:37:24
  7. // :EDITED:2015-06-12 16:41:14
  8. // :ID:1078
  9. // :NUM:1762
  10. // :REV:1
  11. // :WORLD:Second Life, Opensim
  12. // :DESCRIPTION:
  13. // A simple example script for creating your own plugin
  14. // :CODE:
  15. //: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/.
  16. // Night fire plugin for RealFire
  17. // A simple example script for creating your own plugin
  18. //
  19. // Automatically switches on at sunset and off at sunrise
  20. ///////////////////////////////////////////////////////////////////////////////
  21. // HOW TO USE: drop this into the same prim where the FIRE SCRIPT is located //
  22. ///////////////////////////////////////////////////////////////////////////////
  23. key owner; // object owner
  24. integer number = 10959; // number part of link message
  25. default
  26. {
  27. state_entry()
  28. {
  29. owner = llGetOwner();
  30. llSetTimerEvent(300);
  31. }
  32. on_rez(integer start_param)
  33. {
  34. llResetScript();
  35. }
  36. timer()
  37. {
  38. vector sun = llGetSunDirection();
  39. if (sun.z < 0) llMessageLinked(LINK_THIS, number, "on", owner);
  40. else llMessageLinked(LINK_THIS, number, "off", owner);
  41. }
  42. }