Guest User

Sektory

a guest
May 30th, 2015
2,617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.31 KB | None | 0 0
  1. autor:BodzioPlugins
  2. ###Zakaz wklejania na inne fora###
  3. command /sektory [<text>]:
  4. permission message: &cNie mozesz uzywac tej komedy!
  5. permission: essentials.sektory
  6. trigger:
  7. if arg 1 is not set:
  8. send "&fPoprawne uzycie &o/sektory Wlacz|Wylacz|SetSpawn - Robi oddzielny swiat i robi wszystko za ciebie ;)"
  9. if arg 1 is "setspawn":
  10. set {Sectors::Status} to false
  11. set {Sectors::Spawn::s1} to location of player
  12. wait 2 tick
  13. run player command "mv tp s2" as op
  14. wait 2 tick
  15. run player command "bukkit:tp 0 62 0" as op
  16. wait 2 tick
  17. set {Sectors::Spawn::s2} to location of player
  18. wait 2 tick
  19. run player command "mv tp world" as op
  20. teleport player to {Sectors::Spawn::s1}
  21. broadcast "&7Gracz: &c%player% &7ustawil spawn sektorow na kordach: &c%{Sectors::Spawn::s1}% &7!"
  22. set {Sectors::Status} to true
  23. if arg 1 is "wlacz" or "on":
  24. set {Sectors::Status} to true
  25. broadcast "&7Gracz: &c%player% &2wlaczyl &7dzialanie sektorow!"
  26. if arg 1 is "wylacz" or "off":
  27. set {Sectors::Status} to false
  28. broadcast "&7Gracz: &c%player% &4wylaczyl &7dzialanie sektorow!"
  29. on load:
  30. set {Sectors::Status} to false
  31. wait 1 tick
  32. set {Sectors::Status} to true
  33. on anymove:
  34. if {Sectors::Status} is true:
  35. if world of player is "world":
  36. if distance between player and {Sectors::Spawn::s1} is bigger than 4530:
  37. display "&eJestes przy granicy sektora!" on bossbar with 100 percent by 3 seconds for player
  38. if distance between player and {Sectors::Spawn::s1} is bigger than 4501:
  39. if {Sectors::Aready::In::PvP::Of::%player%} is not set:
  40. set {Coordinate::X::Of::%player%} to x-location of player
  41. set {Coordinate::Z::Of::%player%} to z-location of player
  42. add 20.0 to {Coordinate::X::Of::%player%}
  43. add 20.0 to {Coordinate::Z::Of::%player%}
  44. run player command "mv tp s2" as op
  45. execute console command "bukkit:tp %player% %{Coordinate::X::Of::%player%}% 62 %{Coordinate::Z::Of::%player%}%"
  46. loop 98 times:
  47. send ""
  48. display "&ePrzeszedles na nastepny sektor!" on bossbar with 100 percent by 5 seconds for player
  49. else:
  50. cancel event
  51. push the player upwards at speed 0.9
  52. push the player horizontally forward at speed -4
  53. send "&4CIO !"
  54. if world of player is "s2":
  55. if distance between player and {Sectors::Spawn::s2} is smaller than 4470:
  56. display "&eJestes przy granicy sektora!" on bossbar with 100 percent by 3 seconds for player
  57. if distance between player and {Sectors::Spawn::s2} is smaller than 4499:
  58. if {Sectors::Aready::In::PvP::Of::%player%} is not set:
  59. set {Coordinate::X::Of::%player%} to x-location of player
  60. set {Coordinate::Z::Of::%player%} to z-location of player
  61. add -20.0 to {Coordinate::X::Of::%player%}
  62. add -20.0 to {Coordinate::Z::Of::%player%}
  63. run player command "mv tp world" as op
  64. execute console command "bukkit:tp %player% %{Coordinate::X::Of::%player%}% 62 %{Coordinate::Z::Of::%player%}%"
  65. loop 98 times:
  66. send ""
  67. display "&ePrzeszedles na nastepny sektor!" on bossbar with 100 percent by 5 seconds for player
  68. else:
  69. cancel event
  70. push the player upwards at speed 0.9
  71. push the player horizontally forward at speed -4
  72. send "&4CIO !"
  73. command /serwer [<text>]:
  74. aliases: server, sektor
  75. trigger:
  76. if arg 1 is set:
  77. if arg 1 parsed as player is online:
  78. if world of arg 1 parsed as player is "world":
  79. send "&7Ten gracz jest obecnie na sektorze: &cs1"
  80. if world of arg 1 parsed as player is "s2":
  81. send "&7Ten gracz jest obecnie na sektorze: &cs2"
  82. else:
  83. send "&4Ten gracz jest obecnie offline!"
  84. else:
  85. if world of player is "world":
  86. send "&7Jestes na sektorze: &cs1"
  87. if world of player is "s2":
  88. send "&7Jestes na sektorze: &cs2"
  89.  
  90. on quit:
  91. {Sectors::Aready::In::PvP::Of::%player%} is true
  92. delete {Sectors::Aready::In::PvP::Of::%player%}
  93. delete {Sectors::Seconds::Of::PvP::Of::%player%}
  94. on damage:
  95. victim is player
  96. attacker is player
  97. if {Sectors::Aready::In::PvP::Of::%victim%} is true:
  98. set {Sectors::Seconds::Of::PvP::Of::%victim%} to 20
  99. stop
  100. set {Sectors::Aready::In::PvP::Of::%victim%} to true
  101. set {Sectors::Seconds::Of::PvP::Of::%victim%} to 20
  102. while {Sectors::Seconds::Of::PvP::Of::%victim%} is more than 1:
  103. {Sectors::Seconds::Of::PvP::Of::%victim%} is not set:
  104. stop
  105. subtract 1 from {Sectors::Seconds::Of::PvP::Of::%victim%}
  106. wait 1 second
  107. delete {Sectors::Aready::In::PvP::Of::%victim%}
  108. delete {Sectors::Seconds::Of::PvP::Of::%victim%}
  109. on damage:
  110. victim is player
  111. attacker is player
  112. if {Sectors::Aready::In::PvP::Of::%attacker%} is true:
  113. set {Sectors::Seconds::Of::PvP::Of::%attacker%} to 20
  114. stop
  115. set {Sectors::Aready::In::PvP::Of::%attacker%} to true
  116. set {Sectors::Seconds::Of::PvP::Of::%attacker%} to 20
  117. while {Sectors::Seconds::Of::PvP::Of::%attacker%} is more than 1:
  118. {Sectors::Seconds::Of::PvP::Of::%attacker%} is not set:
  119. stop
  120. subtract 1 from {Sectors::Seconds::Of::PvP::Of::%attacker%}
  121. wait 1 second
  122. delete {Sectors::Aready::In::PvP::Of::%attacker%}
  123. delete {Sectors::Seconds::Of::PvP::Of::%attacker%}
  124. on join:
  125. {Sectors::Aready::In::PvP::Of::%player%} is set:
  126. delete {Sectors::Aready::In::PvP::Of::%player%}
  127. {Sectors::Seconds::Of::PvP::Of::%player%} is set:
  128. delete {Sectors::Seconds::Of::PvP::Of::%player%}
Advertisement
Add Comment
Please, Sign In to add comment