Guest User

Untitled

a guest
Dec 16th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. integer deathChan = -86349612387; //to tell overhead to start blood particle
  2.  
  3. integer deathChan2 = -75676434317; // to tell movelock to stop blood particle
  4.  
  5. integer keyAskChan = -12121232321; //asks hud for key on attach
  6.  
  7. integer keyGiveChan = -554345654347; //get key from hud so this script only listens to that HUD
  8. key object;
  9.  
  10. key me;
  11. default
  12. {
  13. attach(key attached)
  14. {
  15. if(attached)
  16. {
  17. llResetScript();
  18. }
  19. }
  20. state_entry()
  21. {
  22. llWhisper(keyAskChan, (string)llGetOwner() + ":" + "key");
  23. llParticleSystem([]);
  24. llListen(deathChan, "", object, "");
  25. llListen(deathChan2, "", object, "");
  26.  
  27. }
  28.  
  29.  
  30.  
  31. listen(integer channel, string name, key id, string message)
  32. {
  33. if(channel == keyGiveChan)
  34. {
  35. llOwnerSay(message);
  36. list msgData = llParseString2List(message, [":"], []);
  37. key me = llList2Key(msgData, 0);
  38. key HUD = llList2Key(msgData, 1);
  39.  
  40. if(me == llGetOwner())
  41. {
  42. llOwnerSay("key added");
  43. object = HUD;
  44. llOwnerSay((string)object);
  45. llListen(deathChan, "", object, "");
  46. llListen(deathChan2, "", object, "");
  47. }
  48. }
  49.  
  50. if(channel == deathChan)
  51. {
  52.  
  53. list msgData = llParseString2List(message, [":"], []);
  54.  
  55. key myKey = llList2Key(msgData, 0);
  56. string req = llList2String(msgData, 1);
  57.  
  58.  
  59. if(myKey == me && req == "death")
  60. {
  61.  
  62. llParticleSystem([
  63. PSYS_PART_FLAGS,( 0
  64. |PSYS_PART_INTERP_COLOR_MASK
  65. |PSYS_PART_INTERP_SCALE_MASK ),
  66. PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE ,
  67. PSYS_PART_START_ALPHA,0.901961,
  68. PSYS_PART_END_ALPHA,1,
  69. PSYS_PART_START_COLOR,<0.4,0.4,0.4> ,
  70. PSYS_PART_END_COLOR,<0.6,0.6,0.6> ,
  71. PSYS_PART_START_SCALE,<0.1875,0.21875,0>,
  72. PSYS_PART_END_SCALE,<0.15625,0.09375,0>,
  73. PSYS_PART_MAX_AGE,2.39844,
  74. PSYS_SRC_MAX_AGE,0,
  75. PSYS_SRC_ACCEL,<0,0,-1.5>,
  76. PSYS_SRC_BURST_PART_COUNT,3,
  77. PSYS_SRC_BURST_RADIUS,0.296875,
  78. PSYS_SRC_BURST_RATE,0.25,
  79. PSYS_SRC_BURST_SPEED_MIN,0,
  80. PSYS_SRC_BURST_SPEED_MAX,0.046875,
  81. PSYS_SRC_ANGLE_BEGIN,0,
  82. PSYS_SRC_ANGLE_END,0,
  83. PSYS_SRC_OMEGA,<0,0,0>,
  84. PSYS_SRC_TEXTURE, (key)"15dca669-6bc3-ef34-df7a-dfd6fd4e5399",
  85. PSYS_SRC_TARGET_KEY, (key)""
  86. ]);
  87. }
  88. }
  89. if(channel == deathChan2)
  90. {
  91. list msgData = llParseString2List(message, [":"], []);
  92.  
  93. key myKey = llList2Key(msgData, 0);
  94. string req = llList2String(msgData, 1);
  95.  
  96. if(myKey == llGetOwner() && req == "nodeath")
  97. {
  98. llParticleSystem([]);
  99. }
  100. }
  101. }
  102. }
Add Comment
Please, Sign In to add comment