szumielxd

WD Safe

Feb 25th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. options:
  2. max_warn: 5
  3. punishment: execute console command "ban %{_p}% 1h utrudnianie rozgrywki"
  4. dir: plugins/Annihilation/Worlds
  5.  
  6.  
  7. #on world load:
  8. #
  9. # RED
  10. # set {_x} to 0
  11. # set {_y} to 0
  12. # set {_z} to 0
  13. # if yml value "Teams.Red Team.Nexus.Location" in file "%{@dir}%/%world%" exists:
  14. # if yml value "Teams.Red Team.Nexus.Location.X" in file "%{@dir}%/%world%" exists:
  15. # set {_x} to yml value "Teams.Red Team.Nexus.Location.X" from file "%{@dir}%/%world%"
  16. # if yml value "Teams.Red Team.Nexus.Location.Y" in file "%{@dir}%/%world%" exists:
  17. # set {_y} to yml value "Teams.Red Team.Nexus.Location.Y" from file "%{@dir}%/%world%"
  18. # if yml value "Teams.Red Team.Nexus.Location.Z" in file "%{@dir}%/%world%" exists:
  19. # set {_z} to yml value "Teams.Red Team.Nexus.Location.Z" from file "%{@dir}%/%world%"
  20. # set {redNexus.location} to location({_x}, {_y}, {_z}, "%world%");
  21. #
  22. # GREEEN
  23. # set {_x} to 0
  24. # set {_y} to 0
  25. # set {_z} to 0
  26. # if yml value "Teams.Red Team.Nexus.Location" in file "%{@dir}%/%world%" exists:
  27. # if yml value "Teams.Red Team.Nexus.Location.X" in file "%{@dir}%/%world%" exists:
  28. # set {_x} to yml value "Teams.Red Team.Nexus.Location.X" from file "%{@dir}%/%world%"
  29. # if yml value "Teams.Red Team.Nexus.Location.Y" in file "%{@dir}%/%world%" exists:
  30. # set {_y} to yml value "Teams.Red Team.Nexus.Location.Y" from file "%{@dir}%/%world%"
  31. # if yml value "Teams.Red Team.Nexus.Location.Z" in file "%{@dir}%/%world%" exists:
  32. # set {_z} to yml value "Teams.Red Team.Nexus.Location.Z" from file "%{@dir}%/%world%"
  33. # set {redNexus.location} to location({_x}, {_y}, {_z}, "%world%");
  34. #
  35. # BLUE
  36. # set {_x} to 0
  37. # set {_y} to 0
  38. # set {_z} to 0
  39. # if yml value "Teams.Blue Team.Nexus.Location" in file "%{@dir}%/%world%" exists:
  40. # if yml value "Teams.Blue Team.Nexus.Location.X" in file "%{@dir}%/%world%" exists:
  41. # set {_x} to yml value "Teams.Blue Team.Nexus.Location.X" from file "%{@dir}%/%world%"
  42. # if yml value "Teams.Blue Team.Nexus.Location.Y" in file "%{@dir}%/%world%" exists:
  43. # set {_y} to yml value "Teams.Blue Team.Nexus.Location.Y" from file "%{@dir}%/%world%"
  44. # if yml value "Teams.Blue Team.Nexus.Location.Z" in file "%{@dir}%/%world%" exists:
  45. # set {_z} to yml value "Teams.Blue Team.Nexus.Location.Z" from file "%{@dir}%/%world%"
  46. # set {blueNexus.location} to location({_x}, {_y}, {_z}, "%world%");
  47. #
  48. # YELLOW
  49. # set {_x} to 0
  50. # set {_y} to 0
  51. # set {_z} to 0
  52. # if yml value "Teams.Yellow Team.Nexus.Location" in file "%{@dir}%/%world%" exists:
  53. # if yml value "Teams.Yellow Team.Nexus.Location.X" in file "%{@dir}%/%world%" exists:
  54. # set {_x} to yml value "Teams.Yellow Team.Nexus.Location.X" from file "%{@dir}%/%world%"
  55. # if yml value "Teams.Yellow Team.Nexus.Location.Y" in file "%{@dir}%/%world%" exists:
  56. # set {_y} to yml value "Teams.Yellow Team.Nexus.Location.Y" from file "%{@dir}%/%world%"
  57. # if yml value "Teams.Yellow Team.Nexus.Location.Z" in file "%{@dir}%/%world%" exists:
  58. # set {_z} to yml value "Teams.Yellow Team.Nexus.Location.Z" from file "%{@dir}%/%world%"
  59. # set {yellowNexus.location} to location({_x}, {_y}, {_z}, "%world%");
  60.  
  61.  
  62. function blockspecrator_warn(p: player):
  63. set {_m} to metadata value "spectator_warn" of {_p}
  64. add 1 to {_m}
  65. if {_m} >= {@max_warn}:
  66. {@punishment}
  67. else:
  68. send "&8[&4WD&8] &eNie utrudniaj graczom rozgrywki na spektatorze! &cOstrzezenie %{_m}%/{@max_warn}" to {_p}
  69. set metadata value "spectator_warn" of {_p} to {_m}
  70.  
  71. # PIROTECHNIK
  72. #on rightclick with fire_charge:
  73. # if name of player's tool is "&4Ognista Burza &agotowe":
  74. # loop all players in radius 5 around player:
  75. # if loop-player's gamemode is spectator:
  76. # blockspecrator_warn(loop-player)
  77.  
  78. # SKORPION
  79. #on rightclick with nether star:
  80. on shoot:
  81. if name of shooter's tool is "&eMagiczny Harpun":
  82. set metadata value "skorpion.rzuca" of shooter to true
  83. wait 5 seconds
  84. clear metadata value "skorpion.rzuca" of shooter
  85. on teleport:
  86. if player's gamemode is spectator:
  87. loop all players in radius 1 of player:
  88. if metadata value "skorpion.rzuca" of loop-player is set:
  89. blockspecrator_warn(player)
  90.  
  91. on rightclick on player:
  92. if gamemode of clicked player is spectator:
  93. # ELEKTRO
  94. if player's tool is slime named "&eParalizator &agotowe":
  95. blockspecrator_warn(clicked player)
  96. # OBCY
  97. else if player's tool is ender pearl named "&eTeleport":
  98. blockspecrator_warn(clicked player)
Advertisement
Add Comment
Please, Sign In to add comment