Optional - xs_infomatic - home in pet.lsl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. // :CATEGORY:XS Pet
  2. // :NAME:XS Pet Robot
  3. // :AUTHOR:Ferd Frederix
  4. // :KEYWORDS: Pet,XS,breed,breedable,companion,Ozimal,Meeroo,Amaretto,critter,Fennux,Pets
  5. // :CREATED:2013-09-06
  6. // :EDITED:2014-01-30 12:24:21
  7. // :ID:988
  8. // :NUM:1459
  9. // :REV:0.50
  10. // :WORLD:Second Life, OpenSim
  11. // :DESCRIPTION:
  12. // XS Pet xs_infomatic when one pet is the home post
  13. // :CODE:
  14. // xs_infomatic
  15. // This code handles the hovertext and also the Dialog boxes
  16. // 4-10-2013 V 0.43 Lots of casting to fix Opensim 0.7.4 failures to parse llList2Float and llList2Integer when there are strings in the list
  17. // START OF COPIED file 'Global Constants.txt' from the Debug folder. It has to be the same in all files
  18. // If you change this in any script, change it in all of them, please. It works a lot better that way.
  19. // This is code based on Version 0.50 01-30-2014
  20. // For version history, see file revisions.txt
  21. //
  22. // LICENSE
  23. /////////////////////////////////////////////////////////////////////
  24. // This code is licensed as Creative Commons Attribution/NonCommercial/Share Alike
  25. // See http://creativecommons.org/liceses/by-nc-sa/3.0/
  26. // Noncommercial -- You may not use this work for commercial purposes, i.e., you cannot sell this script in any form, including derivatives.
  27. // If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
  28. // This means that you cannot sell this or derivative code by itself, but you may share and use this code in any object or virtual world.
  29. // You must attribute authorship in the original scripts to Ferd Frederix and Xundra Snowpaw, and leave this notice intact.
  30. // You do not have to give back to the community any changes you make, however, code changes would be greatly appreciated!
  31. //
  32. // Exception: I am allowing this script to be used in an original build and sold with the build.
  33. // You are not selling the script, you are selling the build. If you want to sell these scripts, write your own or use the original at http://code.google.com/p/xspets/
  34. // Note: Xundra Snowpaw's license was 'New BSD' license and adding additional licenses is allowed.
  35. // Based on code from Xundra Snowpaw
  36. // New BSD License: http://www.opensource.org/licenses/bsd-license.php
  37. // Copyright (c) 2010, Xundra Snowpaw
  38. // All rights reserved.
  39. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  40. //* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  41. //* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
  42. // in the documentationand/or other materials provided with the distribution.
  43. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  44. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
  45. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  46. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  47. // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  48. // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  49. ////////////////////////////////////////////////////////////////////
  50. // DEBUG - lets you see and hear wtf is happening
  51. integer debug = FALSE; // set to TRUE TO hear a lot of chat
  52. // This section has a few tuneable items that MUST be changed for any new pet
  53. // SECURITY
  54. string SECRET_PASSWORD = "top secret string"; // must use a password unique to any species of animal, when ENCRYPT= TRUE. Otherwise you will find Pet type A fucking pet type B.
  55. integer SECRET_NUMBER = 99999; // any number thats a secret, not necessary to change usually, this is used when pets are born and eggs are rezzed to establish a comm channel.
  56. integer ENCRYPT = TRUE; // set to TRUE to encrypt all data, Some Opensim worlds prefer FALSE due to parsing bugs, TRUE is the most secure. If FALSE you MUST change the FOOD_CHANNEL and other channels for different pets. or they will literally fuck each other.
  57. // if you add the UUID for your avatar here, you can change it later
  58. // and other alts or friends can change it too, and all of you can work on these pets.
  59. // If you leave it blank, only the creator of the root prim can work on these pets.
  60. key YOUR_UUID = "";
  61. // PET NAMES - YOU MUST CHANGE THEM HERE AND IN THE ROOT PRIM OF THE OBJECT - THEY MUST MATCH EXACTLY
  62. /////////////////////////
  63. string MaleName = "Troubot"; // Must be the name of your animal
  64. string FemaleName = "Troubot"; // The name of the female pet, if a different shape or prim count. Can be the same as the Male for pets like the robot that are unisex.
  65. string Egg = "Nut and Bolt"; // was 'XS Egg', must be the name of your egg
  66. string Crate = "Transport Spaceship"; // was XS-Cryocrate, must be the name of the crate you package pets in
  67. string HomeObject = "Home Flag"; // was "XS Home Object", must be the name of your Home Post indicator
  68. string EggCup = "Toolbox"; // was "XS Egg Cup", must be the name of your egg holder
  69. // any other object names are 'do not cares'.
  70. // NOTHING NEEDS TO BE CHANGED BELOW, BUT CAN BE CHANGED IF YOU DO IT EVERYWHERE
  71. // misc tunables
  72. float GROWTH_AMOUNT = 0.10; // 10% size increase each day for MaxAge days = 200% (double size after 7 days)
  73. integer MaxAge = 7; // stop growing in seven days. 10% growth compounded daily means that your pet will be 194% larger ( 2x, basically) in 7 days.
  74. integer UNITS_OF_FOOD = 168; // food bowl food qty, used by food bowl only
  75. float secs_to_grow = 86400; // grow daily = 86400 seconds
  76. float FOOD_BOWL_SCAN_INTERVAL = 10800.0; // look for food every 3 hours
  77. float fPregnancy = 172800.0; // how many seconds to lay an egg = 2 days or 48 hours.
  78. float MALE_TIMEOUT = 900.0 ; // in seconds, female waits this long in one spot for a male to arrive
  79. float SEX_WAIT = 10800.0; // How often they desire sex = 3 hours
  80. float fDaysToAdult = 7; // 7 days to become old enough to breed.
  81. integer SECONDS_BETWEEN_FOOD_NORMAL = 14400; // number of seconds to get hungry = 4 hours
  82. integer SECONDS_BETWEEN_FOOD_HUNGRY = 3600; // number of seconds before hunger count increases = 1 hour
  83. integer MAXIMUM_HUNGER = 30; // They die after a month with no food.
  84. // I control versions by Subversion Source Code Control. But the updater needs a version numbert in world.
  85. // This is the Protocol version. If you change this, then all pets with a lower version will be updated by the updater
  86. float VERSION = 0.50;
  87. // the leg sizes are safe to leave alone or set to 0 if you use a thin base prim, these are from the original Quail
  88. float LegLength = 0.064; // length of pet leg??? - not sure
  89. float LegOffset = 0.052399; // This is added to the Post Z to position the pet
  90. // the following are global constants and do not need to be changed
  91. // Prim animation linkmessages are sent by scripts on Link Message number 1
  92. // The strings are the names of the animations that are recorded.
  93. // No need to change them unless you want to change names of the animations when you run the prim animator, or you add additional link messages
  94. // If your pet walks, you need to record these names and save them in the notecard
  95. //
  96. // Example:
  97. // llMessageLinked(LINK_SET, LINK_ANIMATE, ANI_STAND, "");
  98. // The above line will play the pre-recorded 'stand up' animation "stand" using the animator script.
  99. // The following animations are used in the pet. You can add your own.
  100. string ANI_STAND = "stand"; // default standing animation
  101. string ANI_WALKL = "left"; // triggers Left foot and Right arm walk animation
  102. string ANI_WALKR = "right"; // triggers Right foot and Left arm walk animation
  103. string ANI_SLEEP = "sleep"; // Sleeping
  104. string ANI_WAVE = "wave"; // Calling for sex, needs help with food, etc.
  105. // Channel assignments
  106. // if you change any of these constants, change it everywhere and in the list in XS_Debug so it can print them
  107. // If you turn encryption FALSE, you MUST change these between species of pets are they will fuck with each other. Literally.
  108. integer FOOD_CHANNEL = -999191;
  109. integer ANIMAL_CHANNEL = -999192;
  110. integer EGG_CHANNEL = -999193;
  111. integer HOME_CHANNEL = -999194;
  112. integer BOX_CHANNEL = -999195;
  113. integer ACC_CHANNEL = -999196;
  114. integer UPDATE_CHANNEL = -999197;
  115. integer API_CHANNEL = -999198;
  116. // global link messages to control the animal, never any need to change these.
  117. // They are exposed here so they will be the same everywhere. This uses a bit of RAM, but who cares?
  118. integer LINK_ANIMATE = 1; // messages on num 1 are assumed to be directed at the prim animator.
  119. integer DECREASE_FOOD = 100; // used in the food bowl.
  120. integer LINK_AGE_START = 800; // when pety is rezzed and secret_number is sent by brain to breeder, eater and infomatic get booted up
  121. integer LINK_TEXTURE = 801; // ask for a new texture, or paint a color
  122. integer LINK_BREEDNAME = 802; // the name of the pet texture from the texture server notecard
  123. integer LINK_FOOD_CONSUME = 900; // from movement to brain when close to food, brain then consumes a random amount up to 10000
  124. integer LINK_FOODMINUS = 901; // xs_brain receives FOOD_CONSUME, decrement hunger (eat)
  125. integer LINK_HUNGRY = 903; // sent by eater (string)hunger_amount, checks each hour
  126. integer LINK_HAMOUNT = 904; // hunger_amount = (integer)str,m updates the hunger amount in scripts
  127. integer LINK_SET_HOME = 910; // loc ^ dist
  128. integer LINK_MOVER = 911; // tell mover to rest for str seconds
  129. integer LINK_FOODIE_CLR = 920; // clear all food_bowl_keys and contents
  130. integer LINK_FOODIE = 921; // send FOOD_LOCATION coordinates to movement
  131. integer LINK_COLOR1 = 930; // colour1
  132. integer LINK_COLOR2 = 931; // colour2
  133. integer LINK_SEX = 932; // sex
  134. integer LINK_SHINE = 933; // shine
  135. integer LINK_GLOW = 934; // glow
  136. integer LINK_GEN = 935; // generation
  137. integer LINK_RESET_SIZE = 936; // reset size to 1
  138. integer LINK_MAGE = 940; // xs_brain sends, xs_ager consumes, adds str to age, if older than 7 days, will grow the animal
  139. integer LINK_DAYTIME = 941; // xs_ager consumes, starts a timer of 86,400 seconds in xs_ager
  140. integer LINK_GET_AGE = 942; // get age from xs_ager and sent it on channel 943
  141. integer LINK_PUT_AGE = 943; // print age from xs_ager
  142. integer LINK_PACKAGE = 950; // look for a cryo_crate
  143. integer LINK_SEEK_FEMALE = 960; // MALE_BREED_CALL
  144. integer LINK_MALE_BREED_CALL = 961; // triggered by LINK_SEEK_FEMALE
  145. integer LINK_SIGNAL_ELIGIBLE = 962; // sent by female when hears LINK_MALE_BREED_CALL
  146. integer LINK_FEMALE_ELIGIBLE = 963; // sent when it hears in chat FEMALE_ELIGIBLE
  147. integer LINK_CALL_MALE = 964; // if LINK_FEMALE_ELIGIBLE && looking_for_female
  148. integer LINK_MALE_ON_THE_WAY = 965; // triggered by LINK_CALL_MALE
  149. integer LINK_FEMALE_LOCATION = 966; // female location, sends coordinates of a female
  150. integer LINK_RQST_BREED = 967; // sent when close enough to male/female
  151. integer LINK_CALL_MALE_INFO = 968; // sent by xs_breeding, this line of code was in error in v.24 of xs_breeding see line 557 and 636 of xs_brain which make calls and also xs_breeding which receives LINK_MALE_INFO.
  152. integer LINK_MALE_INFO = 969; // Breeding failed, sent info
  153. integer LINK_LAY_EGG = 970; // Rez Object(Egg...
  154. integer LINK_BREED_FAIL = 971; // key = father, failed, timed out
  155. integer LINK_PREGNANT = 972; // chick is preggers
  156. integer LINK_SOUND_OFF= 974; // sound is off
  157. integer LINK_SOUND_ON= 973; // sound is on
  158. integer LINK_SLEEPING = 990; // close eyes
  159. integer LINK_UNSLEEPING = 991; // open eyes
  160. integer LINK_SOUND = 1001; // plays a sound if enabled
  161. integer LINK_SPECIAL = 1010; // xs_special, if str = "Normal", removes script
  162. integer LINK_EFFECTS_ON = 2000; // particle effects in the packger
  163. integer LINK_PREGNANCY_TIME = 5000; // in seconds as str
  164. integer LINK_SLEEP = 7999; // disable sleep by parameter
  165. integer LINK_TIMER = 8000; // scan for food bowl about every 1800 seconds
  166. integer LINK_DIE = 9999; // death
  167. string Copyright = " (c)2014 by Ferd Frederix"; // You cannot change this line, but you can change the code that prints it!
  168. // See License agreements above.
  169. // Attribution is required, as these files are copyrighted.
  170. DEBUG ( string msg){
  171. if (debug) {
  172. llOwnerSay(llGetScriptName() + ":" + msg);
  173. }
  174. }
  175. ///////// end global Link constants ////////
  176. // END OF COPIED CODE
  177. integer hunger_amount;
  178. vector colour1;
  179. vector colour2;
  180. integer sex;
  181. integer shine;
  182. float glow;
  183. string pregnant;
  184. string sleep;
  185. integer gen;
  186. integer name_listener;
  187. integer menu_listener;
  188. integer age;
  189. integer play_sounds;
  190. string special;
  191. integer menu_expired;
  192. integer sleep_disabled;
  193. say_details()
  194. {
  195. string mysex;
  196. string myshine;
  197. if (sex == 1) {
  198. mysex = "Male";
  199. } else
  200. if (sex == 2) {
  201. mysex = "Female";
  202. } else {
  203. mysex = "unknown - not configured correctly";
  204. }
  205. if (shine == 0) {
  206. myshine = "None";
  207. } else
  208. if (shine == 1) {
  209. myshine = "Low";
  210. } else
  211. if (shine == 2) {
  212. myshine = "Medium";
  213. } else
  214. if (shine == 3) {
  215. myshine = "High";
  216. }
  217. llWhisper(0, "Color1: " + (string)colour1);
  218. llWhisper(0, "Color2: " + (string)colour2);
  219. llWhisper(0, "Shine: " + myshine);
  220. llWhisper(0, "Glow: " + (string)((integer)(glow * 100)) + "%");
  221. llWhisper(0, "Special: " + special);
  222. llWhisper(0, "Sex: " + mysex);
  223. llWhisper(0, "Age: " + (string)age + " days");
  224. llWhisper(0, "Generation: " + (string)gen);
  225. llSay(API_CHANNEL, "XSPet^" + (string)llGetKey() + "^" + (string)colour1 + "^" + (string)colour2 + "^" + (string)shine + "^" + (string)glow + "^" + special + "^" + (string)gen + "^" + (string)sex + "^" + (string)age + "^XSPetEnd");
  226. }
  227. default
  228. {
  229. link_message(integer sender, integer num, string str, key id)
  230. {
  231. if (num == LINK_AGE_START) { // this starts the aging process
  232. state running;
  233. }
  234. }
  235. }
  236. state running
  237. {
  238. state_entry()
  239. {
  240. hunger_amount = 0;
  241. age = 0;
  242. pregnant = "";
  243. play_sounds = TRUE;
  244. llListen(API_CHANNEL, "", "", "");
  245. }
  246. touch_start(integer total_number)
  247. {
  248. string mysex;
  249. if (sex == 1) {
  250. mysex = "Male";
  251. } else
  252. if (sex == 2) {
  253. mysex = "Female";
  254. } else {
  255. mysex = "unknown - not configured correctly";
  256. }
  257. llSetText(llGetObjectName() + "\n" + mysex + " - Age: " + (string)age + " - Gen: " + (string)gen + "\n" + "Hunger: " + (string)hunger_amount + "/" + (string)MAXIMUM_HUNGER + "\n" + pregnant + sleep, <1,1,1>, 1.0);
  258. say_details();
  259. menu_expired = 0;
  260. if (llDetectedKey(0) == llGetOwner()) {
  261. integer menu_chan = (integer)llFrand(10000.0) + 100;
  262. llListenRemove(menu_listener);
  263. menu_listener = llListen(menu_chan, "", llGetOwner(), "");
  264. llDialog(llGetOwner(), "What would you like to do?\n\n - Name: Name your pet "
  265. + "\n - Package: Place your pet"
  266. + "into a nearby " + Crate
  267. + "\n - Sound: Toggle Sound On/Off\n"
  268. + "- Home Object: Get a new home object\n"
  269. + "- Sleep: Toggle Sleep On/Off"
  270. + "- Home: Set Home"
  271. + "- Clr: Clear Home:",["Nothing", "Name", "Package", "Sound", "Home Object", "Sleep","Home"], menu_chan);
  272. menu_expired = 1;
  273. }
  274. llSetTimerEvent(30.0);
  275. }
  276. timer()
  277. {
  278. llListenRemove(menu_listener);
  279. llListenRemove(name_listener);
  280. llSetTimerEvent(0.0);
  281. llSetText("", <1,1,1>, 1.0);
  282. if (menu_expired) {
  283. llWhisper(0, "Menu Expired");
  284. menu_expired = 0;
  285. }
  286. }
  287. link_message(integer sender, integer num, string str, key id)
  288. {
  289. if (num == LINK_HUNGRY || num == LINK_HAMOUNT) {
  290. hunger_amount = (integer)str;
  291. } else
  292. if (num == LINK_FOODMINUS) {
  293. hunger_amount --;
  294. //eaten ++;
  295. } else
  296. if (num == LINK_COLOR1) {
  297. colour1 = (vector)str;
  298. } else
  299. if (num == LINK_COLOR2) {
  300. colour2 = (vector)str;
  301. } else
  302. if (num == LINK_SEX) {
  303. sex = (integer)str;
  304. } else
  305. if (num == LINK_SHINE) {
  306. shine = (integer)str;
  307. } else
  308. if (num == LINK_GLOW) {
  309. glow = (float)str;
  310. } else
  311. if (num == LINK_GEN) {
  312. gen = (integer)str;
  313. } else
  314. if (num == LINK_MAGE) {
  315. age += (integer)str;
  316. } else
  317. if (num == LINK_PREGNANT) {
  318. pregnant = "Pregnant";
  319. llSay(API_CHANNEL, "I'm Pregnant!");
  320. } else
  321. if (num == LINK_PREGNANCY_TIME) {
  322. sex = 2;
  323. if ((integer)str != 0) {
  324. pregnant = "Pregnant";
  325. }
  326. } else
  327. if (num == LINK_LAY_EGG) {
  328. pregnant = "";
  329. } else
  330. if (num == LINK_SLEEPING) {
  331. sleep = "\nSleeping";
  332. } else
  333. if (num == LINK_UNSLEEPING) {
  334. sleep = "";
  335. } else
  336. if (num == LINK_SPECIAL) {
  337. special = str;
  338. } else
  339. if (num == LINK_SET_HOME) {
  340. list data = llParseString2List(str, ["^"], []);
  341. llSetText("Home Set: " + llList2String(data, 0) + " " + llList2String(data, 1) + "m", <1,1,1>, 1.0);
  342. llSetTimerEvent(15.0);
  343. }
  344. }
  345. listen(integer channel, string name, key id, string msg)
  346. {
  347. if (channel == 0 && id == llGetOwner()) {
  348. list name_parts = llParseString2List(msg, [","], []);
  349. if (llToLower(llList2String(name_parts, 0)) == "name") {
  350. string myname = llStringTrim(llList2String(name_parts, 1), STRING_TRIM);
  351. integer i;
  352. for (i=0;i<llStringLength(myname);i++) {
  353. if (llGetSubString(myname, i, i) == "^") {
  354. llWhisper(0, "Sorry, cannot have a \"^\" in the name.");
  355. llListenRemove(name_listener);
  356. return;
  357. }
  358. }
  359. llWhisper(0, "My new name is " + myname);
  360. llMessageLinked(LINK_SET, LINK_ANIMATE, ANI_STAND, "");
  361. llMessageLinked(LINK_SET, LINK_ANIMATE, ANI_WAVE, "");
  362. llMessageLinked(LINK_SET, LINK_ANIMATE, ANI_STAND, "");
  363. llSetObjectName(myname);
  364. llListenRemove(name_listener);
  365. }
  366. } else if (channel == API_CHANNEL) {
  367. list data = llParseString2List(msg, ["^"], []);
  368. if (llList2String(data, 0) == "XSPet" && (key) llList2String(data, 1) == llGetKey()) {
  369. llSay(API_CHANNEL, "XSPet^" + (string)llGetKey() + "^" + (string)colour1 + "^" + (string)colour2 + "^" + (string)shine + "^" + (string)glow + "^" + special + "^" + (string)gen + "^" + (string)sex + "^" + (string)age + "^XSPetEnd");
  370. }
  371. } else if (channel != ANIMAL_CHANNEL) {
  372. llListenRemove(menu_listener);
  373. menu_expired = 0;
  374. if (msg == "Name") {
  375. llOwnerSay("You have 30 seconds to type a new name: (Format \"name, Charlie\")");
  376. name_listener = llListen(0, "", llGetOwner(), "");
  377. llSetTimerEvent(30.0);
  378. } else
  379. if (msg == "Package") {
  380. llMessageLinked(LINK_SET, LINK_PACKAGE, "", "");
  381. } else
  382. if (msg == "Sound") {
  383. if (play_sounds) {
  384. llMessageLinked(LINK_SET, LINK_SOUND_OFF, "", "");
  385. llWhisper(0, "Turning sound off.");
  386. } else {
  387. llMessageLinked(LINK_SET, LINK_SOUND_ON, "", "");
  388. llWhisper(0, "Turning sound on.");
  389. }
  390. play_sounds = !play_sounds;
  391. } else
  392. if (msg == "Home Object") {
  393. llGiveInventory(llGetOwner(), HomeObject);
  394. } else
  395. if (msg == "Sleep") {
  396. if (sleep_disabled) {
  397. llWhisper(0, "Enabling Sleeping.");
  398. } else {
  399. llWhisper(0, "Disabling Sleeping.");
  400. }
  401. sleep_disabled = !sleep_disabled;
  402. llMessageLinked(LINK_SET, LINK_SLEEP, (string)sleep_disabled, "");
  403. }
  404. else
  405. if (msg == "Home")
  406. {
  407. llMessageLinked(LINK_SET,0,"SET","");
  408. }
  409. else
  410. if (msg == "Clear")
  411. {
  412. llMessageLinked(LINK_SET,0,"CLR","");
  413. }
  414. }
  415. }
  416. }