Zeldaboy111

Skript Tutorial #27 World config

Oct 11th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 KB | None | 0 0
  1. #LobbyCompass skript
  2.  
  3. options:
  4. {inventory::%arg 1%} = {inventory::%player%}
  5.  
  6. on load:
  7. set {LobbyCompassName} to "&3LobbyCompass"
  8. set {LobbyCompassLore} to "&kl"
  9. set {TitleMessage} to "&c<&4Lobby&c>"
  10.  
  11. on join:
  12. execute console command "/clobby %player% lobby"
  13. wait 1 tick
  14.  
  15.  
  16.  
  17. player is in world "lobby":
  18. set hunger to 10
  19. set player's health to 10
  20.  
  21. clear the player's inventory
  22. add {inventory::%player%} to player
  23. set slot 4 of player to a chest named "&6Cosmetics" with lore "&7Open een cosmetic GUI"
  24. set slot 0 of player to a compass named "%{LobbyCompassName}%" with lore "%{LobbyCompassLore}%"
  25.  
  26. command /setlobby [<text>]:
  27. trigger:
  28. if player has permission "lobby.set" OR "lobby.*":
  29. if arg 1 is "lobby":
  30. set {LobbyLocation} to location of player
  31. send "%{TitleMessage}% Je hebt de locatie van de &4lobby &cgezet op:%nl% &4%{LobbyLocation}%"
  32. stop
  33. if arg 1 is "survival":
  34. set {SurvivalLobbyLocation} to location of player
  35. send "%{TitleMessage}% Je hebt de locatie van de &4survival &cgezet op:%nl% &4%{LobbyLocation}%"
  36. stop
  37. if arg 1 is "kingdom":
  38. set {KingdomLobbyLocation} to location of player
  39. send "%{TitleMessage}% Je hebt de locatie van de &4kingdom &cgezet op:%nl% &4%{LobbyLocation}%"
  40. stop
  41. if arg 1 is "creative":
  42. set {CreativeLobbyLocation} to location of player
  43. send "%{TitleMessage}% Je hebt de locatie van de &4creative &cgezet op:%nl% &4%{LobbyLocation}%"
  44. stop
  45.  
  46. else:
  47. if arg 1 is not set:
  48. send "%{TitleMessage}% Je moet nog een lobbynaam invoeren."
  49. stop
  50. else:
  51. send "%{TitleMessage}% Deze lobby kan niet gezet worden."
  52.  
  53. else:
  54. send "%{TitleMessage}% Je hebt geen permissies om deze command uit te voeren."
  55. stop
  56.  
  57.  
  58. command /clobby [<offline player>] [<text>]:
  59. executable by: console
  60. trigger:
  61. if arg 1 is set:
  62. if arg 2 is "lobby":
  63. set {inventory::%arg 1%} to inventory of arg 1
  64. wait 1 tick
  65. clear inventory of arg 1
  66. teleport arg 1 to {LobbyLocation}
  67. send "&d<&5Lobby&d> Welkom in de lobby!" to arg 1
  68. stop
  69. if arg 2 is "survival":
  70. set {inventory::%arg 1%} to inventory of arg 1
  71. wait 1 tick
  72. clear inventory of arg 1
  73. teleport arg 1 to {SurvivalLobbyLocation}
  74. send "&d<&5Survival&d> Welkom op de server: Survival!" to arg 1
  75. stop
  76. if arg 2 is "kingdom":
  77. set {inventory::%arg 1%} to inventory of arg 1
  78. wait 1 tick
  79. clear inventory of arg 1
  80. teleport arg 1 to {KingdomLobbyLocation}
  81. send "&d<&5Kingdom&d> Welkom op de server: Kingdom!" to arg 1
  82.  
  83. stop
  84. if arg 2 is "creative":
  85. set {inventory::%arg 1%} to inventory of arg 1
  86. wait 1 tick
  87. clear inventory of arg 1
  88. teleport arg 1 to {CreativeLobbyLocation}
  89. send "&d<&5Creative&d> Welkom op de server: Creative!" to arg 1
  90. stop
  91.  
  92.  
  93. command /lobby:
  94. trigger:
  95. teleport player to {LobbyLocation}
  96. send "&d<&5Lobby&d> &5Welkom in de lobby!"
  97. add {inventory::%player%} to player
  98. stop
  99.  
  100. command /alobby [<text>] [<offline player>]:
  101. trigger:
  102. if arg 2 is set:
  103. if arg 1 is "lobby":
  104. teleport arg 2 to {LobbyLocation}
  105. stop
  106. if arg 1 is "survival":
  107. teleport arg 2 to {SurvivalLobbyLocation}
  108. send "&d<&5Survival&d> Welkom op de server: Survival!"
  109. stop
  110. if arg 1 is "kingdom":
  111. teleport arg 2 to {KingdomLobbyLocation}
  112. send "&d<&5Kingdom&d> Welkom op de server: Kingdom!"
  113. stop
  114. if arg 1 is "creative":
  115. teleport arg 2 to {CreativeLobbyLocation}
  116. send "&d<&5Creative&d> Welkom op de server: Creative!"
  117. stop
  118. else:
  119. if arg 1 is "lobby":
  120. teleport player to {LobbyLocation}
  121. stop
  122. if arg 1 is "survival":
  123. teleport player to {SurvivalLobbyLocation}
  124. send "&d<&5Survival&d> Welkom op de server: Survival!"
  125. stop
  126. if arg 1 is "kingdom":
  127. teleport player to {KingdomLobbyLocation}
  128. send "&d<&5Kingdom&d> Welkom op de server: Kingdom!"
  129. stop
  130. if arg 1 is "creative":
  131. teleport player to {CreativeLobbyLocation}
  132. send "&d<&5Creative&d> Welkom op de server: Creative!"
  133. stop
  134. else:
  135. send "%{TitleMessage}% Je moet nog een server invoeren."
  136. stop
  137.  
  138. on rightclick:
  139. if player is in world "lobby":
  140. if player is holding a compass named {LobbyCompassName} with lore {LobbyCompassLore}:
  141. open chest with 1 rows named "&3LobbyCompass" to player
  142. format slot 0 of player with a grass block named "&5Survival" with lore "&7Survival, alleen of met vrienden!" to close then run [execute console command "/clobby %player% survival"]
  143. format slot 2 of player with a diamond sword named "&5Kingdom" with lore "&7Kingdom, welk kingdom wordt het sterkst?" to close then run [execute console command "/clobby %player% kingdom"]
  144. format slot 4 of player with a diamond block named "&5Creative" with lore "&7Creative, bouw maar los op je plot!" to close then run [execute console command "/clobby %player% creative"]
Add Comment
Please, Sign In to add comment