tsutitire2

Shooting Game

May 14th, 2020
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.41 KB | None | 0 0
  1. #================================================================================#
  2. # This is written by tsutitire,yeah #
  3. # And thank you for buy this skript. I should say it first... #
  4. # Please allow these rules and using, please! #
  5. # one. Don't give this skript for anyone! #
  6. # two. Don't use this skript for bad things! (I don't know that how to do it.) #
  7. # three. Enjoy! #
  8. # Oh, you are good cause you read all of this message. So I say it again, ENJOY! #
  9. #================================================================================#
  10. Variables:
  11. {fstpos} = 0
  12. {filposx} = 0
  13. {filposy} = 0
  14. {filposz} = 0
  15. {filposrx} = 0
  16. {filposrz} = 0
  17. {hnyrnd} = 0
  18. {matdng} = 0
  19. {radius} = 0
  20. {matstg} = 0
  21. {score} = 0
  22. {creep} = 0
  23. {times} = 0
  24. {playern} = 0
  25. {bestp} = "tsutitire"
  26. {bests} = 0
  27. {fnspos} = 0
  28. {creepi} = 0
  29. #Setting commands
  30. command /setpos <int> <int> <int> <int>:
  31. permission: skript.admin
  32. trigger:
  33. if arg 1 is 1:
  34. set {fstpos} to player's location
  35. if arg 1 is 2:
  36. set {filposx} to arg 2
  37. set {filposy} to arg 3
  38. set {filposz} to arg 4
  39. if arg 1 is 3:
  40. set {fnspos} to player's location
  41. command /setmat <int> <int>:
  42. permission: skript.admin
  43. trigger:
  44. if arg 1 is 1:
  45. set {radius} to arg 2
  46. if arg 1 is 2:
  47. set {creepi} to arg 2
  48. #starting!
  49. On right click on sponge:
  50. if {matdng} is 1:
  51. message "Now, a player is playing the shooting game now. pls wait!"
  52. if {matdng} is 0:
  53. set {matdng} to 1
  54. set {matstg} to 0
  55. set {score} to 0
  56. set {times} to 0
  57. set {creep} to 0
  58. set {playern} to player
  59. teleport the player to {fstpos}
  60. send title "5" to the player
  61. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  62. wait 1 seconds
  63. send title "4" to the player
  64. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  65. wait 1 seconds
  66. send title "3" to the player
  67. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  68. wait 1 seconds
  69. send title "2" to the player
  70. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  71. wait 1 seconds
  72. send title "1" to the player
  73. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  74. wait 1 seconds
  75. send title "GO!" to the player
  76. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  77. wait 50 seconds
  78. message "5"
  79. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  80. wait 1 seconds
  81. message "4"
  82. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  83. wait 1 seconds
  84. message "3"
  85. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  86. wait 1 seconds
  87. message "2"
  88. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  89. wait 1 seconds
  90. message "1"
  91. execute console command "/playsound minecraft:entity.experience_orb.pickup ambient %player%"
  92. wait 2 seconds
  93. message "FINISH!"
  94. teleport player to {fnspos}
  95. #wow, this is shooting game yeah!
  96. every seconds:
  97. if {matdng} is 1:
  98. if {matstg} is 0:
  99. wait 5 seconds
  100. loop {creepi} times:
  101. set {filposrx} to random integer between 1 to {radius}
  102. set {hnyrnd} to random integer between 1 to 2
  103. if {hnyrnd} is 1:
  104. set {filposrx} to {filposrx} * -1
  105. set {filposrz} to random integer between 1 to {radius}
  106. set {hnyrnd} to random integer between 1 to 2
  107. if {hnyrnd} is 1:
  108. set {filposrz} to {filposrz} * -1
  109. set {filposrx} to {filposrx} + {filposx}
  110. set {filposrz} to {filposrz} + {filposz}
  111. execute console command "/summon creeper %{filposrx}% %{filposy}% %{filposrz}% {NoAI:1,Silent:1}"
  112. set {matstg} to 1
  113. if {matstg} is 1:
  114. loop {creep} times:
  115. set {filposrx} to random integer between 1 to {radius}
  116. set {hnyrnd} to random integer between 1 to 2
  117. if {hnyrnd} is 1:
  118. set {filposrx} to {filposrx} * -1
  119. set {filposrz} to random integer between 1 to {radius}
  120. set {hnyrnd} to random integer between 1 to 2
  121. if {hnyrnd} is 1:
  122. set {filposrz} to {filposrz} * -1
  123. set {filposrx} to {filposrx} + {filposx}
  124. set {filposrz} to {filposrz} + {filposz}
  125. execute console command "/summon creeper %{filposrx}% %{filposy}% %{filposrz}% {NoAI:1,Silent:1}"
  126. set {creep} to 0
  127. set {times} to {times} + 1
  128. if {times} is more than 60:
  129. set {score} to {score}
  130. set {matstg} to 2
  131. broadcast "%{playern}% さんが的当てゲームを %{score}% ポイントで終了しました!お疲れさまでした!"
  132. set {matdng} to 0
  133. if {score} is more than {bests}:
  134. set {bests} to {score}
  135. set {bestp} to {playern}
  136. broadcast "%{playern}%さんが的当てゲームでハイスコアを更新したようです! なんと%{score}% ポイント!"
  137. execute console command "/kill @e[type=creeper]"
  138. On death:
  139. if victim is creeper:
  140. set {score} to {score} + 1
  141. set {creep} to {creep} + 1
  142. #do you want to see the best player? so you should use them:
  143. command /rank:
  144. trigger:
  145. message "The top player is %{bestp}% and his/her score is %{bests}%! wow!"
  146. command /rstrank:
  147. permission: skript.admin
  148. trigger:
  149. set {bestp} to "tsutitire"
  150. set {bests} to 0
Add Comment
Please, Sign In to add comment