Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on quit:
- remove player from {ChefruleQueue::*}
- send "&7%player% &cleft the queue!" to player
- command /playchefrules:
- aliases: /pcf
- trigger:
- joinChefrules(player)
- on load:
- set {ChefRules::info} to "How Chef Rules work: Make food for the chef and get xp to be 1st So good luck and make lots and lots of food for the chef and custormers (Tip: Once you have 50 gold make sure its in a single slot)"
- set {ChefRules::name} to "Chef Rules"
- set {ChefRules::min} to 3
- set {ChefRules::max} to 10
- function joinChefrules(p: player):
- if {ChefruleQueue::*} contains {_p}:
- send "&cLeaving the queue!" to {_p}
- remove {_p} from {ChefruleQueue::*}
- else:
- if size of {ChefruleQueue::*} is greater than {ChefRules::max}:
- send "&cThe game is currently full! Please wait until a new game starts!" to {_p}
- else:
- add {_p} to {ChefruleQueue::*}
- make console execute command "/minecraft:tag {_p} add ChefRulesGame"
- send "&aYou have joined the Chef Rules&a queue" to {_p}
- broadcast "&7%{_p}% &ejoined the game! (&b%size of {ChefruleQueue::*}%&e/&b%{ChefRules::max}%&e)"
- if size of {games::ChefruleQueue::*} is {ChefRules:min}:
- startChefRules()
- else:
- remove {_p} from {ChefruleQueue::*}
- if size of {ChefruleQueue::*} is {_required}-1:
- clear {starting::Chefrule}
- function startChefRules():
- set {_name} to {ChefRules::name}
- set {_info} to {ChefRules:info}
- {starting::Chefrule} is not set
- set {starting::Chefrule} to true
- loop 30 times:
- if {starting::Chefrule} is not true:
- send "&3&lChef Rule &7The queue does not have enough players! &7[Requires %{_min}%&7]" to all players where [{ChefruleQueue::*} contains input]
- stop
- send "&3&lChef Rule &7Game starts in &a%31 - loop-value% &asecond(s)&7!" to all players where [{ChefruleQueue::*} contains input] if (31 - loop-value) is 30 or 20 or 15 or 10 or 5 or 3 or 2 or 1
- wait a second
- delete {ChefruleQueue::*}
- if {starting::Chefrule} is true:
- send "&a____________________________________________________", " &3&l%{_name}%", "", "&e%{_info}%" and "&a____________________________________________________" to all players where [{ChefruleQueue::*} contains input]
- loop 120 times:
- send "&3&l%{_name}% &7Game ends in &a%121 - loop-value% &asecond(s)&7!" to all players where [{ChefruleQueue::*} contains input] if (121 - loop-value) is 60 or 30 or 20 or 15 or 10 or 5 or 3 or 2 or 1
- wait a second
- set block at location(-468, 4, 99, world("ul_ChefRules")) to redstone torch
- delete {starting::Chefrule}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement