ShooterowyPL

TurboDrop

Jan 9th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. command /turbodrop [<text>] [<text>] [<text>] [<text>]:
  2. aliases: td
  3. trigger:
  4. if player doesn't have the permission "TurboDrop.admin":
  5. send "&cNie masz uprawnien do tej komendy."
  6. stop
  7. if arg 1 is not set:
  8. send "&3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
  9. send "&3/turbodrop wylacz"
  10. send "&3/turbodrop status"
  11. stop
  12. if arg 1 is "aktywuj":
  13. if arg 2 is not set:
  14. send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
  15. stop
  16. if arg 2 is not "sektor" or "ogolny":
  17. send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
  18. stop
  19. if arg 3 is not set:
  20. send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
  21. stop
  22. if arg 3 parsed as number is not set:
  23. send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
  24. stop
  25. if arg 4 is not set:
  26. send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
  27. stop
  28. if arg 4 parsed as number is not set:
  29. send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
  30. stop
  31. if {TurboDrop::options::status} is set:
  32. send "&cTurboDrop jest juz wlaczony!"
  33. stop
  34. if arg 2 is "sektor":
  35. if arg 3 parsed as number is smaller than 1:
  36. send "&cObszar nie moze byc mniejszy niz 1."
  37. stop
  38. if arg 4 parsed as number is smaller than 1:
  39. send "&cCzas nie moze byc mniejszy niz 1."
  40. stop
  41. set {TurboDrop::options::tryb} to "Sektor"
  42. set {TurboDrop::options::obszar} to arg 3 parsed as number
  43. set {TurboDrop::options::czas} to arg 4 parsed as number
  44. set {TurboDrop::options::timer} to arg 4 parsed as number
  45. set {TurboDrop::options::status} to true
  46. loop players in radius arg 3 parsed as number around location of player:
  47. set {TurboDrop::status::%loop-player%} to true
  48. display board named "&4&lTurbo&6&lDrop" to loop-player
  49. move display of loop-player to sidebar
  50. make score of "&aCzas do konca:" in board of loop-player to arg 4 parsed as number
  51. broadcast "&4&lTurbo&6&lDrop &azostal wlaczony dla graczy w obszarze &c%arg 3 parsed as number% &akratek wokol lokalizacji &7(X: &c%x-coordinate of player%&7, Y: &c%y-coordinate of player%&7, Z: &c%x-coordinate of player%&7) &ana &c%arg 4 parsed as number% &asekund."
  52. stop
  53. if arg 2 is "ogolny":
  54. if arg 4 parsed as number is smaller than 1:
  55. send "&cCzas nie moze byc mniejszy niz 1."
  56. stop
  57. set {TurboDrop::options::tryb} to "Ogolny"
  58. set {TurboDrop::options::obszar} to 0
  59. set {TurboDrop::options::czas} to arg 4 parsed as number
  60. set {TurboDrop::options::timer} to arg 4 parsed as number
  61. set {TurboDrop::options::status} to true
  62. loop all players:
  63. set {TurboDrop::status::%loop-player%} to true
  64. display board named "&4&lTurbo&6&lDrop" to loop-player
  65. move display of loop-player to sidebar
  66. make score of "&aCzas do konca:" in board of loop-player to arg 4 parsed as number
  67. broadcast "&4&lTurbo&6&lDrop &azostal wlaczony dla wszystkich graczy na &c%arg 4 parsed as number% &asekund."
  68. stop
  69. if arg 1 is "wylacz":
  70. if {TurboDrop::options::status} is not set:
  71. send "&4&lTurbo&6&lDrop &cnie jest wlaczony!"
  72. stop
  73. broadcast "&4&lTurbo&6&lDrop &czostal wylaczony!"
  74. loop {TurboDrop::status::*}:
  75. display scoreboard named "CLEAR" to loop-index parsed as player
  76. launch trailing star firework colored red and green fade to orange and blue at loop-index parsed as player timed 0.2
  77. clear {TurboDrop::*}
  78. stop
  79. if arg 1 is "status":
  80. send "&a&l------&4&lTurbo&6&lDrop&a&l------"
  81. if {TurboDrop::options::status} is not set:
  82. send "&6Status: &cwylaczony"
  83. stop
  84. else:
  85. send "&6Status: &awlaczony"
  86. send "&6Tryb: &a%{TurboDrop::options::tryb}%"
  87. send "&6Obszar: &a%{TurboDrop::options::obszar}% kratek"
  88. send "&6Czas: &a%{TurboDrop::options::czas}% sekund"
  89. send "&6Czas do konca: &a%{TurboDrop::options::timer}% sekund"
  90. stop
  91. on mine of stone:
  92. if {TurboDrop::options::status} is set:
  93. if {TurboDrop::status::%player%} is true:
  94. chance of 10%:
  95. drop diamond at event-block
  96. stop
  97. chance of 10%:
  98. drop golden ingot at event-block
  99. stop
  100. every 1 second:
  101. if {TurboDrop::options::status} is set:
  102. if {TurboDrop::options::timer} is more than 0:
  103. remove 1 from {TurboDrop::options::timer}
  104. loop {TurboDrop::status::*}:
  105. make score of "&aCzas do konca:" in board of loop-index parsed as player to {TurboDrop::options::timer}
  106. else:
  107. broadcast "&4&lTurbo&6&lDrop &cdobiegl konca!"
  108. loop {TurboDrop::status::*}:
  109. display scoreboard named "CLEAR" to loop-index parsed as player
  110. launch trailing star firework colored red and green fade to orange and blue at loop-index parsed as player timed 0.2
  111. clear {TurboDrop::*}
  112. on join:
  113. wait a tick
  114. if {TurboDrop::options::status} is set:
  115. display board named "&4&lTurbo&6&lDrop" to player
  116. move display of player to sidebar
  117. make score of "&aCzas do konca:" in board of player to {TurboDrop::options::timer}
Add Comment
Please, Sign In to add comment