Zeldaboy111

Skript #163

May 13th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. options:
  2. skript_name: Lobby
  3. version: 1.0
  4. prefix: &f[&3Lobby&f] &8>>
  5.  
  6.  
  7. on enable:
  8. send "%nl%%nl%{@prefix} &7Het Skript &8{@skript_name} &7is aangezet" to console
  9. send "{@prefix} &8Bestanden &7aan het maken...%nl%%nl%" to console
  10.  
  11. #Direction
  12. if dir "Files/{@skript_name}" doesn't exist:
  13. create dir "Files/{@skript_name}"
  14.  
  15. if dir "Files/{@skript_name}/LobbyList" doesn't exist:
  16. create dir "Files/{@skript_name}/LobbyList"
  17.  
  18. #Bestanden
  19. if file "Files/{@skript_name}/Config.yml" doesn't exist:
  20. create file "Files/{@skript_name}/Config.yml"
  21. load yaml "Files/{@skript_name}/Config.yml" as "Files/{@skript_name}/Config.yml"
  22. set skript-yaml value "Lobby.Location.World" from "Files/{@skript_name}/Config.yml" to "None"
  23. set skript-yaml value "Lobby.Location.Yaw" from "Files/{@skript_name}/Config.yml" to "None"
  24. set skript-yaml value "Lobby.Location.Pitch" from "Files/{@skript_name}/Config.yml" to "None"
  25. set skript-yaml value "Lobby.Location.X" from "Files/{@skript_name}/Config.yml" to "None"
  26. set skript-yaml value "Lobby.Location.Y" from "Files/{@skript_name}/Config.yml" to "None"
  27. set skript-yaml value "Lobby.Location.Z" from "Files/{@skript_name}/Config.yml" to "None"
  28. save yaml "Files/{@skript_name}/Config.yml"
  29.  
  30.  
  31. wait 3 seconds
  32. send "%nl%%nl%{@prefix} &7Succesvol alle &8bestanden &7gemaakt%nl%%nl%" to console
  33.  
  34.  
  35. on disable:
  36. send "%nl%%nl%{@prefix} &4Het Skript &c{@skript_name} &4is uitgezet%nl%%nl%" to console
  37.  
  38.  
  39. on join:
  40. execute console command "/lobby %player%"
  41.  
  42.  
  43. command /lobbyconfig [<text>] [<text>] [<text>] [<text>]:
  44. trigger:
  45. if player has permission "lobby.*":
  46. if arg 1 is "set":
  47. if arg 2 is set:
  48. if arg 3 is "spawn" OR "lobby":
  49. if arg 2 is "lobby":
  50. set yaml value "Lobby.Location.World" of file "Files/{@skript_name}/Config.yml" to "%world of player%"
  51. set yaml value "Lobby.Location.Yaw" of file "Files/{@skript_name}/Config.yml" to "%yaw of player%"
  52. set yaml value "Lobby.Location.Pitch" of file "Files/{@skript_name}/Config.yml" to "%pitch of player%"
  53. set yaml value "Lobby.Location.X" of file "Files/{@skript_name}/Config.yml" to "%x-coordinate of location of player%"
  54. set yaml value "Lobby.Location.Y" of file "Files/{@skript_name}/Config.yml" to "%y-coordinate of location of player%"
  55. set yaml value "Lobby.Location.Z" of file "Files/{@skript_name}/Config.yml" to "%z-coordinate of location of player%"
  56.  
  57. save yaml "Files/{@skript_name}/Config.yml"
  58.  
  59. send "{@prefix} &7Succesvol de &8spawn gezet &7op:"
  60. send "&8World: &7%world of player%"
  61. send "&8Yaw: &7%yaw of player%"
  62. send "&8Pitch: &7%pitch of player%"
  63. send "&8X: &7%x-coordinate of location of player%"
  64. send "&8Y: &7%y-coordinate of location of player%"
  65. send "&8Z: &7%z-coordinate of location of player%"
  66. stop
  67.  
  68.  
  69.  
  70. else if arg 3 is "name":
  71. if arg 4 is set:
  72.  
  73. else:
  74. send "{@prefix} &4Je moet nog een &cnaam &4opgeven."
  75.  
  76. else:
  77. send "{@prefix} &4Je moet &cspawn &4of &cname &4opgeven."
  78.  
  79. else:
  80. send "{@prefix} &4Je moet nog &clobby &4of een &cnaam voor je gamemode &4opgeven en &cwat je wilt doen&4."
  81. send "{@prefix} &4Voor een lijstje met evenementen doe: &c/lobbyconfig eventlist&4."
  82.  
  83.  
  84. else if arg 2 is "delete":
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94. command /lobby [<text>] [<text>]:
  95. trigger:
  96. if executor is console:
  97. if arg 1 is set:
  98. if arg 2 is set:
  99. teleportLobby((arg-1 parsed as a player), "%arg 2%")
  100. send "{@prefix} &7Succesvol de speler &8%arg 1% &7naar de lobby gestuurd." to console
  101.  
  102. else:
  103. teleportLobby((arg-1 parsed as a player), "Lobby")
  104.  
  105.  
  106. else:
  107. if arg 1 is set:
  108. if player has permission "Lobby.*":
  109. if arg 2 is set:
  110. teleportLobby((arg-1 parsed as a player), arg 2)
  111.  
  112. else:
  113. teleportLobby((arg-1 parsed as a player), "Lobby")
  114.  
  115. else:
  116. teleportLobby(player, "Lobby")
  117. else:
  118. teleportLobby(player, "Lobby")
  119.  
  120. #command /colobby [<text>]:
  121.  
  122.  
  123. function teleportLobby(p: player, tVar: string):
  124. if {_tVar} is "Lobby":
  125. set {_world} to yaml value "Lobby.Location.World" of file "Files/{@skript_name}/Config.yml"
  126.  
  127. if {_world} is not "None":
  128. set {_yaw} to yaml value "Lobby.Location.Yaw" of file "Files/{@skript_name}/Config.yml"
  129. set {_pitch} to yaml value "Lobby.Location.Pitch" of file "Files/{@skript_name}/Config.yml"
  130. set {_x} to yaml value "Lobby.Location.X" of file "Files/{@skript_name}/Config.yml"
  131. set {_y} to yaml value "Lobby.Location.Y" of file "Files/{@skript_name}/Config.yml"
  132. set {_z} to yaml value "Lobby.Location.Z" of file "Files/{@skript_name}/Config.yml"
  133.  
  134. #set {_loc} to {_x}, {_y}, {_z}
  135.  
  136. teleport {_p} to {_loc}
  137.  
  138. else:
  139. send "{@prefix} &4De lobby is &cnog niet gezet&4, doe &c/lobby set &c&llobby &cspawn&4." to {_p}
  140. stop
  141.  
  142. #set yaml value "Lobby.Location.World" of file "Files/{@skript_name}/Config.yml" to "%world of player%"
  143. #set yaml value "Lobby.Location.Yaw" of file "Files/{@skript_name}/Config.yml" to "%yaw of player%"
  144. #set yaml value "Lobby.Location.Pitch" of file "Files/{@skript_name}/Config.yml" to "%pitch of player%"
  145. #set yaml value "Lobby.Location.X" of file "Files/{@skript_name}/Config.yml" to "%x-coordinate of location of player%"
  146. #set yaml value "Lobby.Location.Y" of file "Files/{@skript_name}/Config.yml" to "%y-coordinate of location of player%"
  147. #set yaml value "Lobby.Location.Z" of file "Files/{@skript_name}/Config.yml" to "%z-coordinate of location of player%"
Advertisement
Add Comment
Please, Sign In to add comment