Welcome to SkriptTools.net!

SkriptTools is now part of the skUnity family! skUnity will keep SkriptTools running, updating and adding new features.


- You can now search scripts by author by doing "author:name". For example: "author:nfell2009"

- Login to SkriptTools using your skUnity account to save your favourite scripts and come back to them

Login

Script Viewer

View the code of the script directly in your browser without downloading anything.

Current File: skunitybackup-586.sk - Download / View on the skUnity Parser

#
#
# Version: 1.1
# Créateur: MinePlugins 
#CoinsMySQL de MinePlugins est mis à disportalosition selon les termes de la 
#licence Creative Commons Attribution - Pas d’Utilisation Commerciale - 
#Partage dans les Mêmes Conditions 4.0 International.​
#
# SkPortal
#

every 2 seconds:
	loop {SkPortal-List-name::*}:
		loop all players:
			if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 7:
				set {_nb} to 0
				if {SkPortal-List-Color-%loop-value-1%} is "hardgreen":
					set {_color} to "-1 0.8 -1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "brown":
					set {_color} to "0.8 0.4 -1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "cyan":
					set {_color} to "-1 1 1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "blue":
					set {_color} to "-1 -1 1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "purple":
					set {_color} to "1 -1 1.5 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "hardcyan":
					set {_color} to "0.2 0.8 2 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "gray":
					set {_color} to "0.5 0.5 0.5 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "literose":
					set {_color} to "2 1 1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "green":
					set {_color} to "-1 1.5 -1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "rose":
					set {_color} to "2 -1 1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "orange":
					set {_color} to "2 1 -1 1" parsed as text
				if {SkPortal-List-Color-%loop-value-1%} is "yellow":
					set {_color} to "2 1 1 1" parsed as text
				loop 4 times:
					set {_Radius} to 1.5
					set {_Angle} to 1
					set {_rotation} to 1
					set {_Number} to floor(360 / {_Angle})
					set {_Number.2} to floor(360 / {_rotation})
					set {_Current} to 0
					loop {_Number} times:
						set {_x2} to x-coordinate of {SkPortal-List-Pos-%loop-value-1%}
						set {_y2} to y-coordinate of {SkPortal-List-Pos-%loop-value-1%}
						set {_z2} to z-coordinate of {SkPortal-List-Pos-%loop-value-1%}
						Set {_calc} to ({_Current} / 180) * 3.14159265358979323846
						Set {_x} to (cos {_calc}) * {_Radius}
						Set {_z} to (sin {_calc}) * {_Radius}
						Set {_y} to (sin ({_rotation} / 180) * 3.14159265358979323846) * {_x}
						Set {_mod} to (cos ({_rotation} / 180) * 3.14159265358979323846) * {_x}
						add {_Angle} to {_Current}
						increase {_x2} by {_mod}
						increase {_y2} by {_y}
						increase {_z2} by {_z}
						run loop-player command "/particle reddust %{_x2}% %{_y2} + {_nb} + 0.4% %{_z2}% %{_color}%" as op

					wait 4 tick
					add 0.7 to {_nb}
			if {Start-tp-%loop-player's uuid%} is not set:
				if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 4:
					make console execute command "/title %loop-player% times 2 10 2"
					if {Start-tp-%loop-player's uuid%} is not set:
						make console execute command "/title %loop-player% title {text:"""",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
						if {SkPortal-Portal-LinkN-%loop-value-1%} is set:
							make console execute command "/title %loop-player% subtitle {text:""§3§lTeleport to §9%{SkPortal-Portal-LinkN-%loop-value-1%}%"",color:black,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
						else:
							make console execute command "/title %loop-player% subtitle {text:""§cOut of order"",color:black,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"

				if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 2:
					if {SkPortal-Portal-Link-%loop-value-1%} is set:
						make console execute command "/title %loop-player% title {text:""§e§lTeleportation in 5 seconds..."",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
						wait 1 seconds
						set {Start-tp-%loop-player's uuid%} to true
						if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 2:
							make console execute command "/title %loop-player% title {text:""§e§lTeleportation in 4 seconds..."",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
							wait 1 seconds
							if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 2:
								make console execute command "/title %loop-player% title {text:""§e§lTeleportation in 3 seconds..."",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
								wait 1 seconds
								if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 2:
									make console execute command "/title %loop-player% title {text:""§e§lTeleportation in 2 seconds..."",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
									wait 1 seconds
									if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 2:
										make console execute command "/title %loop-player% title {text:""§e§lTeleportation in 1 seconds..."",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
										wait 1 seconds
										if distance between loop-player and {SkPortal-List-Pos-%loop-value-1%} is less than 2:
											teleport loop-player to {SkPortal-Portal-Link-%loop-value-1%}
											wait 2 seconds
											clear {Start-tp-%loop-player's uuid%}
											stop
										else:
											clear {Start-tp-%loop-player's uuid%}
											make console execute command "/title %loop-player% title {text:""§cTeleportation canceled"",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
									else:
										clear {Start-tp-%loop-player's uuid%}
										make console execute command "/title %loop-player% title {text:""§cTeleportation canceled"",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
								else:
									clear {Start-tp-%loop-player's uuid%}
									make console execute command "/title %loop-player% title {text:""§cTeleportation canceled"",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
							else:
								clear {Start-tp-%loop-player's uuid%}
								make console execute command "/title %loop-player% title {text:""§cTeleportation canceled"",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
						else:
							clear {Start-tp-%loop-player's uuid%}
							make console execute command "/title %loop-player% title {text:""§cTeleportation canceled"",color:gold,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}"
					else:
						if loop-player has permission "skportal.message.admin" or "skportal.*":
						send "&7This portal are not link to another! Do /sportal link..." to loop-player

command /skportal [<text=help>] [<text>] [<text>] [<text>] [<text>]:
	aliases: sportal, skp
	permission: skportal.admin
	trigger:
		if arg-1 is "help":
			send "&1&m--&9&m--&3&m--&b&m--&f&m||&b&m--&3&m--&9&m--&1&m--&r&e[ &5SkPortal &e]&1&m--&9&m--&3&m--&b&m--&f&m||&b&m--&3&m--&9&m--&1&m--"
			send "&3° &7/sportal create (name) (color) &3Creatte a new portal"
			send "&3° &7/sportal link (name) (name) &3Link 2 portal between them"
			send "&3° &7/sportal delete (name) &3Delete the portal"
			send "&3° &7/sportal unlink (name) &3Un link portal"
			send "&3° &7/sportal tp (name) &3Teleport to a portal"
			send "&3° &7/sportal move (name) &3Move portal location"
			send "&3° &7/sportal reload &3Reload the skript -coming soon-"
		if arg-1 is "move":
			if arg-2 is not set:
				send "&3° &7/sportal move (name) &3Move portal location"
			else:
				loop {SkPortal-List-name::*}:
					loop-value is arg-2
					set {_1sportalass} to true
				if {_1sportalass} is set:
					if {SkPortal-Portal-LinkN-%arg-2%} is set:					
						set {SkPortal-List-Pos-%arg-2%} to location of player
						set {SkPortal-Portal-Link-%{SkPortal-Portal-LinkN-%arg-2%}%} to {SkPortal-List-Pos-%arg-2%} 
					if {SkPortal-Portal-LinkN-%arg-2%} is not set:					
						set {SkPortal-List-Pos-%arg-2%} to location of player
					send "&7The portal have move !"
				else:
					send "&cThis portal doesn't exist!"
		if arg-1 is "list":
			send "&7This is the portal list:"
			send "&3Name &7| &3Loc &7| &3Link"
			loop {SkPortal-List-name::*}:
				send "- &7%loop-value% &e| &7%{SkPortal-List-Pos-%loop-value%}% &e|&7 %{SkPortal-Portal-LinkN-%loop-value%}%"
		if arg-1 is "tp":
			if arg-2 is not set:
				send "&3° &7/sportal tp &c(name) &3Teleport to a portal"
			else:
				loop {SkPortal-List-name::*}:
					loop-value is arg-2
					set {_1sportalass} to true
				if {_1sportalass} is set:
					send "&7Teleportation..."
					teleport player to {SkPortal-List-Pos-%arg-2%}
				else:
					send "&cThis portal doesn't exist!"
		if arg-1 is "delete":
			if arg-2 is not set:
				send "&3° &7/sportal delete &c(name) &3Delet the portal"
			else:
				loop {SkPortal-List-name::*}:
					loop-value is arg-2
					set {_1sportalass} to true
				if {_1sportalass} is set:
					send "&7The portal that was linked to it was:: %{SkPortal-Portal-LinkN-%arg-2%}%"
					clear {SkPortal-Portal-Link-%{SkPortal-Portal-LinkN-%arg-2%}%} 
					clear {SkPortal-Portal-LinkN-%{SkPortal-Portal-LinkN-%arg-2%}%} 
					clear {SkPortal-Portal-Link-%arg-2%} 
					clear {SkPortal-Portal-LinkN-%arg-2%}
					clear {SkPortal-List-Color-%arg-2%} 
					clear {SkPortal-List-Pos-%arg-2%} 
					remove arg-2 from {SkPortal-List-name::*}
					send "&7The portal have been deleted !"
		if arg-1 is "link":
			if arg-2 is not set:
				send "&3° &7/sportal link &c(From..name)&7 (To..name) &3Link the portal"
			else:
				loop {SkPortal-List-name::*}:
					loop-value is arg-2
					set {_1sportalass} to true
				if {_1sportalass} is set:
					if arg-3 is not set:
						send "&3° &7/sportal link (From..name)&c (To..name) &3Link the portal"
					else:
						loop {SkPortal-List-name::*}:
							loop-value is arg-3
							set {_2sportalass} to true
						if {_2sportalass} is set:
							if {SkPortal-Portal-LinkN-%arg-2%} is not set:
								set {SkPortal-Portal-Link-%arg-2%} to {SkPortal-List-Pos-%arg-3%} 					
								set {SkPortal-Portal-Link-%arg-3%} to {SkPortal-List-Pos-%arg-2%} 
								set {SkPortal-Portal-LinkN-%arg-3%} to "%arg-2%"
								set {SkPortal-Portal-LinkN-%arg-2%} to "%arg-3%"
								send "&7You have linked the portal &a%arg-2% &7with portal &a%arg-3%"
							else:
								send "&cThis portal is already linked to the portal: &a%{SkPortal-Portal-LinkN-%arg-2%}%"
						else:
							send "&cThis portal doesn't exist!"
				else:
					send "&cThis portal doesn't exist!"		
		if arg-1 is "unlink":
			if arg-2 is not set:
				send "&3° &7/sportal unlink &c(From..name)&7 (To..name) &3Unlink the first portal with the other"
			else:
				loop {SkPortal-List-name::*}:
					loop-value is arg-2
					set {_1sportalass} to true
				if {_1sportalass} is set:
					if {SkPortal-Portal-LinkN-%arg-2%} is set:
						send "&7You have unlink the portal &a%arg-2% &7with portal &a%{SkPortal-Portal-LinkN-%arg-2%}%"
						clear {SkPortal-Portal-Link-%{SkPortal-Portal-LinkN-%arg-2%}%} 
						clear {SkPortal-Portal-LinkN-%{SkPortal-Portal-LinkN-%arg-2%}%} 
						clear {SkPortal-Portal-Link-%arg-2%} 
						clear {SkPortal-Portal-LinkN-%arg-2%}

					else:
						send "&cThis portal is not linked to any other portal"
				else:
					send "&cThis portal doesn't exist!"					

		if arg-1 is "create":
			if arg-2 is not set:
				send "&3° &7/sportal create &c(name)&7 (color) &3Create a new portal"
			else:
				if arg-3 is not "bleu" or "marron" or "jaune" or "violet" or "cyan":
					send "&3° &7/sportal create (name)&c (color) &3Create a new portal"
				else if arg-3 is not set:
					send "&3° &7/sportal create (name)&c (color) &3Create a new portal"
				else:
					loop {SkPortal-List-name::*}:
						loop-value is arg-2
						set {_1sportalass} to "true"
					if {_1sportalass} is not set:
						add arg-2 to {SkPortal-List-name::*}
						set {SkPortal-List-Pos-%arg-2%} to location of player
						set {SkPortal-List-Color-%arg-2%} to "%arg-3%"
						send "&3You created the portal: &a%arg-2%"
					else:
						send "&cThis portal already exist !"
on join:
	clear {Start-tp-%player's uuid%}
on script load:
	send "&aInitialisation..." to console
	make console execute command "/gamerule sendCommandFeedback false"
	make console execute command "/gamerule logAdminCommands false"