Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #▒█▀▀▀█ █░░█ █▀▀█ ▀█░█▀ ░▀░ ▀█░█▀ █▀▀█ █░░ ▒█▀▀█ █▀▀█ █▀▄▀█ █▀▀ █▀▀
- #░▀▀▀▄▄ █░░█ █▄▄▀ ░█▄█░ ▀█▀ ░█▄█░ █▄▄█ █░░ ▒█░▄▄ █▄▄█ █░▀░█ █▀▀ ▀▀█
- #▒█▄▄▄█ ░▀▀▀ ▀░▀▀ ░░▀░░ ▀▀▀ ░░▀░░ ▀░░▀ ▀▀▀ ▒█▄▄█ ▀░░▀ ▀░░░▀ ▀▀▀ ▀▀▀
- #====================================================================
- # █ Plugin: SurvivalGames █
- # █ Made by : karingijs272 █
- # █ Version : 2.0 Release █
- #====================================================================
- # Copyright © Karingijs. All rights reserved.
- # Company : Text Skripts Karingijs - TSK
- # Date : 2017
- #====================================================================
- # /\==============/\
- # / \ o / \
- # / \ o o / o \
- # / o \ o o i / o \ f = other
- # / o \ / o \ o = are the fixed bugs
- # / o o \o f / o o \ x = are the bugs
- # / o i \ / o o o \ i = are youre ideas added to the plugin
- #/ o o o \/ i o \
- #=================================
- #Here you can report bugs and rate the project:
- #>>> https://www.spigotmc.org/resources/%E2%98%A2survivalgames%E2%98%A2.45932/
- #This skript is tested on 1.8/1.8.8 Version
- #Here you also can report bugs ask question and give some ideas to add to this project
- #>>> Discoard : https://discord.gg/gx4q3EP
- on script load:
- wait 1 tick
- if {OPTIONS::MINPLAYERS} is not set:
- set {OPTIONS::MINPLAYERS} to 2
- if {OPTIONS::TIMESTART} is not set:
- set {OPTIONS::TIMESTART} to 15
- if {OPTIONS::KILL} is not set:
- set {OPTIONS::KILL} to 100
- if {OPTIONS::DEATH} is not set:
- set {OPTIONS::DEATH} to 25
- if {OPTIONS::WIN} is not set:
- set {OPTIONS::WIN} to 250
- if {OPTIONS::HIDETIME} is not set:
- set {OPTIONS::HIDETIME} to 30
- if {OPTIONS::PERMISSION::HIDE} is not set:
- set {OPTIONS::PERMISSION::HIDE} to "survivalgames.vip"
- if {OPTIONS::DROPS::MIN} is not set:
- set {OPTIONS::DROPS::MIN} to 5
- if {OPTIONS::DROPS::MAX} is not set:
- set {OPTIONS::DROPS::MAX} to 12
- if {OPTIONS::STARTVOTE} is not set:
- set {OPTIONS::STARTVOTE} to 0.25
- if {OPTIONS::PERMISSION::PREFIXVIP} is not set:
- set {OPTIONS::PERMISSION::PREFIXVIP} to "survivalgames.vip"
- if {OPTIONS::GAMETIME} is not set:
- set {OPTIONS::GAMETIME} to 165
- if {OPTIONS::PERMISSION::BONUS} is not set:
- set {OPTIONS::PERMISSION::BONUS} to "survivalgames.vip"
- wait 3 second
- if {FIRSTLOAD} is not set:
- execute console command "sg load ChestDrops"
- wait 1 second
- execute console command "sg load OtherDrops"
- set {FIRSTLOAD} to true
- wait 1 tick
- loop 10 times:
- set {_rank} to yaml value "ranks.%loop-number%" from file "config.yml"
- wait 2 tick
- set {RANKSYSTEM::%loop-number%} to "%{_rank}%" parsed as number
- loop all players:
- if {KILLS::%loop-player%} is "none" or "<none>":
- set {KILLS::%loop-player%} to 0
- if {DEATHS::%loop-player%} is "none" or "<none>":
- set {DEATHS::%loop-player%} to 0
- if {MONEY::%loop-player%} is "none" or "<none>":
- set {MONEY::%loop-player%} to 0
- if {GAMESPLAYED::%loop-player%} is "none" or "<none>":
- set {GAMESPLAYED::%loop-player%} to 0
- if {WINS::%loop-player%} is "none" or "<none>":
- set {WINS::%loop-player%} to 0
- #send "Loaded" to all players
- options:
- tag: &e[&2Survival&3Games&e]&c>>
- on join:
- set {_player::%player%} to the player
- loop {_player::*}:
- if "%loop-index%" is "%player%":
- set {_player} to "%loop-index%" parsed as player
- set {KILLS::%player%} to yaml value "kills" from file "SurvivalGames/players/%{_player}%.yml"
- set {DEATHS::%player%} to yaml value "deaths" from file "SurvivalGames/players/%{_player}%.yml"
- set {MONEY::%player%} to yaml value "money" from file "SurvivalGames/players/%{_player}%.yml"
- set {GAMESPLAYED::%player%} to yaml value "games" from file "SurvivalGames/players/%{_player}%.yml"
- set {WINS::%player%} to yaml value "wins" from file "SurvivalGames/players/%{_player}%.yml"
- wait 2 tick
- if {KILLS::%player%} is not set:
- set {KILLS::%player%} to 0
- if {DEATHS::%player%} is not set:
- set {DEATHS::%player%} to 0
- if {MONEY::%player%} is not set:
- set {MONEY::%player%} to 0
- if {GAMESPLAYED::%player%} is not set:
- set {GAMESPLAYED::%player%} to 0
- if {WINS::%player%} is not set:
- set {WINS::%player%} to 0
- wait 2 tick
- set {KILLS::%player%} to "%{KILLS::%player%}%" parsed as number
- set {DEATHS::%player%} to "%{DEATHS::%player%}%" parsed as number
- set {MONEY::%player%} to "%{MONEY::%player%}%" parsed as number
- set {GAMESPLAYED::%player%} to "%{GAMESPLAYED::%player%}%" parsed as number
- set {WINS::%player%} to "%{WINS::%player%}%" parsed as number
- wait 2 second
- display board named "&6>SurvivalGames<" to {_player}
- make score "&eKills:&c%{KILLS::%{_player}%}%" in board of {_player} to 5
- make score "&eDeaths:&c%{DEATHS::%{_player}%}%" in board of {_player} to 4
- make score "&eMoney:&a%{MONEY::%{_player}%}%" in board of {_player} to 3
- make score "&eWins:&9%{GAMESPLAYED::%{_player}%}%" in board of {_player} to 2
- make score "&eGames:&9%{WINS::%{_player}%}%" in board of {_player} to 1
- move display of {_player} to sidebar
- on quit:
- if {STATUS::%player%} is "normal" or "survival" or "hardcore":
- subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
- set {_player::%player%} to the player
- loop {_player::*}:
- if "%loop-index%" is "%player%":
- set {_player} to "%loop-index%"
- set yaml value "kills" from file "SurvivalGames/players/%{_player}%.yml" to "%{KILLS::%player%}%"
- set yaml value "deaths" from file "SurvivalGames/players/%{_player}%.yml" to "%{DEATHS::%player%}%"
- set yaml value "money" from file "SurvivalGames/players/%{_player}%.yml" to "%{MONEY::%player%}%"
- set yaml value "games" from file "SurvivalGames/players/%{_player}%.yml" to "%{GAMESPLAYED::%player%}%"
- set yaml value "wins" from file "SurvivalGames/players/%{_player}%.yml" to "%{WINS::%player%}%"
- wait 1 tick
- delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%player%}
- delete {KILLS::%player%}
- delete {DEATHS::%player%}
- delete {MONEY::%player%}
- delete {MAP::%player%}
- delete {NR::%player%}
- delete {STATUS::%player%}
- delete {WINS::%player%}
- delete {GAMESPLAYED::%player%}
- delete {INVISIBLE::%player%}
- delete {VOTE::%player%}
- delete {CLASSPREFIX::%player%}
- on respawn:
- wait 2 tick
- teleport player to {LOBBY}
- command /gamecontrol [<string>] [<string>] [<string>]:
- executable by: console
- trigger:
- set {_time} to "%arg 1%" parsed as number
- set {_map} to "%arg 2%" parsed as string
- set {_gametime} to {OPTIONS::GAMETIME}
- set {SURVIVALGAMES::%{_map}%::STATUS} to "starting"
- set {SURVIVALGAMES::%{_map}%::TIMER} to {_time}
- send "{@tag} &5%{_map}% &bstarting in &3%{_time}% &bsecond" to all players
- loop {SURVIVALGAMES::%{_map}%::TIMER} times:
- if {SURVIVALGAMES::%{_map}%::TIMER} is smaller or equal to 5:
- loop all players:
- if "%{MAP::%loop-player%}%" is "%{_map}%":
- send "{@tag} &5%{_map}% &bstarting in &3%{SURVIVALGAMES::%{_map}%::TIMER}% &bsecond" to loop-player
- wait 1 second
- subtract 1 from {SURVIVALGAMES::%{_map}%::TIMER}
- if {SURVIVALGAMES::%{_map}%::PLAYERS} is smaller or equal to 1:
- set {SURVIVALGAMES::%{_map}%::TIMER} to 0
- set {SURVIVALGAMES::%{_map}%::STATUS} to "waiting"
- stop
- send "{@tag} &5%{_map}% &bStarted!" to all players
- loop all players:
- if "%{MAP::%loop-player%}%" is "%{_map}%":
- delete {VOTE::%loop-player%}
- set {STATUS::%loop-player%} to "%{SURVIVALGAMES::%{_map}%::MODE}%"
- add 1 to {GAMESPLAYED::%loop-player%}
- if {OPTIONS::HIDETIME} is greater than 0:
- if loop-player has permission "%{OPTIONS::PERMISSION::HIDE}%":
- hide loop-player to all players
- set {_hidetime} to {OPTIONS::HIDETIME}
- send "{@tag} &aYou are invisible for &2%{OPTIONS::HIDETIME}% &aseconds." to loop-player
- set {INVISIBLE::%loop-player%} to true
- set {SURVIVALGAMES::%{_map}%::STATUS} to "started"
- while {SURVIVALGAMES::%{_map}%::PLAYERS} is greater than 1:
- wait 1 second
- set {_size} to size of {SURVIVLGAMES::%{_map}%::LISTOFPLAYERS::*}
- loop all players:
- if "%{MAP::%loop-player%}%" is "%{_map}%":
- display board named "&6>SurvivalGames<" to loop-player
- make score "&6&m&l>----" in board of loop-player to 7
- make score "&eGameTime:&7%{_gametime}%" in board of loop-player to 6
- make score "&6&m&l>---" in board of loop-player to 5
- make score "&ePlayers:&7%{_size}%" in board of loop-player to 4
- make score "&6&m&l>--" in board of loop-player to 3
- make score "&eMap:&7%{_map}%" in board of loop-player to 2
- make score "&6&m&l>-" in board of loop-player to 1
- move display of loop-player to sidebar
- subtract 1 from {_gametime}
- if {_gametime} is smaller than 0:
- send "{@tag} &3Time runs out on &6%{_map}%" to all players
- loop all players:
- if "%{MAP::%loop-player%}%" is "%{_map}%":
- teleport loop-player to {LOBBY}
- set {STATUS::%loop-player%} to "left"
- delete {MAP::%loop-player%}
- delete {NR::%loop-player%}
- set {SURVIVALGAMES::%{_map}%::PLAYERS} to 0
- if {_hidetime} is set:
- subtract 1 from {_hidetime}
- if {_hidetime} is smaller or equal to 0:
- loop all players:
- if "%{MAP::%loop-player%}%" is "%{_map}%":
- if loop-player has permission "%{OPTIONS::PERMISSION::HIDE}%":
- reveal loop-player to all players
- send "{@tag} &cWatch out you are visible from now" to loop-player
- delete {INVISIBLE::%loop-player%}
- delete {_hidetime}
- set {SURVIVALGAMES::%{_map}%::TIMER} to 0
- set {SURVIVALGAMES::%{_map}%::PLAYERS} to 0
- set {SURVIVALGAMES::%{_map}%::STATUS} to "restarting"
- loop {SURVIVALGAMES::%{_map}%::PLACE::*}:
- set {SURVIVALGAMES::%{_map}%::PLACE::%loop-index%} to "false"
- loop all players:
- if "%{MAP::%loop-player%}%" is "%{_map}%":
- set {STATUS::%loop-player%} to "left"
- send "{@tag} &6%loop-player% &5won map &b%{_map}%" to all players
- delete {MAP::%loop-player%}
- delete {NR::%loop-player%}
- add 1 to {WINS::%loop-player%}
- send "{@tag} &aReward of %{OPTIONS::WIN}% money for winning the game." to loop-player
- if {OPTIONS::WIN} is set:
- add {OPTIONS::WIN} to {MONEY::%loop-player%}
- wait 5 tick
- teleport loop-player to {LOBBY}
- if "%{SURVIVALGAMES::%{_map}%::MODE}%" is "survival" or "hardcore":
- send "{@tag} &6Restarting of map &b%{_map}%" to all players
- loop {SURVIVLGAMES::%{_map}%::LISTOFPLAYERS::*}:
- delete {SURVIVLGAMES::%{_map}%::LISTOFPLAYERS::%loop-index%}
- set {PROGRESS::%{_map}%::PLACED} to size of {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::*}
- set {PROGRESS::%{_map}%::BREAK} to size of {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::*}
- loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
- set {_newindex} to "%loop-index%"
- set {_new} to {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index%}
- loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
- if {_newindex} is not "%loop-index-2%":
- if distance between {_new} and {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index-2%} is smaller than 5:
- delete {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index-2%}
- loop all entities:
- if "%loop-entity%" is "dropped item":
- loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
- if distance between loop-entity and {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index%} is smaller than 25:
- clear loop-entity
- wait 1 tick
- loop {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::*}:
- set block at location of {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::%loop-index%} to air
- delete {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::%loop-index%}
- wait 1 tick
- loop {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::*}:
- set block at location of {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::%loop-index%} to {SURVIVALGAMES::%{_map}%::BREAKBLOCKSTYPE::%loop-index%}
- delete {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::%loop-index%}
- delete {SURVIVALGAMES::%{_map}%::BREAKBLOCKSTYPE::%loop-index%}
- wait 1 tick
- loop {SURVIVALGAMES::%{_map}%::CHEST::*}:
- wait 1 tick
- delete {SURVIVALGAMES::%{_map}%::CHEST::%loop-index%}
- delete {PROGRESS::%{_map}%::PLACED}
- delete {PROGRESS::%{_map}%::BREAK}
- loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
- delete {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index%}
- set {SURVIVALGAMES::%{_map}%::STATUS} to "waiting"
- send "{@tag} &6Map &b%{_map}% &6is been restarted" to all players
- # {PROGRESS::%{_map}%::DROPPEDITEMS}
- # {PROGRESS::%{_map}%::PLACED}
- # {PROGRESS::%{_map}%::BREAK}
- #SurvivalGames
- #{SURVIVALGAMES::%arg 2%}
- #{SURVIVALGAMES::%arg 2%::NRSPAWN}
- #{SURVIVALGAMES::%arg 2%::SPAWN::*}
- #{SURVIVALGAMES::%arg 2%::PLACE::*}
- #{SURVIVALGAMES::%arg 2%::STATUS} restarting/started/waiting
- #{SURVIVALGAMES::%arg 2%::TIMER}
- #{SURVIVALGAMES::%arg 1%::PLAYERS}
- #{SURVIVALGAMES::%{MAP::%player%}%::CHEST::*}
- #{SURVIVALGAMES::%Map%::BREAKBLOCKS::%location of event-block%}
- #{SURVIVALGAMES::%Map%::PLACEBLOCKS::%location of event-block%}
- #{SURVIVALGAMES::%Map%::BREAKBLOCKSTYPE::%location of event-block%}
- #{SURVIVALGAMES::%arg 2%::INGAME::*} NICKI GRACZY WAZNE DO LOOPOWANIA
- #{STATUS::%player%} "waiting"/
- #{NR::%player%} nuber of spawn of player
- #{MAP::%player%} map
- #{KILLS::%player%}
- #{DEATHS::%player%}
- #{MONEY::%player%}
- #{GAMESPLAYED::%player%}
- #{WINS::%player%}
- #{INVISIBLE::%loop-player%} invisilbe time
- #{VOTE::%player%}
- #{CLASSPREFIX::%player%}
- #{CLASSPRICE::%name%::LVL::%lvl%} Price amount
- #{CLASSITEMS::%Name%::LVL::%Lvl of class%::%Numer%} Variable of items
- #{CLASS::%Name%} name of class
- #{CLASSLVL::%name%}
- #{OPTIONS::WIN}
- #{OPTIONS::KILL} XXX
- #{OPTIONS::DEATH}
- #{OPTIONS::TIMESTART}
- #{OPTIONS::MINPLAYERS}
- #{OPTIONS::HIDETIME}
- #{OPTIONS::PERMISSION::HIDE}
- #{OPTIONS::DROPS::MIN}
- #{OPTIONS::DROPS::MAX}
- #{OPTIONS::STARTVOTE}
- #{OPTIONS::PERMISSION::PREFIXVIP}
- #{OPTIONS::PERMISSION::BONUS} bonus for vip
- #if type of item is diamond:
- #add 1 glowing diamond to the player
- #{SURVIVALGAMES::%arg 4%::DROPS::%arg 3%}
- #{DROPS::%arg 4%}
- #{SURVIVLGAMES::%arg 2%::LISTOFPLAYERS::%player%} list of all players in the map
- #set slot 0 of player to 1 diamond sword
- #add {ITEMSDROP::%{_dropname}%::TYPE::%loop-index%} to slot 20 of event-block
- #set slot 20 of event-block to {ITEMSDROP::%{_dropname}%::TYPE::%loop-index%}
- #{SURVIVALGAMES::%{MAP::%player%}%::DROPPEDITEMS::*}
- command /survivalgames [<string>] [<string>] [<string>] [<string>] [<string>] [<string>]:
- aliases: sg
- trigger:
- if player is op:
- if arg 1 is not set:
- send "&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f=&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f"
- send "&8* &4/&csg &2create &7[&aMap&7]"
- send "&8* &4/&csg &2addspawn &7[&aMap&7]"
- send "&8* &4/&csg &2mode &7[&aMap&7] &6normal&8/&6Survival&8/&6hardcore"
- send "&8* &4/&csg &2drop &7[&6add&7/&6remove&7/&6list&7] &7[&aMap&7] &7[&aFile.yml&7] "
- send "&8* &4/&csg &cdelete &7[&aMap&7]"
- send "&8* &4/&csg &einfo &7[&aMap&7]"
- send "&8* &4/&csg &elist"
- send "&8* &4/&csg &6setlobby"
- send "&8* &4/&csg &6load/unload/reload &7[&afile.yaml&7]"
- send "&8* &4/&csg &9class"
- send "&8* &4/&csg &9options"
- send "&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f=&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f"
- if arg 1 is "create":
- if arg 2 is set:
- if {SURVIVALGAMES::%arg 2%} is not set:
- set {SURVIVALGAMES::%arg 2%::MODE} to "normal"
- set {SURVIVALGAMES::%arg 2%::PLAYERS} to 0
- set {SURVIVALGAMES::%arg 2%::STATUS} to "waiting"
- set {SURVIVALGAMES::%arg 2%::TIMER} to 0
- set {SURVIVALGAMES::%arg 2%} to "%arg 2%"
- send "{@tag} &2Success fully created map &5%arg 2%"
- loop {DROPS::*}:
- set {SURVIVALGAMES::%arg 2%::DROPS::%loop-value%} to "%loop-value%"
- exit loop
- #loop 100 times:
- #Amout of maps numbers
- else:
- send "{@tag} &cThis map allready exist's"
- else:
- send "{@tag} &cThere is no second [Map] argument found"
- if arg 1 is "addspawn":
- if arg 2 is set:
- if {SURVIVALGAMES::%arg 2%} is set:
- add 1 to {SURVIVALGAMES::%arg 2%::NRSPAWN}
- set {SURVIVALGAMES::%arg 2%::SPAWN::%{SURVIVALGAMES::%arg 2%::NRSPAWN}%} to location of player
- set {SURVIVALGAMES::%arg 2%::PLACE::%{SURVIVALGAMES::%arg 2%::NRSPAWN}%} to "false"
- send "{@tag} &2Spawn number &a%{SURVIVALGAMES::%arg 2%::NRSPAWN}% &3is been set"
- else:
- send "{@tag} &cThere is no %arg 2% map found in variable list"
- else:
- send "{@tag} &cThere is no second [Map] argument found"
- if arg 1 is "drop":
- if arg 2 is "add":
- if arg 3 is set:
- if {SURVIVALGAMES::%arg 3%} is set:
- if arg 4 is set:
- if {DROPS::%arg 4%} is set:
- set {SURVIVALGAMES::%arg 3%::DROPS::%arg 4%} to "%arg 4%"
- send "&cThe drop is been added to the drops list of map %arg 3%"
- send "&cCheck the drop using the command /sg drop list %arg 3%"
- else:
- send "{@tag} &cThe yaml is not found plase check /sg drop list"
- else:
- send "{@tag} &cMissing yaml file 4th argument"
- else:
- send "{@tag} &cThere is no %arg 3% map found in variable list"
- else:
- send "{@tag} &cThere is no [Map] argument found"
- else if arg 2 is "list":
- if arg 3 is set:
- if {SURVIVALGAMES::%arg 3%} is set:
- if {SURVIVALGAMES::%arg 3%::DROPS::*} is not empty:
- send "&c---------------------------------"
- loop {SURVIVALGAMES::%arg 3%::DROPS::*}:
- send "&4+ &7%loop-value-1%&a.yml"
- send "&c---------------------------------"
- else:
- send "&cNo drops found the chests in game will be empty!"
- else:
- send "{@tag} &cThere is no %arg 3% map found in variable list"
- else:
- if {DROPS::*} is empty:
- send "&cNo drops loaded yet"
- stop
- send "&c---------------------------------"
- loop {DROPS::*}:
- send "&4+ &7%loop-value-1%&a.yml"
- send "&c---------------------------------"
- else if arg 2 is "remove":
- if arg 3 is set:
- if {SURVIVALGAMES::%arg 3%} is set:
- if arg 4 is set:
- if {SURVIVALGAMES::%arg 3%::DROPS::%arg 4%} is set:
- delete {SURVIVALGAMES::%arg 3%::DROPS::%arg 4%}
- send "&cThe drop is been removed from %arg 3% map"
- send "&cCheck the drop using the command /sg drop list %arg 3%"
- else:
- send "{@tag} &cThe yaml is not found plase check /sg drop list"
- else:
- send "{@tag} &cMissing yaml file 4th argument"
- else:
- send "{@tag} &cThere is no %arg 3% map found in variable list"
- else:
- send "{@tag} &cThere is no [Map] argument found"
- else if arg 2 is not set:
- send "{@tag} &cCorrect command usage add/list/remove"
- if arg 1 is "mode":
- if arg 2 is set:
- if {SURVIVALGAMES::%arg 2%} is set:
- if arg 3 is "normal" or "survival":
- set {SURVIVALGAMES::%arg 2%::MODE} to "%arg 3%"
- send "&e[&2Survival&3Games&e]&c>> &2%arg 3% &aMode &3selected"
- if arg 3 is "survival":
- wait 10 tick
- send " &c>> The player's can now place and break blocks"
- send " &c>> Don't worry after game end the map will be restarted"
- send " &c>> and will look like new"
- else if arg 3 is "hardcore":
- send "&e[&2Survival&3Games&e]&c>> &2%arg 3% &aMode &3selected"
- wait 10 tick
- send " &c>> the mode is very hard player's will allways by hunger"
- set {SURVIVALGAMES::%arg 2%::MODE} to "%arg 3%"
- else:
- send "{@tag} mode is no anvalibe"
- else:
- send "{@tag} &cThere is no %arg 2% map found in variable list"
- else:
- send "{@tag} &cThere is no second [Map] argument found"
- if arg 1 is "delete":
- if arg 2 is set:
- if {SURVIVALGAMES::%arg 2%} is set:
- loop {SURVIVALGAMES::%arg 2%::SPAWN::*}:
- delete {SURVIVALGAMES::%arg 2%::SPAWN::%loop-index%}
- delete {SURVIVALGAMES::%arg 2%::PLACE::%loop-index%}
- loop {SURVIVALGAMES::%{MAP::%player%}%::CHEST::*}:
- delete {SURVIVALGAMES::%arg 2%::CHEST::%loop-index%}
- delete {SURVIVALGAMES::%arg 2%}
- delete {SURVIVALGAMES::%arg 2%::PLAYERS}
- delete {SURVIVALGAMES::%arg 2%::NRSPAWN}
- delete {SURVIVALGAMES::%arg 2%::STATUS}
- delete {SURVIVALGAMES::%arg 2%::TIMER}
- delete {SURVIVALGAMES::%arg 2%::MODE}
- loop {DROPS::*}:
- delete {SURVIVALGAMES::%arg 2%::DROPS::%loop-value%}
- send "&cDeleted %arg 2%"
- else:
- send "{@tag} &cThere is no %arg 2% map found in variable list"
- else:
- send "{@tag} &cThere is no second [Map] argument found"
- if arg 1 is "info":
- if arg 2 is set:
- if {SURVIVALGAMES::%arg 2%} is set:
- send "&c======================================="
- send "&4&l + &7Map : &9%arg 2%"
- send "&4&l + &7Slots : &9%{SURVIVALGAMES::%arg 2%::NRSPAWN}%"
- send "&4&l + &7Players : &9%{SURVIVALGAMES::%arg 2%::PLAYERS}%"
- send "&4&l + &7Mode : &9%{SURVIVALGAMES::%arg 2%::MODE}%"
- send "&4&l + &7Status : &9%{SURVIVALGAMES::%arg 2%::STATUS}%"
- if {SURVIVALGAMES::%arg 2%::STATUS} is "restarting":
- set {_dropped} to size of {SURVIVALGAMES::%arg 2%::DROPPEDITEMS::*}
- set {_placed} to size of {SURVIVALGAMES::%arg 2%::PLACEBLOCKS::*}
- set {_broken} to size of {SURVIVALGAMES::%arg 2%::BREAKBLOCKS::*}
- send "&4&l + &7restart of dropped items : &9%{_dropped}%"
- send "&4&l + &7restart progress of placed blocks : &9%{_placed}%/%{PROGRESS::%arg 2%::PLACED}%"
- send "&4&l + &7restart progress of broken blocks : &9%{_broken}%/%{PROGRESS::%arg 2%::BREAK}%"
- send "&c======================================="
- else:
- send "{@tag} &cThere is no %arg 2% map found in variable list"
- else:
- send "{@tag} &cThere is no second [Map] argument found"
- if arg 1 is "list":
- if {SURVIVALGAMES::*} is not empty:
- send "&c_=++++++*&4( &eMaps &4)&c*++++++=_"
- loop {SURVIVALGAMES::*}:
- add 1 to {_maps}
- send "&8[*&7> &d%loop-index%"
- send "&c_=++++*&4( &eAmount&6(&e%{_maps}%&6) &4)&c*++++=_"
- else:
- send "&cThere are no maps created yet!"
- if arg 1 is "setlobby":
- set {LOBBY} to location of player
- send "&6All player's will spawn here when game end"
- if arg 1 is "load":
- if arg 2 is set:
- send "&cloading..> %arg 2%.yml"
- loop {ITEMSDROP::%arg 2%::TYPE::*}:
- delete {ITEMSDROP::%arg 2%::TYPE::%loop-index%}
- loop 50 times:
- set {_errorname} to false
- set {_line} to size of {ITEMSDROP::%arg 2%::TYPE::*}
- add 1 to {_line}
- if {_errorffix} is set:
- add {_errorffix} to {_line}
- set {_type} to yaml value "%{_line}%.type" from file "%arg 2%.yml"
- wait 2 tick
- set {_S::%loop-number%} to yaml value "%{_line}%.type" from file "%arg 2%.yml"
- if {_S::%loop-number%} is not set:
- set {_end} to true
- if {_end} is set:
- exit loop
- loop {ITEMSDROP::%arg 2%::TYPE::*}:
- if {_type} is "%{ITEMSDROP::%arg 2%::TYPE::%loop-index%}%":
- if {_line} is not "%loop-index%":
- send "&9[&cLoad&9Mode] &7Name Conflict detected it can fake the real drops chance please check Lines : &7(&eLine: &6%{_line}%&7)&eId: &6%{_type}%&7)&7 and (&eLine: &6%loop-index%&7)&eId: &6%{ITEMSDROP::%arg 2%::TYPE::%loop-index%}%&7)"
- add "%{ITEMSDROP::%arg 2%::TYPE::%loop-index%}%" to {_OLDERRORS::*}
- set {ITEMSDROP::%arg 2%::TYPE::%loop-index%} to "error272"
- exit loop
- if {_errorname} is false:
- set {_chance} to yaml value "%loop-number%.chance" from file "%arg 2%.yml"
- set {_min} to yaml value "%loop-number%.min" from file "%arg 2%.yml"
- set {_max} to yaml value "%loop-number%.max" from file "%arg 2%.yml"
- set {_times} to yaml value "%loop-number%.times" from file "%arg 2%.yml"
- wait 2 tick
- set {ITEMSDROP::%arg 2%::TYPE::%{_line}%} to "%{_type}%" parsed as item
- set {_chance} to "%{_chance}%" parsed as number
- set {ITEMSDROP::%arg 2%::CHANCE::%{_line}%} to "%{_chance} * 0.1%" parsed as number
- set {ITEMSDROP::%arg 2%::MIN::%{_line}%} to "%{_min}%" parsed as number
- set {ITEMSDROP::%arg 2%::MAX::%{_line}%} to "%{_max}%" parsed as number
- if {_times} is set:
- set {_times} to "%{_times}%" parsed as number
- if {_times} is greater or equal to 2:
- subtract 1 from {_times}
- loop {_times} times:
- send "%loop-number-2%"
- add "%{_type}%" to {_ITEMTYPE::*}
- add "%{_chance} * 0.1%" to {_CHANCE::*}
- add "%{_min}%" to {_MIN::*}
- add "%{_max}%" to {_MAX::*}
- delete {_times}
- if "%{ITEMSDROP::%arg 2%::TYPE::%{_line}%}%" is "none" or "<none>":
- send "&9[&cLoad&9Mode] &7Loading error of &7((&eLine: &6%{_line}%&7)&eId: &6%{_type}%&7)"
- add 1 to {_errorffix}
- subtract 1 from {_line}
- if {_line} is 0:
- send " "
- wait 5 tick
- send "&cFile not found make sure you using the right method."
- send "&cGood : &7ChestDrop.yml&c Bad : &7chestdrop.yml"
- stop
- loop {_OLDERRORS::*}:
- loop {ITEMSDROP::%arg 2%::TYPE::*}:
- if {ITEMSDROP::%arg 2%::TYPE::%loop-index-2%} is "error272":
- set {ITEMSDROP::%arg 2%::TYPE::%loop-index-2%} to "%loop-value-1%" parsed as item
- exit loop
- set {DROPS::%arg 2%} to "%arg 2%"
- loop {_ITEMTYPE::*}:
- loop 1000 times:
- if {ITEMSDROP::%arg 2%::TYPE::%loop-number%} is not set:
- set {ITEMSDROP::%arg 2%::TYPE::%loop-number%} to "%{_ITEMTYPE::%loop-index%}%" parsed as item
- set {ITEMSDROP::%arg 2%::CHANCE::%loop-number%} to "%{_CHANCE::%loop-index%}%" parsed as number
- set {ITEMSDROP::%arg 2%::MIN::%loop-number%} to "%{_MIN::%loop-index%}%" parsed as number
- set {ITEMSDROP::%arg 2%::MAX::%loop-number%} to "%{_MAX::%loop-index%}%" parsed as number
- send "%{ITEMSDROP::%arg 2%::TYPE::%loop-number%}%/%{ITEMSDROP::%arg 2%::CHANCE::%loop-number%}%/%{ITEMSDROP::%arg 2%::MIN::%loop-number%}%/%{ITEMSDROP::%arg 2%::MAX::%loop-number%}%"
- exit loop
- if {_errorffix} is not set:
- send "&2SurvivalGames successfully loaded! %{_line}% items."
- else:
- set {_errorffix} to "%{_line} - {_errorffix}%"
- send "&2SurvivalGames successfully loaded! &c%{_errorffix}%&7/&c%{_line}% &2items."
- send "&c%{ITEMSDROP::%arg 2%::TYPE::*}%"
- else:
- send "{@tag} &cSecond argument is missing [arg 2].yml"
- if arg 1 is "unload":
- if arg 2 is set:
- if {DROPS::%arg 2%} is set:
- loop {SURVIVALGAMES::*}:
- delete {SURVIVALGAMES::%loop-index%::DROPS::%arg 2%}
- loop {ITEMSDROP::%arg 2%::TYPE::*}:
- delete {ITEMSDROP::%arg 2%::TYPE::%loop-index%}
- delete {ITEMSDROP::%arg 2%::CHANCE::%loop-index%}
- delete {ITEMSDROP::%arg 2%::MIN::%loop-index%}
- delete {ITEMSDROP::%arg 2%::MAX::%loop-index%}
- delete {DROPS::%arg 2%}
- send "&2Successfully unloaded &7%arg 2%&a.yml"
- else:
- send "{@tag} &cNo %arg 2%.yml found please check /sg drop list OR the files"
- else:
- send "{@tag} &cThere is no second [argument] .yml found"
- if arg 1 is "reload":
- send "{@tag} &2Reloading config.yml file"
- wait 1 tick
- set {_minplayers} to yaml value "minplayers" from file "config.yml"
- set {_timestart} to yaml value "timestart" from file "config.yml"
- set {_kill} to yaml value "kill" from file "config.yml"
- set {_death} to yaml value "death" from file "config.yml"
- set {_win} to yaml value "win" from file "config.yml"
- set {_hidetime} to yaml value "hidetime" from file "config.yml"
- set {_hidepermission} to yaml value "hidepermission" from file "config.yml"
- set {_dropmin} to yaml value "dropmin" from file "config.yml"
- set {_dropmax} to yaml value "dropmax" from file "config.yml"
- set {_startvote} to yaml value "startvote" from file "config.yml"
- set {_prefixvip} to yaml value "prefixvip" from file "config.yml"
- set {_gametime} to yaml value "gametime" from file "config.yml"
- set {_vipbonus} to yaml value "vipbonus" from file "config.yml"
- wait 2 tick
- set {OPTIONS::MINPLAYERS} to "%{_minplayers}%" parsed as number
- set {OPTIONS::TIMESTART} to "%{_timestart}%" parsed as number
- set {OPTIONS::KILL} to "%{_kill}%" parsed as number
- set {OPTIONS::DEATH} to "%{_death}%" parsed as number
- set {OPTIONS::WIN} to "%{_win}%" parsed as number
- set {OPTIONS::HIDETIME} to "%{_hidetime}%" parsed as number
- set {OPTIONS::PERMISSION::HIDE} to "%{_hidepermission}%" parsed as string
- set {OPTIONS::DROPS::MIN} to "%{_dropmin}%" parsed as number
- set {OPTIONS::DROPS::MAX} to "%{_dropmax}%" parsed as number
- set {OPTIONS::STARTVOTE} to "%{_startvote} / 100%" parsed as number
- set {OPTIONS::PERMISSION::PREFIXVIP} to "%{_prefixvip}%" parsed as string
- set {OPTIONS::GAMETIME} to "%{_gametime}%" parsed as number
- set {OPTIONS::PERMISSION::BONUS} to "%{_vipbonus}%" parsed as string
- wait 3 second
- loop 10 times:
- set {_rank} to yaml value "ranks.%loop-number%" from file "config.yml"
- wait 2 tick
- set {RANKSYSTEM::%loop-number%} to "%{_rank}%" parsed as number
- loop all players:
- if {KILLS::%loop-player%} is "none" or "<none>":
- set {KILLS::%loop-player%} to 0
- if {DEATHS::%loop-player%} is "none" or "<none>":
- set {DEATHS::%loop-player%} to 0
- if {MONEY::%loop-player%} is "none" or "<none>":
- set {MONEY::%loop-player%} to 0
- if {GAMESPLAYED::%loop-player%} is "none" or "<none>":
- set {GAMESPLAYED::%loop-player%} to 0
- if {WINS::%loop-player%} is "none" or "<none>":
- set {WINS::%loop-player%} to 0
- send "{@tag} &2Successfully reloaded the config file!"
- if arg 1 is "class":
- if arg 2 is not set:
- send "&1=============================================="
- send "&9/sg class &3create &b[Name]"
- send "&9/sg class &3additems &b[Name]"
- send "&9/sg class &3changeitems &b[Name] &7[ClassLVL]"
- send "&9/sg class &3setprice &b[Name] &7[ClassLVL] &e[Price]"
- send "&9/sg class &3list"
- send "&9/sg class &cdelete &b[Name]"
- send "&1=============================================="
- if arg 2 is "create":
- if arg 3 is set:
- if {CLASS::%arg 3%} is not set:
- set {CLASS::%arg 3%} to arg 3
- send "&9[Class] &3New class created &b(%arg 3%)"
- else:
- send "&9[Class] &c%arg 3% is allready created!"
- else:
- send "&9[Class] &c/sg create &c&l[Name of class]"
- if arg 2 is "setprice":
- if arg 3 is set:
- if {CLASS::%arg 3%} is set:
- if arg 4 is not "1":
- if arg 5 is set:
- if {CLASSITEMS::%arg 3%::LVL::%arg 4%::*} is set:
- set {CLASSPRICE::%arg 3%::LVL::%arg 4%} to "%arg 5%" parsed as number
- send "&9[Class] &3Price player needs to pay &e%arg 5% &3to buy the class"
- send "&9[Class] &3for class : &b((&9%arg 3%&b)&aLvl:&2%arg 4%&b)"
- else:
- send "&9[Class] &c/sg class setprice [Name of class] &c&l[class lvl] &c[Amount of money]"
- else:
- send "&9[Class] &c/sg class setprice [Name of class] [class lvl] &c&l[Amount of money]"
- else:
- send "&9[Class] &cYou can't price class with lvl:1"
- else:
- send "&9[Class] &cClass %arg 3% is not created yet"
- else:
- send "&9[Class] &c/sg class setprice &c&l[Name of class] &c[Class lvl] [Amount of money]"
- if arg 2 is "additems":
- if arg 3 is set:
- if {CLASS::%arg 3%} is set:
- add 1 to {CLASSLVL::%arg 3%}
- loop all items in player's inventory:
- add 1 to {_int}
- set {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%{_int}%} to "%loop-item%"
- set {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%{_int}%} to "%{CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%{_int}%}%" parsed as item
- remove loop-item from player's inventory
- if {_int} is not set:
- send "&9[Class] &cNo items in inventory."
- subtract 1 from {CLASSLVL::%arg 3%}
- stop
- send "&9[Class] &3New items for class &b(%arg 3%) &3are added"
- send "&9[Class] &3Class lvl : %{CLASSLVL::%arg 3%}%"
- else:
- send "&9[Class] &cClass %arg 3% is not created yet"
- else:
- send "&9[Class] &c/sg class additems &c&l[Name of class]"
- if arg 2 is "changeitems":
- if arg 3 is set:
- if {CLASS::%arg 3%} is set:
- if arg 4 is set:
- if {CLASSITEMS::%arg 3%::LVL::%arg 4%::*} is set:
- loop {CLASSITEMS::%arg 3%::LVL::%arg 4%::*}:
- add "%{CLASSITEMS::%arg 3%::LVL::%arg 4%::%loop-index%}%" to {_old::*}
- delete {CLASSITEMS::%arg 3%::LVL::%arg 4%::%loop-index%}
- wait 1 tick
- loop all items in player's inventory:
- add 1 to {_int}
- set {CLASSITEMS::%arg 3%::LVL::%arg 4%::%{_int}%} to "%loop-item%"
- set {CLASSITEMS::%arg 3%::LVL::%arg 4%::%{_int}%} to "%{CLASSITEMS::%arg 3%::LVL::%arg 4%::%{_int}%}%" parsed as item
- remove loop-item from player's inventory
- if {_int} is not set:
- send "&9[Class] &cNo items in inventory."
- loop {_old::*}:
- set {CLASSITEMS::%arg 3%::LVL::%arg 4%::%loop-index%} to "%loop-value%" parsed as item
- stop
- send "&9[Class] &3Items for class &b(%arg 3%) &3are changed"
- send "&9[Class] &3Class lvl : %arg 4%"
- else:
- send "&9[Class] &cClass lvl: %arg 4% is not set"
- else:
- send "&9[Class] &cLvl argument is missed"
- else:
- send "&9[Class] &cClass %arg 3% is not created yet"
- else:
- send "&9[Class] &c/sg class changeitems &c&l[Name of class]"
- if arg 2 is "delete":
- if arg 3 is set:
- if {CLASS::%arg 3%} is set:
- loop {CLASSLVL::%arg 3%} times:
- loop {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::*}:
- delete {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%loop-index%}
- loop {CLASSPRICE::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::*}:
- delete {CLASSPRICE::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%loop-index%}
- subtract 1 from {CLASSLVL::%arg 3%}
- delete {CLASSLVL::%arg 3%}
- delete {CLASS::%arg 3%}
- send "&9[Class] &cDeleted class %arg 3%"
- else:
- send "&9[Class] &cClass %arg 3% is not created yet"
- else:
- send "&9[Class] &c/sg class delete &c&l[Name of class]"
- if arg 2 is "list":
- if {CLASS::*} is empty:
- send "&9[Class] &cThe class list is empty"
- stop
- loop {CLASS::*}:
- send "&9[Class] - &b%loop-index%"
- if arg 1 is "options" or "option" or "settings":
- if arg 2 is not set:
- send "&2========================================"
- send "&3&l- &7/options economy"
- send "&3&l- &7/options game"
- send "&3&l- &7/options permission"
- send "&3&l- &7/options drop"
- send "&2========================================"
- if arg 2 is "economy" or "eco":
- if arg 3 is not set:
- send "&4/options &c eco kill"
- send "&4/options &c eco death"
- send "&4/options &c eco win"
- if arg 3 is "kill":
- if arg 4 parsed as number is not set:
- send "&4/options &ceco kill &7<[&cAmount of money&7]>"
- send "&7 - The reward in money for killing a player"
- else:
- set {OPTIONS::KILL} to "%arg 4%" parsed as number
- send "&c[Options] Economy is updated."
- if arg 3 is "death":
- if arg 4 parsed as number is not set:
- send "&4/options &ceco death &7<[&cAmount of money&7]>"
- send "&7 - The amount of money victim will lose when he die"
- else:
- set {OPTIONS::DEATH} to "%arg 4%" parsed as number
- send "&c[Options] Economy is updated."
- if arg 3 is "win":
- if arg 4 parsed as number is not set:
- send "&4/options &ceco win &7<[&cAmount of money&7]>"
- send "&7 - The reward in money for winning the game"
- else:
- set {OPTIONS::WIN} to "%arg 4%" parsed as number
- send "&c[Options] Economy is updated."
- if arg 2 is "game":
- if arg 3 is not set:
- send "&4/options &c game gametime"
- send "&4/options &c game timestart"
- send "&4/options &c game players"
- send "&4/options &c game invisible"
- send "&4/options &c game votes"
- if arg 3 is "timestart":
- if arg 4 parsed as number is not set:
- send "&4/options &cgame timestart &7<[&cTime to start&7]>"
- send "&7 - waiting time to start the game"
- else:
- set {OPTIONS::TIMESTART} to "%arg 4%" parsed as number
- send "&c[Options] Game is updated."
- if arg 3 is "players":
- if arg 4 parsed as number is not set:
- send "&4/options &cgame players &7<[&cAmount of players&7]>"
- send "&7 - The minimum amount of players to start the game"
- else:
- set {OPTIONS::MINPLAYERS} to "%arg 4%" parsed as number
- send "&c[Options] Game is updated."
- if arg 3 is "invisible":
- if arg 4 parsed as number is not set:
- send "&4/options &cgame invisible &7<[&cTime in seconds&7]>"
- send "&7 - The time in seconds vip will be invisible at start of the game. set it to 0 to disable this function"
- else:
- set {OPTIONS::HIDETIME} to "%arg 4%" parsed as number
- send "&c[Options] Game is updated."
- if arg 3 is "votes" or "vote":
- if arg 4 parsed as number is not set:
- send "&4/options &cgame votes &7<[&cProcentage between 0-100&7]>"
- send "&7 - The procentage of votes that need to be reached to start the game"
- else:
- set {_int} to "%arg 4%" parsed as number
- set {OPTIONS::STARTVOTE} to "%{_int} / 100%" parsed as number
- send "&c[Options] Game is updated."
- if arg 3 is "gametime":
- if arg 4 parsed as number is not set:
- send "&4/options &cgame gametime &7<[&cTime to end the game&7]>"
- send "&7 - When the time end game will be automaticly restarted and no one will win"
- else:
- set {OPTIONS::GAMETIME} to "%arg 4%" parsed as number
- send "&c[Options] Game is updated."
- if arg 2 is "permission":
- if arg 3 is not set:
- send "&4/options &c permission invisible"
- send "&4/options &c permission prefixvip"
- send "&4/options &c permission vipbonus"
- if arg 3 is "invisible":
- if arg 4 parsed as string is not set:
- send "&4/options &cpermission invisible &7<[&cPermission&7]>"
- send "&7 - The permission player will need to be invisible at start of the game"
- else:
- set {OPTIONS::PERMISSION::PREFIXVIP} to "%arg 4%" parsed as string
- send "&c[Options] Game is updated."
- if arg 3 is "prefixvip":
- if arg 4 parsed as string is not set:
- send "&4/options &cpermission prefixvip &7<[&cPermission&7]>"
- send "&7 - The permission player will need to get the prefix of a vip on chat"
- else:
- set {OPTIONS::PERMISSION::PREFIXVIP} to "%arg 4%" parsed as string
- send "&c[Options] Game is updated."
- if arg 3 is "vipbonus":
- if arg 4 parsed as string is not set:
- send "&4/options &cpermission vipbonus &7<[&cPermission&7]>"
- send "&7 - The permission player will need to get X2 more money for killing a player"
- else:
- set {OPTIONS::PERMISSION::BONUS} to "%arg 4%" parsed as string
- send "&c[Options] Game is updated."
- if arg 2 is "drop":
- if arg 3 is not set:
- send "&4/options &c drop minimum"
- send "&4/options &c drop maximum"
- if arg 3 is "minimum" or "min":
- if arg 4 parsed as number is not set:
- send "&4/options &cdrop minimum &7<[&cThe minimum drops&7]>"
- send "&7 - The minimum amount of drops can spawn in a chest"
- else:
- set {OPTIONS::DROPS::MAX} to "%arg 4%" parsed as number
- send "&c[Options] Game is updated."
- if arg 3 is "maximum" or "max":
- if arg 4 parsed as number is not set:
- send "&4/options &cdrop maximum &7<[&cThe maximum drops&7]>"
- send "&7 - The maximum amount of drops can spawn in a chest"
- else:
- set {OPTIONS::DROPS::MIN} to "%arg 4%" parsed as number
- send "&c[Options] Game is updated."
- command /vote [<string>]:
- trigger:
- if arg 1 is not set:
- send "{@tag} &cvote start &7- to start the game faster"
- if arg 1 is "start":
- if {STATUS::%player%} is "waiting":
- if {SURVIVALGAMES::%{MAP::%player%}%::STATUS} is "waiting":
- if {VOTE::%player%} is not set:
- if {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS} is greater than 1:
- set {VOTE::%player%} to "%{MAP::%player%}%"
- loop {VOTE::*}:
- if "%loop-value%" is "%{MAP::%player%}%":
- add 1 to {_votes}
- set {_wynik} to "%{_votes} / {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%" parsed as number
- #send "{@tag} &2Players voted for start &a%{_votes}%&7/&a%{SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%"
- set {_procentage2} to "%{OPTIONS::STARTVOTE} * 10%"
- replace all "." with "" in {_procentage2}
- set {_procentage1} to "%{_wynik} * 10%"
- replace all "." with "" in {_procentage1}
- if {_procentage1} is "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "10":
- set {_procentage1} to "%{_procentage1}%0"
- send "{@tag} &2Players voted for start &c%{_procentage1}%&7/&c%{_procentage2}% &aProcent."
- if {_wynik} is greater or equal to {OPTIONS::STARTVOTE}:
- execute console command "gamecontrol %{OPTIONS::TIMESTART}% %{MAP::%player%}%"
- else:
- send "{@tag} &cYou are allone in the game need at least 2 player to vote for start"
- else:
- send "{@tag} &cAllready voted for start of the game."
- else:
- send "{@tag} &cOnly vote for start while waiting in the game"
- else:
- send "{@tag} &cOnly vote for start while waiting in the game"
- on hunger bar change:
- if {STATUS::%player%} is "hardcore":
- if player's food level is greater than 8:
- set player's food level to 8
- if {STATUS::%player%} is "waiting" or "starting":
- cancel event
- command /join [<string>]:
- trigger:
- arg 1 is not set:
- send "{@tag} &2/join &7[&aMap&7]"
- if "%{STATUS::%player%}%" is not "waiting" or "survival" or "normal" or "hardcore":
- if {SURVIVALGAMES::%arg 1%} is set:
- if "%{SURVIVALGAMES::%arg 1%::STATUS}%" is "off" or "waiting" or "starting":
- set {_space} to "%{SURVIVALGAMES::%arg 1%::PLAYERS} + 1%"
- if {SURVIVALGAMES::%arg 1%::SPAWN::%{_space}%} is set:
- loop {SURVIVALGAMES::%arg 1%::PLACE::*}:
- if "%loop-value%" is "false":
- set player's health to 10
- set {_map} to arg 1
- set {_player} to the player
- add 1 to {SURVIVALGAMES::%arg 1%::PLAYERS}
- teleport player to {SURVIVALGAMES::%arg 1%::SPAWN::%loop-index%}
- set {SURVIVLGAMES::%arg 1%::LISTOFPLAYERS::%player%} to "%player%" parsed as player
- set {SURVIVALGAMES::%arg 1%::PLACE::%loop-index%} to "true"
- set {NR::%player%} to "%loop-index%"
- set {STATUS::%player%} to "waiting"
- set {MAP::%player%} to arg 1
- clear player's inventory
- loop {SURVIVLGAMES::%arg 1%::LISTOFPLAYERS::*}:
- send "{@tag} &a%player% joind the game &e((&b%arg 1%&e)&a%{SURVIVALGAMES::%arg 1%::PLAYERS}%&e)" to {SURVIVLGAMES::%arg 1%::LISTOFPLAYERS::%loop-index-2%}
- if "%{SURVIVALGAMES::%arg 1%::STATUS}%" is "waiting" or "off":
- if {SURVIVALGAMES::%arg 1%::PLAYERS} is greater or equal to {OPTIONS::MINPLAYERS}:
- execute console command "gamecontrol %{OPTIONS::TIMESTART}% %arg 1%"
- while "%{STATUS::%player%}%" is "waiting":
- wait 2 tick
- teleport player to {SURVIVALGAMES::%arg 1%::SPAWN::%loop-index%}
- display board named "&6>SurvivalGames<" to {_player}
- make score "&6&m&l>----" in board of {_player} to 7
- make score "&eGameStart:&7%{SURVIVALGAMES::%{_map}%::TIMER}%" in board of {_player} to 6
- make score "&6&m&l>---" in board of {_player} to 5
- make score "&ePlayers:&7%{SURVIVALGAMES::%{_map}%::PLAYERS}%" in board of {_player} to 4
- make score "&6&m&l>--" in board of {_player} to 3
- make score "&eMap:&7%{_map}%" in board of {_player} to 2
- make score "&6&m&l>-" in board of {_player} to 1
- move display of {_player} to sidebar
- exit loop
- else:
- send "{@tag} &cMap is full"
- else:
- send "{@tag} &cThe map is curretly running"
- else:
- send "{@tag} &cWrong map"
- else:
- send "{@tag} &cYou allready in game"
- command /leave:
- trigger:
- if {STATUS::%player%} is "waiting":
- subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
- loop {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::*}:
- send "{@tag} %player% left the game &e((&b%{MAP::%player%}%&e)&c%{SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%&e)" to {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%loop-index%}
- delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%player%}
- #send "&aYou left map &e((&b%{MAP::%player%}%&e)&c%{SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%&e)"
- set {SURVIVALGAMES::%{MAP::%player%}%::PLACE::%{NR::%player%}%} to "false"
- set {STATUS::%player%} to "left"
- delete {MAP::%player%}
- delete {NR::%player%}
- wait 5 tick
- teleport player to {LOBBY}
- delete {VOTE::%player%}
- display board named "&6>SurvivalGames<" to player
- make score "&eKills:&c%{KILLS::%player%}%" in board of player to 5
- make score "&eDeaths:&c%{DEATHS::%player%}%" in board of player to 4
- make score "&eMoney:&a%{MONEY::%player%}%" in board of player to 3
- make score "&eWins:&9%{GAMESPLAYED::%player%}%" in board of player to 2
- make score "&eGames:&9%{WINS::%player%}%" in board of player to 1
- move display of player to sidebar
- else:
- send "{@tag} &cYou can't leave the game now!"
- command /info [<player>]:
- aliases: stats
- trigger:
- if arg 1 is not set:
- send "&6-------(&3Stats&6)-------"
- send "&6> &eKills: &c%{KILLS::%player%}%"
- send "&6> &eDeaths: &c%{DEATHS::%player%}%"
- send "&6> &eMoney: &a%{MONEY::%player%}%"
- send "&6> &eWins: &9%{WINS::%player%}%"
- send "&6> &eGames: &9%{GAMESPLAYED::%player%}%"
- send "&6-------(&3Stats&6)-------"
- if arg 1 is set:
- send "&6-------(&3Stats&6)-------"
- send "&6> &eKills: &c%{KILLS::%arg 1%}%"
- send "&6> &eDeaths: &c%{DEATHS::%arg 1%}%"
- send "&6> &eMoney: &a%{MONEY::%arg 1%}%"
- send "&6> &eWins: &9%{WINS::%arg 1%}%"
- send "&6> &eGames: &9%{GAMESPLAYED::%arg 1%}%"
- send "&6-------(&3Stats&6)-------"
- on death:
- if {STATUS::%victim%} is "normal" or "survival" or "hardcore":
- if {STATUS::%attacker%} is "normal" or "survival" or "hardcore":
- if {OPTIONS::KILL} is set:
- if attacker has permission "%{OPTIONS::PERMISSION::BONUS}%":
- set {_new} to "%{OPTIONS::KILL} * 2%" parsed as number
- add {_new} to {MONEY::%attacker%}
- send "{@tag} &aReward of %{_new}% for killing %victim%" to attacker
- else:
- send "{@tag} &aReward of %{OPTIONS::KILL}% for killing %victim%" to attacker
- add {OPTIONS::KILL} to {MONEY::%attacker%}
- if {OPTIONS::DEATH} is set:
- if {OPTIONS::DEATH} is greater than 0:
- subtract {OPTIONS::DEATH} from {MONEY::%victim%}
- send "{@tag} &aLose of %{OPTIONS::DEATH}% money. &cfor death" to victim
- if {MONEY::%victim%} is smaller than 0:
- set {MONEY::%victim%} to 0
- delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%victim%}
- subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
- set {STATUS::%victim%} to "false"
- delete {MAP::%victim%}
- delete {NR::%victim%}
- add 1 to {KILLS::%attacker%}
- add 1 to {DEATHS::%victim%}
- delete {VOTE::%victim%}
- set the death message to "{@tag} &a%attacker% &cKilled &a%victim% &con map &b(&e%{MAP::%attacker%}%&b)"
- if {INVISIBLE::%victim%} is set:
- reveal victim to all players
- delete {INVISIBLE::%victim%}
- strike lightning effect at victim
- add location of victim to {SURVIVALGAMES::%{MAP::%victim%}%::DROPPEDITEMS::*}
- display board named "&6>SurvivalGames<" to victim
- make score "&eKills:&c%{KILLS::%victim%}%" in board of victim to 5
- make score "&eDeaths:&c%{DEATHS::%victim%}%" in board of victim to 4
- make score "&eMoney:&a%{MONEY::%victim%}%" in board of victim to 3
- make score "&eWins:&9%{GAMESPLAYED::%victim%}%" in board of victim to 2
- make score "&eGames:&9%{WINS::%victim%}%" in board of victim to 1
- move display of victim to sidebar
- else:
- delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%victim%}
- set {STATUS::%victim%} to "false"
- subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
- delete {MAP::%victim%}
- delete {NR::%victim%}
- add 1 to {DEATHS::%victim%}
- set the death message to "{@tag} &a%victim% &cdied on map &b(&e%{MAP::%attacker%}%&b)"
- delete {VOTE::%victim%}
- if {INVISIBLE::%victim%} is set:
- reveal victim to all players
- delete {INVISIBLE::%victim%}
- strike lightning effect at victim
- add location of victim to {SURVIVALGAMES::%{MAP::%victim%}%::DROPPEDITEMS::*}
- display board named "&6>SurvivalGames<" to victim
- make score "&eKills:&c%{KILLS::%victim%}%" in board of victim to 5
- make score "&eDeaths:&c%{DEATHS::%victim%}%" in board of victim to 4
- make score "&eMoney:&a%{MONEY::%victim%}%" in board of victim to 3
- make score "&eWins:&9%{GAMESPLAYED::%victim%}%" in board of victim to 2
- make score "&eGames:&9%{WINS::%victim%}%" in board of victim to 1
- move display of victim to sidebar
- on damage:
- if {INVISIBLE::%attacker%} is set:
- send "&cCan't damage other player's while invisible" to attacker
- cancel event
- stop
- on break:
- if {STATUS::%player%} is "waiting" or "normal":
- cancel event
- stop
- else if {STATUS::%player%} is "survival":
- if {SURVIVALGAMES::%{MAP::%player%}%::PLACEBLOCKS::%location of event-block%} is not set:
- set {SURVIVALGAMES::%{MAP::%player%}%::BREAKBLOCKS::%location of event-block%} to location of event-block
- set {SURVIVALGAMES::%{MAP::%player%}%::BREAKBLOCKSTYPE::%location of event-block%} to "%event-block%" parsed as item
- stop
- stop
- stop
- on place:
- if {STATUS::%player%} is "waiting" or "normal":
- cancel event
- stop
- else if {STATUS::%player%} is "survival":
- set {SURVIVALGAMES::%{MAP::%player%}%::PLACEBLOCKS::%location of event-block%} to location of event-block
- stop
- on drop:
- if {STATUS::%player%} is "survival" or "normal" or "hardcore":
- add location of player to {SURVIVALGAMES::%{MAP::%player%}%::DROPPEDITEMS::*}
- stop
- else if {STATUS::%player%} is "waiting":
- cancel event
- stop
- else:
- stop
- #set slot 0 of player's inventory to {_snownumber.%player%} snowball named "&7Feu d'Artifice
- #{SURVIVALGAMES::%arg 3%::DROPS::%arg 4%}
- on right click on chest:
- if {STATUS::%player%} is "survival" or "normal" or "hardcore":
- if event-block is chest:
- if {SURVIVALGAMES::%{MAP::%player%}%::CHEST::%location of event-block%} is not set:
- clear the block's inventory
- set {SURVIVALGAMES::%{MAP::%player%}%::CHEST::%location of event-block%} to "%location of event-block%"
- while {_dropname} is not set:
- if {SURVIVALGAMES::%{MAP::%player%}%::DROPS::*} is empty:
- send "&c&lThe chest drops are not set plase contact the adminstrator"
- cancel event
- stop
- loop {SURVIVALGAMES::%{MAP::%player%}%::DROPS::*}:
- # wait a tick
- chance of 38%:
- set {_dropname} to "%loop-value%"
- set {_times} to random number between {OPTIONS::DROPS::MIN} and {OPTIONS::DROPS::MAX}
- set {_times} to rounded {_times}
- set {_TYPES::*} to {ITEMSDROP::%{_dropname}%::TYPE::*}
- while {_times} is set:
- loop {_TYPES::*}:
- chance of {ITEMSDROP::%{_dropname}%::CHANCE::%loop-index%}%:
- set {_amount} to random number between {ITEMSDROP::%{_dropname}%::MIN::%loop-index%} and {ITEMSDROP::%{_dropname}%::MAX::%loop-index%}
- set {_amount} to rounded {_amount}
- loop {_amount} times:
- add {ITEMSDROP::%{_dropname}%::TYPE::%loop-index%} to event-block
- delete {_TYPES::%loop-index%}
- subtract 1 from {_times}
- wait 1 tick
- if {_times} is smaller or equal to 0:
- delete {_times}
- wait 2 tick
- if {_TYPES::*} is not set:
- stop
- on first join:
- send "&aThis serwer is running &2SurvivalGames 1.95 &aplugin by &ekaringijs272"
- on join:
- if player is op:
- send "&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f=&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f"
- send "&c&l* &2SurvivalGames &aVersion &b2.0&4/&aRelease"
- send "&c&l* &7The stable version release by karingijs"
- send "&c&l* &7Don't forget to look for new &6(&bUpdates&6) &7of it"
- send "&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f=&1=&2=&3=&4=&5=&6=&7=&8=&9=&0=&a=&b=&c=&d=&f"
- command /class [<string>] [<string>]:
- aliases: kit
- trigger:
- if arg 1 is not set:
- send "&2[&bClass&2] &cClass list"
- send "&2[&bClass&2] &cClass select &a[class]"
- send "&2[&bClass&2] &cClass upgrade &a[class]"
- if arg 1 is "upgrade":
- if arg 2 is set:
- if {CLASS::%arg 2%} is set:
- if {STATUS::%player%} is not "survival" or "normal" or "hardcore":
- set {_player::%player%} to the player
- loop {_player::*}:
- if "%loop-index%" is "%player%":
- set {_player} to "%loop-index%"
- set {_lvl} to yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml"
- wait 2 tick
- if {_lvl} is not set:
- set yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml" to "1"
- set {_lvl} to 1
- set {_lvl} to "%{_lvl}%" parsed as number
- add 1 to {_lvl}
- if {CLASSITEMS::%arg 2%::LVL::%{_lvl}%::*} is set:
- if {MONEY::%player%} is greater or equal to {CLASSPRICE::%arg 2%::LVL::%{_lvl}%}:
- subtract {CLASSPRICE::%arg 2%::LVL::%{_lvl}%} from {MONEY::%player%}
- set yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml" to "%{_lvl}%"
- send "&2[&bClass&2] &aSuccessfully upgreaded class &b%arg 2% &ato LVL: &9%{_lvl}%"
- else:
- send "&2[&bClass&2] &cNeeds %{CLASSPRICE::%arg 2%::LVL::%{_lvl}%} - {MONEY::%player%}% more money to buy %{CLASSPRICE::%arg 2%::LVL::%{_lvl}%}%"
- else:
- send "&2[&bClass&2] &cClass is been upgreaded to the maximum lvl"
- else:
- send "&2[&bClass&2] &cCan't select class in game"
- else:
- send "&2[&bClass&2] &cWrong class plase check the /class list"
- else:
- send "&2[&bClass&2] &c/Class upgrade &c&l[Class]"
- if arg 1 is "select":
- if arg 2 is set:
- if {CLASS::%arg 2%} is set:
- if {STATUS::%player%} is "waiting":
- set {_player::%player%} to the player
- loop {_player::*}:
- if "%loop-index%" is "%player%":
- set {_player} to "%loop-index%"
- set {_lvl} to yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml"
- wait 2 tick
- if {_lvl} is not set:
- set yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml" to "1"
- set {_lvl} to 1
- clear the player's inventory
- loop {CLASSITEMS::%arg 2%::LVL::%{_lvl}%::*}:
- add {CLASSITEMS::%arg 2%::LVL::%{_lvl}%::%loop-index%} to the player's inventory
- set {CLASSPREFIX::%player%} to "%arg 2%"
- send "&2[&bClass&2] &2%arg 2% &aSelected."
- else:
- send "&2[&bClass&2] &cYou can only select youre class while waiting to start"
- else:
- send "&2[&bClass&2] &cWrong class plase check the /class list"
- else:
- send "&2[&bClass&2] &c/Class select &c&l[Class]"
- if arg 1 is "list":
- set {_player::%player%} to the player
- loop {_player::*}:
- if "%loop-index%" is "%player%":
- set {_player} to "%loop-index%"
- send "&9______________________________"
- loop {CLASS::*}:
- set {_lvl%loop-index%} to yaml value "lvl.%loop-index%" from file "SurvivalGames/classess/%{_player}%.yml"
- wait 1 tick
- if {_lvl%loop-index%} is not set:
- set {_lvl%loop-index%} to 1
- send "&6[*] &9%loop-index% &6[*] &9LVL: &a%{_lvl%loop-index%}% &6[*]"
- #&4&l[&c&l&oOwner&4&l] &c&o[username]&4: &b<message>
- #&e&l<<&2&lO&a&lwner&e&l>>
- #&5[&6asdasdsa&5]
- #&b☢&8[&4Owner&8]&b☢&6 In
- on chat:
- if {WINS::%player%} is smaller or equal to {RANKSYSTEM::1}:
- set {_rank} to "&7☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::2}:
- set {_rank} to "&8☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::3}:
- set {_rank} to "&d☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::4}:
- set {_rank} to "&5☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::5}:
- set {_rank} to "&a☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::6}:
- set {_rank} to "&2☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::7}:
- set {_rank} to "&e☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::8}:
- set {_rank} to "&6☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::9}:
- set {_rank} to "&c☢"
- else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::10}:
- set {_rank} to "&4☢"
- if {STATUS::%player%} is "waiting" or "normal" or "survival" or "hardcore":
- cancel event
- if {CLASSPREFIX::%player%} is not set:
- set {_class} to "&b * "
- else:
- set {_class} to "%{CLASSPREFIX::%player%}%"
- if player is op:
- broadcast "&1[&9%{_class}%&1] %{_rank}% &c%player%: &e%message%"
- stop
- if player has permission "%{OPTIONS::PERMISSION::PREFIXVIP}%":
- broadcast "&1[&9%{_class}%&1] %{_rank}% &6%player%: &e%message%"
- stop
- broadcast "&1[&9%{_class}%&1] %{_rank}% &7%player%: &e%message%"
- stop
- cancel event
- if player is op:
- broadcast "&4&l[&c&l&oAdmin&4&l] %{_rank}% &c&o%player%&4: &b%message%"
- stop
- if player has permission "%{OPTIONS::PERMISSION::PREFIXVIP}%":
- broadcast "&6&l[&e&l&oVip&6&l] %{_rank}% &e&o%player%&6: &e%message%"
- stop
- broadcast "&8&l[&7&l&oMember&8&l] %{_rank}% &7&o%player%&8: &7%message%"
- stop
- command /list:
- trigger:
- loop {SURVIVALGAMES::*}:
- if {SURVIVLGAMES::%loop-index%::LISTOFPLAYERS::*} is set:
- loop {SURVIVLGAMES::%loop-index%::LISTOFPLAYERS::*}:
- if {_list} is set:
- set {_list} to "&6%{_list}%&a, &6%loop-value-2%"
- if {_list} is not set:
- set {_list} to "%loop-index-2%"
- send "&9[&6SG&9] &3Map &b%loop-index-1% &2Players: &6%{_list}%"
- delete {_list}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement