Advertisement
akon1248

killeffect

Mar 12th, 2019
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. command /killeffect [<text>]:
  2. trigger:
  3. if player is not op:
  4. send "&c権限ない"
  5. else if player is op:
  6. if arg-1 is not set:
  7. send "&cUsage: /killeffect <blood|greenstar|flame|fireworks|finalsmash|reset>"
  8. else if arg-1 is not "blood" or "greenstar" or "flame" or "fireworks" or "finalsmash" or "reset":
  9. send "&cUsage: /killeffect <blood|greenstar|flame|fireworks|finalsmash|reset>"
  10. else:
  11. if arg-1 is "reset":
  12. delete {killeffect.%UUID of player%}
  13. send "&7あなたのキルエフェクトをリセットしました"
  14. else:
  15. set {killeffect.%UUID of player%} to arg-1 in lower case
  16. send "&7あなたのキルエフェクトを%arg-1 in lower case%に設定しました"
  17. function randomColor() :: integer:
  18. set {_colorpattern} to random integer between 1 and 8
  19. if {_colorpattern} is 1:
  20. set {_r} to 255
  21. set {_g} to random integer between 0 and 255
  22. set {_b} to 0
  23. if {_colorpattern} is 2:
  24. set {_r} to 0
  25. set {_g} to 255
  26. set {_b} to random integer between 0 and 255
  27. if {_colorpattern} is 3:
  28. set {_r} to random integer between 0 and 255
  29. set {_g} to 0
  30. set {_b} to 255
  31. if {_colorpattern} is 4:
  32. set {_r} to random integer between 0 and 255
  33. set {_g} to 255
  34. set {_b} to 0
  35. if {_colorpattern} is 5:
  36. set {_r} to 0
  37. set {_g} to random integer between 0 and 255
  38. set {_b} to 255
  39. if {_colorpattern} is 6:
  40. set {_r} to 255
  41. set {_g} to 0
  42. set {_b} to random integer between 0 and 255
  43. if {_colorpattern} is 7:
  44. set {_r} to 0
  45. set {_g} to 0
  46. set {_b} to 0
  47. if {_colorpattern} is 8:
  48. set {_r} to 255
  49. set {_g} to 255
  50. set {_b} to 255
  51. return "%{_r}*65536+{_g}*256+{_b}%" parsed as integer
  52. on damage:
  53. damage was caused by entity explosion
  54. "%attacker%" is "firework rocket"
  55. set {_tags::*} to getTagValues(attacker)
  56. {_tags::*} contain "nodamage"
  57. cancel event
  58. on death of player:
  59. attacker is a player
  60. victim is not attacker
  61. {killeffect.%UUID of attacker%} is set
  62. if {killeffect.%UUID of attacker%} is "blood":
  63. execute console command "execute %victim% ~ ~ ~ particle blockdust ~ ~1 ~ 0.3 0.5 0.3 0.05 500 force @a 152"
  64. loop 5 times:
  65. execute console command "execute %victim% ~ ~ ~ playsound minecraft:block.stone.break master @a ~ ~ ~ 2 1.2"
  66. else if {killeffect.%UUID of attacker%} is "greenstar":
  67. execute console command "execute %victim% ~ ~ ~ particle happyVillager ~ ~1 ~ 0.3 0.5 0.3 0 300 force"
  68. execute console command "execute %victim% ~ ~ ~ playsound minecraft:entity.villager.yes master @a ~ ~ ~ 2"
  69. else if {killeffect.%UUID of attacker%} is "flame":
  70. execute console command "execute %victim% ~ ~ ~ particle flame ~ ~1 ~ 0.3 0.5 0.3 0.1 300 force"
  71. execute console command "execute %victim% ~ ~ ~ playsound minecraft:block.fire.extinguish master @a ~ ~ ~ 2"
  72. else if {killeffect.%UUID of attacker%} is "fireworks":
  73. spawn a firework rocket at location 1.5 meter above victim
  74. add "{Tags:[""nodamage""],LifeTime:1,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:0,Colors:[I;%randomColor()%]}]}}}}" to nbt of last spawned firework rocket
  75. loop 5 times:
  76. execute console command "execute %victim% ~ ~ ~ playsound minecraft:block.stone.break master @a ~ ~ ~ 2 1.2"
  77. else if {killeffect.%UUID of attacker%} is "finalsmash":
  78. set {_loc} to location of victim
  79. set {_yaw} to yaw of victim
  80. set {_loc2} to {_loc}
  81. set yaw of {_loc2} to yaw of attacker
  82. set pitch of {_loc2} to random number between -10 and -30
  83. spawn an armor stand at {_loc}
  84. add "{NoGravity:1b,NoBasePlate:1b,Marker:1b,ArmorItems:[{id:""minecraft:leather_boots"",Count:1b,Damage:0s},{id:""minecraft:leather_leggings"",Count:1b,Damage:0s},{id:""minecraft:leather_chestplate"",Count:1b,Damage:0s},{id:""minecraft:skull"",Count:1b,Damage:3s,tag:{SkullOwner:%victim%}}]}" to nbt of last spawned armor stand
  85. set {_armorstand} to last spawned armor stand
  86. set {_armorstanduuid} to UUID of {_armorstand}
  87. play sound "entity.wither.shoot" to all players at {_loc} with volume 2 pitch 1
  88. loop 70 times:
  89. set {_distance} to loop-number/1.5
  90. add 10 to {_yaw}
  91. set {_loc} to location {_distance} meter forwards {_loc2}
  92. set yaw of {_loc} to {_yaw}
  93. teleport {_armorstand} to {_loc}
  94. execute console command "execute %{_armorstanduuid}% ~ ~ ~ particle cloud ~ ~ ~ 0 0 0 0 1"
  95. wait 1 tick
  96. spawn a firework rocket at {_loc}
  97. add "{Tags:[""nodamage""],LifeTime:1,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Trail:1,Colors:[I;16711680]}]}}}}" to nbt of last spawned firework rocket
  98. kill {_armorstand}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement