Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. #
  2. # Bytterum - MexiCraft KitPvP
  3. #
  4.  
  5.  
  6.  
  7. command /bytterum [<text>] [<integer>] [<integer>]:
  8. permission: command.bytterum
  9. permission message: %{noPerm}%
  10. trigger:
  11. if arg-1 is "setblock":
  12. if arg-2 is set:
  13. if arg-3 is set:
  14. set {bytterum.%arg-2%.block.%arg-3%} to location of target block
  15. send "&8&l[ &d&lBYTTERUM &8&l] &7Satte &ablock %arg-2% &7i &abytterum %arg-2%&7!"
  16. if arg-1 is "removeblock":
  17. if arg-2 is set:
  18. if arg-3 is set:
  19. delete {bytterum.%arg-2%.block.%arg-3%}
  20. send "&8&l[ &d&lBYTTERUM &8&l] &7Fjernede &cblock %arg-3% &7i &cbytterum %arg-2%&7!"
  21.  
  22.  
  23. on sign change:
  24. if line 1 is "bytterum" or "[bytterum]":
  25. if line 2 is set:
  26. set {_line2} to "%line 2%" parsed as an integer
  27. set {bytterum.%{_line2}%} to location of event-block
  28. send "%{bytterum.%line 2%}%"
  29. set {bytterum.%location of event-block%.nummer} to {_line2}
  30. set line 1 to "&8&m "
  31. set line 3 to "&3&lNummer&8&l: &r&l%line 2%"
  32. set line 2 to "&4&lLuk bytterum"
  33. set line 4 to "&8&m "
  34.  
  35. on click on sign:
  36. if line 2 is "&4&lLuk bytterum":
  37. if player is sneaking:
  38. if player has permission "sign.bytterum":
  39. stop
  40. cancel event
  41. set {_region} to "%region at player%"
  42. replace all "_" with "" in {_region}
  43. replace all " in world world" with "" in {_region}
  44. replace all " and bytterum" with "" in {_region}
  45. set {_region} to "%{_region}%_blocks" parsed as a region
  46. loop all blocks in the region {_region}:
  47. if loop-block is air:
  48. set loop-block to 95:11
  49. set {bytterum.%location of event-block%.ejer} to player
  50. set line 2 of event-block to "&a&lÅben bytterum"
  51. stop
  52. if line 2 is "&a&lÅben bytterum":
  53. if player is sneaking:
  54. if player has permission "sign.bytterum":
  55. stop
  56. cancel event
  57. if player isn't {bytterum.%location of event-block%.ejer}:
  58. send "&8&l[ &d&lBYTTERUM &8&l] &7Det er kun &a%{bytterum.%location of event-block%.ejer}% &7som kan åbne dette rum"
  59. stop
  60. set {_region} to "%region at player%"
  61. replace all "_" with "" in {_region}
  62. replace all " in world world" with "" in {_region}
  63. replace all " and bytterum" with "" in {_region}
  64. set {_region} to "%{_region}%_blocks" parsed as a region
  65. loop all blocks in region {_region}:
  66. if loop-block is 95:11:
  67. set loop-block to air
  68. set line 2 of block at location of event-block to "&4&lLuk bytterum"
  69. stop
  70.  
  71. on region exit:
  72. if "%region%" contains "bytterum_":
  73. set {_nummer} to "%region%"
  74. replace all "bytterum_" and " in world world" in {_nummer} with ""
  75. replace all "bytterum_" and " and bytterum" in {_nummer} with ""
  76. set {_nummer} to "%{_nummer}%" parsed as an integer
  77. if line 2 of block at {bytterum.%{_nummer}%} is "&a&lÅben bytterum":
  78. set {_region} to "%region at player%"
  79. replace all "_" with "" in {_region}
  80. replace all " in world world" with "" in {_region}
  81. replace all " and bytterum" with "" in {_region}
  82. set {_region} to "bytterum_%{_nummer}%_blocks" parsed as a region
  83. loop all blocks in region {_region}:
  84. if loop-block is 95:11:
  85. set loop-block to air
  86. set line 2 of block at {bytterum.%{_nummer}%} to "&4&lLuk bytterum"
  87. stop
  88.  
  89. on quit:
  90. if "%region at player%" contains "bytterum_":
  91. set {_nummer} to "%region at player%"
  92. replace all "bytterum_" and " in world world" in {_nummer} with ""
  93. replace all "bytterum_" and " and bytterum" in {_nummer} with ""
  94. set {_nummer} to "%{_nummer}%" parsed as an integer
  95. if line 2 of block at {bytterum.%{_nummer}%} is "&a&lÅben bytterum":
  96. set {_region} to "%region at player%"
  97. replace all "_" with "" in {_region}
  98. replace all " and bytterum" with "" in {_region}
  99. replace all " in world world" with "" in {_region}
  100. set {_region} to "bytterum_%{_nummer}%_blocks" parsed as a region
  101. loop all blocks in region {_region}:
  102. if loop-block is 95:11:
  103. set loop-block to air
  104. set line 2 of block at {bytterum.%{_nummer}%} to "&4&lLuk bytterum"
  105. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement