tsutitire2

Untitled

May 13th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. Variables:
  2. {fstpos} = 0
  3. {filposx} = 0
  4. {filposy} = 0
  5. {filposz} = 0
  6. {filposrx} = 0
  7. {filposrz} = 0
  8. {hnyrnd} = 0
  9. {matdng} = 0
  10. {radius} = 0
  11. {matstg} = 0
  12. {score} = 0
  13. {creep} = 0
  14. {times} = 0
  15. {playern} = 0
  16. #Setting commands
  17. command /setpos <int> <int> <int> <int>:
  18. trigger:
  19. if arg 1 is 1:
  20. set {fstpos} to player's location
  21. if arg 1 is 2:
  22. set {filposx} to arg 2
  23. set {filposy} to arg 3
  24. set {filposz} to arg 4
  25. command /setmat <int> <int>:
  26. trigger:
  27. if arg 1 is 1:
  28. set {radius} to arg 2
  29.  
  30. #starting!
  31. On right click on sponge:
  32. if {matdng} is 0:
  33. set {matdng} to 1
  34. set {matstg} to 0
  35. set {score} to 0
  36. set {times} to 0
  37. set {playern} to player
  38. teleport the player to {fstpos}
  39. #wow, this is shooting game yeah!
  40. every seconds:
  41. if {matdng} is 1:
  42. if {matstg} is 0:
  43. loop 10 times:
  44. set {filposrx} to random integer between 5 to 5 + {radius}
  45. set {hnyrnd} to random integer between 1 to 2
  46. if {hnyrnd} is 1:
  47. set {filposrx} to {filposrx} * -1
  48. set {filposrz} to random integer between 5 to 5 + {radius}
  49. set {hnyrnd} to random integer between 1 to 2
  50. if {hnyrnd} is 1:
  51. set {filposrz} to {filposrz} * -1
  52. set {filposrx} to {filposrx} + {filposx}
  53. set {filposrz} to {filposrz} + {filposz}
  54. execute console command "/summon creeper %{filposrx}% %{filposy}% %{filposrz}% {NoAI:1,Silent:1}"
  55. set {matstg} to 1
  56. if {matstg} is 1:
  57. loop {creep} times:
  58. set {filposrx} to random integer between 5 to 5 + {radius}
  59. set {hnyrnd} to random integer between 1 to 2
  60. if {hnyrnd} is 1:
  61. set {filposrx} to {filposrx} * -1
  62. set {filposrz} to random integer between 5 to 5 + {radius}
  63. set {hnyrnd} to random integer between 1 to 2
  64. if {hnyrnd} is 1:
  65. set {filposrz} to {filposrz} * -1
  66. set {filposrx} to {filposrx} + {filposx}
  67. set {filposrz} to {filposrz} + {filposz}
  68. execute console command "/summon creeper %{filposrx}% %{filposy}% %{filposrz}% {NoAI:1,Silent:1}"
  69. set {creep} to 0
  70. set {times} to {times} + 1
  71. if {times} is more than 60:
  72. set {matstg} to 2
  73. broadcast "%{playern}% さんが的当てゲームを %{score}% ポイントで終了しました!お疲れさまでした!"
  74. set {matdng} to 0
  75. execute console command "/kill @e[type=creeper]"
  76. On death:
  77. if victim is creeper:
  78. set {score} to {score} + 1
  79. set {creep} to {creep} + 1
Add Comment
Please, Sign In to add comment