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