Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Made By Uzumaki
- #Made it Octomber 2017 so don't blame me for low quality code.
- options:
- plugin-version: 0.0.1
- #
- # ● SETTINGS ●
- #
- prefix: &6&lLuckyRace &8&l»&7
- onlyingamecommands: true
- ingamecommands: "leave" or "lobby" or "hub" or "msg" or "tell" or "w" or "lucky"
- useluckyblockplugin: false
- #Timers
- waitingtime: 10 #seconds, before game starts
- gameminutes: 10 #minutes, in game time
- winlenght: 8 #seconds, until arena restart after win.
- shorttimeto: 30 #seconds, after first player reach to finish.
- #Coins
- coinsperkill: 5
- coinsperwin: 100
- reachfinal: 50
- allownegativecoins: false
- #Chat
- normalchat: "&7%player's displayname% &8&l» &7%message%"
- specchat: "&7%player's displayname% &8&l» &7 %message%"
- #
- # ● SCOREBOARD ●
- #
- websitename: &e&l> BLOODMC.TRADEMC.ORG
- #
- # ● GAME STAGE NAMES ●
- #
- waiting: &a&lLobby
- ingame: &aInGame
- starting: &a&lStarting
- deathmatch: &a&lDeathmatch
- restarting: &c&lEndGame
- full: &c&lFULL
- #
- # ● TITLES ●
- #
- winnertitle: &3&lТы выйграл!
- winnersubtitle: &7Ты остался один, кто стоит на ногах!
- deathtitle: &4&lВы проиграли!
- deathsubtitle: &7Вы стали наблюдателем!
- startingtitle: &c&l%{_sec}%
- startingsubtitle: &eИгра начинается!
- finishtitle: &6&lТы финишировал!
- finishsubtitle: &cСейчас пройдёт финальныя схватка!
- #
- # ● MESSAGESS ●
- #
- startingin: &7Старт через %{_sec}% &7секунд!
- startmessage: &a&lИГРА НАЧАЛАСЬ, ВСЕМ УДАЧИ!
- joinmessage: &7%player's displayname% &6Присоединился к игре.
- leftmessage: &7%player's displayname% &6Покинул игру.
- youarespec: &7&lВы стали наблюдателем.
- deathmessage: &c&l» &7%victim's displayname% был убит &7%attacker's displayname%
- deathmatchstarted: &cDEATHMATCH НАЧАЛСЯ!
- notinarenaregion: &7Вы не находитесь на регионе арены, вы получите &4урон&3!
- checkpoint: &e&l» &a&lЧекпоинт достигнут &9● &6&l! &e&l«
- finishmessage: &e&l» &a&l%{_p}'s displayname% &6&lФинишировал &9● &6&l! &e&l«
- #
- # ● ITEM NAMES ●
- #
- teleporteritem: compass
- teleporteritemname: &a&lTeleporter
- leaveitem: magma_cream
- leaveitemname: &6&lLeave The Game
- #
- # ● SIGNS ●
- #
- signline1: &6&lLuckyRace
- autojoinline: &c&lPlay
- menuline: &3&lArenas
- #
- # ● GUIS ●
- #
- arenasguiname: LUCKY ARENAS
- specgui: TELEPORT TO
- on skript load:
- clear {LUCKY.BLOCKS::*}
- clear {LUCKY.CHESTS::*}
- wait 1 seconds
- #
- # ● LUCKY BLOCKS LOOT ●
- #
- add 1 iron_sword, diamond_leggings of knockback 3, blaze_powder of fire_aspect 2, stone_sword, stone_pickaxe, iron_pickaxe, iron_axe, 1 golden_apple, 2 golden_apple,1 fishing_rod, 1 bow, 16 exp_bottle, 6 cooked_beef, 16 arrows , 1 iron_helmet, 1 iron_chestplate , 1 iron_leggings, 1 iron_boots, 1 diamond_helmet, 1 diamond_chestplate, diamond_sword of sharpness, diamond_helmet of protection 1, diamond_boots of protection 1, diamond_leggings of protection 1 and diamond_chestplate of protection 1, 1 diamond_leggings and 1 diamond_sword to {LUCKY.BLOCKS::*}
- #
- # ● CHEST ITEMS ●
- #
- add 1 iron_sword, stone_sword, stone_pickaxe, iron_pickaxe, iron_axe, 1 golden_apple, 2 golden_apple,1 fishing_rod, 16 snowball, 16 egg, 1 bow, 16 exp_bottle, 6 cooked_beef, 16 arrows , 1 iron_helmet, 1 iron_chestplate , 1 iron_leggings, 1 iron_boots, 1 diamond_helmet, 1 diamond_chestplate, diamond_sword of sharpness, diamond_helmet of protection 1, diamond_boots of protection 1, diamond_leggings of protection 1 and diamond_chestplate of protection 1, 1 diamond_leggings and 1 diamond_sword to {LUCKY.CHESTS::*}
- #
- # \\ CODE //
- #
- on load:
- send "&7&l--------------------------------------------" to console
- send " " to console
- send "{@prefix} &aLoading &ev.{@plugin-version}&a..." to console
- wait 1 tick
- send "{@prefix} &e%size of {lucky.arenas::*}% &agames loaded!" to console
- wait 1 tick
- send "{@prefix} &a&lPlugin loaded!" to console
- send " " to console
- send "&7&l--------------------------------------------" to console
- loop {lucky.arenas::*}:
- lucky_resetarena(loop-value)
- wait 1 seconds
- on unload:
- send "&7&l--------------------------------------------" to console
- send " " to console
- send "{@prefix} &aDisabling &ev.{@plugin-version}&a..." to console
- send "{@prefix} &ev.{@plugin-version} &adisabled!" to console
- send " " to console
- send "&7&l--------------------------------------------" to console
- stop
- #
- # \\ VARIABLES MANAGER //
- #
- function lucky_resetarena(arena: text):
- set {lucky.arena.%{_arena}%.status} to "{@restarting}"
- send "{@prefix} &aReseting &e%{_arena}%" to console
- delete {lucky.arena.%{_arena}%.CHEST::*}
- delete {lucky.arena.%{_arena}%.players.death::*}
- delete {lucky.arena.%{_arena}%.players.alive::*}
- delete {lucky.arena.%{_arena}%.gametime::*}
- delete {lucky.gamekills.%{_arena}%::*}
- delete {lucky.lives.%{_arena}%::*}
- delete {lucky.arena.%{_arena}%.respawnpoint::*}
- delete {lucky.checkpoints.%{_arena}%::*}
- set {lucky.arena.%{_arena}%.gametime::minutes} to {@gameminutes}
- set {lucky.arena.%{_arena}%.gametime::seconds} to 60
- set {lucky.arena.%{_arena}%.gametime::timefix} to ""
- set {lucky.arena.%{_arena}%.playing} to 0
- make console execute command "rb rollbackregion %{_arena}% -clearEntities"
- wait 10 seconds
- set {lucky.arena.%{_arena}%.seconds} to {@waitingtime}
- set {lucky.arena.%{_arena}%.status} to "{@waiting}"
- invoke "lucky.refreshmenu"
- send "{@prefix} &e%{_arena}% &areseted!" to console
- stop
- on join:
- set {lucky.player.%uuid of player%.playing} to "NotInGame"
- if {lucky.stats.kills.%uuid of player%} is not set:
- set {lucky.stats.kills.%uuid of player%} to 0
- if {lucky.stats.deaths.%uuid of player%} is not set:
- set {lucky.stats.deaths.%uuid of player%} to 0
- if {lucky.stats.wins.%uuid of player%} is not set:
- set {lucky.stats.wins.%uuid of player%} to 0
- if {lucky.stats.coins.%uuid of player%} is not set:
- set {lucky.stats.coins.%uuid of player%} to 0
- loop all players:
- if {lucky.player.%uuid of loop-player%.playing} is "InGameSPEC":
- hide loop-player from player
- #
- # \\ CODE //
- #
- command /lucky [<text>] [<text>] [<integer>] [<player>]:
- executable by: players
- trigger:
- if text arg 1 is not set:
- if text arg 2 is not set:
- if integer arg 1 is not set:
- if player arg 1 is not set:
- if player have permission "lucky.player":
- make player execute the command "lucky help"
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- else:
- make player execute the command "lucky"
- stop
- else:
- make player execute the command "lucky"
- stop
- else:
- make player execute the command "lucky"
- stop
- if text arg 1 is "help":
- if arg-2 is not set:
- if player has permission "lucky.player":
- make player execute command "lucky help player"
- stop
- if player has permission "lucky.admin":
- make player execute command "lucky help admin"
- stop
- if arg-2 is set:
- if text arg 2 is "player" or "admin":
- play sound "ORB_PICKUP" to player with volume 100.0 and pitch 100.0
- if text arg 2 is "player":
- send "&7&l■■■■■■■■■&8[ {@prefix} &8]&7&l■■■■■■■■■ "
- send "&8&l» &7/lucky list "
- send "&8&l» &7/lucky join &8(&7arena_name&8) "
- send "&8&l» &7/lucky stats "
- send "&8&l» &7/lucky autojoin "
- send "&8&l» &7/lucky leave "
- send "&7&l■■■■■■■■■■■■■■■■■■■■■■■■■■"
- stop
- if text arg 2 is "admin":
- send "&7&l■■■■■■■■■&8[ {@prefix} &8]&7&l■■■■■■■■■ "
- send "&8&l» &c/lucky setlobby "
- send "&8&l» &c/lucky createArena &8(&7arena_name&8) "
- send "&8&l» &c/lucky deleteArena &8(&7arena_name&8) "
- send "&8&l» &c/lucky addSpawn &8(&7arena_name&8) "
- send "&8&l» &c/lucky removeSpawn &8(&7arena_name&8) "
- send "&8&l» &c/lucky adddmSpawn &8(&7arena_name&8) "
- send "&8&l» &c/lucky removedmSpawn &8(&7arena_name&8) "
- send "&8&l» &c/lucky saveArena &8(&7arena_name&8) "
- send "&8&l» &c/lucky setarenalobby &8(&7arena_name&8) "
- send "&8&l» &c/lucky Max &8(&7arena_name&8) &8(&7number&8) "
- send "&8&l» &c/lucky Min &8(&7arena_name&8) &8(&7number&8) "
- send "&8&l» &c/lucky coins take/set/give &8(&7player&8) "
- send "&8&l» &c/lucky resetstats &8(&7player&8) "
- send "&7&l■■■■■■■■■■■■■■■■■■■■■■■■■■ "
- stop
- else:
- send "{@prefix} &7/lucky help &8Player&7 | &cAdmin"
- stop
- if text arg 1 is "autojoin":
- if player have permission "lucky.player":
- if size of {lucky.arenas::*} is not 0:
- send "&7Searching for available arenas..."
- loop {lucky.arenas::*}:
- if {lucky.arena.%loop-value%.status} is "{@waiting}" or "{@starting}":
- send "&7Arena founded!"
- make player execute the command "/lucky join %loop-value%"
- stop loop
- stop
- else:
- send "&7No arenas available for now!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is not "autojoin" or "list" or "setLobby" or "join" or "createArena" or "deleteArena" or "addSpawn" or "removeSpawn" or "setHighBound" or "setLowBound" or "saveArena" or "max" or "min" or "resetstats" or "stats" or "leave" or "adddmSpawn" or "removedmSpawn" or "coins" or "setarenalobby" or "setfallpoint":
- make player execute the command "lucky"
- stop
- if text arg 1 is "setlobby":
- if player have permission "lucky.admin":
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- set {lucky.lobby} to the player's location
- send "&c&lSETUP &e&l» &7Setted the &aLobby &7to your current location!"
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cYou can't change the Lobby location while playing!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "join":
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if text arg 2 is set:
- if {lucky.arena.%text arg 2%.created} is true:
- if {lucky.arena.%text arg 2%.saved} is true:
- if {lucky.arena.%text arg 2%.status} is "{@waiting}" or "{@starting}":
- invoke "lucky.clearplayer" from player
- add 1 to {lucky.arena.%text arg 2%.playing}
- add player to {lucky.arena.%text arg 2%.players.alive::*}
- set {lucky.player.%uuid of player%.playing} to "InGame"
- set {lucky.player.%uuid of player%.arena} to text arg 2
- set {lucky.gamekills.%{lucky.player.%uuid of player%.arena}%::%player%} to 0
- invoke "lucky.refreshmenu"
- invoke "lucky.join" from text arg 2
- teleport player to {lucky.arena.%text arg 2%.lobby}
- set player's slot 8 to {@leaveitem} named "{@leaveitemname}"
- send "{@joinmessage}" to {lucky.arena.%text arg 2%.players.alive::*}
- stop
- if {lucky.arena.%text arg 2%.status} is "{@full}":
- send "&cThis arena is full of players!"
- stop
- if {lucky.arena.%text arg 2%.status} is "{@ingame}":
- send "&8&l● &cYou can join while game is running"
- stop
- if {lucky.arena.%text arg 2%.status} is "{@restarting}":
- send "&cThis arena is currently being restarted!"
- stop
- else:
- send "{@prefix} &7Error founded!"
- send "&8&l● &3Error 5.0.2 RasenShuriken"
- stop
- else:
- send "&cThis arena hasn't been saved!"
- stop
- else:
- send "&cThis arena doesn't exists!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou can't execute this command while playing!"
- stop
- if text arg 1 is "list":
- if player have permission "lucky.player":
- if size of {lucky.arenas::*} is not 0:
- send "&7Loading arenas..."
- set {_lucky.list} to 0
- if size of {lucky.arenas::*} <= 9:
- set {_list.size} to 1
- if size of {lucky.arenas::*} >= 9:
- set {_list.size} to 2
- if size of {lucky.arenas::*} >= 18:
- set {_list.size} to 3
- if size of {lucky.arenas::*} >= 27:
- set {_list.size} to 4
- if size of {lucky.arenas::*} >= 36:
- set {_list.size} to 5
- open virtual chest inventory with size {_list.size} named "{@arenasguiname}" to player
- wait 1 tick
- loop {lucky.arenas::*}:
- if {lucky.arena.%loop-value%.status} is "{@ingame}" or "{@full}" or "{@restarting}":
- make a gui slot {_lucky.list} of player with red clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value%||||&8&l» &7Status&8: %{lucky.arena.%loop-value%.status}%||||&8&l» &7Players&8: &7%{lucky.arena.%loop-value%.playing}%/%{lucky.arena.%loop-value%.max}%||||&8&l● &7&lClick to spectate!" to run player command "lucky join %loop-value%"
- add 1 to {_lucky.list}
- else:
- make a gui slot {_lucky.list} of player with green clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value%||||&8&l» &7Status&8: %{lucky.arena.%loop-value%.status}%||||&8&l» &7Players&8: &7%{lucky.arena.%loop-value%.playing}%/%{lucky.arena.%loop-value%.max}%||||&8&l● &7&lClick to join!" to run player command "lucky join %loop-value%"
- add 1 to {_lucky.list}
- stop
- else:
- send "&cYou haven't created or saved any arena so there are any arenas to display!"
- stop
- if text arg 1 is "createArena":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is not set:
- set {lucky.arena.%text arg 2%.created} to true
- set {lucky.arena.%text arg 2%.saved} to false
- set {lucky.arena.%text arg 2%.spawn.id} to 0
- set {lucky.arena.%uuid of player%.creating} to text arg-2
- clear player's inventory
- send "&c&lSETUP &e&l» &7The arena &a%text arg 2% &7has been successfully created!"
- set slot 0 of player to green clay named "&7SET LOWBOUND &cAND &7SET HIGHBOUND"
- set slot 1 of player to yellow clay named "&7ADD SPAWN &aAND &7REMOVE SPAWN"
- set slot 2 of player to green clay named "&7ADD &cDM SPAWN &aAND &7REMOVE &cDM &7SPAWN"
- set slot 3 of player to clay ball named "&7SET ARENA &cLOBBY"
- set slot 4 of player to clay ball named "&7SET ARENA &cFALL POINT"
- set slot 5 of player to yellow clay named "&7SET &cMIN PLAYERS"
- set slot 6 of player to yellow clay named "&7SET &cMAX PLAYERS"
- set slot 7 of player to green clay named "&7ARENA &c%{lucky.arena.%uuid of player%.creating}%"
- set slot 8 of player to red clay named "&c&lSAVE ARENA"
- stop
- else:
- send "&cThis arena has already been created!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "deleteArena":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- if {lucky.arena.%text arg 2%.playing} is 0:
- delete {lucky.arena.%text arg 2%.created}
- delete {lucky.arena.%text arg 2%.saved}
- delete {lucky.arena.%text arg 2%.status}
- delete {lucky.arena.%text arg 2%.max}
- delete {lucky.arena.%text arg 2%.min}
- delete {lucky.arena.%text arg 2%.spawn.id}
- delete {lucky.arena.%text arg 2%.playing}
- delete {lucky.arena.%text arg 2%.players.alive::*}
- delete {lucky.arena.%text arg 2%.players.death::*}
- delete {lucky.arena.%text arg 2%.created}
- delete {lucky.arena.%text arg 2%.saved}
- delete {lucky.arena.%text arg 2%.lobby}
- delete {lucky.arena.%text arg 2%.gametime::*}
- delete {lucky.arena.%text arg 2%.dm.id}
- delete {lucky.lives.%text arg 2%::*}
- delete {lucky.checkpoints.%text arg 2%::*}
- delete {lucky.arena.%text arg 2%.fallpoint}
- delete {lucky.gamekills.%text arg 2%::*}
- delete {lucky.arena.%text arg 2%.CHEST::*}
- remove text arg 2 from {lucky.arenas::*}
- send "&c&lSETUP &e&l» &7The arena &c%text arg 2% &7has been successfully deleted!"
- stop
- else:
- send "&cThere are still players playing in the arena!"
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "adddmSpawn":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is not set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- add 1 to {lucky.arena.%text arg 2%.dm.id}
- set {lucky.arena.%text arg 2%.dm.%{lucky.arena.%text arg 2%.dm.id}%} to location of player
- send "&c&lSETUP &e&l» &7DM,Spawn &anº%{lucky.arena.%text arg 2%.dm.id}% &7has been set!"
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou don't need to specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "removedmSpawn":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is not set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- if {lucky.arena.%text arg 2%.dm.id} is not 0:
- send "&c&lSETUP &e&l» &7DM, Spawn &anº%{lucky.arena.%text arg 2%.dm.id}% &7has been deleted!"
- delete {lucky.arena.%text arg 2%.dm.%{lucky.arena.%text arg 2%.dm.id}%}
- remove 1 from {lucky.arena.%text arg 2%.dm.id}
- play sound "ANVIL_BREAK" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cThere is no more spawns to remove!"
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou don't need to specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "addSpawn":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is not set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- add 1 to {lucky.arena.%text arg 2%.spawn.id}
- set {lucky.arena.%text arg 2%.spawn.%{lucky.arena.%text arg 2%.spawn.id}%} to location of player
- send "&c&lSETUP &e&l» &7Spawn &anº%{lucky.arena.%text arg 2%.spawn.id}% &7has been set!"
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou don't need to specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "removeSpawn":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is not set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- if {lucky.arena.%text arg 2%.spawn.id} is not 0:
- send "&c&lSETUP &e&l» &7Spawn &anº%{lucky.arena.%text arg 2%.spawn.id}% &7has been deleted!"
- delete {lucky.arena.%text arg 2%.spawn.%{lucky.arena.%text arg 2%.spawn.id}%}
- remove 1 from {lucky.arena.%text arg 2%.spawn.id}
- play sound "ANVIL_BREAK" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cThere is no more spawns to remove!"
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou don't need to specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "setarenalobby":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is not set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- set {lucky.arena.%text arg 2%.lobby} to location of player
- send "&c&lSETUP &e&l» &7Setted the &aArena Lobby &7to your current location!"
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou don't need to specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "saveArena":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is not set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- if {lucky.arena.%text arg 2%.saved} is false:
- if {lucky.arena.%text arg 2%.max} is set:
- if {lucky.arena.%text arg 2%.min} is set:
- if {lucky.arena.%text arg 2%.lobby} is set:
- if {lucky.arena.%text arg 2%.spawn.id} = {lucky.arena.%text arg 2%.max}:
- if {lucky.arena.%text arg 2%.dm.id} = {lucky.arena.%text arg 2%.max}:
- send "&7Saving the arena this will take a while..."
- wait 10 ticks
- send "&c&lSETUP &e&l» &7The arena &a%text arg 2%&7 has been saved!"
- add text arg 2 to {lucky.arenas::*}
- set {lucky.arena.%text arg 2%.saved} to true
- set {lucky.arena.%text arg 2%.status} to "{@restarting}"
- make player execute command "//expand vert"
- make player execute command "rb addregion %arg-2%"
- clear player's inventory
- clear {lucky.arena.%uuid of player%.creating}
- wait 1 second
- lucky_resetarena(arg-2)
- stop
- else:
- send "&cDeathmatch spawns need to be same count as spawns!"
- stop
- else:
- send "&cYou not set spawns correctly!"
- stop
- else:
- send "&cYou need to set the arena lobby!"
- stop
- else:
- send "&cYou need to set the minimum players!"
- stop
- else:
- send "&cYou need to set the maximum players!"
- stop
- else:
- send "&cYou have already saved this arena!"
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou don't need to specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "max":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- if {lucky.arena.%text arg 2%.saved} is false:
- if integer arg 1 > 0:
- set {lucky.arena.%text arg 2%.max} to integer arg 1
- send "&c&lSETUP &e&l» &7Setted the &amaximum players &7to &a%integer arg 1%&7!"
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cYou can't use negative number!"
- stop
- else:
- send "&cThis arena is saved! That means that it is not open to any kind of modifications."
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou must specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "min":
- if player have permission "lucky.admin":
- if text arg 2 is set:
- if integer arg 1 is set:
- if {lucky.player.%uuid of player%.playing} is "NotInGame":
- if {lucky.arena.%text arg 2%.created} is true:
- if {lucky.arena.%text arg 2%.saved} is false:
- if integer arg 1 > 0:
- set {lucky.arena.%text arg 2%.min} to integer arg 1
- send "&c&lSETUP &e&l» &7Setted the &aminimum players &7to &a%integer arg 1%&7!"
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- stop
- else:
- send "&cYou can't use negative number!"
- stop
- else:
- send "&cThis arena is saved! That means that it is not open to any kind of modifications."
- stop
- else:
- send "&cThis arena doesn't even exists!"
- stop
- else:
- send "&cYou can't do this while playing!"
- stop
- else:
- send "&cYou must specify a number!"
- stop
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "stats":
- if player have permission "lucky.player":
- if arg-2 is not set:
- send "&8&l●&7&l&m----------------------&8&l●"
- send ""
- send "&3&l» &7&lKILLS &c%{lucky.stats.kills.%uuid of player%}%"
- send "&3&l» &7&lDEATHS &c%{lucky.stats.deaths.%uuid of player%}%"
- send "&3&l» &7&lWINS &c%{lucky.stats.wins.%uuid of player%}%"
- send "&3&l» &7&lCOINS &c%{lucky.stats.coins.%uuid of player%}%"
- send ""
- send "&8&l●&7&l&m----------------------&8&l●"
- if arg-2 is set:
- set {_uuid} to uuid of arg-2 parsed as player
- if {lucky.stats.kills.%{_uuid}%} is set:
- send "&8&l●&7&l&m----------------------&8&l●"
- send ""
- send "&3&l» &7&lKILLS &c%{lucky.stats.kills.%{_uuid}%}%"
- send "&3&l» &7&lDEATHS &c%{lucky.stats.deaths.%{_uuid}%}%"
- send "&3&l» &7&lWINS &c%{lucky.stats.wins.%{_uuid}%}%"
- send "&3&l» &7&lCOINS &c%{lucky.stats.coins.%{_uuid}%}%"
- send ""
- send "&8&l●&7&l&m----------------------&8&l●"
- else:
- send "&3&l» &7No data found for &c%arg-2%"
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if arg-1 is "resetstats":
- if player have permission "lucky.admin":
- if arg-2 is set:
- set {_player} to arg-2 parsed as player
- set {_uuid} to uuid of {_player}
- set {lucky.stats.kills.%{_uuid}%} to 0
- set {lucky.stats.deaths.%{_uuid}%} to 0
- set {lucky.stats.wins.%{_uuid}%} to 0
- set {lucky.stats.coins.%{_uuid}%} to 0
- send "&3&l» &c&lYou reset &c&l%arg-2%&c&l's stats"
- else:
- send "&3&l» &c&l/lucky resetstats <player>"
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if arg-1 is "setfallpoint":
- if player have permission "lucky.admin":
- if arg-2 is set:
- set {lucky.arena.%text arg 2%.fallpoint} to y-coords of player
- send "&c&lSETUP &e&l» &7Setted the arena Fall Point"
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- else:
- send "&cYou must specify an arena name!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- if text arg 1 is "coins":
- if text arg 2 is set:
- if player have permission "lucky.admin":
- if integer arg 1 is set:
- if player arg 1 is set:
- if player arg 1 is online:
- if text arg 2 is "give":
- if integer arg 1 >= 1:
- add integer arg 1 to {lucky.stats.coins.%uuid of player%}
- send "{@prefix} &7Gived &a%integer arg 1% &7coins to &a%player arg 1%&7!"
- stop
- else:
- send "&cYou can't use this value!"
- stop
- if text arg 2 is "take":
- if integer arg 1 >= 1:
- remove integer arg 1 from {lucky.stats.coins.%uuid of player%}
- send "{@prefix} &7Taked &a%integer arg 1% &7coins from &a%player arg 1%&7!"
- stop
- else:
- send "&cYou can't use this value!"
- stop
- if text arg 2 is "set":
- if integer arg 1 >= 0:
- set {lucky.stats.coins.%uuid of player%} to integer arg 1
- send "{@prefix} &7Setted &a%player arg 1%&a's &7coins to &a%integer arg 1%&7!"
- stop
- else:
- send "&cYou can't use a negative value!"
- stop
- else:
- send "&cYou can only do give, take or set!"
- stop
- else:
- send "&cThis player is not online!"
- stop
- else:
- send "&cYou must specify a player!"
- stop
- else:
- send "&cYou must specify a value!"
- stop
- else:
- send "&cYou don't have permission to execute this command!"
- stop
- else:
- send "{@prefix} &7You have &a%{lucky.stats.coins.%uuid of player%}% &7coins in total!"
- stop
- if text arg 1 is "leave":
- if {lucky.player.%uuid of player%.playing} is "InGame":
- if {lucky.player.%uuid of player%.arena} is set:
- invoke "lucky.clearplayer" from player
- teleport player to {lucky.lobby}
- remove player from {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.alive::*} and {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.death::*}
- remove 1 from {lucky.arena.%{lucky.player.%uuid of player%.arena}%.playing}
- reveal player from all players
- reveal all players to player
- set {lucky.player.%uuid of player%.playing} to "NotInGame"
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.status} is "{@ingame}" or "{@deathmatch}":
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.playing} is 1:
- loop {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.alive::*}:
- invoke "lucky.winner" from loop-value
- else:
- remove player from {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.alive::*} and {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.death::*}
- send "{@leftmessage} &7(%{lucky.arena.%{lucky.player.%uuid of player%.arena}%.playing}%&7/%{lucky.arena.%{lucky.player.%uuid of player%.arena}%.max}%&7)" to {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.alive::*} and {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.death::*}
- invoke "lucky.clearplayer" from player
- teleport {_p} to {lucky.lobby}
- reveal player to all players
- stop
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.status} is "{@starting}" or "{@full}":
- set {lucky.arena.%{lucky.player.%uuid of player%.arena}%.status} to "{@starting}"
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.playing} = 0:
- set {lucky.arena.%{lucky.player.%uuid of player%.arena}%.status} to "{@waiting}"
- else:
- if {lucky.player.%uuid of player%.playing} is "InGameSPEC":
- stop
- else:
- send "{@leftmessage} &7(%{lucky.arena.%{lucky.player.%uuid of player%.arena}%.playing}%&7/%{lucky.arena.%{lucky.player.%uuid of player%.arena}%.max}%&7)" to {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.alive::*} and {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.death::*}
- else:
- send "{@prefix} &cError founded!"
- send "&8&l● &3Error 5.0.2 RasenShuriken"
- stop
- else:
- send "&cYou are not playing in any arena!"
- stop
- #
- # \\ CHAT //
- #
- on chat:
- if {lucky.player.%uuid of player%.playing} is "InGame" or "InGameSPEC":
- cancel event
- set {_coins} to {lucky.stats.coins.%uuid of player%}
- if {lucky.player.%uuid of player%.playing} is "InGameSPEC":
- send {@specchat} to {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.death::*}
- if {lucky.player.%uuid of player%.playing} is "InGame":
- send {@normalchat} to {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.alive::*} and {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.death::*}
- #
- # \\ IN-GAME COMMANDS //
- #
- on command:
- if {@onlyingamecommands} is true:
- if {lucky.player.%uuid of player%.playing} is "InGame" or "InGameSPEC":
- if command is {@ingamecommands}:
- stop
- if player is op:
- stop
- if player has permission "lucky.admin":
- stop
- else:
- cancel event
- send "{@prefix} You can't use this command in game!"
- #
- # \\ SIGNS //
- #
- on sign change:
- if line 1 is "[Lucky]" or "[LuckyRace]":
- if line 2 is set:
- if line 2 is "autojoin":
- set line 1 to "{@signline1}"
- set line 2 to "{@autojoinline}"
- send "{@prefix} &7Sign Added"
- stop
- if line 2 is "arenas":
- set line 1 to "{@signline1}"
- set line 2 to "{@menuline}"
- send "{@prefix} &7Sign Added"
- stop
- on right-click on sign:
- if line 1 is "{@signline1}":
- if line 2 is "{@autojoinline}":
- make player execute the command "/lucky autojoin"
- stop
- if line 2 is "{@menuline}":
- make player execute the command "/lucky list"
- stop
- else:
- stop
- on break:
- if {lucky.player.%uuid of player%.playing} is "InGame" or "InGameSPEC":
- if event-block is not sponge:
- cancel event
- if {lucky.player.%uuid of player%.playing} is "InGameSPEC":
- cancel event
- on break of sponge:
- if {lucky.player.%uuid of player%.playing} is "InGame":
- if {@useluckyblockplugin} is false:
- cancel event
- set event-block to air
- set {_x} to random element out of {LUCKY.BLOCKS::*}
- drop {_x} at location of event-block
- show mob spawner flames at the event-block
- on place:
- if {lucky.player.%uuid of player%.playing} is "InGame" or "InGameSPEC":
- cancel event
- if {lucky.arena.%uuid of player%.creating} is set:
- if name of item is "&7SET LOWBOUND &cAND &7SET HIGHBOUND" or "&7ADD SPAWN &aAND &7REMOVE SPAWN" or "&7ADD &cDM SPAWN &aAND &7REMOVE &cDM &7SPAWN" or "&7SET ARENA &cLOBBY" or "&7SET &cMIN PLAYERS" or "&7SET &cMAX PLAYERS" or "&c&lSAVE ARENA" or "&7ARENA &c%{lucky.arena.%uuid of player%.creating}%" or "&7SET ARENA &cFALL POINT":
- cancel event
- else:
- stop
- else:
- stop
- on hunger bar change:
- if {lucky.player.%uuid of player%.playing} is set:
- set player's hunger to 20
- function spec(s: player,p: player):
- set {_suuid} to uuid of {_s}
- set {_puuid} to uuid of {_p}
- if {lucky.player.%{_puuid}%.arena} = {lucky.player.%{_suuid}%.arena}:
- teleport {_s} to {_p}
- on pickup:
- if {lucky.player.%uuid of player%.playing} is "InGameSPEC":
- cancel event
- on drop:
- if {lucky.player.%uuid of player%.playing} is "InGame":
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.status} is "{@waiting}" or "{@starting}" or "{@full}":
- cancel event
- else:
- if event-item is crafting table named "&aCrafting Table":
- cancel event
- if {lucky.player.%uuid of player%.playing} is "InGameSPEC":
- cancel event
- on right click:
- if {lucky.player.%uuid of player%.playing} is "InGame" or "InGameSPEC":
- if event-item is crafting table:
- open crafting table to player
- if name of item is "{@teleporteritemname}":
- set {_lucky.spec} to 0
- open virtual chest inventory with size 6 named "{@specgui}" to player
- loop {lucky.arena.%{lucky.player.%uuid of player%.arena}%.players.alive::*}:
- wait 1 tick
- set {_p} to loop-value
- make a gui slot {_lucky.spec} of player with loop-value's skull named "%{_p}'s displayname%" with lore "||&3&l» &e&l● &7&lClick To Teleport||" to run function spec(player,loop-value)
- add 1 to {_lucky.spec}
- set {_lucky.spec} to 0
- stop
- if name of item is "{@leaveitemname}":
- make player execute command "lucky leave"
- stop
- if {lucky.arena.%uuid of player%.creating} is set:
- if name of item is "&7SET LOWBOUND &cAND &7SET HIGHBOUND":
- cancel event
- make player execute command "//pos1"
- if name of item is "&7ADD SPAWN &aAND &7REMOVE SPAWN":
- cancel event
- make player execute command "lucky addspawn %{lucky.arena.%uuid of player%.creating}%"
- if name of item is "&7ADD &cDM SPAWN &aAND &7REMOVE &cDM &7SPAWN":
- cancel event
- make player execute command "lucky adddmSpawn %{lucky.arena.%uuid of player%.creating}%"
- if name of item is "&7SET ARENA &cLOBBY":
- cancel event
- make player execute command "lucky setarenalobby %{lucky.arena.%uuid of player%.creating}%"
- if name of item is "&7SET ARENA &cFALL POINT":
- cancel event
- make player execute command "lucky setfallpoint %{lucky.arena.%uuid of player%.creating}%"
- if name of item is "&7SET &cMIN PLAYERS":
- open virtual chest inventory with size 6 named "&cSET MIN" to player
- wait 3 ticks
- set {_lucky.setplayers} to -1
- loop 55 times:
- make a gui slot {_lucky.setplayers} of player with clay ball named "&7&l%loop-value%" with lore "||&8&l● &7&lClick to Set!||" to run player command "lucky min %{lucky.arena.%uuid of player%.creating}% %loop-value%"
- add 1 to {_lucky.setplayers}
- set {_lucky.setplayers} to 0
- stop
- if name of item is "&7SET &cMAX PLAYERS":
- open virtual chest inventory with size 6 named "&cSET MAX" to player
- wait 3 ticks
- set {_lucky.setplayers} to -1
- loop 55 times:
- make a gui slot {_lucky.setplayers} of player with clay ball named "&7&l%loop-value%" with lore "||&8&l● &7&lClick to Set!||" to run player command "lucky max %{lucky.arena.%uuid of player%.creating}% %loop-value%"
- add 1 to {_lucky.setplayers}
- set {_lucky.setplayers} to 0
- stop
- if name of item is "&c&lSAVE ARENA":
- cancel event
- make player execute command "lucky saveArena %{lucky.arena.%uuid of player%.creating}%"
- if name of item is "&c&l» &7&lARENA &c&l%{lucky.arena.%uuid of player%.creating}%":
- cancel event
- on left click:
- if name of item is "&7ADD SPAWN &aAND &7REMOVE SPAWN":
- cancel event
- make player execute command "lucky removespawn %{lucky.arena.%uuid of player%.creating}%"
- if name of item is "&7SET LOWBOUND &cAND &7SET HIGHBOUND":
- cancel event
- make player execute command "//pos2"
- if name of item is "&7ADD &cDM SPAWN &aAND &7REMOVE &cDM &7SPAWN":
- cancel event
- make player execute command "lucky removedmSpawn %{lucky.arena.%uuid of player%.creating}%"
- on pressure plate:
- if {lucky.player.%uuid of player%.playing} is "InGame":
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.status} is "{@ingame}":
- cancel event
- if block below event-block is redstone block:
- invoke "lucky.finish" from player
- set block at event-location to air
- else:
- set block at event-location to air
- set {lucky.arena.%{lucky.player.%uuid of player%.arena}%.respawnpoint::%uuid of player%} to location of player
- play sound "LEVEL_UP" to player with volume 100.0 and pitch 100.0
- add 1 to {lucky.checkpoints.%{lucky.player.%uuid of player%.arena}%::%player%}
- send "{@prefix} {@checkpoint}"
- create an animated ball effect at location of event-block with id "%uuid of player%" with particle redstone
- wait 0.7 seconds
- delete effect "%uuid of player%"
- on right click on chest:
- if {lucky.player.%uuid of player%.playing} is "InGame":
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.status} is "{@ingame}" or "{@deathmatch}":
- if {lucky.arena.%{lucky.player.%uuid of player%.arena}%.CHEST::%location of event-block%} is not set:
- set {lucky.arena.%{lucky.player.%uuid of player%.arena}%.CHEST::%location of event-block%} to true
- clear inventory of event-block
- loop 15 times:
- set {_random} to a random element of {LUCKY.CHESTS::*}
- set {_slot} to a random integer between 0 and 26
- add {_random} to slot {_slot} of block at event-block
- #
- # \\ DEATH EVENT //
- #
- on damage of player:
- if {lucky.player.%uuid of victim%.playing} is "InGame":
- if {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.status} is "{@restarting}" or "{@starting}" or "{@waiting}" or "{@full}":
- cancel event
- if {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.status} is "{@ingame}":
- if damage cause is fall:
- cancel event
- if damage cause is void:
- cancel event
- teleport victim to {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.respawnpoint::%uuid of victim%}
- heal victim
- else:
- if {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.status} is "{@ingame}" or "{@deathmatch}":
- if damage is greater than or equal to health of victim:
- cancel event
- remove 1 from {lucky.lives.%{lucky.player.%uuid of victim%.arena}%::%uuid of victim%}
- create an animated ball effect at location of victim with id "%uuid of victim%" with particle flame
- play sound "LEVEL_UP" to attacker with volume 100.0 and pitch 100.0
- play sound "ANVIL_BREAK" to victim with volume 100.0 and pitch 100.0
- add 1 to {lucky.gamekills.%{lucky.player.%uuid of attacker%.arena}%::%attacker%}
- add 1 to {lucky.stats.kills.%uuid of attacker%}
- add 1 to {lucky.stats.deaths.%uuid of victim%}
- add {@coinsperkill} to {lucky.stats.coins.%uuid of attacker%}
- if {lucky.lives.%{lucky.player.%uuid of victim%.arena}%::%uuid of victim%} = 0:
- set {_victim} to victim
- drop all items in victim's inventory at block 1 above victim
- clear victim's inventory
- invoke "lucky.spec" from {_victim}
- set {lucky.player.%uuid of victim%.playing} to "InGameSPEC"
- remove {_victim} from {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.alive::*}
- remove 1 from {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.playing}
- add {_victim} to {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.death::*}
- send victim title "{@deathtitle}" with subtitle "{@deathsubtitle}" for 4 seconds
- set {_players.total::*} to {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.alive::*} and {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.death::*}
- set {_alive} to size of {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.alive::*}
- set {_spec} to size of {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.death::*}
- if {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.playing} is 1:
- if attacker is set:
- if attacker is player:
- invoke "lucky.winner" from attacker
- else:
- loop {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.alive::*}:
- invoke "lucky.winner" from loop-value-1
- else:
- loop {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.players.alive::*}:
- invoke "lucky.winner" from loop-value-1
- else:
- set {_spawn} to random integer between 1 and {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.max}
- heal victim
- teleport victim to {lucky.arena.%{lucky.player.%uuid of victim%.arena}%.dm.%{_spawn}%}
- send "{@prefix} {@deathmessage}" to {_players.total::*}
- wait 0.7 seconds
- delete effect "%uuid of victim%"
- else:
- stop
- on quit:
- make player execute command "lucky leave"
- if {lucky.gamekills.%{lucky.player.%uuid of player%.arena}%::%player%} is set:
- delete {lucky.gamekills.%{lucky.player.%uuid of player%.arena}%::%player%}
- if {lucky.player.%uuid of player%.arena} is set:
- clear {lucky.player.%uuid of player%.arena}
- if {lucky.arena.%uuid of player%.creating} is set:
- delete {lucky.arena.%uuid of player%.creating}
- stop
- every second:
- loop all players:
- if {lucky.player.%uuid of loop-player%.playing} is "InGame" or "InGameSPEC":
- if {lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.status} is "{@ingame}":
- if stylish scoreboard "LUCKYGAME-%loop-player%" does not exist:
- create new stylish scoreboard named "LUCKYGAME-%loop-player%"
- loop 15 times:
- create a new id based score "LUCKYGAME-%loop-player%Slot%loop-number%" with text "&%loop-number%" slot loop-number for stylish scoreboard "LUCKYGAME-%loop-player%"
- wait 3 ticks
- set title of stylish scoreboard "LUCKYGAME-%loop-player%" to "&6&lLUCKY RACE"
- set stylish scoreboard of loop-player to "LUCKYGAME-%loop-player%"
- set the text of id "LUCKYGAME-%loop-player%Slot15" to "&7%now%"
- set the text of id "LUCKYGAME-%loop-player%Slot14" to "&8&l&m---------------"
- set the text of id "LUCKYGAME-%loop-player%Slot13" to "&8&l● &6TIME LEFT"
- set the text of id "LUCKYGAME-%loop-player%Slot12" to "&8&l● &c&l%{lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.gametime::minutes}%:%{lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.gametime::timefix}%%{lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.gametime::seconds}%"
- set the text of id "LUCKYGAME-%loop-player%Slot11" to "&1&e&9"
- set the text of id "LUCKYGAME-%loop-player%Slot10" to "&7&l» &e&lMap"
- set the text of id "LUCKYGAME-%loop-player%Slot9" to "&3&8&l● &6&l%{lucky.player.%uuid of loop-player%.arena}%"
- set the text of id "LUCKYGAME-%loop-player%Slot8" to "&3&4"
- set the text of id "LUCKYGAME-%loop-player%Slot7" to "&7&l» &e&lCheckpoints"
- set the text of id "LUCKYGAME-%loop-player%Slot6" to "&4&8&l● &6&l%{lucky.checkpoints.%{lucky.player.%uuid of loop-player%.arena}%::%loop-player%}%"
- set the text of id "LUCKYGAME-%loop-player%Slot5" to "&1&4"
- set the text of id "LUCKYGAME-%loop-player%Slot4" to "&7&l» &e&lPLAYERS"
- set the text of id "LUCKYGAME-%loop-player%Slot3" to "&2&8&l● &6&lInGame: %size of {lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.players.alive::*}%"
- set the text of id "LUCKYGAME-%loop-player%Slot2" to "&8&m&l---------------"
- set the text of id "LUCKYGAME-%loop-player%Slot1" to "{@websitename}"
- if {lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.status} is "{@deathmatch}" or "{@restarting}":
- if stylish scoreboard "LUCKYDM-%loop-player%" does not exist:
- create new stylish scoreboard named "LUCKYDM-%loop-player%"
- loop 12 times:
- create a new id based score "LUCKYDM-%loop-player%Slot%loop-number%" with text "&%loop-number%" slot loop-number for stylish scoreboard "LUCKYDM-%loop-player%"
- wait 3 ticks
- set title of stylish scoreboard "LUCKYDM-%loop-player%" to "&6&lLUCKY RACE"
- set stylish scoreboard of loop-player to "LUCKYDM-%loop-player%"
- set the text of id "LUCKYDM-%loop-player%Slot12" to "&7%now%"
- set the text of id "LUCKYDM-%loop-player%Slot11" to "&8&l&m---------------"
- set the text of id "LUCKYDM-%loop-player%Slot10" to "&8&l● &6TIME LEFT"
- set the text of id "LUCKYDM-%loop-player%Slot9" to "&8&l● &c&l%{lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.gametime::minutes}%:%{lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.gametime::seconds}%"
- set the text of id "LUCKYDM-%loop-player%Slot8" to "&1&e&9"
- set the text of id "LUCKYDM-%loop-player%Slot7" to "&7&l» &c❤ &6&lLEFT"
- set the text of id "LUCKYDM-%loop-player%Slot6" to "&3&8&l● &6&l%{lucky.lives.%{lucky.player.%uuid of loop-player%.arena}%::%uuid of loop-player%}%"
- set the text of id "LUCKYDM-%loop-player%Slot5" to "&3&4"
- set the text of id "LUCKYDM-%loop-player%Slot4" to "&7&l» &e&lPLAYERS"
- set the text of id "LUCKYDM-%loop-player%Slot3" to "&2&8&l● &6&lInGame: %size of {lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.players.alive::*}%"
- set the text of id "LUCKYDM-%loop-player%Slot2" to "&8&m&l---------------"
- set the text of id "LUCKYDM-%loop-player%Slot1" to "{@websitename}"
- if {lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.status} is "{@waiting}" or "{@starting}" or "{@full}":
- if stylish scoreboard "LUCKYLOBBY-%loop-player%" does not exist:
- create new stylish scoreboard named "LUCKYLOBBY-%loop-player%"
- loop 12 times:
- create a new id based score "LUCKYLOBBY-%loop-player%Slot%loop-number%" with text "&%loop-number%" slot loop-number for stylish scoreboard "LUCKYLOBBY-%loop-player%"
- wait 3 ticks
- set title of stylish scoreboard "LUCKYLOBBY-%loop-player%" to "&6&lLUCKY RACE"
- set stylish scoreboard of loop-player to "LUCKYLOBBY-%loop-player%"
- set the text of id "LUCKYLOBBY-%loop-player%Slot12" to "&7%now%"
- set the text of id "LUCKYLOBBY-%loop-player%Slot11" to "&8&l&m---------------"
- set the text of id "LUCKYLOBBY-%loop-player%Slot10" to "&8&l● &6STARTING IN"
- set the text of id "LUCKYLOBBY-%loop-player%Slot9" to "&9&8&l● &e%{lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.seconds}%"
- set the text of id "LUCKYLOBBY-%loop-player%Slot8" to "&1&e&9"
- set the text of id "LUCKYLOBBY-%loop-player%Slot7" to "&7&l» &e&lMap"
- set the text of id "LUCKYLOBBY-%loop-player%Slot6" to "&1&8&l● &6&l%{lucky.player.%uuid of loop-player%.arena}%"
- set the text of id "LUCKYLOBBY-%loop-player%Slot5" to "&1&4"
- set the text of id "LUCKYLOBBY-%loop-player%Slot4" to "&7&l» &e&lPLAYERS"
- set the text of id "LUCKYLOBBY-%loop-player%Slot3" to "&8&l● &6&lLobby: %size of {lucky.arena.%{lucky.player.%uuid of loop-player%.arena}%.players.alive::*}%"
- set the text of id "LUCKYLOBBY-%loop-player%Slot2" to "&8&m&l---------------"
- set the text of id "LUCKYLOBBY-%loop-player%Slot1" to "{@websitename}"
- else:
- if stylish scoreboard "LUCKYLOBBY-%loop-player%" exist:
- delete stylish scoreboard "LUCKYLOBBY-%loop-player%"
- if stylish scoreboard "LUCKYGAME-%loop-player%" exist:
- delete stylish scoreboard "LUCKYGAME-%loop-player%"
- if stylish scoreboard "LUCKYDM-%loop-player%" exist:
- delete stylish scoreboard "LUCKYDM-%loop-player%"
- sub "lucky.join":
- set {_arena} to parameter 1
- if {lucky.arena.%{_arena}%.playing} = {lucky.arena.%{_arena}%.min}:
- set {lucky.arena.%{_arena}%.status} to "{@starting}"
- if {lucky.arena.%{_arena}%.playing} = {lucky.arena.%{_arena}%.max}:
- set {lucky.arena.%{_arena}%.status} to "{@full}"
- set {_sec} to {lucky.arena.%{_arena}%.seconds}
- send "{@prefix} {@startingin}" to {lucky.arena.%{_arena}%.players.alive::*}
- loop {lucky.arena.%{_arena}%.seconds} times:
- remove 1 from {lucky.arena.%{_arena}%.seconds}
- set {_sec} to {lucky.arena.%{_arena}%.seconds}
- wait 1 seconds
- if {_sec} <= 5:
- if {_sec} is greater than 0:
- send {lucky.arena.%{_arena}%.players.alive::*} title "{@startingtitle}" with subtitle "{@startingsubtitle}" for 0.8 seconds
- send "{@prefix} {@startingin}" to {lucky.arena.%{_arena}%.players.alive::*}
- play sound "LEVEL_UP" to {lucky.arena.%{_arena}%.players.alive::*} with volume 100.0 and pitch 100.0
- if {_sec} <= 0:
- if {lucky.arena.%{_arena}%.playing} >= 2:
- send "{@prefix} {@startmessage}" to {lucky.arena.%{_arena}%.players.alive::*}
- invoke "lucky.gametime" from {_arena}
- set {lucky.arena.%{_arena}%.status} to "{@ingame}"
- set {_spawn} to 0
- loop {lucky.arena.%{_arena}%.players.alive::*}:
- set {_p} to loop-value-2
- set {_uuid} to uuid of {_p}
- add 1 to {_spawn}
- invoke "lucky.clearplayer" from {_p}
- teleport {_p} to {lucky.arena.%{_arena}%.spawn.%{_spawn}%}
- set {lucky.arena.%{_arena}%.respawnpoint::%{_uuid}%} to {lucky.arena.%{_arena}%.spawn.%{_spawn}%}
- set {lucky.checkpoints.%{lucky.player.%{_uuid}%.arena}%::%{_p}%} to 0
- set slot 0 of {_p} to iron_sword
- set slot 1 of {_p} to iron_pickaxe
- set slot 8 of {_p} to crafting table named "&aCrafting Table"
- wait 1 tick
- else:
- set {lucky.arena.%{_arena}%.seconds} to {@waitingtime}
- set {lucky.arena.%{_arena}%.status} to "{@waiting}"
- send "{@prefix} &cThere are not enought players to start!" to {lucky.arena.%{_arena}%.players.alive::*}
- stop
- sub "lucky.gametime":
- set {_arena} to parameter 1
- set {lucky.arena.%{_arena}%.gametime::minutes} to {@gameminutes} -1
- set {lucky.arena.%{_arena}%.gametime::seconds} to 60
- set {lucky.arena.%{_arena}%.gametime::timefix} to ""
- loop {@gameminutes}*60+150 times:
- wait 1 seconds
- if {lucky.arena.%{_arena}%.status} is "{@ingame}" or "{@starting}" or "{@full}":
- remove 1 from {lucky.arena.%{_arena}%.gametime::seconds}
- if {lucky.arena.%{_arena}%.gametime::seconds} is 0:
- set {lucky.arena.%{_arena}%.gametime::timefix} to ""
- set {lucky.arena.%{_arena}%.gametime::seconds} to 59
- subtract 1 from {lucky.arena.%{_arena}%.gametime::minutes}
- if {lucky.arena.%{_arena}%.gametime::seconds} is 9:
- set {lucky.arena.%{_arena}%.gametime::timefix} to "0"
- if {lucky.arena.%{_arena}%.gametime::minutes} = 0:
- if {lucky.arena.%{_arena}%.gametime::seconds} <= 1:
- set {lucky.arena.%{_arena}%.gametime::seconds} to 0
- set {lucky.arena.%{_arena}%.gametime::minutes} to 0
- invoke "lucky.deathmatch" from {_arena}
- stop loop
- stop
- else:
- stop loop
- stop
- sub "lucky.deathmatch":
- set {_arena} to parameter 1
- set {lucky.arena.%{_arena}%.gametime::minutes} to 2
- set {lucky.arena.%{_arena}%.gametime::seconds} to 60
- set {lucky.arena.%{_arena}%.status} to "{@deathmatch}"
- loop {lucky.arena.%{_arena}%.players.alive::*}:
- add 1 to {_spawn}
- teleport loop-value to {lucky.arena.%{_arena}%.dm.%{_spawn}%}
- set {lucky.lives.%{lucky.player.%uuid of loop-value%.arena}%::%uuid of loop-value%} to 3
- loop 200 times:
- wait 1 seconds
- if {lucky.arena.%{_arena}%.status} = "{@deathmatch}":
- remove 1 from {lucky.arena.%{_arena}%.gametime::seconds}
- if {lucky.arena.%{_arena}%.gametime::seconds} = 0:
- set {lucky.arena.%{_arena}%.gametime::timefix} to ""
- set {lucky.arena.%{_arena}%.gametime::seconds} to 59
- subtract 1 from {lucky.arena.%{_arena}%.gametime::minutes}
- if {lucky.arena.%{_arena}%.gametime::seconds} = 9:
- set {lucky.arena.%{_arena}%.gametime::timefix} to "0"
- if {lucky.arena.%{_arena}%.gametime::minutes} = 0:
- if {lucky.arena.%{_arena}%.gametime::seconds} <= 1:
- if {lucky.arena.%{_arena}%.status} is not "{@deathmatch}":
- set {lucky.arena.%{_arena}%.gametime::minutes} to 2
- set {lucky.arena.%{_arena}%.gametime::seconds} to 59
- set {lucky.arena.%{_arena}%.gametime::timefix} to ""
- set {lucky.arena.%{_arena}%.status} to "{@deathmatch}"
- send "{@prefix} {@deathmatchstarted}" to {lucky.arena.%{_arena}%.players.alive::*}
- else:
- invoke "lucky.endgame" from {_arena}
- stop loop
- stop
- else:
- stop loop
- stop
- sub "lucky.endgame":
- set {_arena} to parameter 1
- loop {lucky.arena.%{_arena}%.players.alive::*}:
- loop 10 times:
- wait 1 seconds
- if {lucky.arena.%{_arena}%.status} is "{@deathmatch}":
- set {_p} to loop-value-1
- set {_uuid} to uuid of {_p}
- if {lucky.player.%{_uuid}%.playing} is "InGameSPEC":
- stop
- else:
- strike lightning at location of loop-value-1
- else:
- stop loop
- extinguish loop-value-1
- stop
- sub "lucky.finish":
- set {_p} to parameter 1
- set {_uuid} to uuid of {_p}
- send {_p} title "{@finishtitle}" with subtitle "{@finishsubtitle}" for 5 seconds
- send "{@finishmessage}" to {lucky.arena.%{lucky.player.%{_uuid}%.arena}%.players.alive::*}
- set {lucky.arena.%{lucky.player.%{_uuid}%.arena}%.gametime::minutes} to 0
- set {lucky.arena.%{lucky.player.%{_uuid}%.arena}%.gametime::seconds} to {@shorttimeto}
- add {@reachfinal} to {lucky.stats.coins.%{_uuid}%}
- loop 5 times:
- if {lucky.player.%{_uuid}%.playing} is "InGame":
- launch trailing flickering star coloured purple and red fading to yellow at {_p}'s location timed 1
- wait 10 ticks
- else:
- stop loop
- stop
- sub "lucky.spec":
- set {_p} to parameter 1
- set {_uuid} to uuid of {_p}
- hide {_p} from all players
- invoke "lucky.clearplayer" from {_p}
- set {_p}'s slot 0 to {@teleporteritem} named "{@teleporteritemname}"
- set {_p}'s slot 8 to {@leaveitem} named "{@leaveitemname}"
- set {_p}'s flight mode to true
- wait 1 seconds
- teleport {_p} to random element out of {lucky.arena.%{lucky.player.%{_uuid}%.arena}%.players.alive::*}
- stop
- sub "lucky.refreshmenu":
- loop all players:
- if inventory name of loop-player-1's current inventory is "{@arenasguiname}":
- set {_lucky.list} to 0
- loop {lucky.arenas::*}:
- if {lucky.arena.%loop-value-2%.status} is "{@ingame}" or "{@full}" or "{@restarting}":
- make a gui slot {_lucky.list} of loop-player-1 with red clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value-2%||||&8&l» &7Status&8: %{lucky.arena.%loop-value-2%.status}%||||&8&l» &7Players&8: &7%{lucky.arena.%loop-value-2%.playing}%/%{lucky.arena.%loop-value-2%.max}%||||&8&l● &7&lClick to spectate!" to run loop-player-1 command "lucky join %loop-value-2%"
- add 1 to {_lucky.list}
- else:
- make a gui slot {_lucky.list} of loop-player-1 with green clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value-2%||||&8&l» &7Status&8: %{lucky.arena.%loop-value-2%.status}%||||&8&l» &7Players&8: &7%{lucky.arena.%loop-value-2%.playing}%/%{lucky.arena.%loop-value-2%.max}%||||&8&l● &7&lClick to join!" to run loop-player-1 command "lucky join %loop-value-2%"
- add 1 to {_lucky.list}
- stop
- sub "lucky.clearplayer":
- set {_p} to parameter 1
- milk {_p}
- heal {_p}
- extinguish {_p}
- set {_p}'s food to 20
- clear {_p}'s level
- clear {_p}'s inventory
- close {_p}'s inventory
- set {_p}'s gamemode to survival
- set {_p}'s flight mode to false
- sub "lucky.winner":
- set {_p} to parameter 1
- set {_uuid} to uuid of {_p}
- set {_arena} to {lucky.player.%{_uuid}%.arena}
- set {lucky.arena.%{_arena}%.status} to "{@restarting}"
- invoke "lucky.summary" from {_p} and {lucky.player.%{_uuid}%.arena}
- invoke "lucky.clearplayer" from {_p}
- send {_p} title "{@winnertitle}" with subtitle "{@winnersubtitle}" for 7 seconds
- add 1 to {lucky.stats.wins.%{_uuid}%}
- add {@coinsperwin} to {lucky.stats.coins.%{_uuid}%}
- loop 15 times:
- if {lucky.player.%{_uuid}%.playing} is "InGame":
- launch trailing flickering star coloured purple and red fading to yellow at {_p}'s location timed 1
- wait 10 ticks
- wait {@winlenght} seconds
- set {_players.total::*} to {lucky.arena.%{_arena}%.players.alive::*} and {lucky.arena.%{_arena}%.players.death::*}
- loop {_players.total::*}:
- invoke "lucky.clearplayer" from loop-value
- teleport loop-value to {lucky.lobby}
- set {lucky.player.%uuid of loop-value%.playing} to "NotInGame"
- reveal loop-value from all players
- set {lucky.arena.%{_arena}%.status} to "{@restarting}"
- wait 5 ticks
- lucky_resetarena({_arena})
- stop
- sub "lucky.summary":
- set {_p} to parameter 1
- set {_arena} to parameter 2
- set {_uuid} to uuid of {_p}
- loop {lucky.gamekills.%{_arena}%::*}:
- set {_backup::%loop-index%} to loop-value
- loop 3 times:
- delete {_first.player}
- delete {_first.number}
- loop {_backup::*}:
- if {_first.player} is not set:
- set {_first.number} to loop-value-2
- set {_first.player} to loop-index
- else:
- if loop-value-2 > {_first.number}:
- set {_first.number} to loop-value-2
- set {_first.player} to loop-index
- add {_first.number} to {_list::*}
- add {_first.player} to {_list2::*}
- delete {_backup::%{_first.player}%}
- if {_list::1} is not set:
- set {_list::1} to 0
- if {_list::2} is not set:
- set {_list::2} to 0
- if {_list::3} is not set:
- set {_list::3} to 0
- if {_list2::1} is not set:
- set {_list2::1} to "Nobody"
- if {_list2::2} is not set:
- set {_list2::2} to "Nobody"
- if {_list2::3} is not set:
- set {_list2::3} to "Nobody"
- if {lucky.checkpoints.%{_arena}%::%{_list2::2}%} is not set:
- set {lucky.checkpoints.%{_arena}%::%{_list2::2}%} to 0
- if {lucky.checkpoints.%{_arena}%::%{_list2::3}%} is not set:
- set {lucky.checkpoints.%{_arena}%::%{_list2::3}%} to 0
- set {_players.total::*} to {lucky.arena.%{_arena}%.players.alive::*} and {lucky.arena.%{_arena}%.players.death::*}
- wait 0.1 seconds
- send "&3&l■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ " to {_players.total::*}
- send " " to {_players.total::*}
- send " &8&l● &f&lLucky Race &8&l● " to {_players.total::*}
- send " " to {_players.total::*}
- send " &eWinner &f- &3%{_p}'s displayname% " to {_players.total::*}
- send " " to {_players.total::*}
- send " &c&l» &e&l1st Place &8&l» &3%{_list2::1}%" to {_players.total::*}
- send " &a&l● &6&lKills &8&l┃&7%{_list::1}%&8&l┃ &6&lCheckpoints &8&l┃&7%{lucky.checkpoints.%{_arena}%::%{_list2::1}%}%&8&l┃" to {_players.total::*}
- send " &c&l» &e&l2nd Place &8&l» &7%{_list2::2}%" to {_players.total::*}
- send " &a&l● &6&lKills &8&l┃&7%{_list::2}%&8&l┃ &6&lCheckpoints &8&l┃&7%{lucky.checkpoints.%{_arena}%::%{_list2::2}%}%&8&l┃" to {_players.total::*}
- send " &c&l» &e&l3rd Place &8&l» &7%{_list2::3}%" to {_players.total::*}
- send " &a&l● &6&lKills &8&l┃&7%{_list::3}%&8&l┃ &6&lCheckpoints &8&l┃&7%{lucky.checkpoints.%{_arena}%::%{_list2::3}%}%&8&l┃" to {_players.total::*}
- send " " to {_players.total::*}
- send "&3&l■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ " to {_players.total::*}
- command /settime [<integer>] [<integer>]:
- trigger:
- set {lucky.arena.%{lucky.player.%uuid of player%.arena}%.gametime::minutes} to arg-1
- set {lucky.arena.%{lucky.player.%uuid of player%.arena}%.gametime::seconds} to arg-2
Add Comment
Please, Sign In to add comment