ReportCards

Reports

Jul 13th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. on load:
  2. broadcast "&e[&6Reports&e] &aCreated by ReportCards!"
  3. loop all players:
  4. if loop-player has permission "staff":
  5. send "&e[&6Reports&e] &aThanks for using Reports!" to loop-player
  6. send "&e[&6Reports&e] &aUse /reports to list all the active reports!" to loop-player
  7. on join:
  8. if {%player%.new} is not set:
  9. add "%player%" to {joined::*}
  10. set {%player%.new} to false
  11. command /report [<player>] [<text>]:
  12. aliases: /rp
  13. trigger:
  14. if {%player%.report} is not set:
  15. set {%player%.report} to false
  16. if arg 1 is not set:
  17. send "&aEnter a player name!"
  18. else if arg 2 is not set:
  19. send "&aEnter a reason!"
  20. else:
  21. if {%player%.report} is true:
  22. send "&eYou currently have a active report!"
  23. else:
  24. set {%player%.reason} to "&7%arg 2%"
  25. add "%player%" to {reports::*}
  26. set {%player%.report} to true
  27. set {%player%.reported} to "%arg 1%"
  28. send "&eSetting up report!"
  29. wait 10 ticks
  30. send "&eReport filed!"
  31. send "&e[&6Reports&e] &aReport filed against: &e%arg 1%"
  32. send "&e[&6Reports&e] &aReason:%nl%&b%arg 2%"
  33. send " "
  34. send "&cAbuse of this command can lead to a punishment!"
  35. loop all players:
  36. if loop-player has permission "reports.staff":
  37. send "&e%player% filed a new report!" to loop-player
  38. send "&e[&6Reports&e] &a%player% filed a report against: &e%arg 1%" to loop-player
  39. send "&e[&6Reports&e] &aReason:%nl%&b%arg 2%" to loop-player
  40. command /reports:
  41. permission: reports.staff
  42. aliases: /reps
  43. trigger:
  44. open chest with 4 rows named "&cReports" to player
  45. format slot 35 of player with barrier named "&7" with lore "&eClick to close the menu." to close
  46. if player has permission "reports.op":
  47. format slot 34 of player with grass named "&cClear all reports" to run [execute player command "/clearreports"]
  48. else:
  49. format slot 34 of player with dirt named "&cClear all reports" with lore "&4No permission!" to close
  50. set {_slot} to 0
  51. loop {reports::*}:
  52. format slot {_slot} of player with bedrock named "&e%{%loop-value%.reported}%" with lore "&eReported By:||%loop-value%||&aFor Reason:||&7%{%loop-value%.reason}%|| ||&eClick to answer report." to close then run [execute player command "/answerreport %loop-value%"]
  53. set {_slot} to {_slot} + 1
  54. command /answerreport [<player>]:
  55. permission: reports.staff
  56. aliases: /ar
  57. trigger:
  58. loop {joined::*}:
  59. if loop-value is arg-1:
  60. if {%arg 1%.report} is true:
  61. set {%player%.answering} to true
  62. set {%player%.answp} to arg-1
  63. send "&eType what you want to answer!"
  64. else:
  65. send "&cThis player does not have a active report"
  66. command /clearreports:
  67. permission: reports.op
  68. trigger:
  69. send "&e[&6Reports&e] &aClearing all reports, keep in mind this may lag!"
  70. wait 5 ticks
  71. send "&e[&6Reports&e] &aRemoved all reports!"
  72. loop {joined::*}:
  73. set {%loop-value%.report} to false
  74. remove "%loop-value%" from {reports::*}
  75. on chat:
  76. if {%player%.answering} is true:
  77. send "&8Answering the report with: &7%message%"
  78. send "&7%player% &8has answered your report!" to {%player%.answp}
  79. send "&8Answer: &7%message%" to {%player%.answp}
  80. add "%{%player%.answp}%" to {answering::*}
  81. loop {answering::*}:
  82. set {%loop-value%.lastanswer} to "%message%"
  83. set {%loop-value%.lastanswerp} to "%player%"
  84. set {%loop-value%.report} to false
  85. set {%player%.answering} to false
  86. remove "%{%player%.answp}%" from {reports::*}
  87. clear {answering::*}
  88. cancel event
Advertisement
Add Comment
Please, Sign In to add comment