setAlpha.lslp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * sloodle_quiz_router.lsl
  3. * Part of the Sloodle project (www.sloodle.org)
  4. *
  5. * Copyright (c) 2011-06 contributors (see below)
  6. * Released under the GNU GPL v3
  7. * -------------------------------------------
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation, either version 3 of the License, or
  12. * (at your option) any later version.
  13. *
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. *
  22. * All scripts must maintain this copyrite information, including the contributer information listed
  23. *
  24. * Contributors:
  25. * Paul Preibisch
  26. *
  27. * DESCRIPTION
  28. * This script will send messages to waiting quizServers. When a player enters the game, this router
  29. * sends a message to all listening quizServers asking if anyone is available.
  30. * The quiz servers will report if they are AVAILABLE or BUSY.
  31. * The router will select an available quizServer and then send that quizServer the id of the player.
  32. *
  33. * Contributors:
  34. * Edmund Edgar
  35. * Paul Preibisch
  36. */
  37. default {
  38. state_entry() {
  39. llOwnerSay("Hello Scripter");
  40. }
  41. link_message(integer sender_num, integer num, string str, key id) {
  42. if (num!=-99) return;
  43. list data = llParseString2List(str, ["|"], []);
  44. string cmd= llList2String(data,0);
  45. if (cmd=="SET ALPHA"){
  46. llSetAlpha(llList2Float(data, 1), ALL_SIDES);
  47. }
  48. }
  49. }
  50. // Please leave the following line intact to show where the script lives in Git:
  51. // SLOODLE LSL Script Git Location: mod/interaction-1.0/objects/jellyfish/assets/setAlpha.lslp