Advertisement
Zeldaboy111

Skript Tutorial #28 Inventories

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