Advertisement
Guest User

Untitled

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