Advertisement
nunonuno_riku

Untitled

Nov 20th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2. aliasess2v2sign: [gun2v2]
  3. prefix: &e[ &cGunPvP 2v2 &e]
  4. perm: skript.admin
  5.  
  6. on rightclick on a sign:
  7. if line 1 is "{@aliasess2v2sign}":
  8. set line 1 of block to "[System]"
  9. set line 2 of block to "2v2Duel"
  10. set line 3 of block to "Join"
  11.  
  12. on rightclick:
  13. block is a sign
  14. if line 1 of clicked block is "[System]":
  15. if line 2 of clicked block is "2v2Duel":
  16. if line 3 of clicked block is "Join":
  17. loop {gun2v2.player::*}:
  18. if loop-value is less than or equal to 4:
  19. set {gun2v2.player::%player%} to player
  20. send "{@prefix} &aDuelに参加しました"
  21. if loop-value is equal to 0:
  22. set {gun2v2.red::%player%} to player
  23. if loop-value is equal to 1:
  24. set {gun2v2.red::%player%} to player
  25. if loop-value is equal to 2:
  26. set {gun2v2.blue::%player%} to player
  27. if loop-value is equal to 3:
  28. set {gun2v2.blue::%player%} to player
  29. if loop-value is equal to 4:
  30. set {gun2v2.battle} to true
  31. send "{@prefix} &a30秒後に試合を開始します" to {gun2v2.player::*}
  32. wait 20 second
  33. if {gun2v2.battle} is true:
  34. send "{@prefix} 試合開始10秒前" to {gun2v2.player::*}
  35. wait 5 second
  36. if {gun2v2.battle} is true:
  37. send "{@prefix} 試合開始5秒前" to {gun2v2.player::*}
  38. wait 2 second
  39. if {gun2v2.battle} is true:
  40. send "{@prefix} 試合開始3秒前" to {gun2v2.player::*}
  41. wait a second
  42. if {gun2v2.battle} is true:
  43. send "{@prefix} 試合開始2秒前" to {gun2v2.player::*}
  44. wait a second
  45. if {gun2v2.battle} is true:
  46. send "{@prefix} 試合開始1秒前" to {gun2v2.player::*}
  47. wait a second
  48. if {gun2v2.battle} is true:
  49. send "{@prefix} 試合開始" to {gun2v2.player::*}
  50. teleport {gun2v2.red::*} to the location {gun2v2.spawn.red}
  51. teleport {gun2v2.blue::*} to the location {gun2v2.spawn.blue}
  52. wait 300 second
  53. if {gun2v2.player::*} is set:
  54. send "{@prefix} 試合終了 引き分けです" to {gun2v2.player::*}
  55. delete {gun2v2.red::*}
  56. delete {_gun2v2.blue::*}
  57. delete {_gun2v2.player::*}
  58. else:
  59. send "{@prefix} &c参加人数に達しています"
  60.  
  61. on quit:
  62. if player is {gun2v2.player::*}:
  63. delete {gun2v2.player::*}
  64. delete {gun2v2.red::*}
  65. delete {gun2v2.blue::*}
  66. set {gun2v2.battle} to false
  67. loop {gun2v2.player::*}:
  68. send "{@prefix} &c参加しているプレイヤーが退出したため試合開始を中止します" to {gun2v2.player::*}
  69.  
  70. on damage:
  71. if {gun2v2.red::*} is attacker and victim:
  72. cancel event
  73. if {gun2v2.blue::*} is attacker and victim:
  74. cancel event
  75.  
  76. on death:
  77. if player is {gun2v2.red::*}:
  78. wait a tick
  79. force respawn player
  80. wait a tick
  81. remove {gun2v2.red::*} from player
  82. loop {gun2v2.red::*}:
  83. if loop-value is equal to 0:
  84. loop {gun2v2.player::*}:
  85. send "{@prefix} &b青チームの勝利!" to {gun2v2.player::*}
  86. add 5 emerald to {gun2v2.blue::*}
  87. delete {gun2v2.red::*}
  88. delete {gun2v2.blue::*}
  89. delete {gun2v2.player::*}
  90. if player is {gun2v2.blue::*}:
  91. force respawn player
  92. wait a tick
  93. remove {gun2v2.blue::*} from player
  94. loop {gun2v2.blue::*}:
  95. if loop-value is equal to 0:
  96. loop {gun2v2.player::*}:
  97. send "{@prefix} &c赤チームの勝利!" to {gun2v2.player::*}
  98. add 5 emerald to {gun2v2.red::*}
  99. delete {gun2v2.red::*}
  100. delete {gun2v2.blue::*}
  101. delete {gun2v2.player::*}
  102.  
  103. command /gunduel [<text>] [<text>] [<text>]:
  104. permission: {@perm}
  105. aliases: /gd
  106. trigger:
  107. if arg-1 is "set":
  108. if arg-2 is "spawn":
  109. if arg-3 is "red":
  110. set {gun2v2.spawn.red} to location of player
  111. if arg-3 is "blue":
  112. set {gun2v2.spawn.blue} to location of player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement