Zeldaboy111

Skript #277 ]|[ Lobby bugfixing

Jan 3rd, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.92 KB | None | 0 0
  1. #Read 'license.txt' before using this Skript please
  2.  
  3. options:
  4. config: plugins/Lobby/config.yml
  5.  
  6. #-----------------------------------{ Functions / Startup }-----------------------------------
  7. function startUp():
  8. clear {config.list.interaction::*}
  9. clear {config.list.join::*}
  10. clear {config.list.prefixes::*}
  11. clear {config.list.prefixes.default::*}
  12. add "trapdoor", "armor_stand", "item_frame", "button", "furnace", "chest", "trapped_chest", "crafting_table" and "door" to {config.list.interaction::*}
  13. add "teleportLobby", "clearJoinMessage" and "clearPlayer" to {config.list.join::*}
  14. add "Server.logo", "Server.chatColor", "Server.arcatedColor", "Lobby.logo", "Lobby.chatColor" and "Lobby.arcatedColor" to {config.list.prefixes::*}
  15. add "&e&lServer &7➤", "&f", "&e", "&d&lLobby &7➤", "&f" and "&d" to {config.list.prefixes.default::*}
  16.  
  17. if file "{@config}" doesn't exist:
  18. create file "{@config}"
  19.  
  20. loop {config.list.prefixes::*}:
  21. set yml value "Lobby.Prefix.%loop-value%" of file "{@config}" to "%{config.list.prefixes.default::%loop-index%}%"
  22.  
  23. loop {config.list.interaction::*}:
  24. set yml value "Lobby.Interaction.%loop-value%" of file "{@config}" to false
  25.  
  26. loop {config.list.join::*}:
  27. set yml value "Lobby.Join.%loop-value%" of file "{@config}" to true
  28.  
  29. set {lobby.logo.Server} to yml value "Lobby.Prefix.Server.logo" of file "{@config}"
  30. set {lobby.chatColor.Server} to yml value "Lobby.Prefix.Server.chatColor" of file "{@config}"
  31. set {lobby.arcatedColor.Server} to yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}"
  32. set {lobby.logo.Lobby} to yml value "Lobby.Prefix.Lobby.logo" of file "{@config}"
  33. set {lobby.chatColor.Lobby} to yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}"
  34. set {lobby.arcatedColor.Lobby} to yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}"
  35.  
  36. #logo: %{lobby.arcatedColor.Server}%&lServer &7➤&f
  37. #lobby: %{lobby.arcatedColor.Lobby}%Lobby &7➤&f
  38.  
  39. #set yml value "Lobby.Prefix.Server.logo" of file "{@config}" to "%{lobby.arcatedColor.Server}%&lServer &7➤&f"
  40. #set yml value "Lobby.Prefix.Server.chatColor" of file "{@config}" to "&f"
  41. #set yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}" to "%{lobby.arcatedColor.Server}%"
  42.  
  43. #set yml value "Lobby.Prefix.Lobby.logo" of file "{@config}" to "%{lobby.arcatedColor.Lobby}%Lobby &7➤&f"
  44. #set yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}" to "&f"
  45. #set yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}" to "%{lobby.arcatedColor.Lobby}%"
  46.  
  47. set yml value "Lobby.Join.Compass.give" of file "{@config}" to true
  48. set yml value "Lobby.Join.Compass.item" of file "{@config}" to "compass"
  49. set yml value "Lobby.Join.Compass.name" of file "{@config}" to "&9Compass"
  50. set yml value "Lobby.Join.Compass.lore" of file "{@config}" to "&7Click to use"
  51. set yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" to "&9Minigames"
  52. set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to 3
  53. set yml value "Lobby.Join.teleportLobby" of file "{@config}" to true
  54. set yml value "Lobby.Join.Message.clear" of file "{@config}" to true
  55. set yml value "Lobby.Join.Message.message" of file "{@config}" to "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%[player] joined the lobby!"
  56.  
  57.  
  58.  
  59.  
  60. else:
  61. set {lobby.logo.Server} to yml value "Lobby.Prefix.Server.logo" of file "{@config}"
  62. set {lobby.chatColor.Server} to yml value "Lobby.Prefix.Server.chatColor" of file "{@config}"
  63. set {lobby.arcatedColor.Server} to yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}"
  64. set {lobby.logo.Lobby} to yml value "Lobby.Prefix.Lobby.logo" of file "{@config}"
  65. set {lobby.chatColor.Lobby} to yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}"
  66. set {lobby.arcatedColor.Lobby} to yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}"
  67.  
  68.  
  69. loop {config.list.prefixes::*}:
  70. if yml value "Lobby.Prefix.%loop-value%" of file "{@config}" is not set:
  71. set yml value "Lobby.Prefix.%loop-value%" of file "{@config}" to "%{config.list.prefixes.default::%loop-index%}%"
  72.  
  73. loop {config.list.interaction::*}:
  74. if yml value "Lobby.Interaction.%loop-value%" of file "{@config}" is not set:
  75. set yml value "Lobby.Interaction.%loop-value%" of file "{@config}" to false
  76.  
  77. loop {config.list.join::*}:
  78. if yml value "Lobby.Join.%loop-value%" of file "{@config}" is not set:
  79. set yml value "Lobby.Join.%loop-value%" of file "{@config}" to true
  80.  
  81.  
  82.  
  83. if yml value "Lobby.Join.Compass.give" of file "{@config}" is not set:
  84. set yml value "Lobby.Join.Compass.give" of file "{@config}" to true
  85. if yml value "Lobby.Join.Compass.item" of file "{@config}" is not set:
  86. set yml value "Lobby.Join.Compass.item" of file "{@config}" to "compass"
  87. if yml value "Lobby.Join.Compass.name" of file "{@config}" is not set:
  88. set yml value "Lobby.Join.Compass.name" of file "{@config}" to "&9Minigames"
  89. if yml value "Lobby.Join.Compass.lore" of file "{@config}" is not set:
  90. set yml value "Lobby.Join.Compass.lore" of file "{@config}" to "&7Click to use"
  91. if yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" is not set:
  92. set yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" to "&9Minigames"
  93. if yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" is not set:
  94. set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to 3
  95.  
  96. if yml value "Lobby.Join.teleportLobby" of file "{@config}" is not set:
  97. set yml value "Lobby.Join.teleportLobby" of file "{@config}" to true
  98. if yml value "Lobby.Join.Message.clear" of file "{@config}" is not set:
  99. set yml value "Lobby.Join.Message.clear" of file "{@config}" to true
  100. if yml value "Lobby.Join.Message.message" of file "{@config}" is not set:
  101. set yml value "Lobby.Join.Message.message" of file "{@config}" to "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%[player] joined the lobby!"
  102. if yml value "Lobby.Join.clearPlayer" of file "{@config}" is not set:
  103. set yml value "Lobby.Join.clearPlayer" of file "{@config}" to true
  104.  
  105. setupLobby()
  106.  
  107. on enable:
  108. startUp()
  109.  
  110. #-----------------------------------{ Functions / Disable }-----------------------------------
  111.  
  112.  
  113. #-----------------------------------{ Functions / Join and Quit }-----------------------------------
  114. on join:
  115. if {lobby.location} is set:
  116. if {lobby.join.teleportLobby} is true:
  117. wait 2 ticks
  118. teleport player to {lobby.location}
  119. #reveal player for all players in world of player
  120. #reveal all players in world of player for player
  121.  
  122. if {lobby.join.clearJoinMessage} is true:
  123. set join message to ""
  124. if {lobby.joinMessage} is true:
  125. set {_message} to {lobby.joinMessage}
  126. replace all "[player]" in {_message} with name of player
  127. send "%{_message}%" to all players in world of player
  128.  
  129. if {lobby.join.clearPlayer} is true:
  130. clear player's inventory
  131. set player's level to 0
  132.  
  133. if {lobby.join.giveCompass} is true:
  134. set slot 4 of player to {lobby.items.compass}
  135.  
  136. if {lobby.buildmode.removeLeft.%player%} is set:
  137. delete {lobby.buildmode.removeLeft.%player%}
  138. send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby %{lobby.chatColor.Lobby}%because you left."
  139.  
  140. on quit:
  141. if {lobby.buildmode.%player%} is true:
  142. delete {lobby.buildmode.%player%}
  143. set {lobby.buildmode.removeLeft.%player%} to true
  144.  
  145. on disconnect:
  146. if {lobby.buildmode.%player%} is true:
  147. delete {lobby.buildmode.%player%}
  148. set {lobby.buildmode.removeLeft.%player%} to true
  149.  
  150. #-----------------------------------{ Functions / Compass }-----------------------------------
  151. function closeEvent(p: Player, command: Boolean, accept: String, acceptValue: String, minigame: String):
  152. if {_command} is true:
  153. execute {_p} command {_accept}
  154. wait 3 ticks
  155. if {_acceptValue} is not "delete":
  156. execute {_p} command "/lobbycompass gui %{_minigame}%"
  157.  
  158. else:
  159. send "%{_accept}%" to {_p}
  160. set {lobby.chatEvent.%{_p}%} to {_acceptValue}
  161. set {lobby.chatEventMinigame.%{_p}%} to {_minigame}
  162.  
  163. function closeInventory(p: Player, deny: String, minigame: String):
  164. send "%{_deny}%" to {_p}
  165. wait 2 ticks
  166. execute {_p} command "/Lobbycompass gui %{_minigame}%"
  167.  
  168. function setupLobby():
  169.  
  170. set {_compassItem} to yml value "Lobby.Join.Compass.item" of file "{@config}"
  171. set {_compassName} to yml value "Lobby.Join.Compass.name" of file "{@config}"
  172. set {_compassLore} to yml value "Lobby.Join.Compass.lore" of file "{@config}"
  173.  
  174. if {_compassItem} parsed as an item type is not set:
  175. send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_compassItem}% %{lobby.chatColor.Lobby}%is not an item! Setting the item to a compass..." to console
  176. set {_compassItem} to a compass
  177.  
  178. if {_compassName} is not set:
  179. send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.chatColor.Lobby}%There is no %{lobby.arcatedColor.Lobby}%name %{lobby.chatColor.Lobby}%given for the compass!" to console
  180. set {_compassName} to name of {_compassItem}
  181.  
  182. if {_compassLore} is not set:
  183. send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.chatColor.Lobby}%There is no %{lobby.arcatedColor.Lobby}%lore %{lobby.chatColor.Lobby}%given for the compass!" to console
  184. set {_compassLore} to ""
  185.  
  186. loop {config.list.interaction::*}:
  187. set {lobby.interaction.%loop-value%} to yml value "Lobby.Interaction.%loop-value%" of file "{@config}"
  188. loop {config.list.join::*}:
  189. set {lobby.join.%loop-value%} to yml value "Lobby.Join.%loop-value%" of file "{@config}"
  190.  
  191.  
  192. set {lobby.items.compass} to ({_compassItem} parsed as an item type) named "%{_compassName}%" with lore "%{_compassLore}%"
  193. set {lobby.items.compass.guiName} to yml value "Lobby.Join.Compass.GUI.name" of file "{@config}"
  194. set {lobby.items.compass.rows} to yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}"
  195. set {lobby.join.joinMessage} to yml value "Lobby.Join.Message.message" of file "{@config}"
  196. set {lobby.join.giveCompass} to yml value "Lobby.Join.Compass.give" of file "{@config}"
  197.  
  198. function createCompassGUI(p: Player, gname: String, rows: Integer, slot1: Integer, slot2: Integer, item1: Item, item2: Item, i1name: String, i2name: String, accept: String, acceptValue: String, deny: String, minigame: String, command: Boolean):
  199. wait 2 ticks
  200. open chest with {_rows} rows named {_gname} to {_p}
  201. wait 2 ticks
  202.  
  203. set name of {_item1} to {_i1name}
  204. set name of {_item2} to {_i2name}
  205.  
  206. format slot {_slot1} of {_p} with {_item1} to close then run [closeEvent({_p}, {_command}, {_accept}, {_acceptValue}, {_minigame})]
  207.  
  208. format slot {_slot2} of {_p} with {_item2} to close then run [closeInventory({_p}, {_deny}, {_minigame})]
  209.  
  210.  
  211. function teleportMinigame(p: Player, minigame: String):
  212. if {lobby.minigames.%{_minigame}%} is set:
  213. teleport {_p} to {lobby.minigames.%{_minigame}%.spawn}
  214.  
  215. else:
  216. send "%{lobby.logo.server}% %{lobby.chatColor.Server}%Error whilst connecting to %{lobby.arcatedColor.Server}%%{_minigame}%%{lobby.chatColor.Server}%! Please report this error to staff." to {_p}
  217.  
  218. function openCompass(p: Player):
  219. if {lobby.items.compass.rows} is not set:
  220. set {lobby.items.compass.rows} to 3
  221.  
  222. wait 2 ticks
  223. open chest with {lobby.items.compass.rows} rows named "%{lobby.items.compass.guiName}%" to {_p}
  224. wait 2 ticks
  225.  
  226. loop {lobby.minigames.list::*}:
  227. if "%{lobby.minigames.%loop-value%.slot}%" starts with "-":
  228. send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_p}% %{lobby.chatColor.Lobby}%has opened the compass with the following error:" and "%{lobby.arcatedColor.Lobby}%%{lobby.minigames.%loop-value%.slot}% %{lobby.chatColor.Lobby}%starts with '-'" to console
  229.  
  230. else:
  231. if ("%{lobby.minigames.%loop-value%.slot}%" parsed as a number) is set:
  232. if ("%{lobby.minigames.%loop-value%.item}%" parsed as an item type) is set:
  233. set {_item} to {lobby.minigames.%loop-value%.item}
  234.  
  235. else:
  236. set {_item} to paper
  237.  
  238. set {_slot} to ("%{lobby.minigames.%loop-value%.slot}%" parsed as a number)
  239.  
  240.  
  241. if {lobby.minigames.%loop-value%.name} is set:
  242. if {lobby.minigames.%loop-value%.name} is not "&cNone":
  243. set {_name} to "%{lobby.minigames.%loop-value%.name}%"
  244. replace all "&" in {_name} with "§"
  245. if {lobby.mingames.%loop-value%.lore} is set:
  246. if {lobby.minigames.%loop-value%.lore} is not "&cNone":
  247. set {_lore} to "%{lobby.minigames.%loop-value%.lore}%"
  248. replace all "&" in {_lore} with "§"
  249. format slot {_slot} of {_p} with ("%{lobby.minigames.%loop-value%.item}%" parsed as an item) named "&f%{_name}%" with lore "%{_lore}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  250. else:
  251. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "&f%{_name}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  252. else:
  253. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "&f%{_name}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  254. else:
  255. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  256. else:
  257. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  258. else:
  259. send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_p}% %{lobby.chatColor.Lobby}%has opened the compass with the following error:" and "%{lobby.arcatedColor.Lobby}%%{lobby.minigames.%loop-value%.slot}% %{lobby.chatColor.Lobby}%is not a number" to console
  260.  
  261. #-----------------------------------{ Player Interaction / Damage / Chat }-----------------------------------
  262. on damage:
  263. if victim is a player:
  264. if world of victim is {lobby.world}:
  265. if damage cause is ("void" parsed as a damage cause):
  266. set victim's health to 0
  267.  
  268. else:
  269. cancel event
  270.  
  271. else:
  272. if world of attacker is {lobby.world}:
  273. if {lobby.buildmode.%attacker%} is not set:
  274. cancel event
  275.  
  276. on death:
  277. if world of player is {lobby.world}:
  278. set death message to ""
  279.  
  280. on respawn:
  281. if world of player is {lobby.world}:
  282. set slot 4 of player to {lobby.items.compass}
  283. teleport player to {lobby.location}
  284.  
  285. on inventory click:
  286. if world of player is {lobby.world}:
  287. if {lobby.buildmode.%player%} is not set:
  288. cancel event
  289.  
  290. on click:
  291. if world of player is {lobby.world}:
  292. if player's held item is {lobby.items.compass}:
  293. cancel event
  294. openCompass(player)
  295.  
  296. on drop:
  297. if world of player is {lobby.world}:
  298. if {lobby.buildmode.%player%} is not set:
  299. cancel event
  300.  
  301. on break:
  302. if world is {lobby.world}:
  303. if {lobby.buildmode.%player%} is not set:
  304. cancel event
  305. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You can't do this!"
  306.  
  307.  
  308.  
  309. on place:
  310. if world of player is {lobby.world}:
  311. if {lobby.buildmode.%player%} is not set:
  312. cancel event
  313.  
  314. on chat:
  315. if world of player is {lobby.world}:
  316. cancel event
  317. wait 1 tick
  318.  
  319. if {lobby.chatEvent.%player%} is set:
  320. execute console command "/lobbycompass set %{lobby.chatEvent.%player%}% %player% %{lobby.chatEventMinigame.%player%}% %message%"
  321.  
  322. else:
  323. set {_prefix} to "&8[%{lobby.arcatedColor.Server}%%player%&8]"
  324. send "%{_prefix}% &7➣ &f%message%" to all players in world of player
  325. send "&8[&eLOBBY&8]&8[%{lobby.arcatedColor.Server}%%player%&8] &7➣ &f%message%" to console
  326.  
  327. on rightclick on trapdoor:
  328. if world of player is {lobby.world}:
  329. if {lobby.interaction.trapdoor} is false:
  330. cancel event
  331.  
  332. on rightclick on door:
  333. if world of player is {lobby.world}:
  334. if {lobby.interaction.door} is false:
  335. if {lobby.buildmode.%player%} is not set:
  336. cancel event
  337.  
  338. on rightclick on item frame:
  339. if world of player is {lobby.world}:
  340. if {lobby.interaction.item_frame} is false:
  341. if {lobby.buildmode.%player%} is not set:
  342. cancel event
  343.  
  344. on rightclick on button:
  345. if world of player is {lobby.world}:
  346. if {lobby.interaction.button} is false:
  347. if {lobby.buildmode.%player%} is not set:
  348. cancel event
  349.  
  350. on rightclick on armor stand:
  351. if world of player is {lobby.world}:
  352. if {lobby.interaction.armor_stand} is false:
  353. if {lobby.buildmode.%player%} is not set:
  354. cancel event
  355.  
  356. on rightclick on furnace:
  357. if world of player is {lobby.world}:
  358. if {lobby.interaction.button} is false:
  359. if {lobby.buildmode.%player%} is not set:
  360. close player's inventory
  361. cancel event
  362.  
  363. on rightclick on chest:
  364. if world of player is {lobby.world}:
  365. if {lobby.interaction.chest} is false:
  366. if {lobby.buildmode.%player%} is not set:
  367. close player's inventory
  368. cancel event
  369.  
  370. on rightclick on trapped chest:
  371. if world of player is {lobby.world}:
  372. if {lobby.interaction.trapped_chest} is false:
  373. if {lobby.buildmode.%player%} is not set:
  374. close player's inventory
  375. cancel event
  376.  
  377. on rightclick on crafting table:
  378. if world of player is {lobby.world}:
  379. if {lobby.interaction.crafting_table} is false:
  380. if {lobby.buildmode.%player%} is not set:
  381. close player's inventory
  382. cancel event
  383.  
  384. #-----------------------------------{ Lobby Functions / Command }-----------------------------------
  385.  
  386.  
  387. function teleportLobby(p: Player, w: World):
  388. if {lobby.location} is set:
  389.  
  390. if {_w} is {lobby.world}:
  391. teleport {_p} to {lobby.location}
  392.  
  393. else:
  394. teleport {_p} to {lobby.location}
  395. send "World" to console
  396. wait 1 tick
  397. set {_message} to {lobby.joinMessage}
  398. replace "[player]" in {_message} with name of {_p}
  399. send "%{_message}%" to all players in world {lobby.world}
  400. send "&8[&eLOBBY&8]%{_message}%" to console
  401. clear {_p}'s inventory
  402. set slot 4 of {_p} to {lobby.items.compass}
  403.  
  404. else:
  405. send "%{lobby.logo.Server}% %{lobby.chatColor.Server}%The %{lobby.arcatedColor.Server}%lobby %{lobby.chatColor.Server}%is %{lobby.chatColor.Server}%not set%{lobby.chatColor.Lobby}%!" to {_p}
  406.  
  407.  
  408. command /lobby [<text>] [<text>]:
  409. aliases: /hub
  410. trigger:
  411. if executor is player:
  412. if player has permission "lobby.*" or "lobby.set" or "lobby.buildmode":
  413. if arg-1 is set:
  414. if arg-1 is "help":
  415. send "&7──────────[ %{lobby.arcatedColor.Lobby}%lobby &7]──────────"
  416. send "<ttp:&7Get the help page><cmd:/lobby help>%{lobby.arcatedColor.Lobby}%/lobby help"
  417. if player has permission "op" or "lobby.*" or "rank.heler" or "lobby.set":
  418. send "<ttp:&7Set the lobby location><sgt:/lobby set>%{lobby.arcatedColor.Lobby}%/lobby set"
  419. if player has permission "op" or "lobby.*" or "rank.heler" or "lobby.buildmode":
  420. send "<ttp:&7Enable/Disable buildmode><sgt:/lobby buildmode enable/disable>%{lobby.arcatedColor.Lobby}%/lobby buildmode enable/disable"
  421.  
  422. send "&7──────────[ %{lobby.arcatedColor.Lobby}%lobby &7]──────────"
  423.  
  424. else if arg-1 is "set":
  425. if player has permission "lobby.*" or "lobby.set":
  426. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%{cmd}% %{lobby.chatColor.Lobby}%to your location!"
  427. set {lobby.world} to "%world of player%"
  428. set {lobby.location} to location of player
  429. else:
  430. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  431.  
  432. else if arg-1 is "buildmode":
  433. if player has permission "lobby.*" or "lobby.buildmode":
  434. if world of player is {lobby.world}:
  435. if arg-2 is set:
  436. if arg-2 parsed as a player is set:
  437. if {lobby.buildmode.%arg-2%} is true:
  438. delete {lobby.buildmode.%arg-2%}
  439. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%buildmode for %{lobby.arcatedColor.Lobby}%%name of arg-2 parsed as a player% %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  440. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!" to arg-2 parsed as a player
  441.  
  442. else:
  443. set {lobby.buildmode.%arg-2%} to true
  444. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for %{lobby.arcatedColor.Lobby}%%name of arg-2 parsed as a player% %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  445. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!" to arg-2 parsed as a player
  446. else:
  447. send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%is not online!"
  448.  
  449. else:
  450. if {lobby.buildmode.%player%} is true:
  451. delete {lobby.buildmode.%player%}
  452. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  453.  
  454. else:
  455. set {lobby.buildmode.%player%} to true
  456. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  457.  
  458. else:
  459. set {lobby.buildmode.%player%} to true
  460. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  461. else:
  462. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  463.  
  464. else:
  465. send "%{lobby.logo.server}% %{lobby.chatColor.Server}%You are %{lobby.arcatedColor.Server}%not %{lobby.chatColor.Server}%in the %{lobby.arcatedColor.Server}%lobby%{lobby.chatColor.Server}%!"
  466. else:
  467. teleportLobby(player, world of player)
  468. else:
  469. teleportLobby(player, world of player)
  470.  
  471. else:
  472. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Only players can execute this command!"
  473.  
  474.  
  475. command /lobbycompass [<text>] [<text>] [<text>] [<text>] [<text>]:
  476. aliases: /lcomp, /lcompass, /lobbycomp
  477. trigger:
  478. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.create" or "lobby.compass.delete" or "lobby.compass.setspawn" or "lobby.compass.setslot" or "lobby.compass.setname" or "lobby.compass.deletename" or "lobby.compass.setlore" or "lobby.compass.deletelore" or "lobby.compass.setitem" or "lobby.compass.deleteitem" or "lobby.compass.list" or "lobby.compass.setrows" or "lobby.compass.gui":
  479. if arg-1 is not set:
  480. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Do %{lobby.arcatedColor.Lobby}%/%{cmd}% help %{lobby.chatColor.Lobby}%for more info."
  481.  
  482. else if arg-1 is "help":
  483. send "&7──────────[ %{lobby.arcatedColor.Lobby}%LobbyCompass &7]──────────"
  484. send "<ttp:&7Get the help page><cmd:/lobbycompass help>%{lobby.arcatedColor.Lobby}%/lobbycompass help"
  485. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.create":
  486. send "<ttp:&7Create a minigame><sgt:/lobbycompass create <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass create <minigame>"
  487. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.delete":
  488. send "<ttp:&7Delete a minigame><sgt:/lobbycompass delete <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass delete <minigame>"
  489. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setslot":
  490. send "<ttp:&7Set the slot for a minigame><sgt:/lobbycompass setslot <minigame> <slot>>%{lobby.arcatedColor.Lobby}%/lobbycompass setslot <minigame> <slot>"
  491. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setname":
  492. send "<ttp:&7Set the name for a minigame><sgt:/lobbycompass setname <minigame> <name>>%{lobby.arcatedColor.Lobby}%/lobbycompass setname <minigame> <name>"
  493.  
  494. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.deletename":
  495. send "<ttp:&7Delete the name for a minigame><sgt:/lobbycompass deletename <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deletename <minigame>"
  496. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setlore":
  497. send "<ttp:&7Set the lore for a minigame><sgt:/lobbycompass setlore <minigame> <lore>>%{lobby.arcatedColor.Lobby}%/lobbycompass setlore <minigame> <lore>"
  498. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.deletelore":
  499. send "<ttp:&7Delete the lore for a minigame><sgt:/lobbycompass deletelore <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deletelore <minigame>"
  500. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setitem":
  501. send "<ttp:&7Set the item for a minigame><sgt:/lobbycompass setitem <minigame> <item>>%{lobby.arcatedColor.Lobby}%/lobbycompass setitem <minigame> <item>"
  502.  
  503. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.deleteitem":
  504. send "<ttp:&7Delete the item for a minigame><sgt:/lobbycompass deleteitem <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deleteitem <minigame>"
  505. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.list":
  506. send "<ttp:&7Get a list from all minigames><sgt:/lobbycompass list>%{lobby.arcatedColor.Lobby}%/lobbycompass list"
  507. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setrows":
  508. send "<ttp:&7Set the amount of rows in the GUI><sgt:/lobbycompass setrows <rows>>%{lobby.arcatedColor.Lobby}%/lobbycompass setrows <rpws>"
  509. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setspawn":
  510. send "<ttp:&7Set the spawn for a minigame><sgt:/lobbycompass setspawn <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass setspawn <minigame>"
  511. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setspawntype":
  512. send "<ttp:&7Set the teleportion type><sgt:/lobbycompasss setspawntype <minigame> world/location>%{lobby.arcatedColor.Lobby}%/Lobbycompass setspawntype/sst <minigame> world/location"
  513.  
  514. if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.gui":
  515. send "<ttp:&7Open a easy-setup GUI for minigames><sgt:/lobbycompass gui <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass gui <minigame>"
  516.  
  517.  
  518. send "&7──────────[ %{lobby.arcatedColor.Lobby}%LobbyCompass &7]──────────"
  519.  
  520. else if arg-1 is "create":
  521. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.create":
  522. if arg-2 is set:
  523. if {lobby.minigames.%arg-2%} is not set:
  524. set {lobby.minigames.%arg-2%} to true
  525. set {lobby.minigames.%arg-2%.name} to "&cNone"
  526. set {lobby.minigames.%arg-2%.lore} to "&cNone"
  527. set {lobby.minigames.%arg-2%.item} to "&cNone"
  528. set {lobby.minigames.%arg-2%.slot} to "&cNone"
  529. set {lobby.minigames.%arg-2%.teleportType} to "location"
  530. set {lobby.minigames.%arg-2%.spawn} to location of player
  531. add arg-2 to {lobby.minigames.list::*}
  532.  
  533. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully made the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  534.  
  535. else:
  536. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%already exists!"
  537. else:
  538. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
  539. else:
  540. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  541.  
  542. else if arg-1 is "delete" or "remove":
  543. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.delete":
  544. if arg-2 is set:
  545. if {lobby.minigames.%arg-2%} is set:
  546. delete {lobby.minigames.%arg-2%}
  547. delete {lobby.mninigames.%arg-2%.name}
  548. delete {lobby.mninigames.%arg-2%.lore}
  549. delete {lobby.mninigames.%arg-2%.item}
  550. delete {lobby.mninigames.%arg-2%.slot}
  551. delete {lobby.mninigames.%arg-2%.spawn}
  552. delete {lobby.minigames.%arg-2%.teleportType}
  553. remove arg-2 from {lobby.minigames.list::*}
  554.  
  555. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully removed the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  556. else:
  557. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  558. else:
  559. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
  560. else:
  561. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  562.  
  563. else if arg-1 is "setspawn":
  564. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setspawn":
  565. if arg-2 is set:
  566. if {lobby.minigames.%arg-2%} is set:
  567. set {lobby.minigames.%arg-2%.spawn} to location of player
  568. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the spawn of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%at %{lobby.arcatedColor.Lobby}%%location of player%%{lobby.chatColor.Lobby}%!"
  569.  
  570. else:
  571. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  572. else:
  573. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
  574. else:
  575. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  576.  
  577. else if arg-1 is "setslot":
  578. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setslot":
  579. if arg-2 is set:
  580. if {lobby.minigames.%arg-2%} is set:
  581. if arg-3 is set:
  582. if (arg-3 parsed as a number) is set:
  583. if {lobby.items.compass.rows} is not set:
  584. set {lobby.items.compass.rows} to 1
  585.  
  586. else if {lobby.items.compass.rows} < 1:
  587. set {lobby.items.compass.rows} to 1
  588.  
  589. if {lobby.items.compass.rows}*9-1 <= arg-3 parsed as a number:
  590. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The amount %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is to big! The slot number has to be between %{lobby.arcatedColor.Lobby}%0 %{lobby.chatColor.Lobby}%and %{lobby.arcatedColor.Lobby}%%{lobby.items.compass.rows}*9-1%%{lobby.chatColor.Lobby}%."
  591.  
  592. else:
  593. loop {lobby.minigames.list::*}:
  594. if {lobby.minigames.%loop-value%.slot} is arg-3:
  595. set {_set} to loop-value
  596. stop loop
  597.  
  598. if {_set} is set:
  599. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The slot %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is already in use by the minigame %{lobby.arcatedColor.Lobby}%%{_set}%%{lobby.chatColor.Lobby}%!"
  600.  
  601. else:
  602. set {lobby.minigames.%arg-2%.slot} to arg-3 parsed as a number
  603. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the slot of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  604. else:
  605. send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not a number!"
  606. else:
  607. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-2% <slot>%{lobby.chatColor.Lobby}%."
  608. else:
  609. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  610. else:
  611. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% slot <minigame> <slot>%{lobby.chatColor.Lobby}%."
  612. else:
  613. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  614.  
  615. else if arg-1 is "setname":
  616. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setname":
  617. if arg-2 is set:
  618. if {lobby.minigames.%arg-2%} is set:
  619. if arg-3 is set:
  620. set {lobby.minigames.%arg-2%.name} to arg-3
  621. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the name of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  622.  
  623. else:
  624. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setname %arg-2% <name>%{lobby.chatColor.Lobby}%."
  625. else:
  626. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  627. else:
  628. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setname <minigame> <name>%{lobby.chatColor.Lobby}%."
  629. else:
  630. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  631.  
  632. else if arg-1 is "deletename" or "delname":
  633. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deletename":
  634. if arg-2 is set:
  635. if {lobby.minigames.%arg-2%} is set:
  636. set {lobby.minigames.%arg-2%.name} to "&cNone"
  637. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the name of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  638.  
  639. else:
  640. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  641. else:
  642. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
  643.  
  644. else:
  645. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  646.  
  647.  
  648. else if arg-1 is "setlore":
  649. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setlore":
  650. if arg-2 is set:
  651. if {lobby.minigames.%arg-2%} is set:
  652. if arg-3 is set:
  653. set {lobby.minigames.%arg-2%.lore} to arg-3
  654. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the lore of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  655.  
  656. else:
  657. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Currect usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setlore %arg-2% <lore>%{lobby.chatColor.Lobby}%."
  658. else:
  659. send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  660. else:
  661. send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setlore <minigame> <lore>%{lobby.chatColor.Lobby}%."
  662.  
  663. else:
  664. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  665.  
  666. else if arg-1 is "deletelore" or "dellore":
  667. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deletelore":
  668. if arg-2 is set:
  669. if {lobby.minigames.%arg-2%} is set:
  670. set {lobby.minigames.%arg-2%.lore} to "&cNone"
  671. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the lore of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  672.  
  673. else:
  674. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  675. else:
  676. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
  677.  
  678. else:
  679. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  680.  
  681.  
  682. else if arg-1 is "setitem":
  683. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setitem":
  684. if arg-2 is set:
  685. if {lobby.minigames.%arg-2%} is set:
  686. if arg-3 is set:
  687. if arg-3 parsed as an item is set:
  688. set {lobby.minigames.%arg-2%.item} to arg-3 parsed as an item type
  689. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the item of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  690.  
  691. else:
  692. send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not an item!"
  693. else:
  694. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setitem %arg-2% <item>%{lobby.chatColor.Lobby}%."
  695. else:
  696. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  697. else:
  698. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setitem <minigame> <item>%{lobby.chatColor.Lobby}%."
  699. else:
  700. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  701.  
  702. else if arg-1 is "deleteitem" or "delitem":
  703. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deleteitem":
  704. if arg-2 is set:
  705. if {lobby.minigames.%arg-2%} is set:
  706. set {lobby.minigames.%arg-2%.item} to "&cNone"
  707. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the item of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  708.  
  709. else:
  710. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  711. else:
  712. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
  713.  
  714. else:
  715. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  716.  
  717.  
  718. else if arg-1 is "list":
  719. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.list":
  720. if {lobby.minigames.list::*} is not empty:
  721. loop {lobby.minigames.list::*}:
  722. if {_list} is set:
  723. set {_list} to "%{_list}%%{lobby.chatColor.Lobby}%, %{lobby.arcatedColor.Lobby}%%loop-value%"
  724. else:
  725. set {_list} to "%loop-value%"
  726.  
  727. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%This is the list of all the minigames:" and "%{lobby.arcatedColor.Lobby}%%{_list}%"
  728. else:
  729. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%There are no minigames added yet."
  730. else:
  731. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  732.  
  733.  
  734. else if arg-1 is "setrows":
  735. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setrows":
  736. if arg-2 is set:
  737. if arg-2 parsed as a number is set:
  738. if arg-2 parsed as a number < 7:
  739. set {lobby.items.compass.rows} to arg-2 parsed as a number
  740. set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to arg-2 parsed as a number
  741. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the amount of rows to %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  742.  
  743. else:
  744. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The maximum amount of rows is %{lobby.arcatedColor.Lobby}%6%{lobby.chatColor.Lobby}%!"
  745. else:
  746. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%%{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%is not a number!"
  747. else:
  748. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setrows <rows>%{lobby.chatColor.Lobby}%."
  749. else:
  750. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  751.  
  752. else if arg-1 is "setspawntype" or "sst":
  753. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setrows":
  754. if arg-2 is set:
  755. if {lobby.minigames.%arg-2%} is true:
  756. if arg-3 is set:
  757. if arg-3 is "world" or "location":
  758. set {lobby.minigames.%arg-2%.teleportType} to arg-3 in lower case
  759. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%spawn type %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3 in lower case%%{lobby.chatColor.Lobby}%!"
  760.  
  761. else:
  762. send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not a valid type!"
  763. else:
  764. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% %arg-2% world/location%{lobby.chatColor.Lobby}%."
  765.  
  766. else:
  767. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  768.  
  769. else:
  770. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <mingame> world/location%{lobby.chatColor.Lobby}%."
  771. else:
  772. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  773.  
  774. else if arg-1 is "gui":
  775. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.gui":
  776. if arg-2 is set:
  777. if {lobby.minigames.%arg-2%} is set:
  778. wait 2 ticks
  779. open chest with 2 rows named "&8Config GUI" to player
  780. wait 2 ticks
  781. set {_item} to "book"
  782. set {_name} to {lobby.minigames.%arg-2%.name}
  783. set {_lore} to {lobby.minigames.%arg-2%.lore}
  784.  
  785. replace all "&" in {_name} with "§"
  786. replace all "&" in {_lore} with "§"
  787.  
  788. if ({lobby.minigames.%arg-2%.item} parsed as an item type) is set:
  789. if ({lobby.minigames.%arg-2%.item} parsed as an item type) is not air:
  790. set {_item} to {lobby.minigames.%arg-2%.item}
  791.  
  792. format slot 2 of player with ({_item} parsed as an item type) named "%{lobby.chatColor.Lobby}%Minigame: %{lobby.arcatedColor.Lobby}%%arg-2%" to be unstealable
  793. format slot 3 of player with name tag named "%{lobby.chatColor.Lobby}%Name: %{lobby.arcatedColor.Lobby}%%{_name}%" to close then run [createCompassGUI(player, "&8Name %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new name in the chat", "name", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other name.", arg-2, false)]
  794. format slot 4 of player with paper named "%{lobby.chatColor.Lobby}%Lore" with lore {_lore} to close then run [createCompassGUI(player, "&8Lore %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new lore in the chat", "lore", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other lore.", arg-2, false)]
  795. format slot 5 of player with ({_item} parsed as an item type) named "%{lobby.chatColor.Lobby}%Item: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.item}%" to close then run [createCompassGUI(player, "&8Item %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new item in the chat", "item", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other item.", arg-2, false)]
  796. format slot 6 of player with clock named "%{lobby.chatColor.Lobby}%Slot: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.slot}%" to close then run [createCompassGUI(player, "&8Slot %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new slot in the chat", "slot", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other slot.", arg-2, false)]
  797.  
  798. format slot 12 of player with redstone torch on named "%{lobby.chatColor.Lobby}%Spawn: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.spawn}%" to close then run [createCompassGUI(player, "&8Spawn %arg-2%", 3, 12, 14, green wool, red wool, "&aSet", "&cDeny", "/lobbycompass setspawn %arg-2%", "setspawn", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other spawn.", arg-2, true)]
  799. format slot 13 of player with barrier named "&cClose menu" to close
  800.  
  801. if {lobby.minigames.%arg-2%.teleportType} is "location":
  802. format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%Location" to close then run [execute console command "/lobbycompass set setspawntype %player% %arg-2% world"]
  803.  
  804. else if {lobby.minigames.%arg-2%.teleportType} is "world":
  805. format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%World" to close then run [execute console command "/lobbycompass set setspawntype %player% %arg-2% location"]
  806.  
  807. else:
  808. format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%Location" to close then run [execute console command "/lobbycompass set setspawntype %player% %arg-2% world"]
  809.  
  810. #format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%Location / World" to be unstealable
  811.  
  812. format slot 17 of player with redstone named "&4Delete" to close then run [createCompassGUI(player, "&8Delete %arg-2%", 3, 12, 14, green wool, red wool, "&aDelete", "&cDeny", "/lcompass delete %arg-2%", "delete", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to not delete the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%.", arg-2, true)]
  813.  
  814. else:
  815. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  816. else:
  817. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% gui <minigame>%{lobby.chatColor.Lobby}%."
  818.  
  819. else:
  820. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  821.  
  822.  
  823.  
  824. else:
  825. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Do %{lobby.arcatedColor.Lobby}%/%{cmd}% help %{lobby.chatColor.Lobby}%for more info."
  826.  
  827. if executor is console:
  828. if arg-1 is "set":
  829. if arg-2 is set:
  830. if arg-3 is set:
  831. if arg-4 is set:
  832. if arg-5 is set:
  833. if arg-2 is "setspawntype":
  834. set {lobby.minigames.%arg-4%.teleportType} to arg-5 in lower case
  835. delete {lobby.chatEvent.%arg-3%}
  836. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%teleport type%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%arg-5%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
  837. execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
  838. delete {lobby.chatEventMinigame.%arg-2%}
  839.  
  840. else if arg-2 is "item":
  841. if arg-5 parsed as an item type is set:
  842. set {lobby.minigames.%arg-4%.%arg-2%} to arg-5 parsed as an item type
  843. delete {lobby.chatEvent.%arg-3%}
  844. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%arg-5%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
  845. execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
  846. delete {lobby.chatEventMinigame.%arg-2%}
  847. else:
  848. send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-5% %{lobby.chatColor.Lobby}%is not an item!" to arg-3 parsed as a player
  849.  
  850. else if arg-2 is "slot":
  851. if arg-5 parsed as a number is set:
  852. set {lobby.minigames.%arg-4%.%arg-2%} to arg-5 parsed as a number
  853. delete {lobby.chatEvent.%arg-3%}
  854. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%arg-5%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
  855. execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
  856. delete {lobby.chatEventMinigame.%arg-2%}
  857. else:
  858. send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-5% %{lobby.chatColor.Lobby}%is not a number!" to arg-3 parsed as a player
  859.  
  860. else if arg-2 is "lore":
  861. set {_arg} to arg-5
  862. replace all "||" in {_arg} with "&r||"
  863.  
  864. else:
  865. set {_arg} to arg-5
  866.  
  867. if {_arg} is set:
  868. set {lobby.minigames.%arg-4%.%arg-2%} to {_arg}
  869. delete {lobby.chatEvent.%arg-3%}
  870. send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%{_arg}%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
  871. execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
  872. delete {lobby.chatEventMinigame.%arg-4%}
  873. else:
  874. send "&7[&eLOBBY&7] &cERROR &fThere is no %arg-2% given!"
  875. else:
  876. send "&7[&eLOBBY&7] &cERROR &fThere is no mingiame given!"
  877. else:
  878. send "&7[&eLOBBY&7] &cERROR &fThere is no player given!"
  879. else:
  880. send "&7[&eLOBBY&7] &cERROR &fThere is no setting to set given!"
  881.  
  882.  
  883. #-----------------------------------{ Other }-----------------------------------
  884. function sendPluginList(p: Player):
  885. set {_list::*} to list of plugins
  886. set {_count} to 0
  887. loop {_list::*}:
  888. add 1 to {_count}
  889. if {_list} is set:
  890. set {_list} to "%{_list}%%{lobby.chatColor.Server}%, %{lobby.arcatedColor.Server}%%loop-value%"
  891. else:
  892. set {_list} to "%{lobby.arcatedColor.Server}%%loop-value%"
  893.  
  894. send "%{lobby.logo.server}% %{lobby.chatColor.Server}%Total Plugins: %{lobby.arcatedColor.Server}%%{_count}%%nl%%{lobby.chatColor.Server}%%{_list}%" to {_p}
  895.  
  896.  
  897. on command:
  898. command ends with "plugins":
  899. cancel event
  900. if player has permission "op":
  901. sendPluginList(player)
  902.  
  903. command ends with "pl":
  904. cancel event
  905. if player has permission "op":
  906. sendPluginList(player)
  907.  
  908. command is "spawn":
  909. if world of player is not "Zingdom-World" and "Zingdom1-Nether" and "Zingdom1-End":
  910. cancel event
  911. if world of player is {lobby.world}:
  912. teleport player to {lobby.location}
  913.  
  914. command is "hub":
  915. teleport player to {lobby.location}
  916.  
  917. else:
  918. set {cmd} to command in lower case
Add Comment
Please, Sign In to add comment