Advertisement
Guest User

Event Skript

a guest
Aug 25th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. command event <text>:
  2. usage: &e&lEVENTS &8| &7/event <start/stop/join/leave>
  3. trigger:
  4. if arg is "start":
  5. if player has permission "core.events.manage":
  6. open virtual chest inventory with size 3 named "Start Event" to player
  7. format gui slot 13 of player with stick named "&eSumo" with lore "&7Left-click to start and announce event." and "&7Right-click to start event without announcing." to run:
  8. if click action is left mouse button:
  9. set {event::*} to "Sumo"
  10. send "&e&lEVENTS &8| &7A Sumo event is starting! To join, do &e/event join&7." to all players
  11. else if click action is right mouse button:
  12. set {event::*} to "Sumo"
  13. send "&e&lEVENTS &8| &7Successfully started a silent Sumo event."
  14. else:
  15. send "&e&lEVENTS &8| &7You do not have permission to start an event."
  16. else if arg is "stop":
  17. if player has permission "core.events.manage":
  18. if {event::*} is set:
  19. open virtual chest inventory with size 3 named "Stop Event" to player
  20. format gui slot 13 of player with stick named "&c&lStop Event" with lore "&7Left-click to stop the current event." and "&c&lWARNING &8| &7Only use this if necessary." to run:
  21. send "&e&lEVENTS &8| &7The event has ended due to a technical fault. Sorry for the inconvienience." to all players
  22. else:
  23. send "&e&lEVENTS &8| &7You cannot stop an event if there is no event running."
  24. else if arg is "join":
  25. if player doesn't have permission "core.events.blacklist":
  26. if {event::*} is set:
  27. send "&e&lEVENTS &8| &7Joining the active %{event::*}% &7event. Please wait."
  28. set {event::joined::%player%} to true
  29. else:
  30. send "&e&lEVENTS &8| &7There are no active events currently."
  31. else:
  32. send "&e&lEVENTS &8| &7You have been blacklisted from joining server events. If you believe this is a mistake, please contact an administrator."
  33. else if arg is "leave":
  34. if {event::*} is set:
  35. if {event::joined::%player%} is true:
  36. send "&e&lEVENTS &8| &7You have successfully left the current event."
  37. set {event::joined::%player%} to false
  38. else:
  39. send "&e&lEVENTS &8| &7You have not joined an active event yet."
  40. else:
  41. send "&e&lEVENTS &8| &7There are no active events currently."
  42.  
  43.  
  44.  
  45. command events:
  46. trigger:
  47. if {event::*} is set:
  48. send "&e&lEVENTS &8| &7%{event::*}% &7is the current active event. To join, do &e/event join&7."
  49. else:
  50. send "&e&lEVENTS &8| &7There are no active events currently."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement