Edie_Shoreland

Lena Perky/Lush Anti-Walk of Shame v1

Mar 8th, 2019
414
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //NawtieNitey Resident  March 8, 2019
  2. //Tested on Lena Perky 3.13
  3.  
  4. //Not perfect, but it gets you dressed if you find yourself
  5. //teleported to or rezzing on an unfamiliar sim (maintenence
  6. //days or times where you've logged off naked in one of your
  7. //non-usual hangouts). This script allows you to shop "naked"
  8. //if you need to test animations on a PG or Mature sim, or if
  9. //you simply don't feel like putting on an outfit.
  10.  
  11. //Create a new script in your Lena body. Copy and paste this
  12. //code to the new script, and save it. Find a safe place to
  13. //teleport nude and select the level of "dress" you want for
  14. //the sim.  You can opt to whitelist the sim for "always nude"
  15. //or select to be nude for this visit only, wear a catsuit, or
  16. //ignore the dialog and keep your new default "tights".
  17.  
  18. //The script records your skin's default colors, and without
  19. //changing the texture, darkens specific areas of the Lena
  20. //Perky/Lush and gives the appearance of clothing when you're
  21. //in nudity restricted regions.  When you teleport back to
  22. //a whitelist region, your body will return to it's formerly
  23. //"nude" state.  CAUTION: Make sure your entire Lena body's
  24. //base color is white (or it's normal default color) BEFORE
  25. //resetting or saving the script.  Don't panic if you forget,
  26. //just edit the body, select white, then reset the script.
  27.  
  28. //Type "quiet" in your Lena's object description if you don't
  29. //want the alerts.
  30.  
  31. integer bl0 = 1;
  32. integer bl1;
  33. integer bu0;
  34. integer bu1;
  35. integer nip;
  36. vector bl0skco = <1.00,1.00,1.00>;
  37. vector bl1skco = <1.00,1.00,1.00>;
  38. vector bu0skco = <1.00,1.00,1.00>;
  39. vector bu1skco = <1.00,1.00,1.00>;
  40. vector nipskco = <1.00,1.00,1.00>;
  41.  
  42. key lenaOwner;
  43. integer avichan;
  44. integer lisHandle;
  45.  
  46. list Nakiespots;
  47.  
  48. getLinkNum()
  49. {
  50.     integer primCount = llGetNumberOfPrims();
  51.     integer i;
  52.     for (i=0; i<primCount+1;i++)
  53.     {
  54.         if (llGetLinkName(i)=="BodyLw1") bl1 = i;
  55.         if (llGetLinkName(i)=="BodyUp0") bu0 = i;
  56.         if (llGetLinkName(i)=="BodyUp1") bu1 = i;
  57.         if (llGetLinkName(i)=="Nipples") nip = i;
  58.     }
  59.     bl0 = 1;
  60. }
  61.  
  62. integer alertMe (string ObjDesc)
  63. {
  64.     integer giveAlert;
  65.     ObjDesc = llToLower(ObjDesc);
  66.     //and here's where the magic happens...
  67.     if (llSubStringIndex(ObjDesc, "quiet") == -1) giveAlert = TRUE;
  68.     else giveAlert = FALSE;
  69.     return giveAlert;
  70. }
  71.  
  72. wearTights()
  73. //llSetPrimitiveParamsFast also changes the alpha, and
  74. //while you should still be "dressed" well before the
  75. //typical time it takes for mesh outfits to rez when
  76. //teleporting into a new sim, this function may change
  77. //in the future.
  78. {
  79.     llSetLinkColor(nip, <0.01,0.05,0.05>, ALL_SIDES);
  80.     llSetLinkColor(bu0, <0.01,0.05,0.05>, ALL_SIDES);
  81.     llSetLinkColor(bl0, <0.50,0.50,0.55>, ALL_SIDES);
  82.     llSetLinkColor(bl1, <0.01,0.05,0.05>, ALL_SIDES);
  83.     llSetLinkColor(bl1, <0.50,0.50,0.55>, 0);
  84.     llSetLinkColor(bl1, <0.50,0.50,0.55>, 1);
  85.     llSetLinkColor(bu1, <0.01,0.05,0.05>, 0);
  86.     llSetLinkColor(bl1, <0.50,0.50,0.55>, 2);
  87.     llSetLinkColor(bu1, <0.01,0.05,0.05>, 1);
  88.     llSetLinkColor(bl1, <0.50,0.50,0.55>, 3);
  89.     llSetLinkColor(bu1, <0.01,0.05,0.05>, 2);
  90.     llSetLinkColor(bl1, <0.50,0.50,0.55>, 4);
  91. }
  92.  
  93. wearCatsuit()
  94. {
  95.     llSetLinkColor(nip, <0.01,0.05,0.05>, ALL_SIDES);
  96.     llSetLinkColor(bu0, <0.01,0.05,0.05>, ALL_SIDES);
  97.     llSetLinkColor(bl0, <0.01,0.05,0.05>, ALL_SIDES);
  98.     llSetLinkColor(bl1, <0.01,0.05,0.05>, ALL_SIDES);
  99.     llSetLinkColor(bu1, <0.01,0.05,0.05>, 0);
  100.     llSetLinkColor(bu1, <0.01,0.05,0.05>, 1);
  101.     llSetLinkColor(bu1, <0.01,0.05,0.05>, 2);
  102. }
  103.  
  104. goNude()
  105. {
  106.     llSetLinkColor(nip, nipskco, ALL_SIDES);
  107.     llSetLinkColor(bu0, bu0skco, ALL_SIDES);
  108.     llSetLinkColor(bl0, bl0skco, ALL_SIDES);
  109.     llSetLinkColor(bl1, bl1skco, ALL_SIDES);
  110.     llSetLinkColor(bu1, bu1skco, ALL_SIDES);
  111. }
  112.  
  113. getNaked()
  114. {
  115.     //Records initial skin color on the rare chance your skin
  116.     //base color is not <1.00,1.00,1.00>
  117.     list skinclr = llGetLinkPrimitiveParams(bu0, [PRIM_COLOR, 2]);
  118.     bu0skco =  llList2Vector(skinclr,0);
  119.     skinclr = llGetLinkPrimitiveParams(bu1, [PRIM_COLOR, 2]);
  120.     bu1skco =  llList2Vector(skinclr,0);
  121.     skinclr = llGetLinkPrimitiveParams(bl0, [PRIM_COLOR, 2]);
  122.     bl0skco =  llList2Vector(skinclr,0);
  123.     skinclr = llGetLinkPrimitiveParams(bl1, [PRIM_COLOR, 2]);
  124.     bl1skco =  llList2Vector(skinclr,0);
  125.     skinclr = llGetLinkPrimitiveParams(nip, [PRIM_COLOR, 0]);
  126.     nipskco =  llList2Vector(skinclr,0);
  127. }
  128.  
  129.  
  130. default
  131. {
  132.     state_entry()
  133.     {
  134.         lenaOwner = llGetOwner( );
  135.         string uniq_chan = (string)lenaOwner; //get the wearer's key
  136.         uniq_chan = "0x" + (llGetSubString(uniq_chan, 6, 7)) + (llGetSubString(uniq_chan, 11, 12));
  137.         avichan = (integer)uniq_chan; //establish a channel using parts of that key.
  138.         getLinkNum();
  139.         getNaked();
  140.         lisHandle = llListen(avichan, "", llGetOwner(), "");
  141.     }
  142.    
  143.     changed(integer change)
  144.     {
  145.         if (change & CHANGED_REGION)
  146.         {
  147.             if(llListFindList(Nakiespots,[llGetRegionName()])==-1)
  148.             {
  149.                 wearTights();
  150.                 if (alertMe (llGetObjectDesc())) llDialog(lenaOwner,"Would you like to add this sim to your nudity allowed list, allow nudity this visit only, wear tights, or wear a catsuit?",["visit only", "tights", "catsuit", "always allow"],avichan);
  151.             }
  152.             else goNude();
  153.         }
  154.     }
  155.  
  156.     on_rez(integer start_param)
  157.     {
  158.         if(llListFindList(Nakiespots,[llGetRegionName()])==-1)
  159.         {
  160.             wearTights();
  161.             if (alertMe (llGetObjectDesc())) llDialog(lenaOwner,"Would you like to add this sim to your nudity allowed list, allow nudity this visit only, wear tights, or wear a catsuit?",["visit only", "tights", "catsuit", "always allow"],avichan);
  162.         }
  163.         else goNude();
  164.     }
  165.  
  166.     listen(integer chan, string name, key id, string msg)
  167.     {
  168.         if (msg == "visit only") goNude();
  169.         if (msg == "tights") wearTights();
  170.         if (msg == "catsuit") wearCatsuit();
  171.         if (msg == "always allow")
  172.         {
  173.             Nakiespots = Nakiespots + llGetRegionName();
  174.             goNude();
  175.         }      
  176.     }
  177.  
  178.    
  179. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×