YouLosing

pour comprendre

Jan 1st, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.59 KB | None | 0 0
  1. #Fonction
  2. function JoinShootcraft(t: text, p: player):
  3. if {shootcraft::%{_t}%} exist:
  4. if {shootcraft.%{_p}%.IsInGame} doesn't exist:
  5. if {IsStarted.shootcraft.%{_t}%} doesn't exist:
  6. if {speechchecknumber.shootcraft.%{_t}%} doesn't exist:
  7. scoreboardwait({_p})
  8. teleport {_p} to {lobby.shootcraft.%{_t}%}
  9. clear {_p}'s inventory
  10. wait 1 tick
  11. set slot 8 of {_p} to wooden door named "&cQuitter"
  12. set {speechchecknumber.shootcraft.%{_t}%} to 1
  13. set {player.shootcraft.%{_t}%.%{speechchecknumber.shootcraft.%{_t}%}%} to {_p}
  14. set {shootcraft.%{_p}%.IsInGame} to {_t}
  15. add {_p} to {shootcraft.%{_t}%::list::*}
  16. loop {shootcraft.%{_t}%::list::*}:
  17. send "&6[ShootCraft] &a%{_p}% &fa rejoint la partie. &c(%{speechchecknumber.shootcraft.%{_t}%}%/12)" to loop-value
  18. else if {speechchecknumber.shootcraft.%{_t}%} < 12:
  19. scoreboardwait({_p})
  20. teleport {_p} to {lobby.shootcraft.%{_t}%}
  21. clear {_p}'s inventory
  22. wait 1 tick
  23. set slot 8 of {_p} to wooden door named "&cQuitter"
  24. add 1 to {speechchecknumber.shootcraft.%{_t}%}
  25. set {player.shootcraft.%{_t}%.%{speechchecknumber.shootcraft.%{_t}%}%} to {_p}
  26. set {shootcraft.%{_p}%.IsInGame} to {_t}
  27. add {_p} to {shootcraft.%{_t}%::list::*}
  28. loop {shootcraft.%{_t}%::list::*}:
  29. send "&6[ShootCraft] &a%{_p}% &fa rejoint la partie. &a(%{speechchecknumber.shootcraft.%{_t}%}%/12)" to loop-value
  30. if {speechchecknumber.shootcraft.%{_t}%} = 2:
  31. set {time.game.shootcraft.%{_t}%} to 120
  32. while {player.shootcraft.%{_t}%.2} exist:
  33. {time.game.shootcraft.%{_t}%} exist
  34. if {time.game.shootcraft.%{_t}%} = 60:
  35. loop {shootcraft.%{_t}%::list::*}:
  36. send "&6[ShootCraft]&f La partie commence dans 1 minute." to loop-value
  37. wait 1 second
  38. remove 1 from {time.game.shootcraft.%{_t}%}
  39. else if {time.game.shootcraft.%{_t}%} = 30:
  40. loop {shootcraft.%{_t}%::list::*}:
  41. send "&6[ShootCraft]&f La partie commence dans 30 secondes." to loop-value
  42. wait 1 second
  43. remove 1 from {time.game.shootcraft.%{_t}%}
  44. else if {time.game.shootcraft.%{_t}%} = 15:
  45. loop {shootcraft.%{_t}%::list::*}:
  46. send "&6[ShootCraft]&f La partie commence dans 15 secondes." to loop-value
  47. wait 1 second
  48. remove 1 from {time.game.shootcraft.%{_t}%}
  49. else if {time.game.shootcraft.%{_t}%} > 5:
  50. wait 1 second
  51. remove 1 from {time.game.shootcraft.%{_t}%}
  52. else if {time.game.shootcraft.%{_t}%} > 1:
  53. loop {shootcraft.%{_t}%::list::*}:
  54. send "&6[ShootCraft]&f La partie commence dans %{time.game.shootcraft.%{_t}%}% secondes." to loop-value
  55. wait 1 second
  56. remove 1 from {time.game.shootcraft.%{_t}%}
  57. else if {time.game.shootcraft.%{_t}%} > 0:
  58. loop {shootcraft.%{_t}%::list::*}:
  59. send "&6[ShootCraft`]&f La partie commence dans 1 seconde." to loop-value
  60. wait 1 second
  61. remove 1 from {time.game.shootcraft.%{_t}%}
  62. else:
  63. clear {time.game.shootcraft.%{_t}%}
  64. set {IsStarted.shootcraft.%{_t}%} to true
  65. set {_thenumber} to 1
  66. loop {shootcraft.%{_t}%::list::*}:
  67. send "&6[ShootCraft]&f La partie commence !" to loop-value
  68. teleport loop-value to {spawn.%{_thenumber}%.shootcraft.%{_t}%}
  69. set {vie.%loop-value%.shootcraft} to 2
  70. add 1 to {_thenumber}
  71. set loop-value's health to 2
  72. clear loop-value's inventory
  73. set {_player} to loop-value
  74. give a stick named "Baton tueur !" to {_player}
  75. set {shootcraft.gametime.%{_t}%} to now
  76. while {IsStarted.shootcraft.%{_t}%} exist:
  77. wait 1 second
  78. if difference between now and {shootcraft.gametime.%{_t}%} >= 3 minutes:
  79. loop {shootcraft.%{_t}%::list::*}:
  80. send "&6[ShootCraft] &fLa partie est terminée." to loop-value
  81. send "" to loop-value
  82. set {_vainqueur} to 0
  83. set {_vainqueurname} to "Gagnant"
  84. loop {shootcraft.%{_t}%::list::*}:
  85. if {kills.shootcraft.%loop-value-2%} > {_vainqueur}:
  86. set {_vainqueur} to {kills.shootcraft.%loop-value-2%}
  87. set {_vainqueurname} to loop-value-2
  88. send "&fVainqueur: &b%{_vainqueurname}%&f avec &c%{_vainqueur}% kills&f." to loop-value
  89. #Arret du jeu
  90. set {testremoveplayerxd.shootcraft.%{_t}%} to 1
  91. loop {speechchecknumber.shootcraft.%{_t}%} times:
  92. {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%} = {_p}:
  93. clear {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%}
  94. stop loop
  95. else:
  96. add 1 to {testremoveplayerxd.shootcraft.%{_t}%}
  97. loop 15 times:
  98. set {_testremoveplayerxd2.shootcraft.%{_t}%} to {testremoveplayerxd.shootcraft.%{_t}%} + 1
  99. {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%} exist:
  100. set {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%} to {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%}
  101. clear {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%}
  102. add 1 to {testremoveplayerxd.shootcraft.%{_t}%}
  103. else:
  104. stop loop
  105. clear {testremoveplayerxd.shootcraft.%{_t}%}
  106. clear {speechchecknumber.shootcraft.%{_t}%}
  107. clear {time.game.shootcraft.%{_t}%}
  108. clear {IsStarted.shootcraft.%{_t}%}
  109. clear {IsStarted.shootcraft.%{_t}%}
  110. clear {shootcraft.gametime.%{_t}%}
  111. loop {shootcraft.%{_t}%::list::*}:
  112. send "&6[ShootCraft] &b%loop-value% &fa gagné." to loop-value
  113. clear {player.shootcraft.%{_t}%.1}
  114. clear {shootcraft.%loop-value%.IsInGame}
  115. clear {baton.shootcraft.%loop-value%}
  116. clear {morts.shootcraft.%loop-value%}
  117. clear {kills.shootcraft.%loop-value%}
  118. clear {nobouger.shootcraft.%loop-value%}
  119. clear {vie.%loop-value%.shootcraft}
  120. clear loop-value's inventory
  121. heal loop-value
  122. clear {shootcraft.%{_t}%::list::*}
  123. else if {speechchecknumber.shootcraft.%{_t}%} = 12:
  124. {time.game.shootcraft.%{_t}%} > 10:
  125. set {time.game.shootcraft.%{_t}%} to 10
  126. else if {speechchecknumber.shootcraft.%{_t}%} = 6:
  127. {time.game.shootcraft.%{_t}%} > 60:
  128. set {time.game.shootcraft.%{_t}%} to 60
  129.  
  130. else:
  131. send "&cErreur: Le ShootCraft `%{_t}%` est complet." to {_p}
  132. else:
  133. send "&cErreur: Le ShootCraft `%{_t}%` est déjà lancé." to {_p}
  134. else:
  135. send "&cErreur: Vous êtes déjà dans une partie ShootCraft." to {_p}
  136. else:
  137. send "&cErreur: Le ShootCraft `%{_t}%` n'existe pas." to {_p}
  138. function QuitShootcraft(t: text, p: player):
  139. if {shootcraft::%{_t}%} exist:
  140. if {shootcraft.%{_p}%.IsInGame} = {_t}:
  141. if {IsStarted.shootcraft.%{_t}%} doesn't exist:
  142. set {testremoveplayerxd.shootcraft.%{_t}%} to 1
  143. loop {speechchecknumber.shootcraft.%{_t}%} times:
  144. {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%} = {_p}:
  145. clear {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%}
  146. stop loop
  147. else:
  148. add 1 to {testremoveplayerxd.shootcraft.%{_t}%}
  149. loop 15 times:
  150. set {_testremoveplayerxd2.shootcraft.%{_t}%} to {testremoveplayerxd.shootcraft.%{_t}%} + 1
  151. {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%} exist:
  152. set {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%} to {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%}
  153. clear {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%}
  154. add 1 to {testremoveplayerxd.shootcraft.%{_t}%}
  155. else:
  156. stop loop
  157. remove 1 from {speechchecknumber.shootcraft.%{_t}%}
  158. if {speechchecknumber.shootcraft.%{_t}%} = 0:
  159. clear {speechchecknumber.shootcraft.%{_t}%}
  160. else if {speechchecknumber.shootcraft.%{_t}%} = 1:
  161. clear {time.game.shootcraft.%{_t}%}
  162. clear {shootcraft.%{_p}%.IsInGame}
  163. remove {_p} from {shootcraft.%{_t}%::list::*}
  164. send "&cVous avez quitté le jeu." to {_p}
  165. clear {_p}'s inventory
  166. loop {shootcraft.%{_t}%::list::*}:
  167. send "&6[ShootCraft] &c%{_p}% &fa quitté la partie. &e(%{speechchecknumber.shootcraft.%{_t}%}%/12)" to loop-value
  168. else:
  169. set {testremoveplayerxd.shootcraft.%{_t}%} to 1
  170. loop {speechchecknumber.shootcraft.%{_t}%} times:
  171. {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%} = {_p}:
  172. clear {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%}
  173. stop loop
  174. else:
  175. add 1 to {testremoveplayerxd.shootcraft.%{_t}%}
  176. loop 15 times:
  177. set {_testremoveplayerxd2.shootcraft.%{_t}%} to {testremoveplayerxd.shootcraft.%{_t}%} + 1
  178. {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%} exist:
  179. set {player.shootcraft.%{_t}%.%{testremoveplayerxd.shootcraft.%{_t}%}%} to {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%}
  180. clear {player.shootcraft.%{_t}%.%{testremoveplayerxd2.shootcraft.%{_t}%}%}
  181. add 1 to {testremoveplayerxd.shootcraft.%{_t}%}
  182. else:
  183. stop loop
  184. remove 1 from {speechchecknumber.shootcraft.%{_t}%}
  185. clear {baton.shootcraft.%{_p}%}
  186. clear {morts.shootcraft.%{_p}%}
  187. clear {kills.shootcraft.%{_p}%}
  188. clear {nobouger.shootcraft.%{_p}%}
  189. clear {vie.%{_p}%.shootcraft}
  190. clear {shootcraft.%{_p}%.IsInGame}
  191. heal {_p}
  192. remove {_p} from {shootcraft.%{_t}%::list::*}
  193. clear {_p}'s inventory
  194. loop {shootcraft.%{_t}%::list::*}:
  195. send "&6[ShootCraft] &b%{_p}% &fest mort." to loop-value
  196. if {speechchecknumber.shootcraft.%{_t}%} = 1:
  197. clear {testremoveplayerxd.shootcraft.%{_t}%}
  198. clear {speechchecknumber.shootcraft.%{_t}%}
  199. clear {time.game.shootcraft.%{_t}%}
  200. clear {IsStarted.shootcraft.%{_t}%}
  201. clear {shootcraft.gametime.%{_t}%}
  202. loop {shootcraft.%{_t}%::list::*}:
  203. send "&6[ShootCraft] &b%loop-value% &fa gagné." to loop-value
  204. clear {player.shootcraft.%{_t}%.1}
  205. clear {shootcraft.%loop-value%.IsInGame}
  206. clear {baton.shootcraft.%loop-value%}
  207. clear {morts.shootcraft.%loop-value%}
  208. clear {kills.shootcraft.%loop-value%}
  209. clear {nobouger.shootcraft.%loop-value%}
  210. clear {vie.%loop-value%.shootcraft}
  211. heal loop-value
  212. clear loop-value's inventory
  213. clear {shootcraft.%{_t}%::list::*}
  214. else:
  215. send "&cErreur: Vous n'êtes pas dans la partie ShootCraft `%{_t}%`." to {_p}
  216. else:
  217. send "&cErreur: Le ShootCraft `%{_t}%` n'existe pas." to {_p}
  218. function scoreboardwait(p:player):
  219. while {IsStarted.shootcraft.%{shootcraft.%{_p}%.IsInGame}%} doesn't exist:
  220. wipe {_p}'s sidebar
  221. wait 1 tick
  222. set name of sidebar of {_p} to " &6&lFun&f&lCraft&f.net "
  223. set score "" in sidebar of {_p} to 7
  224. set score "&7Jeu: &fShootCraft" in sidebar of {_p} to 6
  225. if {speechchecknumber.shootcraft.%{shootcraft.%{_p}%.IsInGame}%} = 1:
  226. set score "&7Joueurs&f: &c1/12" in sidebar of {_p} to 5
  227. else:
  228. set score "&7Joueurs&f: &a%{speechchecknumber.shootcraft.%{shootcraft.%{_p}%.IsInGame}%}%/12" in sidebar of {_p} to 5
  229. set score "" in sidebar of {_p} to 4
  230. if {player.shootcraft.%{shootcraft.%{_p}%.IsInGame}%.2} doesn't exist:
  231. set score "&cPas assez de joueurs" in sidebar of {_p} to 3
  232. else:
  233. set score "&7Début dans %{time.game.shootcraft.%{shootcraft.%{_p}%.IsInGame}%}%s" in sidebar of {_p} to 3
  234. while {IsStarted.shootcraft.%{shootcraft.%{_p}%.IsInGame}%} exist:
  235. wipe {_p}'s sidebar
  236. wait 1 tick
  237. set name of sidebar of {_p} to " &6&lFun&f&lCraft&f.net "
  238. set score "" in sidebar of {_p} to 13
  239. set score "&fTemps restant: &6%{shootcraft.gametime.%{shootcraft.%{_p}%.IsInGame}%}%" in sidebar of {_p} to 12
  240. set score "&fKills: &6%{kills.shootcraft.%{_p}%}%" in sidebar of {_p} to 11
  241. set score "" in sidebar of {_p} to 10
  242. #Calcul des 5
  243. #1
  244. set {_vainqueur.1.points} to 0
  245. set {_vainqueur.1.name} to "&fAucun joueur"
  246. loop {shootcraft.%{shootcraft.%{_p}%.IsInGame}%::list::*}:
  247. if {kills.shootcraft.%loop-value%} > {_vainqueur.1.points}:
  248. set {_vainqueur.1.points} to {kills.shootcraft.%loop-value%}
  249. set {_vainqueur.1.name} to loop-value
  250. #2
  251. set {_vainqueur.2.points} to 0
  252. set {_vainqueur.2.name} to "&fAucun joueur"
  253. loop {shootcraft.%{shootcraft.%{_p}%.IsInGame}%::list::*}:
  254. if {kills.shootcraft.%loop-value%} > {_vainqueur.2.points}:
  255. loop-value isn't {_vainqueur.1.name}
  256. set {_vainqueur.2.points} to {kills.shootcraft.%loop-value%}
  257. set {_vainqueur.2.name} to loop-value
  258. #3
  259. set {_vainqueur.3.points} to 0
  260. set {_vainqueur.3.name} to "&fAucun joueur"
  261. loop {shootcraft.%{shootcraft.%{_p}%.IsInGame}%::list::*}:
  262. if {kills.shootcraft.%loop-value%} > {_vainqueur.3.points}:
  263. loop-value isn't {_vainqueur.1.name} or {_vainqueur.2.name}
  264. set {_vainqueur.3.points} to {kills.shootcraft.%loop-value%}
  265. set {_vainqueur.3.name} to loop-value
  266. #4
  267. set {_vainqueur.4.points} to 0
  268. set {_vainqueur.4.name} to "&fAucun joueur"
  269. loop {shootcraft.%{shootcraft.%{_p}%.IsInGame}%::list::*}:
  270. if {kills.shootcraft.%loop-value%} > {_vainqueur.4.points}:
  271. loop-value isn't {_vainqueur.1.name} or {_vainqueur.2.name} or {_vainqueur.3.name}
  272. set {_vainqueur.4.points} to {kills.shootcraft.%loop-value%}
  273. set {_vainqueur.4.name} to loop-value
  274. #5
  275. set {_vainqueur.5.points} to 0
  276. set {_vainqueur.5.name} to "&fAucun joueur"
  277. loop {shootcraft.%{shootcraft.%{_p}%.IsInGame}%::list::*}:
  278. if {kills.shootcraft.%loop-value%} > {_vainqueur.5.points}:
  279. loop-value isn't {_vainqueur.1.name} or {_vainqueur.2.name} or {_vainqueur.3.name} or {_vainqueur.4.name}
  280. set {_vainqueur.5.points} to {kills.shootcraft.%loop-value%}
  281. set {_vainqueur.5.name} to loop-value
  282. set score "&fTop Kills:" in sidebar of {_p} to 9
  283. set score "&71. &f%{_vainqueur.1.name}% (%{_vainqueur.1.points}%)" in sidebar of {_p} to 8
  284. set score "&72. &f%{_vainqueur.2.name}% (%{_vainqueur.2.points}%)" in sidebar of {_p} to 7
  285. set score "&73. &f%{_vainqueur.3.name}% (%{_vainqueur.3.points}%)" in sidebar of {_p} to 6
  286. set score "&74. &f%{_vainqueur.4.name}% (%{_vainqueur.4.points}%)" in sidebar of {_p} to 5
  287. set score "&75. &f%{_vainqueur.5.name}% (%{_vainqueur.5.points}%)" in sidebar of {_p} to 4
  288. set score "" in sidebar of {_p} to 3
  289. set score "&7Les alliances" in sidebar of {_p} to 2
  290. set score "&7sont interdites" in sidebar of {_p} to 1
  291. #Commandes et options
  292. options:
  293. prefix: &f[&6ShootCraft&f]
  294. permission: shootcraft.use
  295.  
  296. command /shootcraft [<text>] [<text>] [<number>]:
  297. permission: {@permission}
  298. trigger:
  299. if arg-1 is "create":
  300. if arg-2 exist:
  301. if {shootcraft::%arg-2%} doesn't exist:
  302. send "{@prefix} &fVous avez créé le shootcraft nommé &b`%arg-2%`&f." to sender
  303. set {shootcraft::%arg-2%} to arg-2
  304. else:
  305. send "&cErreur: Le shootcraft `%arg-2%` existe déjà." to sender
  306. else:
  307. send "&cUtilisation: /shootcraft create <Nom>" to sender
  308. else if arg-1 is "delete":
  309. if arg-2 exist:
  310. if {shootcraft::%arg-2%} exist:
  311. send "{@prefix} &fVous avez supprimé le shootcraft nommé &b`%arg-2%`&f." to sender
  312. clear {shootcraft::%arg-2%}
  313. else:
  314. send "&cErreur: Le shootcraft `%arg-2%` n'existe pas." to sender
  315. else:
  316. send "&cUtilisation: /shootcraft delete <Nom>" to sender
  317. else if arg-1 is "list":
  318. set {_n} to 1
  319. loop {shootcraft::*}:
  320. send "%{_n}% - %loop-value%" to sender
  321. add 1 to {_n}
  322. if {_n} = 1:
  323. send "&cErreur: Aucun shootcraft n'a été créé" to sender
  324. else if arg-1 is "setlobby":
  325. if arg-2 exist:
  326. if {shootcraft::%arg-2%} exist:
  327. send "{@prefix} &fVous avez définit le lobby du shootcraft nommé &b`%arg-2%`&f." to sender
  328. set {lobby.shootcraft.%arg-2%} to player's location
  329. else:
  330. send "&cErreur: Le shootcraft `%arg-2%` n'existe pas." to sender
  331. else:
  332. send "&cUtilisation: /shootcraft setlobby <Nom>" to sender
  333. else if arg-1 is "setspawn":
  334. if arg-2 exist:
  335. if {shootcraft::%arg-2%} exist:
  336. if arg-3 is 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12:
  337. set {spawn.%arg-3%.shootcraft.%arg-2%} to player's location
  338. send "{@prefix} &fVous avez définit le point d'apparition numéro %arg-3% du shootcraft nommé &b`%arg-2%`&f." to sender
  339. else:
  340. send "&cUtilisation: /shootcraft setspawn <Nom> <1/2/3/4/5/6/7/8/9/10/11/12>" to sender
  341. else:
  342. send "&cErreur: Le shootcraft `%arg-2%` n'existe pas." to sender
  343. else:
  344. send "&cUtilisation: /shootcraft setspawn <Nom> <1/2/3/4/5/6/7/8/9/10/11/12>" to sender
  345. else if arg-1 is "join":
  346. if arg-2 exist:
  347. JoinShootcraft(arg-2, player)
  348. else:
  349. send "&cUtilisation: /shootcraft join <Nom>" to sender
  350. else if arg-1 is "quit":
  351. if arg-2 exist:
  352. QuitShootcraft(arg-2, player)
  353. else:
  354. send "&cUtilisation: /shootcraft join <Nom>" to sender
  355. else:
  356. send "&6------------------------------" to sender
  357. send "&6ShootCraft: Aide" to sender
  358. send "" to sender
  359. send "&a/shootcraft &bcreate <Nom> &f- Permet de créer un shootcraft" to sender
  360. send "&a/shootcraft &bdelete <Nom> &f- Permet de suprimmer un shootcraft" to sender
  361. send "&a/shootcraft &blist &f- Permet de lister les shootcraft" to sender
  362. send "&a/shootcraft &bsetlobby <Nom> &f- Permet de définir le lobby d'un minijeu shootcraft" to sender
  363. send "&a/shootcraft &bsetspawn <Nom> <1/2/3/4/5/6/7/8/9/10/11/12> &f- Permet de définir les points d'apparition d'un shootcraft" to sender
  364. send "&a/shootcraft &bjoin <Nom> &f- Permet de rejoindre un shootcraft" to sender
  365. send "&6--------------------------" to sender
  366. #Evenements
  367. on rightclick:
  368. if {shootcraft.%player%.IsInGame} exist:
  369. if player's tool is wooden door:
  370. QuitShootcraft({shootcraft.%player%.IsInGame}, player)
  371. else if player's tool is stick:
  372. if name of player's tool is "Baton tueur !":
  373. if {baton.shootcraft.%player%} doesn't exist:
  374. set {baton.shootcraft.%player%} to now
  375. if player's target exist:
  376. if {vie.%player's target%.shootcraft} = 2:
  377. set {_player} to player's target
  378. set {_player}'s health to 1
  379. else if {vie.%player's target%.shootcraft} < 2:
  380. kill player's target
  381. loop {shootcraft.%{shootcraft.%player%.IsInGame}%::list::*}:
  382. send "&6[ShootCraft] &b%player's target% &fa été tué par &b%player%&f." to loop-value
  383. add 1 to {kills.shootcraft.%player%}
  384. add 1 to {morts.shootcraft.%player's target%}
  385. set {vie.%player's target%.shootcraft} to 2
  386. set {_player} to player's target
  387. set {_player}'s health to 2
  388. if {kills.shootcraft.%player%} > {morts.shootcraft.%player%} + 1:
  389. loop {shootcraft.%{shootcraft.%player%.IsInGame}%::list::*}:
  390. send "&6[WOW] &b%player%&f a fait %{kills.shootcraft.%player%} - {morts.shootcraft.%player%}% kills d'affilé." to loop-value
  391. else if difference between now and {baton.shootcraft.%player%} is bigger than 1 second:
  392. set {baton.shootcraft.%player%} to now
  393. if player's target exist:
  394. if {vie.%player's target%.shootcraft} = 2:
  395. set {_player} to player's target
  396. set {_player}'s health to 1
  397. else if {vie.%player's target%.shootcraft} < 2:
  398. kill player's target
  399. loop {shootcraft.%{shootcraft.%player%.IsInGame}%::list::*}:
  400. send "&6[ShootCraft] &b%player's target% &fa été tué par &b%player%&f." to loop-value
  401. add 1 to {kills.shootcraft.%player%}
  402. add 1 to {morts.shootcraft.%player's target%}
  403. set {vie.%player's target%.shootcraft} to 2
  404. set {_player} to player's target
  405. set {_player}'s health to 2
  406. if {kills.shootcraft.%player%} > {morts.shootcraft.%player%} + 1:
  407. loop {shootcraft.%{shootcraft.%player%.IsInGame}%::list::*}:
  408. send "&6[WOW] &b%player%&f a fait %{kills.shootcraft.%player%} - {morts.shootcraft.%player%}% kills d'affilé." to loop-value
  409. On death:
  410. if {shootcraft.%player%.IsInGame} exist:
  411. heal player
  412. set {_thenumber} to 1
  413. loop 12 times:
  414. if {spawn.%{_thenumber}%.shootcraft.%{shootcraft.%player%.IsInGame}%.isoccuped} doesn't exist:
  415. teleport player to {spawn.%{_thenumber}%.shootcraft.%{shootcraft.%player%.IsInGame}%}
  416. set {spawn.%{_thenumber}%.shootcraft.%{shootcraft.%player%.IsInGame}%.isoccuped} to true
  417. set {nobouger.shootcraft.%player%} to true
  418. send player title "&bRespawn dans 3s" with subtitle "" for 1 second
  419. wait 1 second
  420. send player title "&bRespawn dans 2s" with subtitle "" for 1 second
  421. wait 1 second
  422. send player title "&bRespawn dans 1s" with subtitle "" for 1 second
  423. wait 1 second
  424. clear {nobouger.shootcraft.%player%}
  425. clear {spawn.%{_thenumber}%.shootcraft.%{shootcraft.%player%.IsInGame}%.isoccuped}
  426. On any move:
  427. if {nobouger.shootcraft.%player%} exist:
  428. cancel event
  429. on quit:
  430. QuitShootcraft({shootcraft.%{_p}%.IsInGame}, player)
  431. on break:
  432. {shootcraft.%{_p}%.IsInGame} exist:
  433. cancel event
  434. on damage:
  435. {shootcraft.%{_p}%.IsInGame} exist:
  436. cancel event
  437. on hunger meter change:
  438. {shootcraft.%{_p}%.IsInGame} exist:
  439. cancel event
  440. on inventory click:
  441. {shootcraft.%{_p}%.IsInGame} exist:
  442. cancel event
Advertisement
Add Comment
Please, Sign In to add comment