Meow_Squad Posted January 28, 2022 Share Posted January 28, 2022 I tried to make a skript for muting people because there are people that spam on the server. I need help trying to figure it out though. command /mute <player> <number>: permission: op permission message: &cNot today, nor Tomorrow. trigger: add uuid of "%arg-2%" to {Muted::*} send "&cYou have been muted for %arg-2% minutes." to "%arg-1%" parsed as player wait "%arg-2%" minutes remove "%arg-2%"'s uuid from {Muted::*} send "&aYour mute has expired!" to "%arg-1%" parsed as player command /unmute <player>: permission: op permission message: &cNot today, nor Tomorrow. trigger: if "%arg-1%"'s uuid is not in {Muted::*}: send "&cThat player is already unmuted!" to player else: remove "%arg-1%"'s uuid from {Muted::*} send "&aYou have been unmuted!" to "%arg-1%" parsed as player send "&aUnmuted %arg-1%&a!" on chat: if {Muted::*} contains player's uuid: cancel event send "&cYou are currently muted!" to player Errors: Line 13: Can't understand this condition/effect: add uuid of "%arg-2%" to {Muted::*} (line 13: add "%arg-2%"'s uuid to {Muted::*}') Line 16: Can't understand this condition/effect: remove "%arg-2%"'s uuid from {Muted::*} (line 16: remove "%arg-2%"'s uuid from {Muted::*}') (The Parser doesn't support every syntax element.) Line 23: Can't understand this condition: '"%arg-1%"'s uuid is not in {Muted::*}' (line 23: if "%arg-1%"'s uuid is not in {Muted::*}:') Line 25: 'else' has to be placed just after another 'if' or 'else if' section (line 25: else:') Link to comment Share on other sites More sharing options...
ApexSplat Posted January 30, 2022 Share Posted January 30, 2022 (edited) So for the first 2 errors you are trying to add a number's uuid to a list which isn't possible. What you want to be doing is adding the specified player's uuid to this list so instead of using arg-2 you need to use arg-1 as the first argument is a player. For the 3rd error I believe you need to use 'doesn't contain'. I fixed the code here: command /mute <player> <number>: permission: op permission message: &cNot today, nor Tomorrow. trigger: add uuid of "%arg-1%" to {Muted::*} send "&cYou have been muted for %arg-2% minutes." to "%arg-1%" parsed as player wait "%arg-2%" minutes remove "%arg-1%"'s uuid from {Muted::*} send "&aYour mute has expired!" to "%arg-1%" parsed as player command /unmute <player>: permission: op permission message: &cNot today, nor Tomorrow. trigger: if {Muted::*} doesn't contain "%arg-1%'s uuid: send "&cThat player is already unmuted!" to player else: remove "%arg-1%"'s uuid from {Muted::*} send "&aYou have been unmuted!" to "%arg-1%" parsed as player send "&aUnmuted %arg-1%&a!" on chat: if {Muted::*} contains player's uuid: cancel event send "&cYou are currently muted!" to player Edited January 30, 2022 by ApexSplat Discord: Dead#6905 Love anime! Link to comment Share on other sites More sharing options...
BrotherBethuel Posted March 30, 2023 Share Posted March 30, 2023 it doesnt work with the wait arg-2 minutes i tried everything Link to comment Share on other sites More sharing options...
ApexSplat Posted March 31, 2023 Share Posted March 31, 2023 make it so it isn't a string Discord: Dead#6905 Love anime! Link to comment Share on other sites More sharing options...
ApexSplat Posted March 31, 2023 Share Posted March 31, 2023 If that doesn't work you might need to parse it as a timespan Discord: Dead#6905 Love anime! Link to comment Share on other sites More sharing options...
BrotherBethuel Posted April 1, 2023 Share Posted April 1, 2023 what do you mean apexsplat Link to comment Share on other sites More sharing options...
ApexSplat Posted April 1, 2023 Share Posted April 1, 2023 (edited) wait ("%arg 2% minutes" parsed as timespan) Edited April 1, 2023 by ApexSplat Discord: Dead#6905 Love anime! Link to comment Share on other sites More sharing options...
BrotherBethuel Posted April 1, 2023 Share Posted April 1, 2023 thank you so much! i needed this very badly and can you help me with a spam detector so you get muted in a minute or something like that Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now