Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on script load:
- set {queue1} to 0
- delete {queue::*}
- command /reset:
- trigger:
- delete {queue::*}
- set {queue1} to 0
- command /setspawnpoint [<number>]:
- trigger:
- set {minigame::spawnpoints::%arg-1%} to location of player
- command /queue [<text="check">]:
- usage: You can either use &c/queue join &for &c/queue leave
- trigger:
- if arg-1 is "check":
- send "&cThere are &e%{queue1}%/16 &cplayers in the queue!" to player
- if arg-1 is "join":
- if {queue1} >= 8:
- execute console command "/queue start"
- if {queue1} >= 16:
- send "&cThe queue is full!" to player
- else if "%{queue::*}%" contains "%player%":
- send "&cYou are already in the queue!" to player
- else:
- add 1 to {queue1}
- add "%player%" to {queue::*}
- set {queue.%player%} to 1
- broadcast "&cThere are now &e%{queue1}%/16 &cplayers in the queue!"
- if executor is console:
- if arg-1 is "start":
- if {queue1} >= 8:
- broadcast "&eThe match is about to start!"
- broadcast "&cThe match will begin in &e15 seconds.."
- wait 10 seconds
- broadcast "&cThe match will begin in &e5 seconds.."
- wait 1 seconds
- broadcast "&cThe match will begin in &e4 seconds.."
- wait 1 seconds
- broadcast "&cThe match will begin in &e3 seconds.."
- wait 1 seconds
- broadcast "&cThe match will begin in &e2 seconds.."
- wait 1 seconds
- broadcast "&cThe match will begin in &e1 seconds.."
- wait 1 second
- broadcast "&eTeleporting players.."
- loop {queue::*}:
- teleport loop-value to location of {minigame::spawnpoints::%loop-index%}
- delete {queue::*}
- delete {queue1}
- else:
- send "&cNot enough players to start!" to player
- if arg-1 is "leave":
- if {queue.%player%} is 1:
- remove 1 from {queue1}
- send "&cYou have been removed from the queue!"
- broadcast "&cThere are now &e%{queue1}%/16 &cplayers in the queue!"
- remove "%player%" from {queue::*}
- else:
- send "&cYou are not currently in a queue!"
- command /test:
- trigger:
- send "%{queue::*}%" to player
- send "%{queue1}%" to player
- command /test2:
- trigger:
- add 1 to {queue1}
- broadcast "&cThere are now &e%{queue1}%/16 &cplayers in the queue!"
- on death:
- if {queue.%player%} is 1:
- remove 1 from {queue1}
- set {queue.%player%} to 0
- if {queue1} is 0:
- broadcast "&cThe game is now over!"
- broadcast "&cUse &e/queue join &cto join the next queue!"
- on join:
- set {queue.%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement