Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. on quit:
  2. remove player from {SlideShowQueue::*}
  3. send "&7%player% &cleft the queue!" to player
  4.  
  5. command /playslideshow:
  6. aliases: /pss
  7. trigger:
  8. joinSlideShows(player)
  9.  
  10. on load:
  11. set {SlideShows::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 {SlideShows::name} to "Slide Shows"
  13. set {SlideShows::min} to 3
  14. set {SlideShows::max} to 10
  15.  
  16. function joinSlideShows(p: player):
  17. if {SlideShowQueue::*} contains {_p}:
  18. send "&cLeaving the queue!" to {_p}
  19. remove {_p} from {SlideShowQueue::*}
  20. else:
  21. if size of {SlideShowQueue::*} is greater than {SlideShows::max}:
  22. send "&cThe game is currently full! Please wait until a new game starts!" to {_p}
  23. else:
  24. add {_p} to {SlideShowQueue::*}
  25. send "&aYou have joined the Chef Rules&a queue" to {_p}
  26. broadcast "&7%{_p}% &ejoined the game! (&b%size of {SlideShowQueue::*}%&e/&b%{SlideShows::max}%&e)"
  27. if size of {games::SlideShowQueue::*} is {SlideShows:min}:
  28. startSlideShows()
  29. else:
  30. remove {_p} from {SlideShowQueue::*}
  31. if size of {SlideShowQueue::*} is {_required}-1:
  32. clear {starting::SlideShow}
  33.  
  34. function startSlideShows():
  35. set {_name} to {SlideShows::name}
  36. set {_info} to {SlideShows:info}
  37. {starting::SlideShow} is not set
  38. set {starting::SlideShow} to true
  39. loop 30 times:
  40. if {starting::SlideShow} is not true:
  41. send "&3&lChef Rule &7The queue does not have enough players! &7[Requires %{_min}%&7]" to all players where [{SlideShowQueue::*} contains input]
  42. stop
  43. send "&3&lChef Rule &7Game starts in &a%31 - loop-value% &asecond(s)&7!" to all players where [{SlideShowQueue::*} contains input] if (31 - loop-value) is 30 or 20 or 15 or 10 or 5 or 3 or 2 or 1
  44. wait a second
  45. delete {SlideShowQueue::*}
  46. if {starting::SlideShow} is true:
  47. send "&a____________________________________________________", " &3&l%{_name}%", "", "&e%{_info}%" and "&a____________________________________________________" to all players where [{SlideShowQueue::*} contains input]
  48. loop 120 times:
  49. send "&3&l%{_name}% &7Game ends in &a%121 - loop-value% &asecond(s)&7!" to all players where [{SlideShowQueue::*} contains input] if (121 - loop-value) is 60 or 30 or 20 or 15 or 10 or 5 or 3 or 2 or 1
  50. wait a second
  51. set block at location(-468, 4, 99, world("ul_SlideShow")) to redstone torch
  52. delete {starting::SlideShow}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement