Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Bytterum - MexiCraft KitPvP
- #
- command /bytterum [<text>] [<integer>] [<integer>]:
- permission: command.bytterum
- permission message: %{noPerm}%
- trigger:
- if arg-1 is "setblock":
- if arg-2 is set:
- if arg-3 is set:
- set {bytterum.%arg-2%.block.%arg-3%} to location of target block
- send "&8&l[ &d&lBYTTERUM &8&l] &7Satte &ablock %arg-2% &7i &abytterum %arg-2%&7!"
- if arg-1 is "removeblock":
- if arg-2 is set:
- if arg-3 is set:
- delete {bytterum.%arg-2%.block.%arg-3%}
- send "&8&l[ &d&lBYTTERUM &8&l] &7Fjernede &cblock %arg-3% &7i &cbytterum %arg-2%&7!"
- on sign change:
- if line 1 is "bytterum" or "[bytterum]":
- if line 2 is set:
- set {_line2} to "%line 2%" parsed as an integer
- set {bytterum.%{_line2}%} to location of event-block
- send "%{bytterum.%line 2%}%"
- set {bytterum.%location of event-block%.nummer} to {_line2}
- set line 1 to "&8&m "
- set line 3 to "&3&lNummer&8&l: &r&l%line 2%"
- set line 2 to "&4&lLuk bytterum"
- set line 4 to "&8&m "
- on click on sign:
- if line 2 is "&4&lLuk bytterum":
- if player is sneaking:
- if player has permission "sign.bytterum":
- stop
- cancel event
- set {_region} to "%region at player%"
- replace all "_" with "" in {_region}
- replace all " in world world" with "" in {_region}
- replace all " and bytterum" with "" in {_region}
- set {_region} to "%{_region}%_blocks" parsed as a region
- loop all blocks in the region {_region}:
- if loop-block is air:
- set loop-block to 95:11
- set {bytterum.%location of event-block%.ejer} to player
- set line 2 of event-block to "&a&lÅben bytterum"
- stop
- if line 2 is "&a&lÅben bytterum":
- if player is sneaking:
- if player has permission "sign.bytterum":
- stop
- cancel event
- if player isn't {bytterum.%location of event-block%.ejer}:
- send "&8&l[ &d&lBYTTERUM &8&l] &7Det er kun &a%{bytterum.%location of event-block%.ejer}% &7som kan åbne dette rum"
- stop
- set {_region} to "%region at player%"
- replace all "_" with "" in {_region}
- replace all " in world world" with "" in {_region}
- replace all " and bytterum" with "" in {_region}
- set {_region} to "%{_region}%_blocks" parsed as a region
- loop all blocks in region {_region}:
- if loop-block is 95:11:
- set loop-block to air
- set line 2 of block at location of event-block to "&4&lLuk bytterum"
- stop
- on region exit:
- if "%region%" contains "bytterum_":
- set {_nummer} to "%region%"
- replace all "bytterum_" and " in world world" in {_nummer} with ""
- replace all "bytterum_" and " and bytterum" in {_nummer} with ""
- set {_nummer} to "%{_nummer}%" parsed as an integer
- if line 2 of block at {bytterum.%{_nummer}%} is "&a&lÅben bytterum":
- set {_region} to "%region at player%"
- replace all "_" with "" in {_region}
- replace all " in world world" with "" in {_region}
- replace all " and bytterum" with "" in {_region}
- set {_region} to "bytterum_%{_nummer}%_blocks" parsed as a region
- loop all blocks in region {_region}:
- if loop-block is 95:11:
- set loop-block to air
- set line 2 of block at {bytterum.%{_nummer}%} to "&4&lLuk bytterum"
- stop
- on quit:
- if "%region at player%" contains "bytterum_":
- set {_nummer} to "%region at player%"
- replace all "bytterum_" and " in world world" in {_nummer} with ""
- replace all "bytterum_" and " and bytterum" in {_nummer} with ""
- set {_nummer} to "%{_nummer}%" parsed as an integer
- if line 2 of block at {bytterum.%{_nummer}%} is "&a&lÅben bytterum":
- set {_region} to "%region at player%"
- replace all "_" with "" in {_region}
- replace all " and bytterum" with "" in {_region}
- replace all " in world world" with "" in {_region}
- set {_region} to "bytterum_%{_nummer}%_blocks" parsed as a region
- loop all blocks in region {_region}:
- if loop-block is 95:11:
- set loop-block to air
- set line 2 of block at {bytterum.%{_nummer}%} to "&4&lLuk bytterum"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement