Oxalist

Untitled

Jan 2nd, 2018
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. options:
  2. tag: &f[&cRunner&f]
  3.  
  4. command /runner [<text>] [<text>] [<text>] [<int>]:
  5. trigger:
  6. if arg 1 isn't set:
  7. send "{@tag} &7Skript Codded By &cSkripTR"
  8. send "{@tag} &7Help for &c/runner help"
  9. if arg 1 is "help":
  10. player has permission "runner.admin":
  11. send "&8&m---------- &6HELP &8&m----------"
  12. send "{@tag} &7/runner create [arena]"
  13. send "{@tag} &7/runner remove [arena]"
  14. send "{@tag} &7/runner setting"
  15. send "{@tag} &7/runner join"
  16. send "{@tag} &7/runner list"
  17. else:
  18. send "&8&m---------- &6HELP &8&m----------"
  19. send "{@tag} &7/runner join"
  20. send "{@tag} &7/runner list"
  21. if arg 1 is "list":
  22. size of {arenas::*} = 0:
  23. send "{@tag} &cThere is no arena."
  24. size of {arenas::*} > 0:
  25. send "&8&m---------- &6List &8&m----------"
  26. loop {arenas::*}:
  27. send "&a* &7- &a%loop-value% &7- &a%{status.%loop-value%}% &7- &c%{player.%loop-value%}%&7/&c%{maxplayer.%loop-value%}%"
  28. if arg 1 is "create":
  29. player has permission "runner.admin":
  30. if arg 2 is set:
  31. {arenas::*} contains arg 2:
  32. send "{@tag} &cArena is already set!"
  33. else:
  34. set {arenas::%arg 2%} to arg 2
  35. set {status.%arg 2%} to "&aWAITING"
  36. set {maxplayer.%arg 2%} to 0
  37. set {player.%arg 2%} to 0
  38. send "{@tag} &7Arena has been created"
  39. else:
  40. send "{@tag} &cPlease select a arena name"
  41. else:
  42. send "{@tag} &cYou don't have permission"
  43. if arg 1 is "remove":
  44. player has permission "runner.admin":
  45. if arg 2 is set:
  46. if {arenas::%arg 2%} is set:
  47. delete {arenas::%arg 2%}
  48. delete {spawn.%arg 2%}
  49. delete {maxplayer.%arg 2%}
  50. delete {player.%arg 2%}
  51. delete {status.%arg 2%}
  52. delete {players.%arg 2%::*}
  53. send "{@tag} &7Arena has been removed"
  54. else:
  55. send "{@tag} &7Arena isn't found"
  56. else:
  57. send "{@tag} &cPlease select a arena name"
  58. else:
  59. send "{@tag} &cYou don't have permission"
  60. if arg 1 is "settings":
  61. player has permission "runner.admin":
  62. if arg 2 isn't set:
  63. send "{@tag} &7/runner settings &c(lobby-waitinglobby-spawn-maxplayer) [arena]"
  64. else:
  65. if arg 3 isn't set:
  66. send "{@tag} &cPlease select a arena name"
  67. else:
  68. if {arenas::%arg 3%} isn't set:
  69. send "{@tag} &7Arena isn't found"
  70. else:
  71. if arg 2 is "lobby":
  72. set {lobby.%arg 3%} to location of player
  73. send "{@tag} &7Lobby has been set! &b%location of player%"
  74. if arg 2 is "beklemelobisi":
  75. set {waitinglobby.%arg 3%} to location of player
  76. send "{@tag} &7Waiting lobby has been set! &b%location of player%"
  77. if arg 2 is "spawn":
  78. set {spawn.%arg 3%} to location of player
  79. send "{@tag} &7Spawn has been set! &b%location of player%"
  80. if arg 2 is "maxplayer":
  81. set {maxplayer.%arg 3%} to arg 4
  82. send "{@tag} &7MaxPlayers has been set"
  83. else:
  84. send "{@tag} &cYou don't have permission"
  85. if arg 1 is "join":
  86. if arg 2 isn't set:
  87. send "{@tag} &cPlease select a arena name"
  88. else:
  89. if {ingame.%player%} is set:
  90. send "{@tag} &cYou already in game!"
  91. else:
  92. if {arenas::%arg 2%} is set:
  93. if {status.%arg 2%} is "&4INGAME":
  94. send "{@tag} &cArena already in game"
  95. if {status.%arg 2%} is "&aWAITING":
  96. if {player.%arg 2%} is greater than or equal to {maxplayer.%arg 2%}:
  97. send "{@tag} &cArena Full"
  98. else:
  99. clear player's inventory
  100. teleport player to {waitinglobby.%arg 2%}
  101. set player's game mode to adventure
  102. add player to {player.%arg 2%::*}
  103. add 1 to {player.%arg 2%}
  104. set {ingame.%player%} to 1
  105. loop {player.%arg 2%::*}:
  106. send "{@tag} &2%player% &ahas joinned the game! &8(&c%{player.%arg 2%}%&7/&c%{maxplayer.%arg 2%}%&8)" to loop-value
  107. if {player.%arg 2%} is equal to {maxplayer.%arg 2%}:
  108. send "{@tag} &aGame Starting in &b5 Seconds" to {player.%arg 2%::*}
  109. wait 1 seconds
  110. send "{@tag} &aGame Starting in &b5 Seconds" to {player.%arg 2%::*}
  111. wait 1 seconds
  112. send "{@tag} &aGame Starting in &b5 Seconds" to {player.%arg 2%::*}
  113. wait 1 seconds
  114. send "{@tag} &aGame Starting in &b5 Seconds" to {playerr.%arg 2%::*}
  115. wait 1 seconds
  116. send "{@tag} &aGame Starting in &b5 Seconds" to {player.%arg 2%::*}
  117. wait 1 seconds
  118. loop {player.%arg 2%::*}:
  119. teleport loop-value to {spawn.%arg 2%}
  120. set {status.%arg 2%} to "&4INGAME"
  121.  
  122. on step on red wool:
  123. if {ingame.%player%} is set:
  124. loop {arenas::*}:
  125. {player.%loop-value%::*} contains player:
  126. set {player.%loop-value%} to 0
  127. set {status.%loop-value%} to "&aWAITING"
  128. loop {player.%loop-value%::*}:
  129. delete {ingame.%loop-value-2%}
  130. teleport {player.%loop-value%::*} to {player.%loop-value%}
  131. broadcast "{@tag} &a%loop-value% &bEnded. Winner: &a%player%"
  132. delete {player.%loop-value%::*}
  133.  
  134. on break:
  135. if {ingame.%player%} is set:
  136. cancel event
  137.  
  138. on place:
  139. if {ingame.%player%} is set:
  140. cancel event
  141.  
  142. on damage:
  143. if {ingame.%attacker%} is set:
  144. cancel event
  145.  
  146. command /test:
  147. trigger:
  148. delete {ingame.%player%}
Add Comment
Please, Sign In to add comment