Guest User

Kemono - Body (v.1.13.25)

a guest
Feb 9th, 2016
933
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Normal and specular map applier script for Kemono - Body (v.1.13.25)
  2. //If you want to use this with any other version of the kemono body or Avatar 2.0 or whatever other body, you will need to figure out the link and face numbers and replace them in the script.
  3.  
  4. integer listen_id;
  5. integer channel;
  6. string specmap = "UUID goes here"; // your specular map UUID
  7. string normal = "UUID goes here"; // your normal map UUID
  8. vector repeats = <10,10,0>; // horizontal and vertical repeats for speculars
  9. vector offsets = <0,0,0>; // horizontal and vertical offsets for speculars
  10. vector Nrepeats = <1,1,0>; // horizontal and vertical repeats for normals
  11. vector Noffsets = <0,0,0>; // horizontal and vertical offsets for normals
  12. float rot = 0.0; // texture angle for speculars
  13. float Nrot = 0.0; // texture angle for normals
  14. integer gloss = 51; // glossyness
  15. integer env = 0; // environment reflection
  16. vector color = <1.000, 1.000, 1.000>; // specular color
  17.  
  18.  
  19. default
  20. {
  21.  
  22. state_entry()
  23. {
  24. }
  25.  
  26. touch_start(integer total_number)
  27. {
  28. if(llDetectedKey(0) == llGetOwner())
  29. {
  30. channel = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) );
  31. listen_id = llListen( channel, "",llGetOwner(), "");
  32.  
  33. list button_text = ["Apply",
  34. "Delete script"];
  35.  
  36. llDialog(llGetOwner(),"What do?",button_text,channel);
  37. llSetTimerEvent(30.0);
  38. }
  39. }
  40.  
  41. listen(integer channel, string name, key id, string message)
  42. {
  43. if (message=="Apply")
  44. {
  45.  
  46. //body
  47. llSetLinkPrimitiveParamsFast( 11, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  48. llSetLinkPrimitiveParamsFast( 11, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  49. llSetLinkPrimitiveParamsFast( 11, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  50.  
  51. llSetLinkPrimitiveParamsFast( 2, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  52. llSetLinkPrimitiveParamsFast( 2, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  53. llSetLinkPrimitiveParamsFast( 2, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  54.  
  55. llSetLinkPrimitiveParamsFast( 8, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  56. llSetLinkPrimitiveParamsFast( 8, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  57. llSetLinkPrimitiveParamsFast( 8, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  58.  
  59. llSetLinkPrimitiveParamsFast( 9, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  60. llSetLinkPrimitiveParamsFast( 9, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  61. llSetLinkPrimitiveParamsFast( 9, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  62.  
  63. llSetLinkPrimitiveParamsFast( 6, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  64. llSetLinkPrimitiveParamsFast( 6, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  65. llSetLinkPrimitiveParamsFast( 6, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  66.  
  67. llSetLinkPrimitiveParamsFast( 7, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  68. llSetLinkPrimitiveParamsFast( 7, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  69. llSetLinkPrimitiveParamsFast( 7, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  70.  
  71. llSetLinkPrimitiveParamsFast( 5, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  72. llSetLinkPrimitiveParamsFast( 5, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  73. llSetLinkPrimitiveParamsFast( 5, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  74.  
  75. llSetLinkPrimitiveParamsFast( 12, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  76. llSetLinkPrimitiveParamsFast( 12, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  77. llSetLinkPrimitiveParamsFast( 12, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  78.  
  79. llSetLinkPrimitiveParamsFast( 4, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  80. llSetLinkPrimitiveParamsFast( 4, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  81. llSetLinkPrimitiveParamsFast( 4, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  82.  
  83. llSetLinkPrimitiveParamsFast( 3, [ PRIM_SPECULAR, ALL_SIDES, specmap, repeats, offsets, rot, color, gloss, env ] );
  84. llSetLinkPrimitiveParamsFast( 3, [ PRIM_NORMAL, ALL_SIDES, normal, Nrepeats, Noffsets, Nrot ] );
  85. llSetLinkPrimitiveParamsFast( 3, [ PRIM_ALPHA_MODE, ALL_SIDES, 0, 0 ] );
  86.  
  87. llSetLinkPrimitiveParamsFast( 10, [ PRIM_SPECULAR, 1, specmap, repeats, offsets, rot, color, gloss, env ] );
  88. llSetLinkPrimitiveParamsFast( 10, [ PRIM_NORMAL, 1, normal, Nrepeats, Noffsets, Nrot ] );
  89. llSetLinkPrimitiveParamsFast( 10, [ PRIM_ALPHA_MODE, 1, 0, 0 ] );
  90. llSetLinkPrimitiveParamsFast( 10, [ PRIM_SPECULAR, 2, specmap, repeats, offsets, rot, color, gloss, env ] );
  91. llSetLinkPrimitiveParamsFast( 10, [ PRIM_NORMAL, 2, normal, Nrepeats, Noffsets, Nrot ] );
  92. llSetLinkPrimitiveParamsFast( 10, [ PRIM_ALPHA_MODE, 2, 0, 0 ] );
  93. llSetLinkPrimitiveParamsFast( 10, [ PRIM_SPECULAR, 3, specmap, repeats, offsets, rot, color, gloss, env ] );
  94. llSetLinkPrimitiveParamsFast( 10, [ PRIM_NORMAL, 3, normal, Nrepeats, Noffsets, Nrot ] );
  95. llSetLinkPrimitiveParamsFast( 10, [ PRIM_ALPHA_MODE, 3, 0, 0 ] );
  96.  
  97. }
  98.  
  99. if (message=="Delete script")
  100. {
  101. llRemoveInventory(llGetScriptName());
  102. }
  103.  
  104. }
  105. timer(){
  106. llListenRemove(listen_id);
  107. llSetTimerEvent(0.0);
  108. }
  109. }
RAW Paste Data