Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #+--------------------------------------------------------------------------+#
- #| |#
- #| ____ _ _ ___ _ ___ _ _ ___ _ _____ |#
- #| | __ \ | | | | | |\ \ | | | |\ \ | | | | | |\ \ | | / ____| |#
- #| | |__) | | | | | | | \ \| | | | \ \| | | | | | \ \| | | | __ |#
- #| | _ / | | | | | | \ \ | | | \ \ | | | | | \ \ | | | |_ | |#
- #| | | \ \ | |___| | | | \ | | | \ | | | | | \ | | |__| | |#
- #| |_| \_\ |_______| |_| \_| |_| \_| |_| |_| \_| \______| |#
- #| |#
- #| An idea taken from the server mineplex.com |#
- #+--------------------------------------------------------------------------+#
- options:
- tag: &8[&6RN&8]
- refresh: 1
- length: 5
- command /running [<text="null">] [<text>]:
- trigger:
- if player has permission "running.sk":
- if arg 1 is "null":
- send "{@tag} &6Available options:"
- send "&8> &6/running add <name>"
- send "&8> &6/running delete <name>"
- send "&8> &6/running give <name> &8- &7Adds sponge"
- send "&8> &6/running setblock <name> &8- &7Set block"
- send "&8> &6/running start"
- send "&8> &6/running stop"
- if arg 1 is "give":
- if arg 2 is set:
- if {running::list::*} contains arg 2:
- add 1 sponge named "&6%arg 2%" with lore "&6Running created" to player's inventory
- else:
- send "{@tag} &7Arena named &6%arg 2% &7don't exist."
- else:
- send "{@tag} &6/running give <name>"
- if arg 1 is "add":
- if arg 2 is set:
- if {running::list::*} contains arg 2:
- send "{@tag} &7Arena named &6%arg 2% &7don't exist."
- else:
- add 1 sponge named "&6%arg 2%" with lore "&6Running created" to player's inventory
- else:
- send "{@tag} &6/running add <name>"
- if arg 1 is "delete":
- if arg 2 is set:
- if {running::list::*} contains arg 2:
- loop {running::location::%arg 2%::*}:
- set block at loop-value to air
- remove arg 2 from {running::list::*}
- clear {running::location::%arg 2%::*}
- send "{@tag} &7Deleted arena &6%arg 2%&7."
- else:
- send "{@tag} &7Arena named &6%arg 2% &7don't exist."
- else:
- send "{@tag} &6/running delete <name>"
- if arg 1 is "setblock":
- if arg 2 is set:
- if {running::list::*} contains arg 2:
- set {running::block::%arg 2%} to player's tool
- send "{@tag} &7Block set &6%player's tool% &7for arena &6%arg 2%&7."
- else:
- send "{@tag} &7Arena named &6%arg 2% &7don't exist."
- else:
- send "{@tag} &6/running setblock <name>"
- if arg 1 is "start":
- set {running::start} to true
- send "{@tag} &7Successfully enabled."
- if arg 1 is "stop":
- set {running::start} to false
- send "{@tag} &7Successfully disabled."
- else:
- send "&cNo permission."
- every {@refresh} seconds:
- if {running::start} is true:
- loop {running::list::*}:
- set {_list%loop-index%} to loop-value
- broadcast "%{_list1}%"
- loop (size of {running::list::*}) times:
- if {_numer%{_list%loop-number-1%}%} is not set:
- set {_numer%{_list%loop-number-1%}%} to 1
- if {_numer%{_list%loop-number-1%}%} = {running::listBlock::%{_list%loop-number-1%}%}:
- set {_numer%{_list%loop-number-1%}%} to 1
- broadcast "4"
- set {_numer%{_list%loop-number-1%}%} to {_numer%{_list%loop-number-1%}%} + 1
- broadcast "5"
- loop {@length} times:
- set {_n} to {_numer%{_list%loop-number-1%}%} + loop-number-2
- loop {running::location::%{_list%loop-number-1%}%::*}:
- set {_index%loop-index%} to loop-value
- broadcast "6"
- if block at {_index%{_n}%} is not {running::block::%{_list%loop-number-1%}%}:
- set block at {_index%{_n}%} to {running::block::%{_list%loop-number-1%}%}
- broadcast "7"
- set block at {_index%{_numer%{_list%loop-number-1%}%}%} to mushroom
- broadcast "8"
- on place of sponge:
- add location of event-block to {running::location::test::*}
- add 1 to {running::listBlock::test}
- send "{@tag} &7Added &6%{running::listBlock::test}% &7block."
- on break of sponge:
- set {_x} to uncolored name of player's tool
- if {running::list::*} contains {_x}:
- if {running::location::%{_x}%::*} contains location of event-block:
- remove location of event-block from {running::location::%{_x}%::*}
- remove 1 from {running::listBlock::%{_x}%}
- send "{@tag} &7Removed &6%{running::listBlock::%{_x}%}% &7block."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement