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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
import:
org.bukkit.Bukkit
effect make %players% [(1¦stop being)] transparent [for %-players%]:
trigger:
set {_viewers::*} to expressions-2 if raw expressions-2 exists, else all players
loop expressions-1:
set {_scoreboard} to loop-value.getScoreboard() otherwise Bukkit.getScoreboardManager().getNewScoreboard()
set {_team} to {_scoreboard}.getTeam("transparent") otherwise {_scoreboard}.registerNewTeam("transpatent")
{_team}.setCanSeeFriendlyVisibles(false if parser mark is 1, else true)
if parser mark is 1:
remove invisibility from random player out of loop-value
else:
apply invisibility without any particles to loop-value for 99 days
loop expressions-2:
if parser mark is 1:
{_team}.removePlayer(loop-value-2)
else:
{_team}.addPlayer(loop-value-2)
if {_team}.size() is 0:
{_team}.unregister()
loop-value.setScoreboard({_scoreboard})
[02:59:59 ERROR]: Can't understand this condition/effect: {_team}.setCanSeeFriendlyVisibles(true if parser mark is 1, else false) (test.sk, line 20: {_team}.setCanSeeFriendlyVisibles(true if parser mark is 1, else false)')
[02:59:59 ERROR]: loop-value can't have anything removed from it (test.sk, line 22: remove invisibility from loop-value')
[02:59:59 ERROR]: There's no loop that matches 'loop-value for 99 days with no particles' (test.sk, line 24: apply invisibility to loop-value for 99 days with no particles')
[02:59:59 ERROR]: Can't understand this condition/effect: {_team}.removePlayer(loop-value-2) (test.sk, line 28: {_team}.removePlayer(loop-value-2)')
[02:59:59 ERROR]: Can't understand this condition/effect: {_team}.addPlayer(loop-value-2) (test.sk, line 30: {_team}.addPlayer(loop-value-2)')
[02:59:59 ERROR]: Can't understand this condition/effect: {_team}.unregister() (test.sk, line 33: {_team}.unregister()')
[02:59:59 ERROR]: Can't understand this condition/effect: loop-value.setScoreboard({_scoreboard}) (test.sk, line 35: loop-value.setScoreboard({_scoreboard})')
ups, sorry I had outdated skript-mirror on the test server, anywayI told what it specifically needs on my post.
[03:34:13 ERROR]: [Skript] loop-value can't have anything removed from it (test.sk, line 22: remove invisibility from loop-value')
[03:34:13 ERROR]: [Skript] There's no loop that matches 'loop-value for 99 days with no particles' (test.sk, line 24: apply invisibility to loop-value for 99 days with no particles')
Updated the above code.ups, sorry I had outdated skript-mirror on the test server, anyway
code_language.skript:[03:34:13 ERROR]: [Skript] loop-value can't have anything removed from it (test.sk, line 22: remove invisibility from loop-value') [03:34:13 ERROR]: [Skript] There's no loop that matches 'loop-value for 99 days with no particles' (test.sk, line 24: apply invisibility to loop-value for 99 days with no particles')
Just to confirm it, did it work properly? I'm going to move it to my snippets if so. Also, please mark the post as best answer if it did.
command /1:
trigger:
loop all players:
make loop-player transparent for player
[12:14:10 WARN]: [Skript] method CraftScoreboard#registerNewTeam called with (transpatent (String)) threw a IllegalArgumentException: Team name 'transpatent' is already in use
effect make %players% [(1¦stop being)] transparent [for %-players%]:
trigger:
set {_viewers::*} to expressions-2 if raw expressions-2 exists, else all players
loop {_viewers::*}:
set {_scoreboard} to loop-value.getScoreboard() otherwise Bukkit.getScoreboardManager().getNewScoreboard()
set {_team} to {_scoreboard}.getTeam("transparent") otherwise {_scoreboard}.registerNewTeam("transparent")
if parser mark is 1:
{_team}.setCanSeeFriendlyInvisibles(false)
else:
{_team}.setCanSeeFriendlyInvisibles(true)
if parser mark is 1:
remove invisibility from random player out of loop-value
else:
apply invisibility without any particles to loop-value for 99 days
loop expressions-1:
if parser mark is 1:
{_team}.removePlayer(loop-value-2)
else:
{_team}.addPlayer(loop-value-2)
if {_team}.size() is 0:
{_team}.unregister()
loop-value.setScoreboard({_scoreboard})
I've fixed it already just that I forgot to say it here@Uzumaki
code_language.skript:effect make %players% [(1¦stop being)] transparent [for %-players%]: trigger: set {_viewers::*} to expressions-2 if raw expressions-2 exists, else all players loop {_viewers::*}: set {_scoreboard} to loop-value.getScoreboard() otherwise Bukkit.getScoreboardManager().getNewScoreboard() set {_team} to {_scoreboard}.getTeam("transparent") otherwise {_scoreboard}.registerNewTeam("transparent") if parser mark is 1: {_team}.setCanSeeFriendlyInvisibles(false) else: {_team}.setCanSeeFriendlyInvisibles(true) if parser mark is 1: remove invisibility from random player out of loop-value else: apply invisibility without any particles to loop-value for 99 days loop expressions-1: if parser mark is 1: {_team}.removePlayer(loop-value-2) else: {_team}.addPlayer(loop-value-2) if {_team}.size() is 0: {_team}.unregister() loop-value.setScoreboard({_scoreboard})
Fixed
_team}.setCanSeeFriendlyVisibles(true if parser mark is 1, else false)
(true if parser mark is 1, else false)
You need Skript dev36 for this@Snow-Pyon
Where is no setCanSeeFriendlyVisibles. https://hub.spigotmc.org/javadocs/b...eam.html#setCanSeeFriendlyInvisibles-boolean-code_language.skript:_team}.setCanSeeFriendlyVisibles(true if parser mark is 1, else false)
Doesn't workcode_language.skript:(true if parser mark is 1, else false)
Or you forgot to update code above?
I see what you meant, it wasn't what you mentioned but it was the boolean being inverted in the code, that should hopefully make it work properly.I have latest Skript and still doesn't work . Then I added if else then it started to work