pewax

Suggestions

Apr 3rd, 2017
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. #
  2. # Server Suggestions
  3. # By Pewax
  4. #
  5.  
  6. variables:
  7. {suggestion.%player%} = " "
  8. {suggestion.last.%player%} = " "
  9. {suggestions.list::*} = "&dNo suggestions have been made yet, be the first!"
  10.  
  11. command /suggestion [<string>]:
  12. trigger:
  13. if arg-1 is set:
  14. if arg-1 is "help":
  15. send "&f[&5Suggestions&f] &a/suggestion help &f- Brings up this help list!" to player
  16. send "&f[&5Suggestions&f] &a/suggestion list &f- Brings up all suggestions!" to player
  17. send "&f[&5Suggestions&f] &a/suggestion <suggestion> &f- Add a new suggestion!" to player
  18.  
  19. else if arg-1 is "list":
  20. send "&f[&5Suggestions&f] %{suggestions.list::*}%" to player
  21.  
  22. else if arg-1 is "clear-all":
  23. if player is op:
  24. send "&f[&5Suggestions&f] &aYou have successfully reset all suggestions!" to player
  25. clear {suggestions.list::*}
  26. wait 3 ticks
  27. add "&dNo suggestions have been made yet, be the first!" to {suggestions.list::*}
  28. else:
  29. send "&f[&5Suggestions&f] &cYou do not have permission to use this command!" to player
  30.  
  31. else:
  32. if {suggestions.list::*} contains "&5%player%: &d%arg-1%":
  33. send "&f[&5Suggestions&f] &cThis suggestion has aleady been made!" to player
  34. else:
  35. remove "&dNo suggestions have been made yet, be the first!" from {suggestions.list::*}
  36. remove "&5%player%: &d%{suggestion.last.%player%}%" from {suggestions.list::*}
  37. wait 3 ticks
  38. set {suggestion.%player%} to arg-1
  39. set {suggestion.last.%player%} to arg-1
  40. add "&5%player%: &d%arg-1%" to {suggestions.list::*}
  41. send "&f[&5Suggestions&f] &aYou have successfully created a new suggestion!" to player
  42. send "&f[&5Suggestions&f] &cSending another suggestion will delete your old one!" to player
  43. else:
  44. make player execute "/suggestion help"
Advertisement
Add Comment
Please, Sign In to add comment