I need a skript (pretty long)

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

FrostPVP™️

Active Member
Feb 12, 2021
63
3
8
24
USA
I need a /report skript

- if they only do /report send "&cPlease report a &6Player &cand type a &eReason"

- Message if they didn't put in a player: send "&cYou need to choose a player!"

- Message if they didn't put in a reason: send "&cYou need to have a reason!"

- Message if they try to report thereself: send "&cYou can't report yourself!"

- Message if they reported the player: send "&aYou reported (the player they reported)"

- Message for cooldown: send "You need to wait (time they have to wait)

- 10 second cooldown

- if they get to 5 warns /tempban player 1 hour "&cYou have to many warns"

- /report <player> <reason>

- permission sk.report (for /reports)

- permission message: send "&cInsufficient Permission"

- /reports (shows reports)


/report [<offlineplayer>] [<text>]
ex
&a----------------------------------------------------------------------------
&c[&6Warning System&c] &6FrostPVP &cwarned &6FrostPVP
&c[&6Warning System&c] He not has 2 warn(s).
&c[&6Warning System&c] Reason: &6Hacking
&a----------------------------------------------------------------------------

Thank you
2764.png
 
Last edited:
Code:
command /report <player> <text>:
  usage: &c/report <player name> <reason> - Please report a &6Player &cand type a &eReason
  trigger:
    if {reportcooldown::%player%} <= 0:
      if arg-1 is set:
        if {playerreports::%player%} contains "%arg-1%":
          send "&cYou already reported the player %arg-1%!"
          stop
        else:
          if arg-2 is set:
            send "&aYou have successfully reported &c%arg-1% &afor: %arg-2%"
            set {playerreports::%player%} to "%arg-1%"
            add 1 to {warns::%arg-1%}
            add "%player% reported %arg-1% for: %arg-2%" to {reports::*}
            if {warns::%arg-1%} is 5:
              make console execute command "/tempban %arg-1% 1h &cYou have to many warns"
              set {warns::%arg-1%} to 0
    else:
      send "&cYou have to wait another &4%{reportcooldown::%player%}% &cseconds."
    set {reportcooldown::%player%} to 10
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}
    wait 20 ticks
    remove 1 from {reportcooldown::%player%}

command /reports:
  permission: sk.report
  permission message: "&cInsufficient Permission"
  trigger:
    send "&cSubmitted reports:" to player
    send "%{reports::*}%" to player

command /reportsclear:
  permission: sk.report
  permission message: "&cInsufficient Permission"
  trigger:
    set {reports::*} to "<none>"
    send "&2Reports have been cleared!" to player

I made this but there are a few things I couldn't do:
The messages to specify different things because of the "usage: ..."
You can report yourself
If you report player1 then player2 you can report player1 again
The /reports is unorganized and can be hard to check all if there were lots of reports

And I added /reportsclear which allows you to clear all the reports.