Guest User

Report skript

a guest
Mar 17th, 2020
831
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # ------------------ SimpleReports ------------------
  2. #
  3. # Made by MeKink with help of MorenoNL
  4. # Don't copy
  5. #
  6. #------------------------------------
  7.  
  8. options:
  9. prefix: &c&lReports &8&l> &e #Prefix infront of messages
  10. no_perm_message: &cYou are not allowed to do this command! #Permission for /reportadmin
  11.  
  12.  
  13. #------------------ CODE -----------------------
  14.  
  15.  
  16. command /report [<player>] [<text>]:
  17. trigger:
  18. arg 1 is not set:
  19. message "{@prefix} Please specify the player!"
  20. stop
  21. arg 2 is not set:
  22. message "{@prefix} Please specify a reason"
  23. stop
  24. message "{@prefix} Your report has been forwarded to our staff"
  25. add arg 2 to {reason::*}
  26. set {report.%text-argument%} to player
  27. set {reported.%text-argument%} to player argument
  28. loop all players:
  29. if loop-player has the permission "report.view":
  30. send "&8----[ &cReport incoming &8]----" to loop-player
  31. send "&6Report: &e%arg 2%" to loop-player
  32. send "&6The reported person: &e%arg 1%" to loop-player
  33. send "&6Sender: &e%player%" to loop-player
  34.  
  35. command /reportadmin [<text>] [<integer>]:
  36. permission: report.view
  37. aliases: ra
  38. permission message: {@prefix} {@no_perm_message}
  39. trigger:
  40. if arg 1 is not set:
  41. message "{@prefix} Report commands"
  42. message "&c/ra list &a| &eLists all reports"
  43. message "&c/ra remove &a| &eIt deletes a complaint from the system."
  44. message "&c/ra clear &a| &eAll reports will delete from the system."
  45. message "&c/ra help &a| &eShows this"
  46. if arg 1 is "list":
  47. set {_number} to 1
  48. loop {reason::*}:
  49. set {number.%loop-value%} to {_number}
  50. message "%{number.%loop-value%}%. &6Report reason: &e%loop-value% &a| &6Report on: %{reported.%loop-value%}% &a| &6Reporter: &e%{report.%loop-value%}%"
  51. add 1 to {_number}
  52. if arg 1 is "remove":
  53. if arg 2 is not set:
  54. message "{@prefix} Please enter a number"
  55. else:
  56. set {_deleted} to false
  57. loop {reason::*}:
  58. if {number.%loop-value%} is arg 2:
  59. remove loop-value from {reason::*}
  60. set {deleted} to true
  61. delete {number.%loop-value%}
  62. delete {report.%loop-value%}
  63. delete {reported.%loop-value%}
  64. message "{@prefix} Report has been deleted"
  65. exit loop
  66. stop
  67. else:
  68. message "{@prefix} No reports"
  69. if arg 1 is "clear":
  70. loop {reason::*}:
  71. remove loop-value from {reason::*}
  72. delete {number.%loop-value%}
  73. delete {reported.%loop-value%}
  74. delete {report.%loop-value%}
  75. message "{@prefix} Reports cleared"
  76. if arg 1 is "help":
  77. message "{@prefix} Report commands"
  78. message "&c/ra list &a| &eLists all reports"
  79. message "&c/ra remove &a| &eIt deletes a complaint from the system."
  80. message "&c/ra clear &a| &eAll reports will delete from the system."
  81. message "&c/ra help &a| &eShows this"
RAW Paste Data