Advertisement
Prawnus

Untitled

Oct 26th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.18 KB | None | 0 0
  1. #▒█▀▀▀█ █░░█ █▀▀█ ▀█░█▀ ░▀░ ▀█░█▀ █▀▀█ █░░   ▒█▀▀█ █▀▀█ █▀▄▀█ █▀▀ █▀▀
  2. #░▀▀▀▄▄ █░░█ █▄▄▀ ░█▄█░ ▀█▀ ░█▄█░ █▄▄█ █░░   ▒█░▄▄ █▄▄█ █░▀░█ █▀▀ ▀▀█
  3. #▒█▄▄▄█ ░▀▀▀ ▀░▀▀ ░░▀░░ ▀▀▀ ░░▀░░ ▀░░▀ ▀▀▀   ▒█▄▄█ ▀░░▀ ▀░░░▀ ▀▀▀ ▀▀▀
  4. #====================================================================
  5. # █ Plugin: SurvivalGames █
  6. # █ Made by : karingijs272 █
  7. # █ Version : 2.0 Release █
  8. #====================================================================
  9. # Copyright © Karingijs. All rights reserved.
  10. # Company : Text Skripts Karingijs - TSK
  11. # Date : 2017
  12. #====================================================================
  13. # /\==============/\
  14. # / \ o / \
  15. # / \ o o / o \
  16. # / o \ o o i / o \ f = other
  17. # / o \ / o \ o = are the fixed bugs
  18. # / o o \o f / o o \ x = are the bugs
  19. # / o i \ / o o o \ i = are youre ideas added to the plugin
  20. #/ o o o \/ i o \
  21. #=================================
  22. #Here you can report bugs and rate the project:
  23. #>>> https://www.spigotmc.org/resources/%E2%98%A2survivalgames%E2%98%A2.45932/
  24. #This skript is tested on 1.8/1.8.8 Version
  25. #Here you also can report bugs ask question and give some ideas to add to this project
  26. #>>> Discoard : https://discord.gg/gx4q3EP
  27.  
  28. on script load:
  29. wait 1 tick
  30. if {OPTIONS::MINPLAYERS} is not set:
  31. set {OPTIONS::MINPLAYERS} to 2
  32. if {OPTIONS::TIMESTART} is not set:
  33. set {OPTIONS::TIMESTART} to 15
  34. if {OPTIONS::KILL} is not set:
  35. set {OPTIONS::KILL} to 100
  36. if {OPTIONS::DEATH} is not set:
  37. set {OPTIONS::DEATH} to 25
  38. if {OPTIONS::WIN} is not set:
  39. set {OPTIONS::WIN} to 250
  40. if {OPTIONS::HIDETIME} is not set:
  41. set {OPTIONS::HIDETIME} to 30
  42. if {OPTIONS::PERMISSION::HIDE} is not set:
  43. set {OPTIONS::PERMISSION::HIDE} to "survivalgames.vip"
  44. if {OPTIONS::DROPS::MIN} is not set:
  45. set {OPTIONS::DROPS::MIN} to 5
  46. if {OPTIONS::DROPS::MAX} is not set:
  47. set {OPTIONS::DROPS::MAX} to 12
  48. if {OPTIONS::STARTVOTE} is not set:
  49. set {OPTIONS::STARTVOTE} to 0.25
  50. if {OPTIONS::PERMISSION::PREFIXVIP} is not set:
  51. set {OPTIONS::PERMISSION::PREFIXVIP} to "survivalgames.vip"
  52. if {OPTIONS::GAMETIME} is not set:
  53. set {OPTIONS::GAMETIME} to 165
  54. if {OPTIONS::PERMISSION::BONUS} is not set:
  55. set {OPTIONS::PERMISSION::BONUS} to "survivalgames.vip"
  56. wait 3 second
  57. if {FIRSTLOAD} is not set:
  58. execute console command "sg load ChestDrops"
  59. wait 1 second
  60. execute console command "sg load OtherDrops"
  61. set {FIRSTLOAD} to true
  62. wait 1 tick
  63. loop 10 times:
  64. set {_rank} to yaml value "ranks.%loop-number%" from file "config.yml"
  65. wait 2 tick
  66. set {RANKSYSTEM::%loop-number%} to "%{_rank}%" parsed as number
  67. loop all players:
  68. if {KILLS::%loop-player%} is "none" or "<none>":
  69. set {KILLS::%loop-player%} to 0
  70. if {DEATHS::%loop-player%} is "none" or "<none>":
  71. set {DEATHS::%loop-player%} to 0
  72. if {MONEY::%loop-player%} is "none" or "<none>":
  73. set {MONEY::%loop-player%} to 0
  74. if {GAMESPLAYED::%loop-player%} is "none" or "<none>":
  75. set {GAMESPLAYED::%loop-player%} to 0
  76. if {WINS::%loop-player%} is "none" or "<none>":
  77. set {WINS::%loop-player%} to 0
  78. #send "Loaded" to all players
  79.  
  80.  
  81. options:
  82. tag: &e[&2Survival&3Games&e]&c>>
  83.  
  84. on join:
  85. set {_player::%player%} to the player
  86. loop {_player::*}:
  87. if "%loop-index%" is "%player%":
  88. set {_player} to "%loop-index%" parsed as player
  89. set {KILLS::%player%} to yaml value "kills" from file "SurvivalGames/players/%{_player}%.yml"
  90. set {DEATHS::%player%} to yaml value "deaths" from file "SurvivalGames/players/%{_player}%.yml"
  91. set {MONEY::%player%} to yaml value "money" from file "SurvivalGames/players/%{_player}%.yml"
  92. set {GAMESPLAYED::%player%} to yaml value "games" from file "SurvivalGames/players/%{_player}%.yml"
  93. set {WINS::%player%} to yaml value "wins" from file "SurvivalGames/players/%{_player}%.yml"
  94. wait 2 tick
  95. if {KILLS::%player%} is not set:
  96. set {KILLS::%player%} to 0
  97. if {DEATHS::%player%} is not set:
  98. set {DEATHS::%player%} to 0
  99. if {MONEY::%player%} is not set:
  100. set {MONEY::%player%} to 0
  101. if {GAMESPLAYED::%player%} is not set:
  102. set {GAMESPLAYED::%player%} to 0
  103. if {WINS::%player%} is not set:
  104. set {WINS::%player%} to 0
  105. wait 2 tick
  106. set {KILLS::%player%} to "%{KILLS::%player%}%" parsed as number
  107. set {DEATHS::%player%} to "%{DEATHS::%player%}%" parsed as number
  108. set {MONEY::%player%} to "%{MONEY::%player%}%" parsed as number
  109. set {GAMESPLAYED::%player%} to "%{GAMESPLAYED::%player%}%" parsed as number
  110. set {WINS::%player%} to "%{WINS::%player%}%" parsed as number
  111. wait 2 second
  112. display board named "&6>SurvivalGames<" to {_player}
  113. make score "&eKills:&c%{KILLS::%{_player}%}%" in board of {_player} to 5
  114. make score "&eDeaths:&c%{DEATHS::%{_player}%}%" in board of {_player} to 4
  115. make score "&eMoney:&a%{MONEY::%{_player}%}%" in board of {_player} to 3
  116. make score "&eWins:&9%{GAMESPLAYED::%{_player}%}%" in board of {_player} to 2
  117. make score "&eGames:&9%{WINS::%{_player}%}%" in board of {_player} to 1
  118. move display of {_player} to sidebar
  119.  
  120. on quit:
  121. if {STATUS::%player%} is "normal" or "survival" or "hardcore":
  122. subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
  123.  
  124. set {_player::%player%} to the player
  125. loop {_player::*}:
  126. if "%loop-index%" is "%player%":
  127. set {_player} to "%loop-index%"
  128. set yaml value "kills" from file "SurvivalGames/players/%{_player}%.yml" to "%{KILLS::%player%}%"
  129. set yaml value "deaths" from file "SurvivalGames/players/%{_player}%.yml" to "%{DEATHS::%player%}%"
  130. set yaml value "money" from file "SurvivalGames/players/%{_player}%.yml" to "%{MONEY::%player%}%"
  131. set yaml value "games" from file "SurvivalGames/players/%{_player}%.yml" to "%{GAMESPLAYED::%player%}%"
  132. set yaml value "wins" from file "SurvivalGames/players/%{_player}%.yml" to "%{WINS::%player%}%"
  133. wait 1 tick
  134. delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%player%}
  135. delete {KILLS::%player%}
  136. delete {DEATHS::%player%}
  137. delete {MONEY::%player%}
  138. delete {MAP::%player%}
  139. delete {NR::%player%}
  140. delete {STATUS::%player%}
  141. delete {WINS::%player%}
  142. delete {GAMESPLAYED::%player%}
  143. delete {INVISIBLE::%player%}
  144. delete {VOTE::%player%}
  145. delete {CLASSPREFIX::%player%}
  146.  
  147. on respawn:
  148. wait 2 tick
  149. teleport player to {LOBBY}
  150.  
  151. command /gamecontrol [<string>] [<string>] [<string>]:
  152. executable by: console
  153. trigger:
  154. set {_time} to "%arg 1%" parsed as number
  155. set {_map} to "%arg 2%" parsed as string
  156. set {_gametime} to {OPTIONS::GAMETIME}
  157.  
  158. set {SURVIVALGAMES::%{_map}%::STATUS} to "starting"
  159. set {SURVIVALGAMES::%{_map}%::TIMER} to {_time}
  160. send "{@tag} &5%{_map}% &bstarting in &3%{_time}% &bsecond" to all players
  161. loop {SURVIVALGAMES::%{_map}%::TIMER} times:
  162. if {SURVIVALGAMES::%{_map}%::TIMER} is smaller or equal to 5:
  163. loop all players:
  164. if "%{MAP::%loop-player%}%" is "%{_map}%":
  165. send "{@tag} &5%{_map}% &bstarting in &3%{SURVIVALGAMES::%{_map}%::TIMER}% &bsecond" to loop-player
  166. wait 1 second
  167. subtract 1 from {SURVIVALGAMES::%{_map}%::TIMER}
  168. if {SURVIVALGAMES::%{_map}%::PLAYERS} is smaller or equal to 1:
  169. set {SURVIVALGAMES::%{_map}%::TIMER} to 0
  170. set {SURVIVALGAMES::%{_map}%::STATUS} to "waiting"
  171. stop
  172. send "{@tag} &5%{_map}% &bStarted!" to all players
  173. loop all players:
  174. if "%{MAP::%loop-player%}%" is "%{_map}%":
  175. delete {VOTE::%loop-player%}
  176. set {STATUS::%loop-player%} to "%{SURVIVALGAMES::%{_map}%::MODE}%"
  177. add 1 to {GAMESPLAYED::%loop-player%}
  178. if {OPTIONS::HIDETIME} is greater than 0:
  179. if loop-player has permission "%{OPTIONS::PERMISSION::HIDE}%":
  180. hide loop-player to all players
  181. set {_hidetime} to {OPTIONS::HIDETIME}
  182. send "{@tag} &aYou are invisible for &2%{OPTIONS::HIDETIME}% &aseconds." to loop-player
  183. set {INVISIBLE::%loop-player%} to true
  184. set {SURVIVALGAMES::%{_map}%::STATUS} to "started"
  185. while {SURVIVALGAMES::%{_map}%::PLAYERS} is greater than 1:
  186. wait 1 second
  187. set {_size} to size of {SURVIVLGAMES::%{_map}%::LISTOFPLAYERS::*}
  188. loop all players:
  189. if "%{MAP::%loop-player%}%" is "%{_map}%":
  190. display board named "&6>SurvivalGames<" to loop-player
  191. make score "&6&m&l>----" in board of loop-player to 7
  192. make score "&eGameTime:&7%{_gametime}%" in board of loop-player to 6
  193. make score "&6&m&l>---" in board of loop-player to 5
  194. make score "&ePlayers:&7%{_size}%" in board of loop-player to 4
  195. make score "&6&m&l>--" in board of loop-player to 3
  196. make score "&eMap:&7%{_map}%" in board of loop-player to 2
  197. make score "&6&m&l>-" in board of loop-player to 1
  198. move display of loop-player to sidebar
  199. subtract 1 from {_gametime}
  200. if {_gametime} is smaller than 0:
  201. send "{@tag} &3Time runs out on &6%{_map}%" to all players
  202. loop all players:
  203. if "%{MAP::%loop-player%}%" is "%{_map}%":
  204. teleport loop-player to {LOBBY}
  205. set {STATUS::%loop-player%} to "left"
  206. delete {MAP::%loop-player%}
  207. delete {NR::%loop-player%}
  208. set {SURVIVALGAMES::%{_map}%::PLAYERS} to 0
  209. if {_hidetime} is set:
  210. subtract 1 from {_hidetime}
  211. if {_hidetime} is smaller or equal to 0:
  212. loop all players:
  213. if "%{MAP::%loop-player%}%" is "%{_map}%":
  214. if loop-player has permission "%{OPTIONS::PERMISSION::HIDE}%":
  215. reveal loop-player to all players
  216. send "{@tag} &cWatch out you are visible from now" to loop-player
  217. delete {INVISIBLE::%loop-player%}
  218. delete {_hidetime}
  219. set {SURVIVALGAMES::%{_map}%::TIMER} to 0
  220. set {SURVIVALGAMES::%{_map}%::PLAYERS} to 0
  221. set {SURVIVALGAMES::%{_map}%::STATUS} to "restarting"
  222. loop {SURVIVALGAMES::%{_map}%::PLACE::*}:
  223. set {SURVIVALGAMES::%{_map}%::PLACE::%loop-index%} to "false"
  224. loop all players:
  225. if "%{MAP::%loop-player%}%" is "%{_map}%":
  226. set {STATUS::%loop-player%} to "left"
  227. send "{@tag} &6%loop-player% &5won map &b%{_map}%" to all players
  228. delete {MAP::%loop-player%}
  229. delete {NR::%loop-player%}
  230. add 1 to {WINS::%loop-player%}
  231. send "{@tag} &aReward of %{OPTIONS::WIN}% money for winning the game." to loop-player
  232. if {OPTIONS::WIN} is set:
  233. add {OPTIONS::WIN} to {MONEY::%loop-player%}
  234. wait 5 tick
  235. teleport loop-player to {LOBBY}
  236. if "%{SURVIVALGAMES::%{_map}%::MODE}%" is "survival" or "hardcore":
  237. send "{@tag} &6Restarting of map &b%{_map}%" to all players
  238. loop {SURVIVLGAMES::%{_map}%::LISTOFPLAYERS::*}:
  239. delete {SURVIVLGAMES::%{_map}%::LISTOFPLAYERS::%loop-index%}
  240. set {PROGRESS::%{_map}%::PLACED} to size of {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::*}
  241. set {PROGRESS::%{_map}%::BREAK} to size of {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::*}
  242. loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
  243. set {_newindex} to "%loop-index%"
  244. set {_new} to {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index%}
  245. loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
  246. if {_newindex} is not "%loop-index-2%":
  247. if distance between {_new} and {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index-2%} is smaller than 5:
  248. delete {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index-2%}
  249. loop all entities:
  250. if "%loop-entity%" is "dropped item":
  251. loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
  252. if distance between loop-entity and {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index%} is smaller than 25:
  253. clear loop-entity
  254. wait 1 tick
  255. loop {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::*}:
  256. set block at location of {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::%loop-index%} to air
  257. delete {SURVIVALGAMES::%{_map}%::PLACEBLOCKS::%loop-index%}
  258. wait 1 tick
  259. loop {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::*}:
  260. set block at location of {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::%loop-index%} to {SURVIVALGAMES::%{_map}%::BREAKBLOCKSTYPE::%loop-index%}
  261. delete {SURVIVALGAMES::%{_map}%::BREAKBLOCKS::%loop-index%}
  262. delete {SURVIVALGAMES::%{_map}%::BREAKBLOCKSTYPE::%loop-index%}
  263. wait 1 tick
  264. loop {SURVIVALGAMES::%{_map}%::CHEST::*}:
  265. wait 1 tick
  266. delete {SURVIVALGAMES::%{_map}%::CHEST::%loop-index%}
  267. delete {PROGRESS::%{_map}%::PLACED}
  268. delete {PROGRESS::%{_map}%::BREAK}
  269. loop {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::*}:
  270. delete {SURVIVALGAMES::%{_map}%::DROPPEDITEMS::%loop-index%}
  271.  
  272. set {SURVIVALGAMES::%{_map}%::STATUS} to "waiting"
  273. send "{@tag} &6Map &b%{_map}% &6is been restarted" to all players
  274.  
  275. # {PROGRESS::%{_map}%::DROPPEDITEMS}
  276. # {PROGRESS::%{_map}%::PLACED}
  277. # {PROGRESS::%{_map}%::BREAK}
  278.  
  279. #SurvivalGames
  280. #{SURVIVALGAMES::%arg 2%}
  281. #{SURVIVALGAMES::%arg 2%::NRSPAWN}
  282. #{SURVIVALGAMES::%arg 2%::SPAWN::*}
  283. #{SURVIVALGAMES::%arg 2%::PLACE::*}
  284. #{SURVIVALGAMES::%arg 2%::STATUS} restarting/started/waiting
  285. #{SURVIVALGAMES::%arg 2%::TIMER}
  286. #{SURVIVALGAMES::%arg 1%::PLAYERS}
  287. #{SURVIVALGAMES::%{MAP::%player%}%::CHEST::*}
  288.  
  289. #{SURVIVALGAMES::%Map%::BREAKBLOCKS::%location of event-block%}
  290. #{SURVIVALGAMES::%Map%::PLACEBLOCKS::%location of event-block%}
  291. #{SURVIVALGAMES::%Map%::BREAKBLOCKSTYPE::%location of event-block%}
  292.  
  293. #{SURVIVALGAMES::%arg 2%::INGAME::*} NICKI GRACZY WAZNE DO LOOPOWANIA
  294.  
  295. #{STATUS::%player%} "waiting"/
  296. #{NR::%player%} nuber of spawn of player
  297. #{MAP::%player%} map
  298. #{KILLS::%player%}
  299. #{DEATHS::%player%}
  300. #{MONEY::%player%}
  301. #{GAMESPLAYED::%player%}
  302. #{WINS::%player%}
  303. #{INVISIBLE::%loop-player%} invisilbe time
  304. #{VOTE::%player%}
  305. #{CLASSPREFIX::%player%}
  306.  
  307. #{CLASSPRICE::%name%::LVL::%lvl%} Price amount
  308. #{CLASSITEMS::%Name%::LVL::%Lvl of class%::%Numer%} Variable of items
  309. #{CLASS::%Name%} name of class
  310. #{CLASSLVL::%name%}
  311.  
  312. #{OPTIONS::WIN}
  313. #{OPTIONS::KILL} XXX
  314. #{OPTIONS::DEATH}
  315. #{OPTIONS::TIMESTART}
  316. #{OPTIONS::MINPLAYERS}
  317. #{OPTIONS::HIDETIME}
  318. #{OPTIONS::PERMISSION::HIDE}
  319. #{OPTIONS::DROPS::MIN}
  320. #{OPTIONS::DROPS::MAX}
  321. #{OPTIONS::STARTVOTE}
  322. #{OPTIONS::PERMISSION::PREFIXVIP}
  323. #{OPTIONS::PERMISSION::BONUS} bonus for vip
  324.  
  325. #if type of item is diamond:
  326. #add 1 glowing diamond to the player
  327.  
  328. #{SURVIVALGAMES::%arg 4%::DROPS::%arg 3%}
  329. #{DROPS::%arg 4%}
  330. #{SURVIVLGAMES::%arg 2%::LISTOFPLAYERS::%player%} list of all players in the map
  331.  
  332. #set slot 0 of player to 1 diamond sword
  333. #add {ITEMSDROP::%{_dropname}%::TYPE::%loop-index%} to slot 20 of event-block
  334. #set slot 20 of event-block to {ITEMSDROP::%{_dropname}%::TYPE::%loop-index%}
  335.  
  336. #{SURVIVALGAMES::%{MAP::%player%}%::DROPPEDITEMS::*}
  337.  
  338. command /survivalgames [<string>] [<string>] [<string>] [<string>] [<string>] [<string>]:
  339. aliases: sg
  340. trigger:
  341. if player is op:
  342. if arg 1 is not set:
  343. 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"
  344. send "&8* &4/&csg &2create &7[&aMap&7]"
  345. send "&8* &4/&csg &2addspawn &7[&aMap&7]"
  346. send "&8* &4/&csg &2mode &7[&aMap&7] &6normal&8/&6Survival&8/&6hardcore"
  347. send "&8* &4/&csg &2drop &7[&6add&7/&6remove&7/&6list&7] &7[&aMap&7] &7[&aFile.yml&7] "
  348. send "&8* &4/&csg &cdelete &7[&aMap&7]"
  349. send "&8* &4/&csg &einfo &7[&aMap&7]"
  350. send "&8* &4/&csg &elist"
  351. send "&8* &4/&csg &6setlobby"
  352. send "&8* &4/&csg &6load/unload/reload &7[&afile.yaml&7]"
  353. send "&8* &4/&csg &9class"
  354. send "&8* &4/&csg &9options"
  355. 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"
  356. if arg 1 is "create":
  357. if arg 2 is set:
  358. if {SURVIVALGAMES::%arg 2%} is not set:
  359. set {SURVIVALGAMES::%arg 2%::MODE} to "normal"
  360. set {SURVIVALGAMES::%arg 2%::PLAYERS} to 0
  361. set {SURVIVALGAMES::%arg 2%::STATUS} to "waiting"
  362. set {SURVIVALGAMES::%arg 2%::TIMER} to 0
  363. set {SURVIVALGAMES::%arg 2%} to "%arg 2%"
  364. send "{@tag} &2Success fully created map &5%arg 2%"
  365. loop {DROPS::*}:
  366. set {SURVIVALGAMES::%arg 2%::DROPS::%loop-value%} to "%loop-value%"
  367. exit loop
  368. #loop 100 times:
  369. #Amout of maps numbers
  370. else:
  371. send "{@tag} &cThis map allready exist's"
  372. else:
  373. send "{@tag} &cThere is no second [Map] argument found"
  374. if arg 1 is "addspawn":
  375. if arg 2 is set:
  376. if {SURVIVALGAMES::%arg 2%} is set:
  377. add 1 to {SURVIVALGAMES::%arg 2%::NRSPAWN}
  378. set {SURVIVALGAMES::%arg 2%::SPAWN::%{SURVIVALGAMES::%arg 2%::NRSPAWN}%} to location of player
  379. set {SURVIVALGAMES::%arg 2%::PLACE::%{SURVIVALGAMES::%arg 2%::NRSPAWN}%} to "false"
  380. send "{@tag} &2Spawn number &a%{SURVIVALGAMES::%arg 2%::NRSPAWN}% &3is been set"
  381. else:
  382. send "{@tag} &cThere is no %arg 2% map found in variable list"
  383. else:
  384. send "{@tag} &cThere is no second [Map] argument found"
  385. if arg 1 is "drop":
  386. if arg 2 is "add":
  387. if arg 3 is set:
  388. if {SURVIVALGAMES::%arg 3%} is set:
  389. if arg 4 is set:
  390. if {DROPS::%arg 4%} is set:
  391. set {SURVIVALGAMES::%arg 3%::DROPS::%arg 4%} to "%arg 4%"
  392. send "&cThe drop is been added to the drops list of map %arg 3%"
  393. send "&cCheck the drop using the command /sg drop list %arg 3%"
  394. else:
  395. send "{@tag} &cThe yaml is not found plase check /sg drop list"
  396. else:
  397. send "{@tag} &cMissing yaml file 4th argument"
  398. else:
  399. send "{@tag} &cThere is no %arg 3% map found in variable list"
  400. else:
  401. send "{@tag} &cThere is no [Map] argument found"
  402. else if arg 2 is "list":
  403. if arg 3 is set:
  404. if {SURVIVALGAMES::%arg 3%} is set:
  405. if {SURVIVALGAMES::%arg 3%::DROPS::*} is not empty:
  406. send "&c---------------------------------"
  407. loop {SURVIVALGAMES::%arg 3%::DROPS::*}:
  408. send "&4+ &7%loop-value-1%&a.yml"
  409. send "&c---------------------------------"
  410. else:
  411. send "&cNo drops found the chests in game will be empty!"
  412. else:
  413. send "{@tag} &cThere is no %arg 3% map found in variable list"
  414. else:
  415. if {DROPS::*} is empty:
  416. send "&cNo drops loaded yet"
  417. stop
  418. send "&c---------------------------------"
  419. loop {DROPS::*}:
  420. send "&4+ &7%loop-value-1%&a.yml"
  421. send "&c---------------------------------"
  422. else if arg 2 is "remove":
  423. if arg 3 is set:
  424. if {SURVIVALGAMES::%arg 3%} is set:
  425. if arg 4 is set:
  426. if {SURVIVALGAMES::%arg 3%::DROPS::%arg 4%} is set:
  427. delete {SURVIVALGAMES::%arg 3%::DROPS::%arg 4%}
  428. send "&cThe drop is been removed from %arg 3% map"
  429. send "&cCheck the drop using the command /sg drop list %arg 3%"
  430. else:
  431. send "{@tag} &cThe yaml is not found plase check /sg drop list"
  432. else:
  433. send "{@tag} &cMissing yaml file 4th argument"
  434. else:
  435. send "{@tag} &cThere is no %arg 3% map found in variable list"
  436. else:
  437. send "{@tag} &cThere is no [Map] argument found"
  438. else if arg 2 is not set:
  439. send "{@tag} &cCorrect command usage add/list/remove"
  440. if arg 1 is "mode":
  441. if arg 2 is set:
  442. if {SURVIVALGAMES::%arg 2%} is set:
  443. if arg 3 is "normal" or "survival":
  444. set {SURVIVALGAMES::%arg 2%::MODE} to "%arg 3%"
  445. send "&e[&2Survival&3Games&e]&c>> &2%arg 3% &aMode &3selected"
  446. if arg 3 is "survival":
  447. wait 10 tick
  448. send " &c>> The player's can now place and break blocks"
  449. send " &c>> Don't worry after game end the map will be restarted"
  450. send " &c>> and will look like new"
  451. else if arg 3 is "hardcore":
  452. send "&e[&2Survival&3Games&e]&c>> &2%arg 3% &aMode &3selected"
  453. wait 10 tick
  454. send " &c>> the mode is very hard player's will allways by hunger"
  455. set {SURVIVALGAMES::%arg 2%::MODE} to "%arg 3%"
  456. else:
  457. send "{@tag} mode is no anvalibe"
  458. else:
  459. send "{@tag} &cThere is no %arg 2% map found in variable list"
  460. else:
  461. send "{@tag} &cThere is no second [Map] argument found"
  462. if arg 1 is "delete":
  463. if arg 2 is set:
  464. if {SURVIVALGAMES::%arg 2%} is set:
  465. loop {SURVIVALGAMES::%arg 2%::SPAWN::*}:
  466. delete {SURVIVALGAMES::%arg 2%::SPAWN::%loop-index%}
  467. delete {SURVIVALGAMES::%arg 2%::PLACE::%loop-index%}
  468. loop {SURVIVALGAMES::%{MAP::%player%}%::CHEST::*}:
  469. delete {SURVIVALGAMES::%arg 2%::CHEST::%loop-index%}
  470. delete {SURVIVALGAMES::%arg 2%}
  471. delete {SURVIVALGAMES::%arg 2%::PLAYERS}
  472. delete {SURVIVALGAMES::%arg 2%::NRSPAWN}
  473. delete {SURVIVALGAMES::%arg 2%::STATUS}
  474. delete {SURVIVALGAMES::%arg 2%::TIMER}
  475. delete {SURVIVALGAMES::%arg 2%::MODE}
  476. loop {DROPS::*}:
  477. delete {SURVIVALGAMES::%arg 2%::DROPS::%loop-value%}
  478. send "&cDeleted %arg 2%"
  479. else:
  480. send "{@tag} &cThere is no %arg 2% map found in variable list"
  481. else:
  482. send "{@tag} &cThere is no second [Map] argument found"
  483. if arg 1 is "info":
  484. if arg 2 is set:
  485. if {SURVIVALGAMES::%arg 2%} is set:
  486. send "&c======================================="
  487. send "&4&l + &7Map : &9%arg 2%"
  488. send "&4&l + &7Slots : &9%{SURVIVALGAMES::%arg 2%::NRSPAWN}%"
  489. send "&4&l + &7Players : &9%{SURVIVALGAMES::%arg 2%::PLAYERS}%"
  490. send "&4&l + &7Mode : &9%{SURVIVALGAMES::%arg 2%::MODE}%"
  491. send "&4&l + &7Status : &9%{SURVIVALGAMES::%arg 2%::STATUS}%"
  492. if {SURVIVALGAMES::%arg 2%::STATUS} is "restarting":
  493. set {_dropped} to size of {SURVIVALGAMES::%arg 2%::DROPPEDITEMS::*}
  494. set {_placed} to size of {SURVIVALGAMES::%arg 2%::PLACEBLOCKS::*}
  495. set {_broken} to size of {SURVIVALGAMES::%arg 2%::BREAKBLOCKS::*}
  496. send "&4&l + &7restart of dropped items : &9%{_dropped}%"
  497. send "&4&l + &7restart progress of placed blocks : &9%{_placed}%/%{PROGRESS::%arg 2%::PLACED}%"
  498. send "&4&l + &7restart progress of broken blocks : &9%{_broken}%/%{PROGRESS::%arg 2%::BREAK}%"
  499. send "&c======================================="
  500. else:
  501. send "{@tag} &cThere is no %arg 2% map found in variable list"
  502. else:
  503. send "{@tag} &cThere is no second [Map] argument found"
  504. if arg 1 is "list":
  505. if {SURVIVALGAMES::*} is not empty:
  506. send "&c_=++++++*&4( &eMaps &4)&c*++++++=_"
  507. loop {SURVIVALGAMES::*}:
  508. add 1 to {_maps}
  509. send "&8[*&7> &d%loop-index%"
  510. send "&c_=++++*&4( &eAmount&6(&e%{_maps}%&6) &4)&c*++++=_"
  511. else:
  512. send "&cThere are no maps created yet!"
  513. if arg 1 is "setlobby":
  514. set {LOBBY} to location of player
  515. send "&6All player's will spawn here when game end"
  516. if arg 1 is "load":
  517. if arg 2 is set:
  518. send "&cloading..> %arg 2%.yml"
  519. loop {ITEMSDROP::%arg 2%::TYPE::*}:
  520. delete {ITEMSDROP::%arg 2%::TYPE::%loop-index%}
  521. loop 50 times:
  522. set {_errorname} to false
  523. set {_line} to size of {ITEMSDROP::%arg 2%::TYPE::*}
  524. add 1 to {_line}
  525. if {_errorffix} is set:
  526. add {_errorffix} to {_line}
  527. set {_type} to yaml value "%{_line}%.type" from file "%arg 2%.yml"
  528. wait 2 tick
  529. set {_S::%loop-number%} to yaml value "%{_line}%.type" from file "%arg 2%.yml"
  530. if {_S::%loop-number%} is not set:
  531. set {_end} to true
  532. if {_end} is set:
  533. exit loop
  534. loop {ITEMSDROP::%arg 2%::TYPE::*}:
  535. if {_type} is "%{ITEMSDROP::%arg 2%::TYPE::%loop-index%}%":
  536. if {_line} is not "%loop-index%":
  537. 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)"
  538. add "%{ITEMSDROP::%arg 2%::TYPE::%loop-index%}%" to {_OLDERRORS::*}
  539. set {ITEMSDROP::%arg 2%::TYPE::%loop-index%} to "error272"
  540. exit loop
  541. if {_errorname} is false:
  542. set {_chance} to yaml value "%loop-number%.chance" from file "%arg 2%.yml"
  543. set {_min} to yaml value "%loop-number%.min" from file "%arg 2%.yml"
  544. set {_max} to yaml value "%loop-number%.max" from file "%arg 2%.yml"
  545. set {_times} to yaml value "%loop-number%.times" from file "%arg 2%.yml"
  546. wait 2 tick
  547. set {ITEMSDROP::%arg 2%::TYPE::%{_line}%} to "%{_type}%" parsed as item
  548. set {_chance} to "%{_chance}%" parsed as number
  549. set {ITEMSDROP::%arg 2%::CHANCE::%{_line}%} to "%{_chance} * 0.1%" parsed as number
  550. set {ITEMSDROP::%arg 2%::MIN::%{_line}%} to "%{_min}%" parsed as number
  551. set {ITEMSDROP::%arg 2%::MAX::%{_line}%} to "%{_max}%" parsed as number
  552. if {_times} is set:
  553. set {_times} to "%{_times}%" parsed as number
  554. if {_times} is greater or equal to 2:
  555. subtract 1 from {_times}
  556. loop {_times} times:
  557. send "%loop-number-2%"
  558. add "%{_type}%" to {_ITEMTYPE::*}
  559. add "%{_chance} * 0.1%" to {_CHANCE::*}
  560. add "%{_min}%" to {_MIN::*}
  561. add "%{_max}%" to {_MAX::*}
  562. delete {_times}
  563. if "%{ITEMSDROP::%arg 2%::TYPE::%{_line}%}%" is "none" or "<none>":
  564. send "&9[&cLoad&9Mode] &7Loading error of &7((&eLine: &6%{_line}%&7)&eId: &6%{_type}%&7)"
  565. add 1 to {_errorffix}
  566. subtract 1 from {_line}
  567. if {_line} is 0:
  568. send " "
  569. wait 5 tick
  570. send "&cFile not found make sure you using the right method."
  571. send "&cGood : &7ChestDrop.yml&c Bad : &7chestdrop.yml"
  572. stop
  573. loop {_OLDERRORS::*}:
  574. loop {ITEMSDROP::%arg 2%::TYPE::*}:
  575. if {ITEMSDROP::%arg 2%::TYPE::%loop-index-2%} is "error272":
  576. set {ITEMSDROP::%arg 2%::TYPE::%loop-index-2%} to "%loop-value-1%" parsed as item
  577. exit loop
  578. set {DROPS::%arg 2%} to "%arg 2%"
  579. loop {_ITEMTYPE::*}:
  580. loop 1000 times:
  581. if {ITEMSDROP::%arg 2%::TYPE::%loop-number%} is not set:
  582. set {ITEMSDROP::%arg 2%::TYPE::%loop-number%} to "%{_ITEMTYPE::%loop-index%}%" parsed as item
  583. set {ITEMSDROP::%arg 2%::CHANCE::%loop-number%} to "%{_CHANCE::%loop-index%}%" parsed as number
  584. set {ITEMSDROP::%arg 2%::MIN::%loop-number%} to "%{_MIN::%loop-index%}%" parsed as number
  585. set {ITEMSDROP::%arg 2%::MAX::%loop-number%} to "%{_MAX::%loop-index%}%" parsed as number
  586. 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%}%"
  587. exit loop
  588. if {_errorffix} is not set:
  589. send "&2SurvivalGames successfully loaded! %{_line}% items."
  590. else:
  591. set {_errorffix} to "%{_line} - {_errorffix}%"
  592. send "&2SurvivalGames successfully loaded! &c%{_errorffix}%&7/&c%{_line}% &2items."
  593. send "&c%{ITEMSDROP::%arg 2%::TYPE::*}%"
  594. else:
  595. send "{@tag} &cSecond argument is missing [arg 2].yml"
  596. if arg 1 is "unload":
  597. if arg 2 is set:
  598. if {DROPS::%arg 2%} is set:
  599. loop {SURVIVALGAMES::*}:
  600. delete {SURVIVALGAMES::%loop-index%::DROPS::%arg 2%}
  601. loop {ITEMSDROP::%arg 2%::TYPE::*}:
  602. delete {ITEMSDROP::%arg 2%::TYPE::%loop-index%}
  603. delete {ITEMSDROP::%arg 2%::CHANCE::%loop-index%}
  604. delete {ITEMSDROP::%arg 2%::MIN::%loop-index%}
  605. delete {ITEMSDROP::%arg 2%::MAX::%loop-index%}
  606. delete {DROPS::%arg 2%}
  607. send "&2Successfully unloaded &7%arg 2%&a.yml"
  608. else:
  609. send "{@tag} &cNo %arg 2%.yml found please check /sg drop list OR the files"
  610. else:
  611. send "{@tag} &cThere is no second [argument] .yml found"
  612. if arg 1 is "reload":
  613. send "{@tag} &2Reloading config.yml file"
  614. wait 1 tick
  615. set {_minplayers} to yaml value "minplayers" from file "config.yml"
  616. set {_timestart} to yaml value "timestart" from file "config.yml"
  617. set {_kill} to yaml value "kill" from file "config.yml"
  618. set {_death} to yaml value "death" from file "config.yml"
  619. set {_win} to yaml value "win" from file "config.yml"
  620. set {_hidetime} to yaml value "hidetime" from file "config.yml"
  621. set {_hidepermission} to yaml value "hidepermission" from file "config.yml"
  622. set {_dropmin} to yaml value "dropmin" from file "config.yml"
  623. set {_dropmax} to yaml value "dropmax" from file "config.yml"
  624. set {_startvote} to yaml value "startvote" from file "config.yml"
  625. set {_prefixvip} to yaml value "prefixvip" from file "config.yml"
  626. set {_gametime} to yaml value "gametime" from file "config.yml"
  627. set {_vipbonus} to yaml value "vipbonus" from file "config.yml"
  628. wait 2 tick
  629. set {OPTIONS::MINPLAYERS} to "%{_minplayers}%" parsed as number
  630. set {OPTIONS::TIMESTART} to "%{_timestart}%" parsed as number
  631. set {OPTIONS::KILL} to "%{_kill}%" parsed as number
  632. set {OPTIONS::DEATH} to "%{_death}%" parsed as number
  633. set {OPTIONS::WIN} to "%{_win}%" parsed as number
  634. set {OPTIONS::HIDETIME} to "%{_hidetime}%" parsed as number
  635. set {OPTIONS::PERMISSION::HIDE} to "%{_hidepermission}%" parsed as string
  636. set {OPTIONS::DROPS::MIN} to "%{_dropmin}%" parsed as number
  637. set {OPTIONS::DROPS::MAX} to "%{_dropmax}%" parsed as number
  638. set {OPTIONS::STARTVOTE} to "%{_startvote} / 100%" parsed as number
  639. set {OPTIONS::PERMISSION::PREFIXVIP} to "%{_prefixvip}%" parsed as string
  640. set {OPTIONS::GAMETIME} to "%{_gametime}%" parsed as number
  641. set {OPTIONS::PERMISSION::BONUS} to "%{_vipbonus}%" parsed as string
  642. wait 3 second
  643. loop 10 times:
  644. set {_rank} to yaml value "ranks.%loop-number%" from file "config.yml"
  645. wait 2 tick
  646. set {RANKSYSTEM::%loop-number%} to "%{_rank}%" parsed as number
  647. loop all players:
  648. if {KILLS::%loop-player%} is "none" or "<none>":
  649. set {KILLS::%loop-player%} to 0
  650. if {DEATHS::%loop-player%} is "none" or "<none>":
  651. set {DEATHS::%loop-player%} to 0
  652. if {MONEY::%loop-player%} is "none" or "<none>":
  653. set {MONEY::%loop-player%} to 0
  654. if {GAMESPLAYED::%loop-player%} is "none" or "<none>":
  655. set {GAMESPLAYED::%loop-player%} to 0
  656. if {WINS::%loop-player%} is "none" or "<none>":
  657. set {WINS::%loop-player%} to 0
  658. send "{@tag} &2Successfully reloaded the config file!"
  659. if arg 1 is "class":
  660. if arg 2 is not set:
  661. send "&1=============================================="
  662. send "&9/sg class &3create &b[Name]"
  663. send "&9/sg class &3additems &b[Name]"
  664. send "&9/sg class &3changeitems &b[Name] &7[ClassLVL]"
  665. send "&9/sg class &3setprice &b[Name] &7[ClassLVL] &e[Price]"
  666. send "&9/sg class &3list"
  667. send "&9/sg class &cdelete &b[Name]"
  668. send "&1=============================================="
  669. if arg 2 is "create":
  670. if arg 3 is set:
  671. if {CLASS::%arg 3%} is not set:
  672. set {CLASS::%arg 3%} to arg 3
  673. send "&9[Class] &3New class created &b(%arg 3%)"
  674. else:
  675. send "&9[Class] &c%arg 3% is allready created!"
  676. else:
  677. send "&9[Class] &c/sg create &c&l[Name of class]"
  678. if arg 2 is "setprice":
  679. if arg 3 is set:
  680. if {CLASS::%arg 3%} is set:
  681. if arg 4 is not "1":
  682. if arg 5 is set:
  683. if {CLASSITEMS::%arg 3%::LVL::%arg 4%::*} is set:
  684. set {CLASSPRICE::%arg 3%::LVL::%arg 4%} to "%arg 5%" parsed as number
  685. send "&9[Class] &3Price player needs to pay &e%arg 5% &3to buy the class"
  686. send "&9[Class] &3for class : &b((&9%arg 3%&b)&aLvl:&2%arg 4%&b)"
  687. else:
  688. send "&9[Class] &c/sg class setprice [Name of class] &c&l[class lvl] &c[Amount of money]"
  689. else:
  690. send "&9[Class] &c/sg class setprice [Name of class] [class lvl] &c&l[Amount of money]"
  691. else:
  692. send "&9[Class] &cYou can't price class with lvl:1"
  693. else:
  694. send "&9[Class] &cClass %arg 3% is not created yet"
  695. else:
  696. send "&9[Class] &c/sg class setprice &c&l[Name of class] &c[Class lvl] [Amount of money]"
  697. if arg 2 is "additems":
  698. if arg 3 is set:
  699. if {CLASS::%arg 3%} is set:
  700. add 1 to {CLASSLVL::%arg 3%}
  701. loop all items in player's inventory:
  702. add 1 to {_int}
  703. set {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%{_int}%} to "%loop-item%"
  704. set {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%{_int}%} to "%{CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%{_int}%}%" parsed as item
  705. remove loop-item from player's inventory
  706. if {_int} is not set:
  707. send "&9[Class] &cNo items in inventory."
  708. subtract 1 from {CLASSLVL::%arg 3%}
  709. stop
  710. send "&9[Class] &3New items for class &b(%arg 3%) &3are added"
  711. send "&9[Class] &3Class lvl : %{CLASSLVL::%arg 3%}%"
  712. else:
  713. send "&9[Class] &cClass %arg 3% is not created yet"
  714. else:
  715. send "&9[Class] &c/sg class additems &c&l[Name of class]"
  716. if arg 2 is "changeitems":
  717. if arg 3 is set:
  718. if {CLASS::%arg 3%} is set:
  719. if arg 4 is set:
  720. if {CLASSITEMS::%arg 3%::LVL::%arg 4%::*} is set:
  721. loop {CLASSITEMS::%arg 3%::LVL::%arg 4%::*}:
  722. add "%{CLASSITEMS::%arg 3%::LVL::%arg 4%::%loop-index%}%" to {_old::*}
  723. delete {CLASSITEMS::%arg 3%::LVL::%arg 4%::%loop-index%}
  724. wait 1 tick
  725. loop all items in player's inventory:
  726. add 1 to {_int}
  727. set {CLASSITEMS::%arg 3%::LVL::%arg 4%::%{_int}%} to "%loop-item%"
  728. set {CLASSITEMS::%arg 3%::LVL::%arg 4%::%{_int}%} to "%{CLASSITEMS::%arg 3%::LVL::%arg 4%::%{_int}%}%" parsed as item
  729. remove loop-item from player's inventory
  730. if {_int} is not set:
  731. send "&9[Class] &cNo items in inventory."
  732. loop {_old::*}:
  733. set {CLASSITEMS::%arg 3%::LVL::%arg 4%::%loop-index%} to "%loop-value%" parsed as item
  734. stop
  735. send "&9[Class] &3Items for class &b(%arg 3%) &3are changed"
  736. send "&9[Class] &3Class lvl : %arg 4%"
  737. else:
  738. send "&9[Class] &cClass lvl: %arg 4% is not set"
  739. else:
  740. send "&9[Class] &cLvl argument is missed"
  741. else:
  742. send "&9[Class] &cClass %arg 3% is not created yet"
  743. else:
  744. send "&9[Class] &c/sg class changeitems &c&l[Name of class]"
  745. if arg 2 is "delete":
  746. if arg 3 is set:
  747. if {CLASS::%arg 3%} is set:
  748. loop {CLASSLVL::%arg 3%} times:
  749. loop {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::*}:
  750. delete {CLASSITEMS::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%loop-index%}
  751. loop {CLASSPRICE::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::*}:
  752. delete {CLASSPRICE::%arg 3%::LVL::%{CLASSLVL::%arg 3%}%::%loop-index%}
  753. subtract 1 from {CLASSLVL::%arg 3%}
  754. delete {CLASSLVL::%arg 3%}
  755. delete {CLASS::%arg 3%}
  756. send "&9[Class] &cDeleted class %arg 3%"
  757. else:
  758. send "&9[Class] &cClass %arg 3% is not created yet"
  759. else:
  760. send "&9[Class] &c/sg class delete &c&l[Name of class]"
  761. if arg 2 is "list":
  762. if {CLASS::*} is empty:
  763. send "&9[Class] &cThe class list is empty"
  764. stop
  765. loop {CLASS::*}:
  766. send "&9[Class] - &b%loop-index%"
  767. if arg 1 is "options" or "option" or "settings":
  768. if arg 2 is not set:
  769. send "&2========================================"
  770. send "&3&l- &7/options economy"
  771. send "&3&l- &7/options game"
  772. send "&3&l- &7/options permission"
  773. send "&3&l- &7/options drop"
  774. send "&2========================================"
  775.  
  776. if arg 2 is "economy" or "eco":
  777. if arg 3 is not set:
  778. send "&4/options &c eco kill"
  779. send "&4/options &c eco death"
  780. send "&4/options &c eco win"
  781. if arg 3 is "kill":
  782. if arg 4 parsed as number is not set:
  783. send "&4/options &ceco kill &7<[&cAmount of money&7]>"
  784. send "&7 - The reward in money for killing a player"
  785. else:
  786. set {OPTIONS::KILL} to "%arg 4%" parsed as number
  787. send "&c[Options] Economy is updated."
  788. if arg 3 is "death":
  789. if arg 4 parsed as number is not set:
  790. send "&4/options &ceco death &7<[&cAmount of money&7]>"
  791. send "&7 - The amount of money victim will lose when he die"
  792. else:
  793. set {OPTIONS::DEATH} to "%arg 4%" parsed as number
  794. send "&c[Options] Economy is updated."
  795. if arg 3 is "win":
  796. if arg 4 parsed as number is not set:
  797. send "&4/options &ceco win &7<[&cAmount of money&7]>"
  798. send "&7 - The reward in money for winning the game"
  799. else:
  800. set {OPTIONS::WIN} to "%arg 4%" parsed as number
  801. send "&c[Options] Economy is updated."
  802. if arg 2 is "game":
  803. if arg 3 is not set:
  804. send "&4/options &c game gametime"
  805. send "&4/options &c game timestart"
  806. send "&4/options &c game players"
  807. send "&4/options &c game invisible"
  808. send "&4/options &c game votes"
  809. if arg 3 is "timestart":
  810. if arg 4 parsed as number is not set:
  811. send "&4/options &cgame timestart &7<[&cTime to start&7]>"
  812. send "&7 - waiting time to start the game"
  813. else:
  814. set {OPTIONS::TIMESTART} to "%arg 4%" parsed as number
  815. send "&c[Options] Game is updated."
  816. if arg 3 is "players":
  817. if arg 4 parsed as number is not set:
  818. send "&4/options &cgame players &7<[&cAmount of players&7]>"
  819. send "&7 - The minimum amount of players to start the game"
  820. else:
  821. set {OPTIONS::MINPLAYERS} to "%arg 4%" parsed as number
  822. send "&c[Options] Game is updated."
  823. if arg 3 is "invisible":
  824. if arg 4 parsed as number is not set:
  825. send "&4/options &cgame invisible &7<[&cTime in seconds&7]>"
  826. send "&7 - The time in seconds vip will be invisible at start of the game. set it to 0 to disable this function"
  827. else:
  828. set {OPTIONS::HIDETIME} to "%arg 4%" parsed as number
  829. send "&c[Options] Game is updated."
  830. if arg 3 is "votes" or "vote":
  831. if arg 4 parsed as number is not set:
  832. send "&4/options &cgame votes &7<[&cProcentage between 0-100&7]>"
  833. send "&7 - The procentage of votes that need to be reached to start the game"
  834. else:
  835. set {_int} to "%arg 4%" parsed as number
  836. set {OPTIONS::STARTVOTE} to "%{_int} / 100%" parsed as number
  837. send "&c[Options] Game is updated."
  838. if arg 3 is "gametime":
  839. if arg 4 parsed as number is not set:
  840. send "&4/options &cgame gametime &7<[&cTime to end the game&7]>"
  841. send "&7 - When the time end game will be automaticly restarted and no one will win"
  842. else:
  843. set {OPTIONS::GAMETIME} to "%arg 4%" parsed as number
  844. send "&c[Options] Game is updated."
  845. if arg 2 is "permission":
  846. if arg 3 is not set:
  847. send "&4/options &c permission invisible"
  848. send "&4/options &c permission prefixvip"
  849. send "&4/options &c permission vipbonus"
  850. if arg 3 is "invisible":
  851. if arg 4 parsed as string is not set:
  852. send "&4/options &cpermission invisible &7<[&cPermission&7]>"
  853. send "&7 - The permission player will need to be invisible at start of the game"
  854. else:
  855. set {OPTIONS::PERMISSION::PREFIXVIP} to "%arg 4%" parsed as string
  856. send "&c[Options] Game is updated."
  857. if arg 3 is "prefixvip":
  858. if arg 4 parsed as string is not set:
  859. send "&4/options &cpermission prefixvip &7<[&cPermission&7]>"
  860. send "&7 - The permission player will need to get the prefix of a vip on chat"
  861. else:
  862. set {OPTIONS::PERMISSION::PREFIXVIP} to "%arg 4%" parsed as string
  863. send "&c[Options] Game is updated."
  864. if arg 3 is "vipbonus":
  865. if arg 4 parsed as string is not set:
  866. send "&4/options &cpermission vipbonus &7<[&cPermission&7]>"
  867. send "&7 - The permission player will need to get X2 more money for killing a player"
  868. else:
  869. set {OPTIONS::PERMISSION::BONUS} to "%arg 4%" parsed as string
  870. send "&c[Options] Game is updated."
  871. if arg 2 is "drop":
  872. if arg 3 is not set:
  873. send "&4/options &c drop minimum"
  874. send "&4/options &c drop maximum"
  875. if arg 3 is "minimum" or "min":
  876. if arg 4 parsed as number is not set:
  877. send "&4/options &cdrop minimum &7<[&cThe minimum drops&7]>"
  878. send "&7 - The minimum amount of drops can spawn in a chest"
  879. else:
  880. set {OPTIONS::DROPS::MAX} to "%arg 4%" parsed as number
  881. send "&c[Options] Game is updated."
  882. if arg 3 is "maximum" or "max":
  883. if arg 4 parsed as number is not set:
  884. send "&4/options &cdrop maximum &7<[&cThe maximum drops&7]>"
  885. send "&7 - The maximum amount of drops can spawn in a chest"
  886. else:
  887. set {OPTIONS::DROPS::MIN} to "%arg 4%" parsed as number
  888. send "&c[Options] Game is updated."
  889.  
  890. command /vote [<string>]:
  891. trigger:
  892. if arg 1 is not set:
  893. send "{@tag} &cvote start &7- to start the game faster"
  894. if arg 1 is "start":
  895. if {STATUS::%player%} is "waiting":
  896. if {SURVIVALGAMES::%{MAP::%player%}%::STATUS} is "waiting":
  897. if {VOTE::%player%} is not set:
  898. if {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS} is greater than 1:
  899. set {VOTE::%player%} to "%{MAP::%player%}%"
  900. loop {VOTE::*}:
  901. if "%loop-value%" is "%{MAP::%player%}%":
  902. add 1 to {_votes}
  903. set {_wynik} to "%{_votes} / {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%" parsed as number
  904. #send "{@tag} &2Players voted for start &a%{_votes}%&7/&a%{SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%"
  905. set {_procentage2} to "%{OPTIONS::STARTVOTE} * 10%"
  906. replace all "." with "" in {_procentage2}
  907. set {_procentage1} to "%{_wynik} * 10%"
  908. replace all "." with "" in {_procentage1}
  909. if {_procentage1} is "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "10":
  910. set {_procentage1} to "%{_procentage1}%0"
  911. send "{@tag} &2Players voted for start &c%{_procentage1}%&7/&c%{_procentage2}% &aProcent."
  912. if {_wynik} is greater or equal to {OPTIONS::STARTVOTE}:
  913. execute console command "gamecontrol %{OPTIONS::TIMESTART}% %{MAP::%player%}%"
  914. else:
  915. send "{@tag} &cYou are allone in the game need at least 2 player to vote for start"
  916. else:
  917. send "{@tag} &cAllready voted for start of the game."
  918. else:
  919. send "{@tag} &cOnly vote for start while waiting in the game"
  920. else:
  921. send "{@tag} &cOnly vote for start while waiting in the game"
  922.  
  923.  
  924. on hunger bar change:
  925. if {STATUS::%player%} is "hardcore":
  926. if player's food level is greater than 8:
  927. set player's food level to 8
  928. if {STATUS::%player%} is "waiting" or "starting":
  929. cancel event
  930.  
  931. command /join [<string>]:
  932. trigger:
  933. arg 1 is not set:
  934. send "{@tag} &2/join &7[&aMap&7]"
  935. if "%{STATUS::%player%}%" is not "waiting" or "survival" or "normal" or "hardcore":
  936. if {SURVIVALGAMES::%arg 1%} is set:
  937. if "%{SURVIVALGAMES::%arg 1%::STATUS}%" is "off" or "waiting" or "starting":
  938. set {_space} to "%{SURVIVALGAMES::%arg 1%::PLAYERS} + 1%"
  939. if {SURVIVALGAMES::%arg 1%::SPAWN::%{_space}%} is set:
  940. loop {SURVIVALGAMES::%arg 1%::PLACE::*}:
  941. if "%loop-value%" is "false":
  942. set player's health to 10
  943. set {_map} to arg 1
  944. set {_player} to the player
  945. add 1 to {SURVIVALGAMES::%arg 1%::PLAYERS}
  946. teleport player to {SURVIVALGAMES::%arg 1%::SPAWN::%loop-index%}
  947. set {SURVIVLGAMES::%arg 1%::LISTOFPLAYERS::%player%} to "%player%" parsed as player
  948. set {SURVIVALGAMES::%arg 1%::PLACE::%loop-index%} to "true"
  949. set {NR::%player%} to "%loop-index%"
  950. set {STATUS::%player%} to "waiting"
  951. set {MAP::%player%} to arg 1
  952. clear player's inventory
  953. loop {SURVIVLGAMES::%arg 1%::LISTOFPLAYERS::*}:
  954. 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%}
  955. if "%{SURVIVALGAMES::%arg 1%::STATUS}%" is "waiting" or "off":
  956. if {SURVIVALGAMES::%arg 1%::PLAYERS} is greater or equal to {OPTIONS::MINPLAYERS}:
  957. execute console command "gamecontrol %{OPTIONS::TIMESTART}% %arg 1%"
  958. while "%{STATUS::%player%}%" is "waiting":
  959. wait 2 tick
  960. teleport player to {SURVIVALGAMES::%arg 1%::SPAWN::%loop-index%}
  961. display board named "&6>SurvivalGames<" to {_player}
  962. make score "&6&m&l>----" in board of {_player} to 7
  963. make score "&eGameStart:&7%{SURVIVALGAMES::%{_map}%::TIMER}%" in board of {_player} to 6
  964. make score "&6&m&l>---" in board of {_player} to 5
  965. make score "&ePlayers:&7%{SURVIVALGAMES::%{_map}%::PLAYERS}%" in board of {_player} to 4
  966. make score "&6&m&l>--" in board of {_player} to 3
  967. make score "&eMap:&7%{_map}%" in board of {_player} to 2
  968. make score "&6&m&l>-" in board of {_player} to 1
  969. move display of {_player} to sidebar
  970. exit loop
  971. else:
  972. send "{@tag} &cMap is full"
  973. else:
  974. send "{@tag} &cThe map is curretly running"
  975. else:
  976. send "{@tag} &cWrong map"
  977. else:
  978. send "{@tag} &cYou allready in game"
  979.  
  980. command /leave:
  981. trigger:
  982. if {STATUS::%player%} is "waiting":
  983. subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
  984. loop {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::*}:
  985. send "{@tag} %player% left the game &e((&b%{MAP::%player%}%&e)&c%{SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%&e)" to {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%loop-index%}
  986. delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%player%}
  987. #send "&aYou left map &e((&b%{MAP::%player%}%&e)&c%{SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}%&e)"
  988. set {SURVIVALGAMES::%{MAP::%player%}%::PLACE::%{NR::%player%}%} to "false"
  989. set {STATUS::%player%} to "left"
  990. delete {MAP::%player%}
  991. delete {NR::%player%}
  992. wait 5 tick
  993. teleport player to {LOBBY}
  994. delete {VOTE::%player%}
  995. display board named "&6>SurvivalGames<" to player
  996. make score "&eKills:&c%{KILLS::%player%}%" in board of player to 5
  997. make score "&eDeaths:&c%{DEATHS::%player%}%" in board of player to 4
  998. make score "&eMoney:&a%{MONEY::%player%}%" in board of player to 3
  999. make score "&eWins:&9%{GAMESPLAYED::%player%}%" in board of player to 2
  1000. make score "&eGames:&9%{WINS::%player%}%" in board of player to 1
  1001. move display of player to sidebar
  1002. else:
  1003. send "{@tag} &cYou can't leave the game now!"
  1004.  
  1005. command /info [<player>]:
  1006. aliases: stats
  1007. trigger:
  1008. if arg 1 is not set:
  1009. send "&6-------(&3Stats&6)-------"
  1010. send "&6> &eKills: &c%{KILLS::%player%}%"
  1011. send "&6> &eDeaths: &c%{DEATHS::%player%}%"
  1012. send "&6> &eMoney: &a%{MONEY::%player%}%"
  1013. send "&6> &eWins: &9%{WINS::%player%}%"
  1014. send "&6> &eGames: &9%{GAMESPLAYED::%player%}%"
  1015. send "&6-------(&3Stats&6)-------"
  1016. if arg 1 is set:
  1017. send "&6-------(&3Stats&6)-------"
  1018. send "&6> &eKills: &c%{KILLS::%arg 1%}%"
  1019. send "&6> &eDeaths: &c%{DEATHS::%arg 1%}%"
  1020. send "&6> &eMoney: &a%{MONEY::%arg 1%}%"
  1021. send "&6> &eWins: &9%{WINS::%arg 1%}%"
  1022. send "&6> &eGames: &9%{GAMESPLAYED::%arg 1%}%"
  1023. send "&6-------(&3Stats&6)-------"
  1024. on death:
  1025. if {STATUS::%victim%} is "normal" or "survival" or "hardcore":
  1026. if {STATUS::%attacker%} is "normal" or "survival" or "hardcore":
  1027. if {OPTIONS::KILL} is set:
  1028. if attacker has permission "%{OPTIONS::PERMISSION::BONUS}%":
  1029. set {_new} to "%{OPTIONS::KILL} * 2%" parsed as number
  1030. add {_new} to {MONEY::%attacker%}
  1031. send "{@tag} &aReward of %{_new}% for killing %victim%" to attacker
  1032. else:
  1033. send "{@tag} &aReward of %{OPTIONS::KILL}% for killing %victim%" to attacker
  1034. add {OPTIONS::KILL} to {MONEY::%attacker%}
  1035. if {OPTIONS::DEATH} is set:
  1036. if {OPTIONS::DEATH} is greater than 0:
  1037. subtract {OPTIONS::DEATH} from {MONEY::%victim%}
  1038. send "{@tag} &aLose of %{OPTIONS::DEATH}% money. &cfor death" to victim
  1039. if {MONEY::%victim%} is smaller than 0:
  1040. set {MONEY::%victim%} to 0
  1041. delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%victim%}
  1042. subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
  1043. set {STATUS::%victim%} to "false"
  1044. delete {MAP::%victim%}
  1045. delete {NR::%victim%}
  1046. add 1 to {KILLS::%attacker%}
  1047. add 1 to {DEATHS::%victim%}
  1048. delete {VOTE::%victim%}
  1049. set the death message to "{@tag} &a%attacker% &cKilled &a%victim% &con map &b(&e%{MAP::%attacker%}%&b)"
  1050. if {INVISIBLE::%victim%} is set:
  1051. reveal victim to all players
  1052. delete {INVISIBLE::%victim%}
  1053. strike lightning effect at victim
  1054. add location of victim to {SURVIVALGAMES::%{MAP::%victim%}%::DROPPEDITEMS::*}
  1055. display board named "&6>SurvivalGames<" to victim
  1056. make score "&eKills:&c%{KILLS::%victim%}%" in board of victim to 5
  1057. make score "&eDeaths:&c%{DEATHS::%victim%}%" in board of victim to 4
  1058. make score "&eMoney:&a%{MONEY::%victim%}%" in board of victim to 3
  1059. make score "&eWins:&9%{GAMESPLAYED::%victim%}%" in board of victim to 2
  1060. make score "&eGames:&9%{WINS::%victim%}%" in board of victim to 1
  1061. move display of victim to sidebar
  1062. else:
  1063. delete {SURVIVLGAMES::%{MAP::%player%}%::LISTOFPLAYERS::%victim%}
  1064. set {STATUS::%victim%} to "false"
  1065. subtract 1 from {SURVIVALGAMES::%{MAP::%player%}%::PLAYERS}
  1066. delete {MAP::%victim%}
  1067. delete {NR::%victim%}
  1068. add 1 to {DEATHS::%victim%}
  1069. set the death message to "{@tag} &a%victim% &cdied on map &b(&e%{MAP::%attacker%}%&b)"
  1070. delete {VOTE::%victim%}
  1071. if {INVISIBLE::%victim%} is set:
  1072. reveal victim to all players
  1073. delete {INVISIBLE::%victim%}
  1074. strike lightning effect at victim
  1075. add location of victim to {SURVIVALGAMES::%{MAP::%victim%}%::DROPPEDITEMS::*}
  1076. display board named "&6>SurvivalGames<" to victim
  1077. make score "&eKills:&c%{KILLS::%victim%}%" in board of victim to 5
  1078. make score "&eDeaths:&c%{DEATHS::%victim%}%" in board of victim to 4
  1079. make score "&eMoney:&a%{MONEY::%victim%}%" in board of victim to 3
  1080. make score "&eWins:&9%{GAMESPLAYED::%victim%}%" in board of victim to 2
  1081. make score "&eGames:&9%{WINS::%victim%}%" in board of victim to 1
  1082. move display of victim to sidebar
  1083.  
  1084. on damage:
  1085. if {INVISIBLE::%attacker%} is set:
  1086. send "&cCan't damage other player's while invisible" to attacker
  1087. cancel event
  1088. stop
  1089.  
  1090. on break:
  1091. if {STATUS::%player%} is "waiting" or "normal":
  1092. cancel event
  1093. stop
  1094. else if {STATUS::%player%} is "survival":
  1095. if {SURVIVALGAMES::%{MAP::%player%}%::PLACEBLOCKS::%location of event-block%} is not set:
  1096. set {SURVIVALGAMES::%{MAP::%player%}%::BREAKBLOCKS::%location of event-block%} to location of event-block
  1097. set {SURVIVALGAMES::%{MAP::%player%}%::BREAKBLOCKSTYPE::%location of event-block%} to "%event-block%" parsed as item
  1098. stop
  1099. stop
  1100. stop
  1101. on place:
  1102. if {STATUS::%player%} is "waiting" or "normal":
  1103. cancel event
  1104. stop
  1105. else if {STATUS::%player%} is "survival":
  1106. set {SURVIVALGAMES::%{MAP::%player%}%::PLACEBLOCKS::%location of event-block%} to location of event-block
  1107. stop
  1108.  
  1109. on drop:
  1110. if {STATUS::%player%} is "survival" or "normal" or "hardcore":
  1111. add location of player to {SURVIVALGAMES::%{MAP::%player%}%::DROPPEDITEMS::*}
  1112. stop
  1113. else if {STATUS::%player%} is "waiting":
  1114. cancel event
  1115. stop
  1116. else:
  1117. stop
  1118.  
  1119.  
  1120. #set slot 0 of player's inventory to {_snownumber.%player%} snowball named "&7Feu d'Artifice
  1121. #{SURVIVALGAMES::%arg 3%::DROPS::%arg 4%}
  1122.  
  1123. on right click on chest:
  1124. if {STATUS::%player%} is "survival" or "normal" or "hardcore":
  1125. if event-block is chest:
  1126. if {SURVIVALGAMES::%{MAP::%player%}%::CHEST::%location of event-block%} is not set:
  1127. clear the block's inventory
  1128. set {SURVIVALGAMES::%{MAP::%player%}%::CHEST::%location of event-block%} to "%location of event-block%"
  1129. while {_dropname} is not set:
  1130. if {SURVIVALGAMES::%{MAP::%player%}%::DROPS::*} is empty:
  1131. send "&c&lThe chest drops are not set plase contact the adminstrator"
  1132. cancel event
  1133. stop
  1134. loop {SURVIVALGAMES::%{MAP::%player%}%::DROPS::*}:
  1135. # wait a tick
  1136. chance of 38%:
  1137. set {_dropname} to "%loop-value%"
  1138. set {_times} to random number between {OPTIONS::DROPS::MIN} and {OPTIONS::DROPS::MAX}
  1139. set {_times} to rounded {_times}
  1140. set {_TYPES::*} to {ITEMSDROP::%{_dropname}%::TYPE::*}
  1141. while {_times} is set:
  1142. loop {_TYPES::*}:
  1143. chance of {ITEMSDROP::%{_dropname}%::CHANCE::%loop-index%}%:
  1144. set {_amount} to random number between {ITEMSDROP::%{_dropname}%::MIN::%loop-index%} and {ITEMSDROP::%{_dropname}%::MAX::%loop-index%}
  1145. set {_amount} to rounded {_amount}
  1146. loop {_amount} times:
  1147. add {ITEMSDROP::%{_dropname}%::TYPE::%loop-index%} to event-block
  1148. delete {_TYPES::%loop-index%}
  1149. subtract 1 from {_times}
  1150. wait 1 tick
  1151. if {_times} is smaller or equal to 0:
  1152. delete {_times}
  1153. wait 2 tick
  1154. if {_TYPES::*} is not set:
  1155. stop
  1156. on first join:
  1157. send "&aThis serwer is running &2SurvivalGames 1.95 &aplugin by &ekaringijs272"
  1158. on join:
  1159. if player is op:
  1160. 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"
  1161. send "&c&l* &2SurvivalGames &aVersion &b2.0&4/&aRelease"
  1162. send "&c&l* &7The stable version release by karingijs"
  1163. send "&c&l* &7Don't forget to look for new &6(&bUpdates&6) &7of it"
  1164. 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"
  1165.  
  1166. command /class [<string>] [<string>]:
  1167. aliases: kit
  1168. trigger:
  1169. if arg 1 is not set:
  1170. send "&2[&bClass&2] &cClass list"
  1171. send "&2[&bClass&2] &cClass select &a[class]"
  1172. send "&2[&bClass&2] &cClass upgrade &a[class]"
  1173. if arg 1 is "upgrade":
  1174. if arg 2 is set:
  1175. if {CLASS::%arg 2%} is set:
  1176. if {STATUS::%player%} is not "survival" or "normal" or "hardcore":
  1177. set {_player::%player%} to the player
  1178. loop {_player::*}:
  1179. if "%loop-index%" is "%player%":
  1180. set {_player} to "%loop-index%"
  1181. set {_lvl} to yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml"
  1182. wait 2 tick
  1183. if {_lvl} is not set:
  1184. set yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml" to "1"
  1185. set {_lvl} to 1
  1186. set {_lvl} to "%{_lvl}%" parsed as number
  1187. add 1 to {_lvl}
  1188. if {CLASSITEMS::%arg 2%::LVL::%{_lvl}%::*} is set:
  1189. if {MONEY::%player%} is greater or equal to {CLASSPRICE::%arg 2%::LVL::%{_lvl}%}:
  1190. subtract {CLASSPRICE::%arg 2%::LVL::%{_lvl}%} from {MONEY::%player%}
  1191. set yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml" to "%{_lvl}%"
  1192. send "&2[&bClass&2] &aSuccessfully upgreaded class &b%arg 2% &ato LVL: &9%{_lvl}%"
  1193. else:
  1194. send "&2[&bClass&2] &cNeeds %{CLASSPRICE::%arg 2%::LVL::%{_lvl}%} - {MONEY::%player%}% more money to buy %{CLASSPRICE::%arg 2%::LVL::%{_lvl}%}%"
  1195. else:
  1196. send "&2[&bClass&2] &cClass is been upgreaded to the maximum lvl"
  1197. else:
  1198. send "&2[&bClass&2] &cCan't select class in game"
  1199. else:
  1200. send "&2[&bClass&2] &cWrong class plase check the /class list"
  1201. else:
  1202. send "&2[&bClass&2] &c/Class upgrade &c&l[Class]"
  1203. if arg 1 is "select":
  1204. if arg 2 is set:
  1205. if {CLASS::%arg 2%} is set:
  1206. if {STATUS::%player%} is "waiting":
  1207. set {_player::%player%} to the player
  1208. loop {_player::*}:
  1209. if "%loop-index%" is "%player%":
  1210. set {_player} to "%loop-index%"
  1211. set {_lvl} to yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml"
  1212. wait 2 tick
  1213. if {_lvl} is not set:
  1214. set yaml value "lvl.%arg 2%" from file "SurvivalGames/classess/%{_player}%.yml" to "1"
  1215. set {_lvl} to 1
  1216. clear the player's inventory
  1217. loop {CLASSITEMS::%arg 2%::LVL::%{_lvl}%::*}:
  1218. add {CLASSITEMS::%arg 2%::LVL::%{_lvl}%::%loop-index%} to the player's inventory
  1219. set {CLASSPREFIX::%player%} to "%arg 2%"
  1220. send "&2[&bClass&2] &2%arg 2% &aSelected."
  1221. else:
  1222. send "&2[&bClass&2] &cYou can only select youre class while waiting to start"
  1223. else:
  1224. send "&2[&bClass&2] &cWrong class plase check the /class list"
  1225. else:
  1226. send "&2[&bClass&2] &c/Class select &c&l[Class]"
  1227. if arg 1 is "list":
  1228. set {_player::%player%} to the player
  1229. loop {_player::*}:
  1230. if "%loop-index%" is "%player%":
  1231. set {_player} to "%loop-index%"
  1232. send "&9______________________________"
  1233. loop {CLASS::*}:
  1234. set {_lvl%loop-index%} to yaml value "lvl.%loop-index%" from file "SurvivalGames/classess/%{_player}%.yml"
  1235. wait 1 tick
  1236. if {_lvl%loop-index%} is not set:
  1237. set {_lvl%loop-index%} to 1
  1238. send "&6[*] &9%loop-index% &6[*] &9LVL: &a%{_lvl%loop-index%}% &6[*]"
  1239. #&4&l[&c&l&oOwner&4&l] &c&o[username]&4: &b<message>
  1240. #&e&l<<&2&lO&a&lwner&e&l>>
  1241. #&5[&6asdasdsa&5]
  1242. #&b☢&8[&4Owner&8]&b☢&6 In
  1243. on chat:
  1244. if {WINS::%player%} is smaller or equal to {RANKSYSTEM::1}:
  1245. set {_rank} to "&7☢"
  1246. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::2}:
  1247. set {_rank} to "&8☢"
  1248. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::3}:
  1249. set {_rank} to "&d☢"
  1250. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::4}:
  1251. set {_rank} to "&5☢"
  1252. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::5}:
  1253. set {_rank} to "&a☢"
  1254. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::6}:
  1255. set {_rank} to "&2☢"
  1256. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::7}:
  1257. set {_rank} to "&e☢"
  1258. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::8}:
  1259. set {_rank} to "&6☢"
  1260. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::9}:
  1261. set {_rank} to "&c☢"
  1262. else if {WINS::%player%} is smaller or equal to {RANKSYSTEM::10}:
  1263. set {_rank} to "&4☢"
  1264. if {STATUS::%player%} is "waiting" or "normal" or "survival" or "hardcore":
  1265. cancel event
  1266. if {CLASSPREFIX::%player%} is not set:
  1267. set {_class} to "&b * "
  1268. else:
  1269. set {_class} to "%{CLASSPREFIX::%player%}%"
  1270. if player is op:
  1271. broadcast "&1[&9%{_class}%&1] %{_rank}% &c%player%: &e%message%"
  1272. stop
  1273. if player has permission "%{OPTIONS::PERMISSION::PREFIXVIP}%":
  1274. broadcast "&1[&9%{_class}%&1] %{_rank}% &6%player%: &e%message%"
  1275. stop
  1276. broadcast "&1[&9%{_class}%&1] %{_rank}% &7%player%: &e%message%"
  1277. stop
  1278. cancel event
  1279. if player is op:
  1280. broadcast "&4&l[&c&l&oAdmin&4&l] %{_rank}% &c&o%player%&4: &b%message%"
  1281. stop
  1282. if player has permission "%{OPTIONS::PERMISSION::PREFIXVIP}%":
  1283. broadcast "&6&l[&e&l&oVip&6&l] %{_rank}% &e&o%player%&6: &e%message%"
  1284. stop
  1285. broadcast "&8&l[&7&l&oMember&8&l] %{_rank}% &7&o%player%&8: &7%message%"
  1286. stop
  1287. command /list:
  1288. trigger:
  1289. loop {SURVIVALGAMES::*}:
  1290. if {SURVIVLGAMES::%loop-index%::LISTOFPLAYERS::*} is set:
  1291. loop {SURVIVLGAMES::%loop-index%::LISTOFPLAYERS::*}:
  1292. if {_list} is set:
  1293. set {_list} to "&6%{_list}%&a, &6%loop-value-2%"
  1294. if {_list} is not set:
  1295. set {_list} to "%loop-index-2%"
  1296. send "&9[&6SG&9] &3Map &b%loop-index-1% &2Players: &6%{_list}%"
  1297. delete {_list}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement