Guest User

PvPBox

a guest
Jan 15th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.01 KB | None | 0 0
  1. #=========================#
  2. # PvPArena #
  3. # V 3.0 #
  4. # by JouonsEnsemble #
  5. #=========================#
  6.  
  7. #=========================#
  8. # Options #
  9. #=========================#
  10.  
  11. options:
  12. prefix: &7[&ePvPArena&7] # Prefix avant un message de ce plugin
  13.  
  14. monde: Test_Kwaki # Vous devez mettre absolument votre monde !
  15.  
  16. commande_principal: pvparena
  17.  
  18. commande_secondaire_aliase: pa
  19.  
  20. Nom_de_votre_serveur: HorizonCraft # Le Nom de votre Serveur ou vous voulez mettre le Game
  21.  
  22. permission: pvparena.op # La permission pour Set les spawn et les tp .
  23.  
  24. #=========================#
  25. # Divers #
  26. #=========================#
  27.  
  28. on join:
  29. if {pvp.arena.mort.%player%} isn't set:
  30. set {pvp.arena.mort.%player%} to 0
  31. if {pvp.arena.kill.%player%} isn't set:
  32. set {pvp.arena.kill.%player%} to 0
  33. if {pvp.arena.ratio.%player%} isn't set:
  34. set {pvp.arena.ratio.%player%} to 0
  35.  
  36. on respawn:
  37. if player is in "{@Test _Kwaki}":
  38. teleport player to {pvp.arena}
  39. set slot 0 of player to paper named "&eStats"
  40. set slot 4 of player to golden apple item named "&e« &aRejoindre L'arène &e»"
  41. set slot 8 of player to sign named "&6Actuces & Crafts"
  42.  
  43. on death:
  44. if player is in "{@Test_Kwaki}":
  45. clear drops
  46. if attacker is a player:
  47. if victim is a player:
  48. teleport player to {pvp.arena}
  49. apply slowness to the victim for 2 tick
  50. add 1 to {pvp.arena.kill.%attacker%}
  51. add 1 to {pvp.arena.mort.%victim%}
  52. give attacker 8 gold ingot
  53. give attacker 1 player head
  54. give attacker 1 diamond
  55. give attacker 10 arrow
  56. apply regeneration 2 to the attacker for 10 seconds
  57. set death message to "{@prefix} &a%victim% &7 a été tué par &a%attacker%"
  58. make attacker and victim execute command "/{@commande_principal} scoreboard"
  59.  
  60. on damage:
  61. if projectile is a arrow:
  62. if victim is a player:
  63. if victim is in "{@Test_Kwaki}":
  64. send "{@prefix} &a%victim% &7a maintenant : &a%victim's health% ♥" to attacker
  65.  
  66. #=========================#
  67. # Golden Head #
  68. #=========================#
  69.  
  70. # Le craft !
  71.  
  72. on load:
  73. register new shapeless recipe for golden apple item named "&6Golden Head" using Gold ingot, Gold ingot, Gold ingot, Gold ingot, player head, Gold ingot, Gold ingot, Gold ingot, Gold ingot
  74.  
  75. # L'effect !
  76.  
  77. On Consume a golden apple:
  78. if item is golden apple item named "&6Golden Head":
  79. wait 5 tick
  80. remove regeneration from the player
  81. remove absorption from the player
  82. wait 5 tick
  83. apply regeneration 2 to the player for 10 seconds
  84. apply Absorption 1 to the player for 160 seconds
  85.  
  86. #=========================#
  87. # Commande principal #
  88. #=========================#
  89.  
  90. command /{@commande_principal} [<text>] [<text>]:
  91. aliases: {@commande_secondaire_aliase}
  92. trigger:
  93. if arg 1 is not set:
  94. if arg 2 is not set:
  95. message "{@prefix} &7/{@commande_principal} spawn"
  96. message "{@prefix} &7/{@commande_principal} kit"
  97. message "{@prefix} &7/{@commande_principal} scoreboard"
  98. message "{@prefix} &7/{@commande_principal} stats"
  99. if player has permission "{@permission}":
  100. message "{@prefix} &7/{@commande_principal} set"
  101. message "{@prefix} &7/{@commande_principal} rl (reload)"
  102. if arg 1 is "stats":
  103. message "&7====>&e---&7[&ePvPArena&7]&e---&7<===="
  104. message "&aKills &7= &e%{pvp.arena.kill.%player%}%"
  105. message "&cMorts &7= &e%{pvp.arena.mort.%player%}%"
  106. message "&7====>&e---&7[&ePvPArena&7]&e---&7<===="
  107. if arg 1 is "spawn" or "tp":
  108. if arg 2 is not set:
  109. teleport player to {pvp.arena}
  110. apply saturation to player for 999999 seconds
  111. make player execute command "/{@commande_principal} scoreboard"
  112. clear player's inventory
  113. wait 2 ticks
  114. clear player's inventory
  115. set slot 0 of player to paper named "&eStats"
  116. set slot 4 of player to golden apple item named "&e« &aRejoindre L'arène &e»"
  117. set slot 8 of player to sign named "&6Actuces & Crafts"
  118. if arg 1 is "set":
  119. if player has permission "{@permission}":
  120. if arg 2 is not set:
  121. message "{@prefix} &7Vous avez le choix entre &eSpawn&7/&etp1&7/&etp2&7/&etp3&7/&etp4&7/&etp5&7/&etp6&7/"
  122. if arg 2 is "tp1":
  123. set {tp.1} to player's location
  124. message "{@prefix} &eVous avez set le &7tp 1"
  125. if arg 2 is "tp2":
  126. set {tp.2} to player's location
  127. message "{@prefix} &eVous avez set le &7tp 2"
  128. if arg 2 is "tp3":
  129. set {tp.3} to player's location
  130. message "{@prefix} &eVous avez set le &7tp 3"
  131. if arg 2 is "tp4":
  132. set {tp.4} to player's location
  133. message "{@prefix} &eVous avez set le &7tp 4"
  134. if arg 2 is "tp5":
  135. set {tp.5} to player's location
  136. message "{@prefix} &eVous avez set le &7tp 5"
  137. if arg 2 is "tp6":
  138. set {tp.6} to player's location
  139. message "{@prefix} &eVous avez set le &7tp 6"
  140. if arg 2 is "spawn":
  141. set {pvp.arena} to player's location
  142. message "{@prefix} &7Vous avez set le spawn du &ePvPArena"
  143. else:
  144. message "&4Vous n'avez pas la permission !"
  145. if arg 1 is "rl" or "reload":
  146. if player has permission "{@permission}":
  147. make player execute command "/sk reload PvPArena"
  148. if arg 1 is "kit":
  149. if arg 2 is not set:
  150. message "{@prefix} &7Vous avez le choix entre &eGuerrier &7, &eArcher &7, &eTank &7."
  151. if arg 2 is "guerrier":
  152. clear player's inventory
  153. message "{@prefix} &cPréparations de ton équipements en cours ..."
  154. wait 2 ticks
  155. clear player's inventory
  156. set the player's gamemode to survival
  157. remove saturation from the player
  158. wait 2 tick
  159. equip player with iron helmets of protection 1
  160. equip player with iron chestplates of protection 1
  161. equip player with iron leggings of protection 1
  162. equip player with diamond boots of protection 1
  163. wait 8 ticks
  164. give player iron sword of sharpness 2
  165. wait 8 ticks
  166. give player fishing rod
  167. wait 8 ticks
  168. give player bow of power 1
  169. wait 8 ticks
  170. give player 5 golden apple item
  171. wait 8 ticks
  172. give player 16 arrow
  173. wait 8 ticks
  174. give player 64 steak
  175. apply slowness to player for 4 seconds
  176. wait 8 ticks
  177. message "{@prefix} &7Vous allez être téléporté dans &e3 secondes &7!"
  178. wait 1 seconds
  179. message "{@prefix} &7Vous allez être téléporté dans &e2 secondes &7!"
  180. wait 1 seconds
  181. message "{@prefix} &7Vous allez être téléporté dans &e1 secondes &7!"
  182. wait 1 seconds
  183. teleport player to {tp.1} or {tp.2} or {tp.3} or {tp.4} or {tp.5} or {tp.6}
  184. apply blindness to player for 2 seconds
  185. if arg 2 is "archer":
  186. clear player's inventory
  187. message "{@prefix} &cPréparations de ton équipements en cours ..."
  188. wait 2 ticks
  189. clear player's inventory
  190. set the player's gamemode to survival
  191. remove saturation from the player
  192. wait 2 tick
  193. equip player with chainmail helmets of protection 2
  194. equip player with iron chestplates of protection 1
  195. equip player with iron leggings of protection 1
  196. equip player with chainmail boots of protection 2
  197. wait 8 ticks
  198. give player wood sword of sharpness 1 and knockback 2
  199. wait 8 ticks
  200. give player fishing rod
  201. wait 8 ticks
  202. give player bow of power 3 and infinity
  203. wait 8 ticks
  204. give player 5 golden apple item
  205. wait 8 ticks
  206. give player 16 arrow
  207. wait 8 ticks
  208. give player 64 steak
  209. apply slowness to player for 4 seconds
  210. wait 8 ticks
  211. message "{@prefix} &7Vous allez être téléporté dans &e3 secondes &7!"
  212. wait 1 seconds
  213. message "{@prefix} &7Vous allez être téléporté dans &e2 secondes &7!"
  214. wait 1 seconds
  215. message "{@prefix} &7Vous allez être téléporté dans &e1 secondes &7!"
  216. wait 1 seconds
  217. teleport player to {tp.1} or {tp.2} or {tp.3} or {tp.4} or {tp.5} or {tp.6}
  218. apply blindness to player for 2 seconds
  219. if arg 2 is "tank":
  220. clear player's inventory
  221. message "{@prefix} &cPréparations de ton équipements en cours ..."
  222. wait 2 ticks
  223. apply slowness to player for 999999 seconds
  224. clear player's inventory
  225. set the player's gamemode to survival
  226. remove saturation from the player
  227. wait 2 tick
  228. equip player with diamond helmets of protection 1
  229. equip player with diamond chestplates of protection 1
  230. equip player with diamond leggings of protection 1
  231. equip player with diamond boots of protection 1
  232. wait 8 ticks
  233. give player stone sword of sharpness 1
  234. wait 8 ticks
  235. give player fishing rod
  236. wait 8 ticks
  237. give player bow
  238. wait 8 ticks
  239. give player 5 golden apple item
  240. wait 8 ticks
  241. give player 8 arrow
  242. wait 8 ticks
  243. give player 64 steak
  244. wait 8 ticks
  245. message "{@prefix} &7Vous allez être téléporté dans &e3 secondes &7!"
  246. wait 1 seconds
  247. message "{@prefix} &7Vous allez être téléporté dans &e2 secondes &7!"
  248. wait 1 seconds
  249. message "{@prefix} &7Vous allez être téléporté dans &e1 secondes &7!"
  250. wait 1 seconds
  251. teleport player to {tp.1} or {tp.2} or {tp.3} or {tp.4} or {tp.5} or {tp.6}
  252. apply blindness to player for 2 seconds
  253. if arg 1 is "scoreboard":
  254. if player is in "{@Test_Kwaki}":
  255. set {pvp.arena.ratio.%player%} to {pvp.arena.kill.%player%} / {pvp.arena.mort.%player%}
  256. display board named "&7[&ePvPArena&7]" to player
  257. make score "&bInfo &b&o> " in board of player to 8
  258. make score "&7-----&8-&7-------" in board of player to 7
  259. make score "&6Morts: &e%{pvp.arena.mort.%player%}%" in board of player to 6
  260. make score "&6Kills: &e%{pvp.arena.kill.%player%}%" in board of player to 5
  261. make score "&aRatio: &e%{pvp.arena.ratio.%player%}%" in board of player to 4
  262. make score "&7----------" in board of player to 3
  263. make score "&3> {@Nom_de_votre_serveur}" in board of player to 2
  264. move display of player to sidebar
  265.  
  266. #==================================#
  267. # Rejoindre l'arène + Le Menu #
  268. #==================================#
  269.  
  270. on right click with golden apple item:
  271. if name of tool of player is "&e« &aRejoindre L'arène &e»":
  272. cancel event
  273. wait 2 tick
  274. open chest with 1 rows named "&7[&ePvPBox &8- &eKit&7]" to player
  275. wait 2 tick
  276. format slot 3 of player with a iron sword named "&7Guerrier" to close then run [make the player execute command "/{@commande_principal} kit guerrier"]
  277. format slot 4 of player with a bow named "&7Archer" to close then run [make the player execute command "/{@commande_principal} kit archer"]
  278. format slot 5 of player with a diamond chestplates named "&7Tank" to close then run [make the player execute command "/{@commande_principal} kit tank"]
  279.  
  280. on right click with paper:
  281. if name of tool of player is "&eStats":
  282. make player execute command "/{@commande_principal} stats"
  283.  
  284. on left click with paper:
  285. if name of tool of player is "&eStats":
  286. make player execute command "/{@commande_principal} stats"
  287.  
  288. on left click with sign:
  289. if name of tool of player is "&6Actuces & Crafts":
  290. open chest with 5 rows named "&6Actuces & Crafts" to player
  291. wait 2 ticks
  292. format slot 0 of player with a yellow window glass named " " to be unstealable
  293. format slot 1 of player with a yellow window glass named " " to be unstealable
  294. format slot 2 of player with a yellow window glass named " " to be unstealable
  295. format slot 3 of player with a yellow window glass named " " to be unstealable
  296. format slot 4 of player with a yellow window glass named " " to be unstealable
  297. format slot 5 of player with a yellow window glass named " " to be unstealable
  298. format slot 6 of player with a yellow window glass named " " to be unstealable
  299. format slot 7 of player with a yellow window glass named " " to be unstealable
  300. format slot 8 of player with a yellow window glass named " " to be unstealable
  301. format slot 9 of player with a yellow window glass named " " to be unstealable
  302. format slot 10 of player with a yellow window glass named " " to be unstealable
  303. format slot 11 of player with a gold ingot named "&6Or" to be unstealable
  304. format slot 12 of player with a gold ingot named "&6Or" to be unstealable
  305. format slot 13 of player with a gold ingot named "&6Or" to be unstealable
  306. format slot 14 of player with a yellow window glass named " " to be unstealable
  307. format slot 15 of player with a yellow window glass named " " to be unstealable
  308. format slot 16 of player with a yellow window glass named " " to be unstealable
  309. format slot 17 of player with a yellow window glass named " " to be unstealable
  310. format slot 18 of player with a yellow window glass named " " to be unstealable
  311. format slot 19 of player with a yellow window glass named " " to be unstealable
  312. format slot 20 of player with a gold ingot named "&6Or" to be unstealable
  313. format slot 21 of player with a player head named "&4Tête d'un joueur" to be unstealable
  314. format slot 22 of player with a gold ingot named "&6Or" to be unstealable
  315. format slot 23 of player with a yellow window glass named " " to be unstealable
  316. format slot 24 of player with a golden apple item named "&6Golden Head" with lore "&6Régène 4 coeur ||&4Plus éfficace qu'une pomme en or" to be unstealable
  317. format slot 25 of player with a yellow window glass named " " to be unstealable
  318. format slot 26 of player with a yellow window glass named " " to be unstealable
  319. format slot 27 of player with a yellow window glass named " " to be unstealable
  320. format slot 28 of player with a yellow window glass named " " to be unstealable
  321. format slot 29 of player with a gold ingot named "&6Or" to be unstealable
  322. format slot 30 of player with a gold ingot named "&6Or" to be unstealable
  323. format slot 31 of player with a gold ingot named "&6Or" to be unstealable
  324. format slot 32 of player with a yellow window glass named " " to be unstealable
  325. format slot 33 of player with a yellow window glass named " " to be unstealable
  326. format slot 34 of player with a yellow window glass named " " to be unstealable
  327. format slot 35 of player with a yellow window glass named " " to be unstealable
  328. format slot 36 of player with a yellow window glass named " " to be unstealable
  329. format slot 37 of player with a yellow window glass named " " to be unstealable
  330. format slot 38 of player with a yellow window glass named " " to be unstealable
  331. format slot 39 of player with a yellow window glass named " " to be unstealable
  332. format slot 40 of player with a yellow window glass named " " to be unstealable
  333. format slot 41 of player with a yellow window glass named " " to be unstealable
  334. format slot 42 of player with a yellow window glass named " " to be unstealable
  335. format slot 43 of player with a yellow window glass named " " to be unstealable
  336. format slot 44 of player with a yellow window glass named " " to be unstealable
  337.  
  338. on right click with sign:
  339. if name of tool of player is "&6Actuces & Crafts":
  340. open chest with 5 rows named "&6Actuces & Crafts" to player
  341. wait 2 ticks
  342. format slot 0 of player with a yellow window glass named " " to be unstealable
  343. format slot 1 of player with a yellow window glass named " " to be unstealable
  344. format slot 2 of player with a yellow window glass named " " to be unstealable
  345. format slot 3 of player with a yellow window glass named " " to be unstealable
  346. format slot 4 of player with a yellow window glass named " " to be unstealable
  347. format slot 5 of player with a yellow window glass named " " to be unstealable
  348. format slot 6 of player with a yellow window glass named " " to be unstealable
  349. format slot 7 of player with a yellow window glass named " " to be unstealable
  350. format slot 8 of player with a yellow window glass named " " to be unstealable
  351. format slot 9 of player with a yellow window glass named " " to be unstealable
  352. format slot 10 of player with a yellow window glass named " " to be unstealable
  353. format slot 11 of player with a gold ingot named "&6Or" to be unstealable
  354. format slot 12 of player with a gold ingot named "&6Or" to be unstealable
  355. format slot 13 of player with a gold ingot named "&6Or" to be unstealable
  356. format slot 14 of player with a yellow window glass named " " to be unstealable
  357. format slot 15 of player with a yellow window glass named " " to be unstealable
  358. format slot 16 of player with a yellow window glass named " " to be unstealable
  359. format slot 17 of player with a yellow window glass named " " to be unstealable
  360. format slot 18 of player with a yellow window glass named " " to be unstealable
  361. format slot 19 of player with a yellow window glass named " " to be unstealable
  362. format slot 20 of player with a gold ingot named "&6Or" to be unstealable
  363. format slot 21 of player with a player head named "&4Tête d'un joueur" to be unstealable
  364. format slot 22 of player with a gold ingot named "&6Or" to be unstealable
  365. format slot 23 of player with a yellow window glass named " " to be unstealable
  366. format slot 24 of player with a golden apple item named "&6Golden Head" with lore "&6Régène 4 coeur ||&4Plus éfficace qu'une pomme en or" to be unstealable
  367. format slot 25 of player with a yellow window glass named " " to be unstealable
  368. format slot 26 of player with a yellow window glass named " " to be unstealable
  369. format slot 27 of player with a yellow window glass named " " to be unstealable
  370. format slot 28 of player with a yellow window glass named " " to be unstealable
  371. format slot 29 of player with a gold ingot named "&6Or" to be unstealable
  372. format slot 30 of player with a gold ingot named "&6Or" to be unstealable
  373. format slot 31 of player with a gold ingot named "&6Or" to be unstealable
  374. format slot 32 of player with a yellow window glass named " " to be unstealable
  375. format slot 33 of player with a yellow window glass named " " to be unstealable
  376. format slot 34 of player with a yellow window glass named " " to be unstealable
  377. format slot 35 of player with a yellow window glass named " " to be unstealable
  378. format slot 36 of player with a yellow window glass named " " to be unstealable
  379. format slot 37 of player with a yellow window glass named " " to be unstealable
  380. format slot 38 of player with a yellow window glass named " " to be unstealable
  381. format slot 39 of player with a yellow window glass named " " to be unstealable
  382. format slot 40 of player with a yellow window glass named " " to be unstealable
  383. format slot 41 of player with a yellow window glass named " " to be unstealable
  384. format slot 42 of player with a yellow window glass named " " to be unstealable
  385. format slot 43 of player with a yellow window glass named " " to be unstealable
  386. format slot 44 of player with a yellow window glass named " " to be unstealable
  387.  
  388. on right click on crafting table:
  389. if player is in "{@Test_Kwaki}":
  390. cancel event
  391. wait 1 tick
  392. make player execute command "/craft"
  393.  
  394. on place:
  395. if player is in "{@Test_Kwaki}":
  396. if player has permission "{@permission}":
  397. stop
  398. else:
  399. cancel event
  400.  
  401. on break:
  402. if player is in "{@Test_Kwaki}":
  403. if player has permission "{@permission}":
  404. stop
  405. else:
  406. cancel event
Advertisement
Add Comment
Please, Sign In to add comment