List loop

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Hartvig

Member
Apr 18, 2017
39
1
0
22
Trying to make this work, currently it adds 4 reports when reporting a player, if i report multiple players with multiple reasons they will all have the same reason, reported by etc.

No reload errors

Skript Version (do not put latest): 2.4-beta7
Skript Author: Hartvig
Minecraft Version: 1.12

Full Code:
Code:
options:
    mr: &cMissing reason, reasons: &7flyhack, nuker, reach
command /report [<offline player>] [<text>]:
    trigger:
        if arg 1 is not set:
            send "&cPlease do /report &7[&cplayer&7] &7[&creason&7]"
        if arg 1 is set:
            if arg 1 is a offline player:
                if arg 2 is set:
                    if arg 2 is "flyhack", "nuker" or "reach":
                        add skull of arg 1 to {reports::*}
                        add arg 1 to {reports::*}
                        add player to {reports::*}
                        add arg 2 to {reports::*}
                        send "&cReported &e&n%arg 1% &cfor &e&n%arg 2%"
                    else:
                        send "{@mr}"
                else:
                    send "{@mr}"
command /reports:
    permission: "report.sk"
    trigger:
        set {_i} to chest inventory with 6 rows named  "&c&lReports"
        wait 1 tick
        open {_i} to player
        set {_slot} to -1
        loop {reports::*}:
            add 1 to {_slot}
            set slot {_slot} of {_i} to 1st element of {reports::*} named "&e&l%2nd element of {reports::*}%" with lore "&7Reported by &b%3rd element of {reports::*}%" and "&7Reason &c%4th element of {reports::*}%"

 
Here you go bro :emoji_wink: I full ready skript
.
Permission for /reports (reports.hartvig)
.
Addons Needed: TuSKe
[doublepost=1575993786,1575993255][/doublepost]Fixed version :emoji_slight_smile:
 

Attachments

  • Sk.sk
    1.8 KB · Views: 238
  • Sk.sk
    1.9 KB · Views: 260
Here you go bro :emoji_wink: I full ready skript
.
Permission for /reports (reports.hartvig)
.
Addons Needed: TuSKe
[doublepost=1575993786,1575993255][/doublepost]Fixed version :emoji_slight_smile:
Thank you, i do have some errors when i reload though
error.png

[doublepost=1575995558][/doublepost]
Here you go bro :emoji_wink: I full ready skript
.
Permission for /reports (reports.hartvig)
.
Addons Needed: TuSKe
[doublepost=1575993786,1575993255][/doublepost]Fixed version :emoji_slight_smile:
oh downloaded the non-fixed version. It looks great but i have the same issue as before when reporting multiple players the skull will remain of one person, it doesn't load the reason either
 
Thats anti spam :emoji_slight_smile:
i meant, if reporting 2 different players, it will only take the value of 1 of them and duplicate it over to the other, so when reporting 3 different players you will have 3 reports with same reason, reported by, and reported player though it's different players
 
Status
Not open for further replies.