Reports.sk

Created by RyanDo

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

Options:
    Version: 1.0 # Do not mess with this

    Prefix: &6&lReports &8ยป # Main prefix used in some of the systems messages.
    Report_Msg: &7You've reported &f%arg-1%. &7Our team will review it shortly. # Report message after a successful report of another player.
    # Check out line 48 to edit the report notifications part.
    Reported_Already: &c'%arg-1%&c' must've been reported already. # Will send this message regarding thhat there is already a pending report about the player you want to report.
    Reports_Full: &cOur report system is currently full, try contacting a staff member. # Detects the amount of reports in /reports and will determine if there is enough space for another.
    Character_Issue: &cYou cannot do more than 50 characters in a report. # Message of the minimum amount of characters to prevent not being able to see the full report reason in /reports.
    Reports_GUI_Text: &8Community Reports # The title of the /reports gui.
    Color1: &e # A Color
    Color2: &6 # A Color
    Color3: &f # A Color



#
#                   S K R I P T
#             R E P O R T   S Y S T E M
#
#       C R E A T E D   B Y:    l o l i t s a o d s
#


# Warning! Do not go below this line unless you know what you are doing.


command /report [<offline player>] [<string>]:
    trigger:
        if arg-1 or arg-2 is not set:
            send "&c/report (player) <reason>"
        else:
            if arg-1 hasn't played before:
                send "&c'%arg-1%&c' cannot be found in the system."
            else:
                if arg-1 is not online:
                    send "&c'%arg-1%&c' is not online."
                else:
                    if length of arg-2 is less than 51:
                        if size of {Reports::*} is not 44:
                            if {Reports::%uuid of arg-1%} is not set:
                                send "{@Prefix} {@Report_Msg}"
                                set {Reports::%uuid of arg-1%} to arg-2 
                                set {names::%uuid of arg-1%} to "%arg-1%"
                                set {Reports::%uuid of arg-1%::reporter} to player
                                loop all players:
                                    loop-player is not player
                                    loop-player has the permission "Reports.review":
                                        send "{@Prefix} {@Color1}%player% &7has reported {@Color1}%arg-1%&7. Checkout /reports!" to loop-player # This should be pretty easy to edit.
                            else:
                                send "{@Reported_Already}"
                        else:
                            send "{@Reports_Full}"
                    else:
                        send "{@Character_Issue}"

command /reports [<text>]:
    permission: Reports.review
    permission message: &cInsufficient Permissions
    trigger:
        open chest with 6 rows named "{@Reports_GUI_Text}" for player
        loop {Reports::*}:
            set {_slots} to 0
            set {_i} to loop-index
            set {_name} to {names::%{_i}%}
            set {_reason} to loop-value
            set {_reporter} to {Reports::%{_i}%::reporter}
            format a gui slot ( {_slots} - 1) of player with skull of ("%{_name}%" parsed as player) named "{@Color1}%{_name}%" lored "||{@Color2}Reporter: {@Color3}%{_reporter}%||{@Color2}Reason: {@Color3}%{_reason}%||||&7&oClick to see available options.." to run:
                open chest with 4 rows named "&8Options for ""%{_name}%""" for player
                format a gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 and 36 of player with black stained glass pane named "&f" to do nothing
                format a gui slot 13 of player with skull of ("%{_name}%" parsed as player) named "{@Color1}%{_name}%" to do nothing
                format a gui slot 21 of player with lime dye named "&a&lApprove" lored "||&7Click to approve this||&7report by,||&7&o%{_reporter}%||&r" to run:
                    close the player's inventory
                    wait 1 tick
                    send "{@Prefix} &7Your report of %{_name}% &7has been &aapproved&7." to {_reporter}
                    clear {reports::%{_i}%::*}
                    clear {reports::%{_i}%}
                    send ""
                    send "{@Prefix} &7You've successfully &aapproved &7%{_reporter}%&7's report."
                    send ""
                format a gui slot 23 of player with red dye named "&c&lDisapprove" lored "||&7Click to disapprove this||&7report by,||&7&o%{_reporter}%||&r" to run:
                    close the player's inventory
                    send "{@Prefix} &7Your report of %{_name}% &7has been &cdisapproved&7. Contact our support team for more information about it." to {_reporter}
                    clear {reports::%{_i}%::*}
                    clear {reports::%{_i}%}
                    send ""
                    send "{@Prefix} &7You've successfully &cdisapproved &7%{_reporter}%&7's report."
                    send ""
            add 1 to {_slots}
            if {_slots} is 44:
                stop loop
        format a gui slot 45, 46, 47, 48, 49, 50, 51, 52 and 53 of player with black stained glass pane named "&f" to do nothing