merte_edenflower

Hair texturizer

Mar 29th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LScript 28.89 KB | None | 0 0
  1. // insert your server name between the quotemarks below
  2. string server = "not for you to know";
  3.  
  4. // insert your server's password between the quotemarks below
  5. string password = "no go";
  6.  
  7. // insert the product name between the quotemarks below
  8. string product = "Hair Retexturizer";
  9. // insert the current version number between the quotemarks below
  10. // don't use numbers like 1.2.4 ... stick to integers (1, 4, 9 etc.) or decimals (1.2, 4.12 etc.)
  11. string version = "0.0.1";
  12. // insert your avatar key below (use the server's "My Key" command to get it)
  13. string my_key = "d14e8ac2-6e74-4727-8afe-cb1dffc58b9e";
  14. integer elapsed = 43200;
  15. list HairNames;
  16. list HairUUID1;
  17. list HairUUID2;
  18. list HairNr;
  19. list ColorNr;
  20. list ColorNames;
  21. list ColorVector;
  22. list Xmin;
  23. list Xmax;
  24. list Ymin;
  25. list Ymax;
  26. list Hairpart;
  27. list Hairpartnr;
  28. list HudRot;
  29. integer sides;
  30. integer faceno;
  31. string partnr = "A";
  32. rotation rot_xyzq;
  33. rotation rot_xyzqn;
  34. integer channel;
  35. string myRPC;
  36. string serverKEY;
  37. string last_url;
  38. integer retries;
  39. string ownerName;
  40.  
  41. check_for_update()
  42. {
  43.     // calculate hashcode that will let the server identify paired communication events
  44.    
  45.     integer hash = ((integer) llFrand(9999) * llGetUnixTime()) % 65536;
  46.     if (hash < 0) {hash *= -1;}
  47.    
  48.    // perform a database lookup
  49.    
  50.    load_html("http://www.hippo-tech-sl.com/hippoupdate/update-give.php?N=" + llEscapeURL(server) + "&O=" + my_key + "&PS=" + llMD5String(password, 45736) + "&PR=" + llEscapeURL(product) + "&V=" + llEscapeURL(version) + "&TO=" + (string) llGetOwner() + "&TONAME=" + llEscapeURL(ownerName) + "&H=" + (string) hash + "&R=" + myRPC + "&T=" + (string) elapsed);
  51.    
  52.     llSetTimerEvent(60);
  53. }
  54.  
  55. load_html(string url)
  56. {
  57.     last_url = url;
  58. llHTTPRequest(url, [HTTP_METHOD,"GET"], "");
  59. llOwnerSay("Looking for updates");
  60. }
  61.  
  62. process_command(string message)
  63. {
  64.     list data = llParseStringKeepNulls(message, ["^"], []);
  65.     if (llList2String(data, 0) == "SUCCESS")
  66.     {
  67.         llSetTimerEvent(0);
  68.         llOwnerSay("No Update Found.");
  69.         return;
  70.     }
  71.     if (llList2String(data, 0) == "FAIL")
  72.     {
  73.     llSetTimerEvent(0);
  74.         llOwnerSay("something went wrong wile connecting with the update server, please try again later.");
  75.         return;
  76.     }
  77.     if (llList2String(data, 0) == "DOUPDATE")
  78.     {
  79.         serverKEY = llList2String(data, 1);
  80.         llEmail(serverKEY + "@lsl.secondlife.com", llMD5String(password, 28172) + "XGIVE", llList2String(data, 2) + "^" + llList2String(data, 3) + "^" + llList2String(data, 4) + "^" + llList2String(data, 5) + "^" + llList2String(data, 6) + "^" + llList2String(data, 7) + "^" + llList2String(data, 8) + "^" + llList2String(data, 9) + "^" + llList2String(data, 10));
  81.         llOwnerSay("Updated product is comming your way.");
  82.     }
  83. }
  84.  
  85. default
  86. {  
  87.     state_entry()
  88.     {
  89.         channel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF;
  90.         faceno = 0;
  91.         HudRot = [
  92.         llEuler2Rot(<0.0,270.0,270.0>*DEG_TO_RAD),
  93.         llEuler2Rot(<0.0,0.0,270.0>*DEG_TO_RAD),
  94.         llEuler2Rot(<0.0,0.0,180.0>*DEG_TO_RAD),
  95.         llEuler2Rot(<0.0,0.0,90.0>*DEG_TO_RAD),
  96.         llEuler2Rot(<0.0,0.0,0.0>*DEG_TO_RAD),
  97.         llEuler2Rot(<0.0,90.0,270.0>*DEG_TO_RAD)];
  98.         llSetLocalRot(llList2Rot(HudRot,1));
  99.         llOwnerSay((string)llGetFreeMemory());//1
  100.         sides = 5;
  101.         ColorNr= [
  102.         1041,
  103.         1042,
  104.         1043,
  105.         1044,
  106.         1045,
  107.         1046,
  108.    
  109.         1051,
  110.         1052,
  111.         1053,
  112.         1054,
  113.         1055,
  114.         1056,
  115.        
  116.         1061,
  117.         1062,
  118.         1063,
  119.         1064,
  120.         1065,
  121.         1066];
  122.         llOwnerSay((string)llGetFreeMemory());//2
  123.     ColorNames = [     
  124.         "Black",
  125.         "Orange",
  126.         "Brown",
  127.         "Maroon",
  128.         "Green",
  129.         "Olive",
  130.    
  131.         "Yellow",
  132.         "Lime",
  133.         "Fuchsia",
  134.         "White",
  135.         "Silver",
  136.         "Gray",
  137.        
  138.         "Red",
  139.         "Cyan",
  140.         "Blue",
  141.         "Dark Blue",
  142.         "Light Blue",
  143.         "Purple"];
  144.         llOwnerSay((string)llGetFreeMemory());//3
  145.    
  146.         ColorVector = [
  147.         <0.0000,0.0000,0.0000>,//1041
  148.         <1.0000,0.6470,0.0000>,//1042
  149.         <0.6470,0.1647,0.1647>,//1043
  150.         <0.5000,0.0000,0.0000>,//1044
  151.         <0.0000,0.5000,0.0000>,//1045
  152.         <0.5000,0.5000,0.0000>,//1046
  153.    
  154.         <1.0000,1.0000,0.0000>,//1051
  155.         <0.0000,1.0000,0.0000>,//1052
  156.         <1.0000,0.0000,1.0000>,//1053
  157.         <1.0000,1.0000,1.0000>,//1054
  158.         <0.7500,0.7500,0.7500>,//1055
  159.         <0.5000,0.5000,0.5000>,//1056
  160.    
  161.         <1.0000,0.0000,0.0000>,//1061
  162.         <0.0000,1.0000,1.0000>,//1062
  163.         <0.0000,0.0000,1.0000>,//1063
  164.         <0.0000,0.0000,0.6274>,//1064
  165.         <0.6784,0.8470,0.9019>,//1065
  166.         <0.5000,0.0000,0.5000>];//1066
  167.         llOwnerSay((string)llGetFreeMemory());//4
  168.         HairNames = [
  169.         "Golden Light",//1131
  170.         "Ice Blue",//1132
  171.         "Ice Mint",//1133
  172.         "Blank/none",//1134
  173.         "Blank/none",//1135
  174.         "Blank/none",//1136
  175.        
  176.         "Iced Perl",//1141
  177.         "Iced Pink",//1142
  178.         "Iced Plasma",//1143
  179.         "Iced Purple",//1144
  180.         "Ultra Light",//1145
  181.         "Golden Highlights",//1146
  182.        
  183.         "Iced Caramel",//1151
  184.         "Mocha Highlights",//1152
  185.         "Platinum Highlights",//1153
  186.         "Rich Cafe",//1154
  187.         "Swirl Caramel",//1155
  188.         "Swirl Choco",//1156
  189.        
  190.         "Swirl Golden",//1151
  191.         "Swirl Mocha",//1162
  192.         "Ultra Light",//1163
  193.         "Vanilla Highlights",//1164
  194.         "Vanilla Swirl",//1165
  195.         "Warm Brown",//1166
  196.        
  197.         "Barbie",//1221
  198.         "Berry",//1222
  199.         "Blood",//1223
  200.         "Blue Dream Highlights",//1224
  201.         "Bright Blue",//1225
  202.         "Bright Lime",//1226
  203.        
  204.         "Bright Ocean",//1231
  205.         "Bright Orange",//1232
  206.         "Bright Pink",//1233
  207.         "Bright Purple",//1234
  208.         "Bright Teal",//1235
  209.         "Bright Yellow",//1236
  210.        
  211.         "Bubblegum",//1241
  212.         "Candy Girl Highlights",//1242
  213.         "Chocolate Love",//1243
  214.         "Clubbin Highlights",//1244
  215.         "Deep Teal",//1245
  216.         "Egypt Highlights",//1246
  217.        
  218.         "Grape",//1251
  219.         "Grass Green",//1252
  220.         "Hot Pink",//1253
  221.         "Papaya",//1254
  222.         "Party",//1255
  223.         "Pumpkin",//1256
  224.        
  225.         "Purple",//1261
  226.         "Raspberry",//1262
  227.         "Red",//1263
  228.         "Stephy",//1264
  229.         "Tiffany",//1265
  230.         "Vamp Highlights",//1266
  231.        
  232.         "Blondie",//1421
  233.         "Black",//1422
  234.         "Beach Blonde",//1423
  235.         "Amber",//1424
  236.         "Blank/none",//1425
  237.         "Invisible",//1426
  238.        
  239.         "Chestnut",//1431
  240.         "Caramel",//1432
  241.         "Buttercup",//1433
  242.         "Bright Chestnut",//1434
  243.         "Boston Caramel",//1435
  244.         "Bombshell",//1436
  245.        
  246.         "Heather",//1441
  247.         "Goth Red",//1442
  248.         "Goldenrod",//1443
  249.         "Golden Light",//1444
  250.         "Dirty Blonde",//11445
  251.         "Creme Brown",//446
  252.        
  253.         "Pippy",//1451
  254.         "Mocha",//1452
  255.         "Mandi",//1453
  256.         "Madrid",//1454
  257.         "Jenny",//1455
  258.         "Jamie",//1456
  259.        
  260.         "Telia",//1461
  261.         "Sandy",//1462
  262.         "Sandra",//1463
  263.         "Sammie",//1464
  264.         "Saddle",//1465
  265.         "Reflected Goth"];//1466
  266.         llOwnerSay((string)llGetFreeMemory());//5
  267.        
  268.         HairUUID2 = [
  269.         "92f07459-aa18-465b-c0e0-062e5fcc5136",//1131
  270.         "e4602a52-6865-19df-e9a5-66a53a42110e",//1132
  271.         "fa3ebac3-9502-e982-6ec5-4f595d0201fb",//1133
  272.         "5748decc-f629-461c-9a36-a35a221fe21f",//1134
  273.         "5748decc-f629-461c-9a36-a35a221fe21f",//1135
  274.         "5748decc-f629-461c-9a36-a35a221fe21f",//1136
  275.        
  276.         "0a392b5a-25ac-68cb-ccbc-ec73e1616883",//1141
  277.         "132a1572-ecfd-76a3-89d9-bdedfafb1d6c",//1142
  278.         "07a5b0b6-d659-bd53-a433-598de96a2c26",//1143
  279.         "6c32d69d-0263-9090-5e2c-8cdacf16a59f",//1144
  280.         "65e1c058-2757-e5b6-d6e9-653a58c56a63",//1145
  281.         "6f4041fc-1dbb-59d1-c58d-079e4c2f2c6b",//1146
  282.        
  283.         "7722d66b-71d5-819e-8e94-39f32339a8ff",//1151
  284.         "57429559-cc1e-c06f-9a08-9f6ba7b46ef8",//1152
  285.         "c15b88c7-14ab-b4a6-b16e-32aa38de617c",//1153
  286.         "eafed1ef-df9c-bb4a-0bc6-e15b2549f799",//1154
  287.         "d159dab5-7c4d-fc4a-c900-e328b1facea5",//1155
  288.         "145a2c72-90fd-0372-8a56-8a00af8533ca",//1156
  289.        
  290.         "b4081919-4185-1575-337b-6694f80890b3",//1161
  291.         "6455f683-3184-9b68-4520-01a0ab48b015",//1162
  292.         "65e1c058-2757-e5b6-d6e9-653a58c56a63",//1163
  293.         "b2bd0ed3-8c4f-7f26-4400-192ff393fb8c",//1164
  294.         "d1b97bc7-a76a-780c-b8d3-74b13c39f841",//1165
  295.         "6d4c8b4c-b5d1-8bea-1199-f570ccc4d443",//1166
  296.        
  297.         "15d20f4f-b883-8e08-decf-9840eb0b5f35",//1221
  298.         "4930adb4-e57e-db67-e040-4962a0d97683",//1222
  299.         "3bbf9b9b-079f-827d-904e-f5cb60bbaf81",//1223
  300.         "808a2f72-56c9-31b3-c317-e24d85b0471a",//1224
  301.         "d95ab6ec-3472-cfd6-a880-e2a588b6f9c9",//1225
  302.         "802fc1e3-0917-ee63-5d93-e07359570a13",//1226
  303.        
  304.         "bb9361f3-a4dd-4517-3ff3-55a2f70ac291",//1231
  305.         "5c6520ce-dd93-7018-dbcf-3dd2e61be664",//1232
  306.         "2b6693ac-99b2-c8e1-1fdc-532fa25be431",//1233
  307.         "2653cca1-636b-b580-963c-effa796be661",//1234
  308.         "fb293c97-80db-95be-2e46-de38cdfd3aa0",//1235
  309.         "e76ee3ad-51bd-0283-f0ec-d29099b8c39e",//1236
  310.        
  311.         "7c2f1917-bcca-9b43-a589-bb6b8399fab7",//1241
  312.         "66f6690c-3e2d-fd5a-63a9-1d6efc9c6ee2",//1242
  313.         "2d3e1a57-7e49-1f47-076d-561ce5d8eca0",//1243
  314.         "46efb417-bdc6-c2f5-a61d-7266f911e523",//1244
  315.         "c03d71bb-b351-292f-9d0e-88d356a49d41",//1245
  316.         "f523dfdf-1f19-ff1c-0620-85b898ad54a2",//1246
  317.        
  318.         "7a9e2110-4970-1262-fba0-4d472656d2d5",//1251
  319.         "de4faea7-5fc4-ab89-f6ed-60056f55d533",//1252
  320.         "c4369219-6129-4b78-6a65-2f20bbe797ca",//1253
  321.         "04db0954-963a-b583-85e4-9d133e295d65",//1254
  322.         "6e43d69b-e60b-d111-ae49-053f1365c809",//1255
  323.         "46bd2436-94b7-4aa0-8d31-3d72b37d99a7",//1256
  324.        
  325.         "b7a214c9-6099-a94b-4fd5-40d517986571",//1261
  326.         "fc9f656e-97e9-fc4a-6393-b8531639a821",//1262
  327.         "6e4d2910-ff2f-eeeb-8556-43e5520c2bff",//1263
  328.         "360ad55e-606c-fd50-9ce6-9155d2a9e64f",//1264
  329.         "77df9dfa-063d-597d-a1df-6e3b7cb437d3",//1265
  330.         "96b6ae71-c3a6-0242-b214-f8325796c095",//1266
  331.        
  332.         "e1e0f03f-c97b-baef-2fc7-b93b8feeaff4",//1421
  333.         "fd0db2a7-da91-0328-c4c7-d54d3fece789",//1422
  334.         "5502523a-3458-9c7e-92f5-a891098e7fe3",//1423
  335.         "5a57b143-5b82-8cc3-1479-12613cc6f401",//1424
  336.         "5748decc-f629-461c-9a36-a35a221fe21f",//1425
  337.         "bd7d7770-39c2-d4c8-e371-0342ecf20921",//1426
  338.        
  339.         "76770b76-370b-f4d2-854b-c5f51f940ee4",//1431
  340.         "1bf94260-6fb6-087e-32d5-a7259365d656",//1432
  341.         "10b4ff63-c5d8-9f22-3633-ededbd57d054",//1433
  342.         "15feed17-154a-815f-30bd-a557f5efbc6b",//1434
  343.         "1ada9bb5-21bf-f840-723f-08a9f66ae0e3",//1435
  344.         "303716ef-00e8-4e2b-c33f-cbaf4fabe332",//1436
  345.        
  346.         "81c959ce-8774-5e38-1210-fd5129f1d198",//1441
  347.         "16c05726-5150-1005-e324-10be238680fd",//1442
  348.         "2f1160ba-7669-60e4-a800-eb92841520c7",//1443
  349.         "a50ae2ce-41cf-bf29-50d5-5cc119d50425",//1444
  350.         "f6319b49-8788-f279-a463-565328f9c7b8",//1445
  351.         "06d4a3cf-b5c0-aee6-7804-daee9ebbe862",//1446
  352.        
  353.         "6eb8922e-c061-5900-f07f-f77efb840ec7",//1451
  354.         "d2e1fc1a-1e86-4fec-8d43-e32d5d421282",//1452
  355.         "22243232-24e8-2ed5-f472-4caa45a9df0d",//1453
  356.         "e475fdb6-26b5-f733-3d6d-f03ffdf8d5d4",//1454
  357.         "9abf2b72-6b03-5e37-7664-112c814b3247",//1455
  358.         "3949b910-db8e-c468-8ee9-71697fdd8deb",//1456
  359.        
  360.         "3cd951fd-b356-be36-f51f-844835087ce4",//1461
  361.         "707a6c79-3bcf-0611-5491-8316b3193580",//1462
  362.         "6754e076-31f3-c315-e532-19046e499cfa",//1463
  363.         "66ddf90d-b3b9-e03b-1415-c4c07957c6ca",//1464
  364.         "cf374324-2cb8-7314-d939-5ef075d1143f",//1465
  365.         "543f06e6-b708-8f88-fa2e-4abe04736e3b"];//1466
  366.         llOwnerSay((string)llGetFreeMemory());//6
  367.         HairUUID1 = [
  368.         "c4577f82-14c2-04dd-ee10-90deebde0997",//1121
  369.         "54a79351-00e7-2fe3-1fda-c3a58ab5f4fa",//1122
  370.         "9c0c23a5-3692-17fe-1849-18d7b67d32b1",//1133
  371.         "5748decc-f629-461c-9a36-a35a221fe21f",//1134
  372.         "5748decc-f629-461c-9a36-a35a221fe21f",//1135
  373.         "5748decc-f629-461c-9a36-a35a221fe21f",//1136
  374.        
  375.         "196dbe7a-a5c0-fbe8-e192-2fe0abc26857",//1141
  376.         "5af0e14e-81ab-9c20-6562-1da8582916be",//1142
  377.         "48176669-4a24-273a-2a29-2ac1551ed999",//1143
  378.         "8712a40d-c7d9-f338-b72e-4a8bfce5cd45",//1144
  379.         "7f2c82b9-4bed-9a58-badd-c5b3c4b0af19",//1145
  380.         "9a35da38-dac1-cc27-7837-83ba9ecb067a",//1146
  381.        
  382.         "887b28b3-6332-020d-5865-0a8b14c74b1c",//1151
  383.         "2fa50eba-5c0c-79dc-5ddc-44b9043b393e",//1152
  384.         "740d7b19-fb69-c2cc-cf5c-8d3a5ab9c1d8",//1153
  385.         "225d84d0-4721-2b3d-3ee8-7aed391a9fa9",//1154
  386.         "5056026f-d65a-1c4d-fd2f-e017273af246",//1155
  387.         "207fde6a-b7f8-46af-aef3-4a72a0391d1b",//1156
  388.        
  389.         "6c057019-2871-f66a-7b6a-cb3c6cdfd6bc",//1161
  390.         "a814ac56-7e53-010a-0cd4-3f5e139453bb",//1162
  391.         "7f2c82b9-4bed-9a58-badd-c5b3c4b0af19",//1163
  392.         "124b909d-f5d5-9efa-2dcd-447a5fabf8a9",//1164
  393.         "0f06a5bb-d281-039b-7c3a-46cde38d9d21",//1165
  394.         "c0c6b58d-d7af-8363-a5a7-13abb05516a1",//1166
  395.        
  396.         "915d7df1-ab34-75ed-98c5-387bdb19e028",//1221
  397.         "cc41ba4f-33b1-74d6-9520-445969163f09",//1222
  398.         "abc7d22a-4c81-fab0-227a-719e5368d424",//1223
  399.         "c97a0409-2868-d344-461c-c1ecd283f196",//1224
  400.         "37bbc488-3d0a-6387-6eb7-3189934fe64c",//1225
  401.         "d363f5b7-1f4b-26df-d247-896f52efe0ca",//1226
  402.        
  403.         "f94bef13-73cc-0a07-831e-451eae83dc8f",//1231
  404.         "a13cd1c6-0053-5ab6-d051-b171a7017f06",//1232
  405.         "2d3464af-b330-2272-4121-64da3ab02dbc",//1233
  406.         "669408b2-ca79-8c47-1e6b-01cbc3b74e6f",//1234
  407.         "d1f738f4-9044-43bc-88dd-5616426406a1",//1235
  408.         "5f20a50a-9fa9-8da2-2287-326514911285",//1236
  409.        
  410.         "3969a092-e68f-3df1-e571-c431577a2a73",//1241
  411.         "6826fcf5-721a-85b8-5f28-525e858cee15",//1242
  412.         "0f16d5ff-753a-4c4f-9f6c-ac1bd3c70da2",//1243
  413.         "e92e9ea0-4e98-cd87-d084-2f649b264dba",//1244
  414.         "2316ae1c-4bf8-b948-8ecb-a64e3f56685c",//1245
  415.         "0ef32140-edd0-da6f-8043-c0efeecc136e",//1246
  416.        
  417.         "d2ea6572-b8f6-2fc1-9622-73ce08431d9a",//1251
  418.         "591758d5-d1d9-3d8f-b1a9-7a4f0de7abf5",//1252
  419.         "56576b21-5b1b-936a-615a-10616c4f8ed4",//1253
  420.         "cb9ac7cc-92d0-e749-4296-a790a409f61d",//1254
  421.         "7769ea85-4127-37c8-9035-a57f037404b0",//1255
  422.         "6e316536-688b-b59e-bde5-a8ab02468974",//1256
  423.        
  424.         "3c06cd13-fce5-1f26-bb7d-4e46b9c45729",//1261
  425.         "dde43d73-156f-3500-80bb-ad3bfc4f3e8a",//1262
  426.         "65b006f7-8de9-e729-3074-8397bbda5063",//1263
  427.         "628cdb49-fbe4-6d39-0fc1-732436c89834",//1264
  428.         "46301706-3591-5f13-3a40-f1ac6bf5eba3",//1265
  429.         "5a94da7c-f01e-4f1c-2022-53d063a7d6c2",//1266
  430.        
  431.         "4e0bcce7-0276-728c-f713-c4fa9278bc8f",//1421
  432.         "b155fd00-9a66-4d52-93ce-5827a538e7ef",//1422
  433.         "5d8a50b9-9b7f-df49-aede-d6cd180c2b65",//1423
  434.         "fd9df09b-71d9-bc7d-c3fa-bd7cb4ace224",//1424
  435.         "5748decc-f629-461c-9a36-a35a221fe21f",//1425
  436.         "bd7d7770-39c2-d4c8-e371-0342ecf20921",//1426
  437.        
  438.         "ab2ff86c-9e8c-31c4-e43b-94f34b4c153f",//1431
  439.         "8850f6ec-3ee6-e7bf-868d-884f8bcb81f4",//1432
  440.         "3b4ec20e-7105-8b49-51dc-f64a601f11ea",//1433
  441.         "6e44275a-981a-e958-c956-a83d75f31517",//1434
  442.         "c2416607-3031-5941-0e52-6845a2d0d203",//1435
  443.         "de260925-3d4c-4c39-a297-86a967a50a12",//1436
  444.        
  445.         "91647c97-5e07-7c34-c28b-c06f313cc0dc",//1441
  446.         "d59dd7cc-da06-ffb4-e332-81ca1571d89d",//1442
  447.         "2adf755b-f2a0-283b-e656-dd11f8db66f2",//1443
  448.         "5109bfc1-a221-eeac-0a26-a6c53be2787a",//1444
  449.         "c7c5dd36-8b3a-c8e6-76e1-386c72ff1ae7",//1445
  450.         "4e75aa34-f359-51e9-1993-5b98cb3b2809",//1446
  451.        
  452.         "72ef5077-6097-6193-616f-5df971e05cda",//1451
  453.         "1cb26d3a-121a-8a31-8d68-0e5fb467d5e2",//1452
  454.         "07f055c4-e4c5-5b59-c75c-0374b5ef4f7d",//1453
  455.         "86fa0778-819f-5717-83dd-6bcd8f2e2376",//1454
  456.         "e732454c-e2a9-b5b6-32db-58ce7f9dfc2b",//1455
  457.         "3dadd1a0-a396-a903-e88d-5252844fd8a3",//1456
  458.        
  459.         "89c30cee-c845-2c20-9c0b-84ec690ea7dc",//1461
  460.         "06fd68e4-9aa7-8aea-ca95-673b1ddd3779",//1462
  461.         "0640c52e-9819-e3aa-a58e-04d80c59af88",//1463
  462.         "c84eeba7-24af-ad31-d360-2774a2d6295c",//1464
  463.         "be88c004-26de-1921-14db-71ec2ee85e32",//1465
  464.         "b2a789d7-bb8e-1081-77b3-31ddb7148322"];//1466
  465.         llOwnerSay((string)llGetFreeMemory());//7
  466.         HairNr = [
  467.         //first row (X11 trough X16is for controls
  468.         1131,
  469.         1132,
  470.         1133,
  471.         1134,
  472.         1135,
  473.         1136,
  474.         1141,
  475.         1142,
  476.         1143,
  477.         1144,
  478.         1145,
  479.         1146,
  480.         1151,
  481.         1152,
  482.         1153,
  483.         1154,
  484.         1155,
  485.         1156,
  486.         1161,
  487.         1162,
  488.         1163,
  489.         1164,
  490.         1165,
  491.         1166,
  492.         1221,
  493.         1222,
  494.         1223,
  495.         1224,
  496.         1225,
  497.         1226,
  498.         1231,
  499.         1232,
  500.         1233,
  501.         1234,
  502.         1235,
  503.         1236,
  504.         1241,
  505.         1242,
  506.         1243,
  507.         1244,
  508.         1245,
  509.         1246,
  510.         1251,
  511.         1252,
  512.         1253,
  513.         1254,
  514.         1255,
  515.         1256,
  516.         1261,
  517.         1262,
  518.         1263,
  519.         1264,
  520.         1265,
  521.         1266,
  522.         1421,
  523.         1422,
  524.         1423,
  525.         1424,
  526.         1425,
  527.         1426,
  528.         1431,
  529.         1432,
  530.         1433,
  531.         1434,
  532.         1435,
  533.         1436,
  534.         1441,
  535.         1442,
  536.         1443,
  537.         1444,
  538.         1445,
  539.         1446,
  540.         1451,
  541.         1452,
  542.         1453,
  543.         1454,
  544.         1455,
  545.         1456,
  546.         1461,
  547.         1462,
  548.         1463,
  549.         1464,
  550.         1465,
  551.         1466];
  552.         llOwnerSay((string)llGetFreeMemory());//8
  553.         Hairpart = [
  554.         "A"];
  555.         llOwnerSay((string)llGetFreeMemory());//9
  556.         Hairpartnr = [
  557.         4];
  558.         llOwnerSay((string)llGetFreeMemory());//10
  559.         Xmin = [//Data to figure out where the face has been touched/invisible lines
  560.         0.000000,
  561.         0.171642,
  562.         0.335821,
  563.         0.500000,
  564.         0.664179,
  565.         0.828358,
  566.         1.000000];
  567.         llOwnerSay((string)llGetFreeMemory());//11
  568.         Ymin = [
  569.         0.000000,
  570.         0.171642,
  571.         0.335821,
  572.         0.500000,
  573.         0.664179,
  574.         0.828358,
  575.         1.000000];
  576.         llOwnerSay((string)llGetFreeMemory());//12
  577.         llSetLinkPrimitiveParamsFast(2,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  578.         llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  579.         llSetLinkPrimitiveParamsFast(4,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  580.         llSetLinkPrimitiveParamsFast(5,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  581.         llSetLinkPrimitiveParamsFast(6,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  582.         llSetLinkPrimitiveParamsFast(7,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  583.         llOwnerSay((string)llGetFreeMemory());//13
  584.         ownerName = llKey2Name(llGetOwner());
  585.         if (llGetInventoryPermMask(llGetScriptName(), MASK_NEXT) & PERM_TRANSFER) {llWhisper(0, "Warning! Transfer permissions are set on " + llGetScriptName() + "!");}
  586.         if (llGetInventoryPermMask(llGetScriptName(), MASK_NEXT) & PERM_MODIFY) {llWhisper(0, "Warning! Modify permissions are set on " + llGetScriptName() + "!");}
  587.         llOpenRemoteDataChannel();
  588.         }
  589.  
  590.     touch_start(integer total_number)
  591.     {
  592.    
  593.         integer d = llDetectedLinkNumber(0);
  594.         vector touchplace = llDetectedTouchUV(0);
  595.         if (d==1)
  596.         {
  597.             integer a=0;
  598.             while(touchplace.x > llList2Float(Xmin,a))
  599.             {
  600.                 a++;
  601.             }
  602.             integer b=0;
  603.             while(touchplace.y > llList2Float(Ymin,b))
  604.             {
  605.                 b++;
  606.             }
  607.             if (b==1)
  608.             {
  609.                 if(a==6)
  610.                 {
  611.                     faceno += 1;
  612.                 }
  613.                 else if(a==1)
  614.                 {
  615.                     faceno -= 1;
  616.                 }
  617.                 if (faceno > sides)
  618.                 {
  619.                     faceno = 0;
  620.                 }
  621.                 else if (faceno < 0)
  622.                 {
  623.                     faceno = sides;
  624.                 }
  625.                 llSetLocalRot(llList2Rot(HudRot,faceno));
  626.             }
  627.             else
  628.             {
  629.                 integer c = llDetectedTouchFace(0);
  630.                 llOwnerSay("Face:" + (string)c);
  631.                 integer pointcode = (d*1000)+(c*100)+(b*10)+a;
  632.                 //llOwnerSay("Code:" + (string)pointcode);
  633.                 integer primalindex = llListFindList(HairNr,[pointcode]);
  634.                 if(primalindex != -1)
  635.                 {
  636.                     //llOwnerSay((string)primalindex);
  637.                     llOwnerSay("Applying " + llList2String(HairNames,primalindex) + " To part " + partnr);
  638.                     list message;
  639.                     message += [partnr];
  640.                     message += ["Hairtexture"];
  641.                     message += [llList2Key(HairUUID1,primalindex)];
  642.                     message += [llList2Key(HairUUID2,primalindex)];
  643.                     string txtmessage = llDumpList2String(message,"|");
  644.                     llSay(channel,txtmessage);
  645.                     //llOwnerSay(txtmessage);
  646.                 }
  647.                 //list ColorNr;
  648.                 //list ColorNames;
  649.                 //list ColorVector;
  650.                     llOwnerSay((string)pointcode);
  651.                 integer primalindex2 = llListFindList(ColorNr,[pointcode]);
  652.                 llOwnerSay((string)primalindex2);
  653.                 if(primalindex2 != -1)
  654.                 {
  655.                     llOwnerSay((string)primalindex2);
  656.                     llOwnerSay("Applying " + llList2String(ColorNames,primalindex2) + " To part " + partnr);
  657.                     list message2;
  658.                     message2 += ["COL" + (string)partnr];
  659.                     message2 += ["Color"];
  660.                     message2 += [llList2Vector(ColorVector,primalindex2)];
  661.                     string txtmessage2 = llDumpList2String(message2,"|");
  662.                     llSay(channel,txtmessage2);
  663.                     llOwnerSay(txtmessage2);
  664.                 }
  665.             }
  666.         }
  667.         if (d==2|d==3|d==4|d==5|d==6|d==7)
  668.         {
  669.             vector touchplace = llDetectedTouchUV(0);
  670.             //llOwnerSay((string)touchplace);
  671.             if (touchplace.x < 1.2)
  672.             {  
  673.                 //llOwnerSay("A");
  674.                 llSetLinkPrimitiveParamsFast(2,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  675.                 llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  676.                 llSetLinkPrimitiveParamsFast(4,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  677.                 llSetLinkPrimitiveParamsFast(5,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  678.                 llSetLinkPrimitiveParamsFast(6,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  679.                 llSetLinkPrimitiveParamsFast(7,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.4,1.0>,0.0]);
  680.                 partnr = "A";
  681.             }
  682.             else if (touchplace.x < 1.4)
  683.             {  
  684.                 //llOwnerSay("B");
  685.                 llSetLinkPrimitiveParamsFast(2,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.2,1.0>,0.0]);
  686.                 llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.2,1.0>,0.0]);
  687.                 llSetLinkPrimitiveParamsFast(4,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.2,1.0>,0.0]);
  688.                 llSetLinkPrimitiveParamsFast(5,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.2,1.0>,0.0]);
  689.                 llSetLinkPrimitiveParamsFast(6,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.2,1.0>,0.0]);
  690.                 llSetLinkPrimitiveParamsFast(7,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.2,1.0>,0.0]);
  691.                 partnr = "B";
  692.             }
  693.             else if (touchplace.x < 1.6)
  694.             {  
  695.                 //llOwnerSay("C");
  696.                 llSetLinkPrimitiveParamsFast(2,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.0,1.0>,0.0]);
  697.                 llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.0,1.0>,0.0]);
  698.                 llSetLinkPrimitiveParamsFast(4,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.0,1.0>,0.0]);
  699.                 llSetLinkPrimitiveParamsFast(5,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.0,1.0>,0.0]);
  700.                 llSetLinkPrimitiveParamsFast(6,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.0,1.0>,0.0]);
  701.                 llSetLinkPrimitiveParamsFast(7,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.0,1.0>,0.0]);
  702.                 partnr = "C";
  703.             }
  704.             else if (touchplace.x < 1.8)
  705.             {  
  706.                 //llOwnerSay("D");
  707.                 llSetLinkPrimitiveParamsFast(2,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.8,1.0>,0.0]);
  708.                 llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.8,1.0>,0.0]);
  709.                 llSetLinkPrimitiveParamsFast(4,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.8,1.0>,0.0]);
  710.                 llSetLinkPrimitiveParamsFast(5,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.8,1.0>,0.0]);
  711.                 llSetLinkPrimitiveParamsFast(6,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.8,1.0>,0.0]);
  712.                 llSetLinkPrimitiveParamsFast(7,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.8,1.0>,0.0]);
  713.                 partnr = "D";
  714.             }
  715.             else if (touchplace.x < 2.0)
  716.             {
  717.                 //llOwnerSay("E");
  718.                 llSetLinkPrimitiveParamsFast(2,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.6,1.0>,0.0]);
  719.                 llSetLinkPrimitiveParamsFast(3,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.6,1.0>,0.0]);
  720.                 llSetLinkPrimitiveParamsFast(4,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.6,1.0>,0.0]);
  721.                 llSetLinkPrimitiveParamsFast(5,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.6,1.0>,0.0]);
  722.                 llSetLinkPrimitiveParamsFast(6,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.6,1.0>,0.0]);
  723.                 llSetLinkPrimitiveParamsFast(7,[PRIM_TEXTURE, ALL_SIDES, "8a7c5988-d76b-a2d9-1f8c-622225199b7b",<1.0,0.2,1.0>, <1.0,0.6,1.0>,0.0]);
  724.                 partnr = "E";
  725.             }
  726.         }
  727.     }
  728.     http_response(key id, integer err, list metadata, string body)
  729.     {        
  730.         if (err == 404 || err == 500)
  731.         {
  732.             retries++;
  733.             if (retries > 4) {retries = 0; last_url = ""; llSetTimerEvent(0);}
  734.             if (last_url !="") {load_html(last_url);}
  735.         }
  736.         else
  737.         {
  738.             last_url = ""; retries = 0;
  739.             process_command(body);
  740.         }
  741.     }
  742.     timer()
  743.     {
  744.         llSetTimerEvent(0);
  745.        
  746.     }
  747.    
  748.     remote_data(integer type, key channel, key message_id, string sender, integer idata, string sdata)
  749.     {
  750.         if (type == REMOTE_DATA_CHANNEL)
  751.         {
  752.             myRPC = channel;
  753.             check_for_update();
  754.             return;
  755.         }
  756.        
  757.         if (type == REMOTE_DATA_REQUEST)
  758.         {
  759.             process_command(sdata);
  760.         }
  761.     }
  762.     on_rez(integer params)
  763.     {
  764.         llResetScript();
  765.     }
  766. }
Advertisement
Add Comment
Please, Sign In to add comment