Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- skript_name: Lobby
- version: 1.0
- prefix: &f[&3Lobby&f] &8>>
- on enable:
- send "%nl%%nl%{@prefix} &7Het Skript &8{@skript_name} &7is aangezet" to console
- send "{@prefix} &8Bestanden &7aan het maken...%nl%%nl%" to console
- #Direction
- if dir "Files/{@skript_name}" doesn't exist:
- create dir "Files/{@skript_name}"
- if dir "Files/{@skript_name}/LobbyList" doesn't exist:
- create dir "Files/{@skript_name}/LobbyList"
- #Bestanden
- if file "Files/{@skript_name}/Config.yml" doesn't exist:
- create file "Files/{@skript_name}/Config.yml"
- load yaml "Files/{@skript_name}/Config.yml" as "Files/{@skript_name}/Config.yml"
- set skript-yaml value "Lobby.Location.World" from "Files/{@skript_name}/Config.yml" to "None"
- set skript-yaml value "Lobby.Location.Yaw" from "Files/{@skript_name}/Config.yml" to "None"
- set skript-yaml value "Lobby.Location.Pitch" from "Files/{@skript_name}/Config.yml" to "None"
- set skript-yaml value "Lobby.Location.X" from "Files/{@skript_name}/Config.yml" to "None"
- set skript-yaml value "Lobby.Location.Y" from "Files/{@skript_name}/Config.yml" to "None"
- set skript-yaml value "Lobby.Location.Z" from "Files/{@skript_name}/Config.yml" to "None"
- save yaml "Files/{@skript_name}/Config.yml"
- wait 3 seconds
- send "%nl%%nl%{@prefix} &7Succesvol alle &8bestanden &7gemaakt%nl%%nl%" to console
- on disable:
- send "%nl%%nl%{@prefix} &4Het Skript &c{@skript_name} &4is uitgezet%nl%%nl%" to console
- on join:
- execute console command "/lobby %player%"
- command /lobbyconfig [<text>] [<text>] [<text>] [<text>]:
- trigger:
- if player has permission "lobby.*":
- if arg 1 is "set":
- if arg 2 is set:
- if arg 3 is "spawn" OR "lobby":
- if arg 2 is "lobby":
- set yaml value "Lobby.Location.World" of file "Files/{@skript_name}/Config.yml" to "%world of player%"
- set yaml value "Lobby.Location.Yaw" of file "Files/{@skript_name}/Config.yml" to yaw of player
- set yaml value "Lobby.Location.Pitch" of file "Files/{@skript_name}/Config.yml" to pitch of player
- set yaml value "Lobby.Location.X" of file "Files/{@skript_name}/Config.yml" to x-coordinate of player
- set yaml value "Lobby.Location.Y" of file "Files/{@skript_name}/Config.yml" to y-coordinate of player
- set yaml value "Lobby.Location.Z" of file "Files/{@skript_name}/Config.yml" to z-coordinate of player
- save yaml "Files/{@skript_name}/Config.yml"
- send "{@prefix} &7Succesvol de &8%arg 2% &7gezet op:"
- send "&8World: &7%world of player%"
- send "&8Yaw: &7%yaw of player%"
- send "&8Pitch: &7%pitch of player%"
- send "&8X: &7%x-coordinate of location of player%"
- send "&8Y: &7%y-coordinate of location of player%"
- send "&8Z: &7%z-coordinate of location of player%"
- stop
- else:
- set yaml value "%arg 2%.Location.World" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml" to "%world of player%"
- set yaml value "%arg 2%.Location.Yaw" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml" to yaw of player
- set yaml value "%arg 2%.Location.Pitch" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml" to pitch of player
- set yaml value "%arg 2%.Location.X" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml" to x-coordinate of player
- set yaml value "%arg 2%.Location.Y" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml" to y-coordinate of player
- set yaml value "%arg 2%.Location.Z" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml" to z-coordinate of player
- save yaml "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- send "{@prefix} &7Succesvol &8%arg 2% &7gezet op:"
- send "&8World: &7%world of player%"
- send "&8Yaw: &7%yaw of player%"
- send "&8Pitch: &7%pitch of player%"
- send "&8X: &7%x-coordinate of location of player%"
- send "&8Y: &7%y-coordinate of location of player%"
- send "&8Z: &7%z-coordinate of location of player%"
- stop
- else if arg 3 is "name":
- if arg 4 is set:
- if arg 2 is "lobby" OR "spawn":
- send "{@prefix} &4Je kan de naam van de &c%arg 2% &4niet aanpassen."
- stop
- else:
- if file "Files/{@skript_name}/LobbyList/%arg 4%.yml" exists:
- send "{@prefix} &4De naam &c%arg 4% &4is al in gebruik."
- stop
- send "{@prefix} &7Bestand &8%arg 2% &7van naam veranderen naar &8%arg 4%&7..."
- set {_world} to yaml value "%arg 2%.Location.World" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- set {_yaw} to yaml value "%arg 2%.Location.Yaw" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- set {_pitch} to yaml value "%arg 2%.Location.Pitch" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- set {_x} to yaml value "%arg 2%.Location.X" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- set {_y} to yaml value "%arg 2%.Location.Y" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- set {_z} to yaml value "%arg 2%.Location.Z" of file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- delete file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- wait 1 second
- create file "Files/{@skript_name}/LobbyList/%arg 4%.yml"
- set yaml value "%arg 4%.Location.World" of file "Files/{@skript_name}/LobbyList/%arg 4%.yml" to {_world}
- set yaml value "%arg 4%.Location.Yaw" of file "Files/{@skript_name}/LobbyList/%arg 4%.yml" to {_yaw}
- set yaml value "%arg 4%.Location.Pitch" of file "Files/{@skript_name}/LobbyList/%arg 4%.yml" to {_pitch}
- set yaml value "%arg 4%.Location.X" of file "Files/{@skript_name}/LobbyList/%arg 4%.yml" to {_x}
- set yaml value "%arg 4%.Location.Y" of file "Files/{@skript_name}/LobbyList/%arg 4%.yml" to {_y}
- set yaml value "%arg 4%.Location.Z" of file "Files/{@skript_name}/LobbyList/%arg 4%.yml" to {_z}
- wait 1 second
- send "{@prefix} &7Bestand &8%arg 2% &7is succesvol van naam gewijzigd naar &8%arg 4%&7."
- stop
- else:
- send "{@prefix} &4Je moet nog een &cnaam &4opgeven."
- else:
- send "{@prefix} &4Je moet &cspawn &4of &cname &4opgeven."
- else:
- send "{@prefix} &4Je moet nog &clobby &4of een &cnaam voor je gamemode &4opgeven en &cwat je wilt doen&4."
- send "{@prefix} &4Voor een lijstje met evenementen doe: &c/lobbyconfig eventlist&4."
- else if arg 1 is "delete":
- if arg 2 is set:
- if arg 2 is "lobby" OR "spawn":
- set yaml value "Lobby.Location.World" of file "Files/{@skript_name}/Config.yml" to "None"
- set yaml value "Lobby.Location.Yaw" of file "Files/{@skript_name}/Config.yml" to "None"
- set yaml value "Lobby.Location.Pitch" of file "Files/{@skript_name}/Config.yml" to "None"
- set yaml value "Lobby.Location.X" of file "Files/{@skript_name}/Config.yml" to "None"
- set yaml value "Lobby.Location.Y" of file "Files/{@skript_name}/Config.yml" to "None"
- set yaml value "Lobby.Location.Z" of file "Files/{@skript_name}/Config.yml" to "None"
- save yaml "Files/{@skript_name}/Config.yml"
- send "{@prefix} &7Succesvol de &8%arg 2% &7verwijderd."
- stop
- else:
- if file "Files/{@skript_name}/LobbyList/%arg 2%.yml" exists:
- delete file "Files/{@skript_name}/LobbyList/%arg 2%.yml"
- send "{@prefix} &7Succesvol het bestand &8%arg 2%.yml &7verwijderd."
- stop
- else:
- send "{@prefix} &4De lobby &c%arg 2% &4bestaat niet."
- stop
- else:
- send "{@prefix} &4Je moet nog een &clobby naam &4opgeven."
- stop
- command /lobby [<text>] [<text>]:
- trigger:
- if executor is console:
- if arg 1 is set:
- if arg 2 is set:
- teleportLobby((arg-1 parsed as a player), "%arg 2%")
- send "{@prefix} &7Succesvol de speler &8%arg 1% &7naar de lobby gestuurd." to console
- else:
- teleportLobby((arg-1 parsed as a player), "Lobby")
- else:
- if arg 1 is set:
- if player has permission "Lobby.*":
- if arg 2 is set:
- teleportLobby((arg-1 parsed as a player), arg 2)
- else:
- teleportLobby((arg-1 parsed as a player), "Lobby")
- else:
- teleportLobby(player, "Lobby")
- else:
- teleportLobby(player, "Lobby")
- command /lobbycompass [<text>] [<text>] [<text>] [<text>] [<text>]:
- aliases: /lc
- trigger:
- if player has permission "Lobby.*":
- if arg 1 is "config":
- if arg 2 is "create":
- if arg 3 is set:
- if file "Files/{@skript_name}/LobbyList/%arg 3%.yml" exists:
- if arg 4 is set:
- if arg 4 is an item:
- stop
- else:
- send "{@prefix} &4Het item &c%arg 4% &4is geen item."
- stop
- else:
- send "{@prefix} &4Je moet nog een &citem &4opgeven."
- stop
- else:
- send "{@prefix} &4Het bestand &c%arg 3%.yml &4bestaat niet."
- stop
- else:
- send "{@prefix} &4Je moet nog een &clobbynaam &4en &citem &4opgeven."
- stop
- if arg 2 is "edit":
- if arg 3 is set:
- if file "Files/{@skript_name}/LobbyList/%arg 3%.yml" exists:
- if arg 4 is "setname":
- if arg 5 is set:
- set yaml value "%arg 3%.LobbyCompass.name" of file "Files/{@skript_name}/LobbyList/%arg 3%.yml" to "%arg 5%"
- save yaml "Files/{@skript_name}/LobbyList/%arg 3%.yml"
- send "{@prefix} &7Succesvol de naam van &8%arg 3% &7veranderd naar: &8%arg 5%"
- stop
- else:
- send "{@prefix} &4Je moet nog een &cnaam voor het item &4opgeven."
- stop
- if arg 4 is "enable":
- if arg 4 is "disable":
- if arg 4 is "setitem":
- if arg 4 is "deletename":
- if arg 4 is "setlore":
- if arg 5 is set:
- if arg 4 is "deletelore":
- if arg 5 is set:
- else:
- send "{@prefix} &4Het bestand &c%arg 3%.yml &4bestaat niet."
- stop
- function teleportLobby(p: player, tVar: string):
- if {_tVar} is "Lobby":
- set {_world} to yaml value "Lobby.Location.World" of file "Files/{@skript_name}/Config.yml"
- if {_world} is not "None":
- set {_yaw} to yaml value "Lobby.Location.Yaw" of file "Files/{@skript_name}/Config.yml"
- set {_pitch} to yaml value "Lobby.Location.Pitch" of file "Files/{@skript_name}/Config.yml"
- set {_x} to yaml value "Lobby.Location.X" of file "Files/{@skript_name}/Config.yml"
- set {_y} to yaml value "Lobby.Location.Y" of file "Files/{@skript_name}/Config.yml"
- set {_z} to yaml value "Lobby.Location.Z" of file "Files/{@skript_name}/Config.yml"
- set {_loc} to location at ({_x}, {_y}, {_z}) in world "%{_world}%"
- set {_loc}'s pitch to {_pitch}
- set {_loc}'s yaw to {_yaw}
- teleport {_p} to {_loc}
- stop
- else:
- send "{@prefix} &4De lobby is &cnog niet gezet&4, doe &c/lobby set &c&llobby &cspawn&4." to {_p}
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement