NelGossem_

Untitled

Jul 7th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.98 KB | None | 0 0
  1. # ____ __.__.__ .__ ___________.__ ____ __.__
  2. # | |/ _|__| | | | \__ ___/| |__ ____ | |/ _|__| ____ ____
  3. # | < | | | | | | | | | \_/ __ \ | < | |/ \ / ___\
  4. # | | \| | |_| |__ | | | Y \ ___/ | | \| | | \/ /_/ >
  5. # |____|__ \__|____/____/ |____| |___| /\___ > |____|__ \__|___| /\___ /
  6. # \/ \/ \/ \/ \//_____/
  7.  
  8. # ########################################
  9. # # Kill The King by NelGossem_ #
  10. # #GoldenGames : pvp.goldengames.fr:27470#
  11. # ########################################
  12.  
  13. options:
  14. {ktk.minplayer}: 4 #Nombre de joueur requit pour débuter la partie
  15. {ktk.maxplayer}: 20 #Le nombre maximum de joueur
  16.  
  17. variables: #NE PAS CHANGER
  18. {ktk.%player%.join} = false
  19. {ktk.start} = false
  20. {ktk.slots} = 0
  21. {coins.%player%} = 0
  22.  
  23.  
  24. # COMMANDES
  25.  
  26. command /ktkadmin <text> [<text>]:
  27. permission: ktkadmin.perm
  28. trigger:
  29.  
  30. if arg 1 is equal to "help":
  31. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  32. message "&4> &e/ktk help &6- &eVoir la liste des commandes joueurs" to command sender
  33. message "&4> &e/ktkadmin help &6- &eVoir la liste des commandes administrateurs" to command sender
  34. message "&4> &e/ktkadmin setlobbyspawn &6-&e Définir le point de spawn de la salle d attente" to command sender
  35. message "&4> &e/ktkadmin setfinspawn &6-&e Définir le point de spawn ou le joueur spawnera quand il aura perdue/quiter" to command sender
  36. message "&4> &e/ktkadmin setpointspawn1 &6-&e Définir le point de spawn de l équipe 1" to command sender
  37. message "&4> &e/ktkadmin setpointspawn2 &6-&e Définir le point de spawn de l équipe 2" to command sender
  38. message "&4> &e/ktkadmin setsign join/leave &6- &eSet la pancarte" to command sender
  39. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  40.  
  41. if arg 1 is not set:
  42. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  43. message "&4> &e/ktk help &6- &eVoir la liste des commandes joueurs" to command sender
  44. message "&4> &e/ktkadmin help &6- &eVoir la liste des commandes administrateurs" to command sender
  45. message "&4> &e/ktkadmin setlobbyspawn &6-&e Définir le point de spawn de la salle d attente" to command sender
  46. message "&4> &e/ktkadmin setfinspawn &6-&e Définir le point de spawn ou le joueur spawnera quand il aura perdue/quiter" to command sender
  47. message "&4> &e/ktkadmin setpointspawn1 &6-&e Définir le point de spawn de l équipe 1" to command sender
  48. message "&4> &e/ktkadmin setpointspawn2 &6-&e Définir le point de spawn de l équipe 2" to command sender
  49. message "&4> &e/ktkadmin setsign join/leave &6- &eSet la pancarte" to command sender
  50. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  51.  
  52. if arg 1 is equal to "setpointspawn1":
  53. set {ktk.spawn1} to location of player
  54. message "&6Kill The King &4&l> &7Le point de spawn de l équipe numéro 1 a été définit en : %location of player%"
  55.  
  56. if arg 1 is equal to "setpointspawn2":
  57. set {ktk.spawn2} to location of player
  58. message "&6Kill The King &4&l> &7Le point de spawn de l équipe numéro 2 a été définit en : %location of player%"
  59.  
  60. if arg 1 is equal to "setlobbyspawn":
  61. set {ktk.wait} to location of player
  62. message "&6Kill The King &4&l> &7Le point de spawn de la salle d attente a été définit en : %location of player%"
  63.  
  64. if arg 1 is equal to "setfinspawn":
  65. set {ktk.finspawn} to location of player
  66. message "&6Kill The King &4&l> &7Le point de spawn ou le joueur spawnera en quittant ou en perdant a été définit en : %location of player%"
  67.  
  68. if arg 1 is equal to "setsign":
  69. arg 2 is "join":
  70. if {ktk.configure_sign.leave} is true:
  71. send "&eVous configurez déjà le panneau de Leave"
  72. stop
  73. set {ktk.configure_sign.join} to true
  74. send "&eFaites un clic droit sur le panneau de Join"
  75. arg 2 is "leave":
  76. if {ktk.configure_sign.join} is true:
  77. send "&eVous configurez déjà le panneau de Join"
  78. stop
  79. set {ktk.configure_sign.leave} to true
  80. send "&eFaites un clic droit sur le panneau de Leave"
  81.  
  82. command /ktk [<text=help>]:
  83. trigger:
  84.  
  85. if arg 1 is equal to "help":
  86. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  87. message "&4> &e/ktk help &6- &eVoir la liste des commandes joueurs" to command sender
  88. message "&4> &e/ktkadmin help &6- &eVoir la liste des commandes administrateurs" to command sender
  89. message "&4> &e/ktk join/enter/play &6- &eRejoindre la partie" to command sender
  90. message "&4> &e/ktk leave/quit/exit &6- &eQuitter la partie" to command sender
  91. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  92.  
  93. if arg 1 is not set:
  94. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  95. message "&4> &e/ktk help &6- &eVoir la liste des commandes joueurs" to command sender
  96. message "&4> &e/ktkadmin help &6- &eVoir la liste des commandes administrateurs" to command sender
  97. message "&4> &e/ktk join/enter/play &6- &eRejoindre la partie" to command sender
  98. message "&4> &e/ktk leave/quit/exit &6- &eQuitter la partie" to command sender
  99. message "&6========= &4Kill The King by NelGossem_ &6=========" to command sender
  100.  
  101. if arg 1 is equal to "join":
  102. if {ktk.%player%.join} is true:
  103. send "&cVous êtes déja en jeu !"
  104. stop
  105. if {ktk.start} is true:
  106. send "&cLa partie a déja commencé !"
  107. stop
  108. if {ktk.slots} is {ktk.maxplayer}:
  109. send "&cLa partie est complète"
  110. stop
  111. set {ktk.%player%.join} to true
  112. wait 1 tick
  113. clear the player's inventory
  114. wait 1 tick
  115. message "&6Kill The King &4&l> &7Vous avez rejoint la partie"
  116. add 1 to {ktk.slots}
  117. teleport player to {ktk.wait}
  118. set {ktk.invincible.%player%} to true
  119. give a emerald named "&6Shop" to slot 4 of player's inventory
  120. give an bed named "&cQuitter" with lore "&cVeux-tu quitter ?" to slot 8 of player's inventory
  121. give an blue wool named "&6Rejoin l équipe bleue" to slot 0 of player's inventory
  122. give an red wool named "&6Rejoin l équipe rouge" to slot 1 of player's inventory
  123. {ktk.slots} is equal to {ktk.minplayer}:
  124. execute console command "/ktkstartcommande"
  125.  
  126.  
  127. if arg 1 is equal to "leave" or "quit" or "exit":
  128. if {ktk.%player%.join} is false:
  129. send "&cVous n'êtes pas en jeu !"
  130. stop
  131. message "&6Kill The King &4&l> &7Vous avez quitté la partie"
  132. set {ktk.%player%.join} to false
  133. teleport player to {ktk.finspawn}
  134. remove 1 from {game.slots}
  135. set {ktk.invincible.%player%} to false
  136. set {ktk.enjeu.%player%} to false
  137. clear the player's inventory
  138. set {ktk.red.%player%} to false
  139. set {ktk.bleue.%player%} to false
  140.  
  141. command /ktkstartcommande:
  142. trigger:
  143. set {ktk.start} to true
  144. clear the player's inventory
  145. loop all players:
  146. if {ktk.%loop-player%.join} is true:
  147. message "&a5" to loop-player
  148. wait 1 second
  149. message "&a4" to loop-player
  150. wait 1 second
  151. message "&a3" to loop-player
  152. wait 1 second
  153. message "&a2" to loop-player
  154. wait 1 second
  155. message "&a1" to loop-player
  156. wait 1 second
  157. message "&aQue le dernier roi survive !" to loop-player
  158. wait 0.5 tick
  159. give loop-player a stone sword named "&bL épée"
  160. give loop-player a bow named "&bL arc"
  161. give loop-player 12 arrow named "&bLa fleche"
  162. clear {ktk.bleue.king.%player%}
  163. clear {ktk.red.king.%player%}
  164. add a random player out of {ktk.bleue.%loop-player%} to {ktk.bleue.king.%player%}
  165. add a random player out of {ktk.red.%loop-player%} to {ktk.red.king.%player%}
  166. if {ktk.bleue.%loop-player%} is true:
  167. equip loop-player with all leather armour
  168. teleport loop-player to {ktk.spawn1}
  169. if {ktk.red.%loop-player%} is true:
  170. equip loop-player with all leather armour
  171. teleport loop-player to {ktk.spawn2}
  172. if {ktk.buy1.%loop-player%} is true:
  173. delete player's chestplate
  174. equip loop-player with leather Chestplate of protection 1
  175. if {ktk.buy2.%loop-player%} is true:
  176. delete player's chestplate
  177. equip loop-player with iron Chestplate
  178. set {ktk.invincible.%loop-player%} to false
  179. set {ktk.enjeu.%loop-player%} to true
  180.  
  181. On rightclick with bed:
  182. if {ktk.invincible.%player%} is true:
  183. make player execute "ktk leave"
  184. On join:
  185. if {ktk.invincible.%player%} is true:
  186. teleport player to {ktk.finspawn}
  187. set {ktk.invincible.%player%} to false
  188. clear the player's inventory
  189. set {ktk.%player%.join} to false
  190. if {ktk.enjeu.%player%} is true:
  191. teleport player to {ktk.finspawn}
  192. set {ktk.enjeu.%player%} to false
  193. execute console command "clear %player%"
  194. set {ktk.%player%.join} to false
  195. On rightclick with blue wool:
  196. if {ktk.invincible.%player%} is true:
  197. set {ktk.bleue.%player%} to true
  198. set {ktk.red.%player%} to false
  199. message "&6Kill The King &4&l> &7Vous avez rejoint l équipe &3Bleue"
  200.  
  201. On rightclick with red wool:
  202. if {ktk.invincible.%player%} is true:
  203. set {ktk.red.%player%} to true
  204. set {ktk.bleue.%player%} to false
  205. message "&6Kill The King &4&l> &7Vous avez rejoint l équipe &4Rouge"
  206.  
  207. On rightclick with emerald:
  208. open chest with 1 row named "&9Shop" to player
  209. wait 4 ticks
  210. format slot 0 of player with Black Stained Glass Pane named " " with lore " " to close
  211. format slot 1 of player with diamond helmet named "&4Stuff" with lore "&2Améliorez votre stuff !" to close then run [make player execute command "/ktkguistuffshop"]
  212. format slot 2 of player with Black Stained Glass Pane named " " with lore " " to close
  213. format slot 3 of player with Black Stained Glass Pane named " " with lore " " to close
  214. format slot 4 of player with iron sword named "&4épée" with lore "&2Améliorez votre épée !" to close then run [make player execute command "/ktkguiepeeshop"]
  215. format slot 5 of player with Black Stained Glass Pane named " " with lore " " to close
  216. format slot 6 of player with Black Stained Glass Pane named " " with lore " " to close
  217. format slot 7 of player with stick named "&4Les batons magics !" with lore "&2Achetez votre baton !" to close then run [make player execute command "/ktkguibatonshop"]
  218. format slot 8 of player with Black Stained Glass Pane named " " with lore " " to close
  219.  
  220. command /ktkguistuffshop:
  221. trigger:
  222. wait 3 ticks
  223. open chest with 1 row named "&9Shop - Stuff" to player
  224. format slot 0 of player with leather Chestplate of protection 1 named "&bNiveau 1" with lore "&bPrix : 10 coins" to close then run [make player execute command "/ktkbuy1"]
  225. format slot 1 of player with Iron Chestplate named "&bNiveau 2" with lore "&bPrix : 20 coins" to close then run [make player execute command "/ktkbuy2"]
  226. format slot 2 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  227. format slot 3 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  228. format slot 4 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  229. format slot 5 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  230. format slot 6 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  231. format slot 7 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  232. format slot 8 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  233.  
  234. command /ktkguiepeeshop:
  235. trigger:
  236. wait 3 ticks
  237. open chest with 1 row named "&9Shop - épée" to player
  238. format slot 0 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  239. format slot 1 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  240. format slot 2 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  241. format slot 3 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  242. format slot 4 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  243. format slot 5 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  244. format slot 6 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  245. format slot 7 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  246. format slot 8 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  247.  
  248. command /ktkguibatonshop:
  249. trigger:
  250. wait 3 ticks
  251. open chest with 1 row named "&9Shop - Baton" to player
  252. format slot 0 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  253. format slot 1 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  254. format slot 2 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  255. format slot 3 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  256. format slot 4 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  257. format slot 5 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  258. format slot 6 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  259. format slot 7 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  260. format slot 8 of player with Black Stained Glass Pane named "&4Bientot" with lore " " to close
  261.  
  262.  
  263.  
  264.  
  265.  
  266. Command /ktkbuy1:
  267. trigger:
  268. if {coins.%player%} > 9:
  269. remove 10 from {coins.%player%}
  270. set {ktk.buy1.%player%} to true
  271. set {achat.%player%} to true
  272. send "&aAchat effectué ! Tu auras ta récompense dès que la partie commencera !"
  273. else:
  274. send "&cTu n'as pas assez de coins"
  275. stop
  276.  
  277. Command /ktkbuy2:
  278. trigger:
  279. if {coins.%player%} > 19:
  280. remove 20 from {coins.%player%}
  281. set {ktk.buy2.%player%} to true
  282. set {achat.%player%} to true
  283. send "&aAchat effectué ! Tu auras ta récompense dès que la partie commencera !"
  284. else:
  285. send "&cTu n'as pas assez de coins"
  286. stop
  287.  
  288. on respawn:
  289. if {ktk.red.%player%} is true:
  290. wait 1 tick
  291. teleport player to {ktk.spawn2}
  292. if {ktk.bleue.%player%} is true:
  293. wait 1 tick
  294. teleport player to {ktk.spawn1}
  295.  
  296. on chat:
  297. if {ktk.red.%player%} is true:
  298. loop all players:
  299. if {ktk.%loop-player%.join} is true:
  300. cancel event
  301. message "&6[&4Rouge&6] &2%player% &4&l> &7%message%" to loop-player
  302. if {ktk.bleue.%player%} is true:
  303. loop all players:
  304. if {ktk.%loop-player%.join} is true:
  305. cancel event
  306. message "&6[&3Bleue&6] &2%player% &4&l> &7%message%" to loop-player
  307.  
  308. on damage:
  309. if {ktk.red.%attacker%} is true:
  310. if {ktk.red.%victim%} is true:
  311. cancel event
  312. if {ktk.bleue.%attacker%} is true:
  313. if {ktk.bleue.%victim%} is true:
  314. cancel event
  315.  
  316. On right click on sign:
  317. player is op
  318. {ktk.configure_sign.join} is true:
  319. set {ktk.sign_location} to location of clicked block
  320. set first line of clicked block to "&a[&bKill The King&a]"
  321. set second line of clicked block to "&aRejoindre la partie"
  322. set {ktk.configure_sign.join} to false
  323. {ktk.configure_sign.leave} is true:
  324. set {ktk.sign_location} to location of clicked block
  325. set first line of clicked block to "&a[&bKill The King&a]"
  326. set second line of clicked block to "&aQuitter la partie"
  327. set {ktk.configure_sign.leave} to false
  328.  
  329. On right click on sign:
  330. if first line of clicked block is "&a[&bKill The King&a]":
  331. if second line of clicked block is "&aRejoindre la partie":
  332. make player execute command "/ktk join"
  333. stop
  334. if first line of clicked block is "&a[&bKill The King&a]":
  335. if second line of clicked block is "&aQuitter la partie":
  336. make player execute command "/ktk leave"
  337. stop
  338.  
  339. on drop:
  340. if {ktk.invincible.%player%} is true:
  341. cancel event
  342. if {ktk.enjeu.%player%} is true:
  343. cancel event
  344.  
  345. On Hunger Meter Change:
  346. if {ktk.invincible.%player%} is true:
  347. cancel event
  348. set the player's food level to 10
  349. if {ktk.enjeu.%player%} is true:
  350. cancel event
  351. set the player's food level to 10
  352.  
  353. on place:
  354. if {ktk.invincible.%player%} is true:
  355. cancel event
  356. if {ktk.enjeu.%player%} is true:
  357. cancel event
  358.  
  359. on break:
  360. if {ktk.invincible.%player%} is true:
  361. cancel event
  362. if {ktk.enjeu.%player%} is true:
  363. cancel event
  364.  
  365. On Heal:
  366. if player is "{ktk.bleue.king.%player%}":
  367. cancel event
  368. if player is "{ktk.red.king.%player%}":
  369. cancel event
  370.  
  371. On death:
  372. if player is "{ktk.bleue.king.%victim%}":
  373. loop all players:
  374. if {ktk.%loop-player%.join} is true:
  375. message "&4Le roi de l équipe BLEUE a été tué par %attacker%" to loop-player
  376. message "&4Félicitation à l équipe ROUGE qui remporte la partie !" to loop-player
  377. teleport loop-player to {ktk.finspawn}
  378. set {ktk.start} to false
  379. set {ktk.%loop-player%.join} to false
  380. set {ktk.slots} to 0
  381. if {ktk.red.%loop-player%} is true:
  382. add 2 to {coins.%loop-player%}
  383.  
  384. if player is "{ktk.red.king.%victim%}":
  385. loop all players:
  386. if {ktk.%loop-player%.join} is true:
  387. message "&4Le roi de l équipe ROUGE a été tué par %attacker%" to loop-player
  388. message "&4Félicitation à l équipe BLEUE qui remporte la partie !" to loop-player
  389. teleport loop-player to {ktk.finspawn}
  390. set {ktk.start} to false
  391. set {ktk.%loop-player%.join} to false
  392. set {ktk.slots} to 0
  393. if {ktk.bleue.%loop-player%} is true:
  394. add 2 to {coins.%loop-player%}
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401. # ########################################
  402. # # Kill The King by NelGossem_ #
  403. # #GoldenGames : pvp.goldengames.fr:27470#
  404. # ########################################
  405.  
  406.  
  407. # ____ __.__.__ .__ ___________.__ ____ __.__
  408. # | |/ _|__| | | | \__ ___/| |__ ____ | |/ _|__| ____ ____
  409. # | < | | | | | | | | | \_/ __ \ | < | |/ \ / ___\
  410. # | | \| | |_| |__ | | | Y \ ___/ | | \| | | \/ /_/ >
  411. # |____|__ \__|____/____/ |____| |___| /\___ > |____|__ \__|___| /\___ /
  412. # \/ \/ \/ \/ \//_____/
Advertisement
Add Comment
Please, Sign In to add comment