Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /event <text>:
- trigger:
- if arg-1 is not set:
- if player doesn't have permission "essentials.event":
- send "&c/event join"
- else:
- send "&9&l[Event]"
- send " "
- send "&9/event join (Joins Event)"
- send "&9/event start (Starts Event)"
- send "&9/event stop (Stops An Event)"
- send "&9/event settp (Sets The TP)"
- send "&9/event tp (TPs To Event TP)"
- if arg-1 is "help":
- if player doesn't have permission "essentials.event":
- send "&c/event join"
- else:
- send "&9&l[Event]"
- send " "
- send "&9/event join (Joins Event)"
- send "&9/event start (Starts Event)"
- send "&9/event stop (Stops An Event)"
- send "&9/event settp (Sets The TP)"
- send "&9/event tp (TPs To Event TP)"
- if arg-1 is "join":
- if {event.join} is not set:
- send "&cAn event has not started or is in progress!"
- if {event.join} is true:
- send "&9&l[Event] &9Teleporting in 2 seconds!"
- wait 1 second
- send "&9&l[Event] &9Teleporting in 1 second!"
- wait 1 second
- teleport player at {event.start}
- set {event.%player%.start} to true
- send "&9&l[Event] &9Wait here till the event starts!"
- set {event} to true
- if arg-1 is "settp":
- send "&9&l[Event] &9You have set the TP for the event!"
- set {event.start} to player's location
- if arg-1 is "tp":
- if {event.start} is set:
- send "&9&ll[Event] &9You have TP-ed to the event TP!"
- teleport player at {event.start}
- if {event.start} is not set:
- send "&9&[Event] &9You need to set the TP for the event first!"
- if arg-1 is "start":
- if player doesn't have permission "essentials.event":
- send "&cYou cannot do this!"
- stop
- if player has permission "essentials.event":
- if {event.start} is set:
- broadcast " "
- broadcast "&9&l[Event] &9Event started! Do '/event join' to join in!"
- broadcast " "
- teleport player at {event.start}
- set {event} to true
- wait 20 seconds
- broadcast "&9&l[Event] &9Starting in 10 seconds!"
- wait 7 seconds
- broadcast "&9&l[Event] &9Starting in 3 seconds!"
- wait 1 second
- broadcast "&9&l[Event] &9Starting in 2 seconds!"
- wait 1 second
- broadcast "&9&l[Event] &9Starting in 1 second"
- wait 1 second
- broadcast "&9&l[Event] &9The event has started!"
- loop all players:
- if {event.%loop-player%.start} is true:
- set {event.%loop-player%} to true
- delete {event.%loop-player%.start}
- else:
- send "&9&l[Event] &9You need to set the TP for the event!"
- send "&9&l[Event] &9Use /event settp to set the TP!"
- stop
- if arg-1 is "stop":
- if player doesn't have permission "essentials.event":
- send "&cYou cannot do this!"
- stop
- if player has permission "essentials.event":
- if {event} is true:
- loop 2 times:
- broadcast " "
- broadcast "&9&l[Event] &9Event has been stopped!"
- loop 2 times:
- broadcast " "
- loop all players:
- if {event.%loop-player%} is true:
- make player execute "/spawn"
- delete {event.%loop-player%}
- delete {event}
- stop
- if {event} is not set:
- send "&cAn event has not started!"
- stop
- on quit:
- if {event.%player%} is true:
- delete {event.%player%}
- send "&9&l[Event] &9You have left the event!"
- if {event.%player%.start} is true:
- delete {event.%player%.start}
- send "&9&l[Event] &9You have left the event!"
- on any movement:
- if {event.%player%.start} is true:
- cancel event
Add Comment
Please, Sign In to add comment