SHARE
TWEET

Untitled

a guest Jan 29th, 2020 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on quit:
  2.     remove player from {ChefruleQueue::*}
  3.     send "&7%player% &cleft the queue!" to player
  4.  
  5. command /playchefrules:
  6.     aliases: /pcf
  7.     trigger:
  8.         joinChefrules(player)
  9.        
  10. on load:
  11.     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)"
  12.     set {ChefRules::name} to "Chef Rules"
  13.     set {ChefRules::min} to 3
  14.     set {ChefRules::max} to 10
  15.    
  16. function joinChefrules(p: player):
  17.     if {ChefruleQueue::*} contains {_p}:
  18.         send "&cLeaving the queue!" to {_p}
  19.         remove {_p} from {ChefruleQueue::*}
  20.     else:
  21.         if size of {ChefruleQueue::*} is greater than {ChefRules::max}:
  22.             send "&cThe game is currently full! Please wait until a new game starts!" to {_p}
  23.         else:
  24.             add {_p} to {ChefruleQueue::*}
  25.             make console execute command "/minecraft:tag {_p} add ChefRulesGame"
  26.             send "&aYou have joined the Chef Rules&a queue" to {_p}
  27.             broadcast "&7%{_p}% &ejoined the game! (&b%size of {ChefruleQueue::*}%&e/&b%{ChefRules::max}%&e)"
  28.             if size of {games::ChefruleQueue::*} is {ChefRules:min}:
  29.                 startChefRules()
  30.         else:
  31.             remove {_p} from {ChefruleQueue::*}
  32.             if size of {ChefruleQueue::*} is {_required}-1:
  33.                 clear {starting::Chefrule}
  34.            
  35. function startChefRules():
  36.     set {_name} to {ChefRules::name}
  37.     set {_info} to {ChefRules:info}
  38.     {starting::Chefrule} is not set
  39.     set {starting::Chefrule} to true
  40.     loop 30 times:
  41.         if {starting::Chefrule} is not true:
  42.             send "&3&lChef Rule &7The queue does not have enough players! &7[Requires %{_min}%&7]" to all players where [{ChefruleQueue::*} contains input]
  43.             stop
  44.         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
  45.         wait a second
  46.         delete {ChefruleQueue::*}
  47.     if {starting::Chefrule} is true:
  48.         send "&a____________________________________________________", "                               &3&l%{_name}%", "", "&e%{_info}%" and "&a____________________________________________________" to all players where [{ChefruleQueue::*} contains input]
  49.     loop 120 times:
  50.         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
  51.         wait a second
  52.     set block at location(-468, 4, 99, world("ul_ChefRules")) to redstone torch
  53.     delete {starting::Chefrule}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top