Advertisement
Guest User

Untitled

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