Advertisement
Guest User

Untitled

a guest
May 8th, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.86 KB | None | 0 0
  1. script options:
  2. $ db url jdbc:mysql://localhost:3306/skriptGTA2
  3. $ db username root
  4. $ db password craft
  5. options:
  6. table_prefix: ARME
  7. On script load:
  8. update "CREATE TABLE IF NOT EXISTS {@table_prefix}_Player (Arme varchar(255),Nom varchar(255),Degats varchar(255),Munition varchar(255),NomMunition varchar(255),MunMax TINYINT,Cadence TINYINT,Tchargement TINYINT,Balle varchar(255),VitesseB TINYINT,NombreB TINYINT,Durabilite SMALLINT,SonCh varchar(255),SonTir varchar(255))"
  9. delete {{@table_prefix}.arme::*}
  10. add objects in column "Arme" from result of query "SELECT Arme FROM {@table_prefix}_Player WHERE 1" to {{@table_prefix}.arme::*}
  11. loop {{@table_prefix}.arme::*}:
  12. set {{@table_prefix}.%loop-value%.Arme} to loop-value parsed as an item type
  13. set {{@table_prefix}.%loop-value%.Nom} to the first element out of objects in column "Nom" from result of query "SELECT Nom FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  14. set {{@table_prefix}.%loop-value%.Nom} to {{@table_prefix}.%loop-value%.Nom} parsed as an text
  15. set {{@table_prefix}.%loop-value%.NomMunition} to the first element out of objects in column "NomMunition" from result of query "SELECT NomMunition FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  16. set {{@table_prefix}.%loop-value%.NomMunition} to {{@table_prefix}.%loop-value%.NomMunition} parsed as an text
  17. set {{@table_prefix}.%loop-value%.Munition} to the first element out of objects in column "Munition" from result of query "SELECT Munition FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  18. set {{@table_prefix}.%loop-value%.Munition} to {{@table_prefix}.%loop-value%.Munition} parsed as item type
  19. set {{@table_prefix}.%loop-value%.Degats} to the first element out of objects in column "Degats" from result of query "SELECT Degats FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  20. set {{@table_prefix}.%loop-value%.Degats} to {{@table_prefix}.%loop-value%.Munition} parsed as an integer
  21. set {{@table_prefix}.%loop-value%.MunMax} to the first element out of objects in column "MunMax" from result of query "SELECT MunMax FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  22. set {{@table_prefix}.%loop-value%.MunMax} to {{@table_prefix}.%loop-value%.MunMax} parsed as an integer
  23. set {{@table_prefix}.%loop-value%.Cadence} to the first element out of objects in column "Cadence" from result of query "SELECT Cadence FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  24. set {{@table_prefix}.%loop-value%.Cadence} to "%{{@table_prefix}.%loop-value%.Cadence}% tick" parsed as an timespan
  25. set {{@table_prefix}.%loop-value%.Tchargement} to the first element out of objects in column "Tchargement" from result of query "SELECT Tchargement FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  26. set {{@table_prefix}.%loop-value%.Tchargement} to "%{{@table_prefix}.%loop-value%.Tchargement}% tick" parsed as an timespan
  27. set {{@table_prefix}.%loop-value%.Balle} to the first element out of objects in column "Balle" from result of query "SELECT Balle FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  28. set {{@table_prefix}.%loop-value%.Balle} to "%{{@table_prefix}.%loop-value%.Balle}% tick" parsed as entity type
  29. set {{@table_prefix}.%loop-value%.VitesseB} to the first element out of objects in column "VitesseB" from result of query "SELECT VitesseB FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  30. set {{@table_prefix}.%loop-value%.VitesseB} to {{@table_prefix}.%loop-value%.VitesseB} parsed as an integer
  31. set {{@table_prefix}.%loop-value%.NombreB} to the first element out of objects in column "NombreB" from result of query "SELECT NombreB FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  32. set {{@table_prefix}.%loop-value%.NombreB} to {{@table_prefix}.%loop-value%.NombreB} parsed as an integer
  33. set {{@table_prefix}.%loop-value%.Durabilite} to the first element out of objects in column "Durabilite" from result of query "SELECT Durabilite FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  34. set {{@table_prefix}.%loop-value%.Durabilite} to {{@table_prefix}.%loop-value%.Durabilite} parsed as an integer
  35. set {{@table_prefix}.%loop-value%.SonCh} to the first element out of objects in column "SonCh" from result of query "SELECT SonCh FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  36. set {{@table_prefix}.%loop-value%.SonCh} to {{@table_prefix}.%loop-value%.SonCh} parsed as an text
  37. set {{@table_prefix}.%loop-value%.SonTir} to the first element out of objects in column "SonTir" from result of query "SELECT SonTir FROM {@table_prefix}_Player WHERE Arme = '%loop-value%'"
  38. set {{@table_prefix}.%loop-value%.SonTir} to {{@table_prefix}.%loop-value%.SonTir} parsed as an text
  39.  
  40.  
  41. command /as:
  42. trigger:
  43. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('flint and steel','&6&lM2A1 ','6','gunpowder','&6&lMunition lance flamme','5','3','80','bottle of enchanting','1','5','10','portal.travel','fire.fire')"
  44. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('golden pickaxe','&6&lM72-LAW ','20','cactus green','&6&lMunition Roquette','1','3','60','fireball','2','1','10','portal.travel','note.harp')"
  45. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('wooden hoe','&6&lGatling-PR ','4','gold nugget','&6&lMunition Mitrailleuse','20','5','40','snowball','5','5','20','note.pling','note.snare')"
  46. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('iron hoe','&6&lArbalète ','6','arrow','&7&lCarreau d arbalète','1','15','10','arrow','100','1','30','none','random.bow')"
  47. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('iron shovel','&6&lSarbacane ','2','prismarine shard','&7&lFléchette','1','10','5','arrow','4','1','15','none','random.bow')"
  48. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('diamond hoe','&5&lFR-F1 ','8','nether quartz item','&5&lMunition Sniper','1','20','20','snowball','50','1','15','note.pling','note.snare')"
  49. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('golden hoe','&5&lDragounov ','10','nether quartz item','&5&lMunition Sniper','1','20','20','snowball','50','1','15','note.pling','note.snare')"
  50. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('stone hoe','&5&lBarette-M90 ','6','nether quartz item','&5&lMunition Sniper','2','20','20','snowball','50','1','25','note.pling','note.snare')"
  51. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('wooden pickaxe','&3&lTEC-9 ','2','pumpkin seeds','&3&lMunition Uzi','10','9','20','snowball','5','1','60','note.pling','note.hat')"
  52. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('wooden axe','&3&lR12-MU ','2','pumpkin seeds','&3&lMunition Uzi','12','9','20','snowball','5','1','60','note.pling','note.hat')"
  53. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('stone shovel','&3&lScorpion-VZ61 ','2','pumpkin seeds','&3&lMunition Uzi','16','9','20','snowball','5','1','50','note.pling','note.hat')"
  54. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('stone pickaxe','&e&lMaverick ','3','melon seeds','&e&lMunition fusil a pompe','4','10','40','snowball','3','4','30','note.pling','note.bass')"
  55. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('stone axe','&e&lTRX-Tactical ','4','melon seeds','&e&lMunition fusil a pompe','1','10','10','snowball','3','4','25','note.pling','note.bass')"
  56. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('diamond axe','&b&lAK-47 ','3','nether wart item','&b&lMunition fusil d assaut','30','3','20','snowball','5','1','150','note.pling','note.bass')"
  57. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('golden shovel','&b&lG36K ','3','nether wart item','&b&lMunition fusil d assaut','22','3','20','snowball','5','1','90','note.pling','note.bass')"
  58. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('golden axe','&b&lM-16 ','2','nether wart','&b&lMunition fusil d assaut','26','3','20','snowball','5','1','90','note.pling','note.bass')"
  59. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('iron pickaxe','&a&lDouble WALTER P99 ','3','wheat seeds','&a&lMunition arme de poing','12','4','20','snowball','5','1','50','note.pling','note.bass')"
  60. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('iron axe','&a&lColt Python ','3','wheat seeds','&a&lMunition arme de poing','6','6','30','snowball','5','1','25','note.pling','note.bass')"
  61. #update "INSERT INTO {@table_prefix}_Player (Arme, Nom, Degats, Munition, NomMunition, MunMax, Cadence, Tchargement, Balle, VitesseB, NombreB, Durabilite, SonCh, SonTir) VALUES ('shears','&a&lMR-88 ','2','wheat seeds','&a&lMunition arme de poing','10','8','20','snowball','5','1','30','note.pling','note.bass')"
  62.  
  63. on rightclick holding weapon:
  64. if line 2 of lore of player's tool contains "Catégorie":
  65. if line 2 of lore of slot 40 of player contains "Catégorie":
  66. stop
  67. cancel event
  68. set {_name} to "%player's tool%"
  69. if {db1.arme.%player%.rechargement} is true:
  70. stop
  71. name of player's tool contains "Rech.":
  72. set the name of player's tool to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0&2&l >>"
  73. set {_wait} to difference between {db1.arme.%player%.lastused} and now
  74. if {_wait} is less than {{@table_prefix}.%{_name}%.Cadence}:
  75. stop
  76. set {_string} to name of player's tool
  77. replace "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l" in {_string} with ""
  78. replace "&2&l >>" in {_string} with ""
  79. set {_chargeur} to {_string} parsed as integer
  80. set {db1.arme.%player%.lastused} to now
  81. if {_chargeur} is 0:
  82. set {_munition} to the amount of {{@table_prefix}.%{_name}%.Munition} in the player's inventory
  83. message "%{_munition}%"
  84. if {_munition} is 0:
  85. stop
  86. if {_munition} is greater than {{@table_prefix}.%{_name}%.MunMax}-1:
  87. message "%{{@table_prefix}.%{_name}%.MunMax}-1%"
  88. set {db1.arme.%player%.rechargement} to true
  89. set action bar of player to "&4&l[&c&lRechargement&4&l]"
  90. set the name of player's tool to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>"
  91. loop all players in radius 20 around the player:
  92. play raw sound "%{{@table_prefix}.%{_name}%.SonCh}%" to loop-player at location of player
  93. wait {{@table_prefix}.%{_name}%.Tchargement}
  94. remove {{@table_prefix}.%{_name}%.MunMax} of {{@table_prefix}.%{_name}%.Munition} named "%{{@table_prefix}.%{_name}%.NomMunition}%" from player
  95. loop all items in the player's inventory:
  96. if name of loop-item contains "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>":
  97. set the name of loop-item to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{{@table_prefix}.%{_name}%.MunMax}%&2&l >>"
  98. set {db1.arme.%player%.rechargement} to false
  99. set action bar of player to ""
  100. stop
  101. if {_munition} is less than {{@table_prefix}.%{_name}%.MunMax}:
  102. set {db1.arme.%player%.rechargement} to true
  103. set action bar of player to "&4&l[&c&lRechargement&4&l]"
  104. set the name of player's tool to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>"
  105. wait {{@table_prefix}.%{_name}%.Tchargement}
  106. loop all players in radius 20 around the player:
  107. play raw sound "%{{@table_prefix}.%{_name}%.SonCh}%" to loop-player at location of player
  108. set {_chargeur} to {_munition}
  109. remove all {{@table_prefix}.%{_name}%.Munition} named "%{{@table_prefix}.%{_name}%.NomMunition}%" from the player
  110. loop all items in the player's inventory:
  111. if name of loop-item contains "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>":
  112. set the name of loop-item to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{_chargeur}%&2&l >>"
  113. set {db1.arme.%player%.rechargement} to false
  114. set action bar of player to ""
  115. stop
  116. if {_chargeur} is greater than 0:
  117. remove 1 from {_chargeur}
  118. set {_dura} to line 7 of lore of player's tool
  119. if "%{_dura}%" is "<none>":
  120. set {_dura} to {{@table_prefix}.%{_name}%.Durabilite}
  121. replace "&fDurability: " and "/%{{@table_prefix}.%{_name}%.Durabilite}%" in {_dura} with ""
  122. set {_dura} to {_dura} parsed as an integer
  123. set metadata value "Damage" of player to {{@table_prefix}.%{_name}%.Degats}
  124. set {_speed} to {{@table_prefix}.%{_name}%.VitesseB}
  125. remove 1 from {_dura}
  126. set line 7 of lore of player's tool to "&fDurability: %{_dura}%/%{{@table_prefix}.%{_name}%.Durabilite}%"
  127. if line 2 of lore of player's tool don't contain "Mitrailleuse":
  128. loop all players in radius 20 around the player:
  129. play raw sound "%{{@table_prefix}.%{_name}%.SonTir}%" to loop-player at location of player
  130. set the name of player's tool to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{_chargeur}%&2&l >>"
  131. if line 2 of lore of player's tool contains "Uzi" or "Mitrailleuse" or "Lance flamme":
  132. loop {{@table_prefix}.%{_name}%.NombreB} times:
  133. if "%{{@table_prefix}.%{_name}%.Balle}%" is "snowball":
  134. shoot snowball at speed {_speed}
  135. if "%{{@table_prefix}.%{_name}%.Balle}%" is "arrow":
  136. shoot arrow at speed {_speed}
  137. if "%{{@table_prefix}.%{_name}%.Balle}%" is "bottle of enchanting":
  138. shoot bottle of enchanting at speed {_speed}
  139. if "%{{@table_prefix}.%{_name}%.Balle}%" is "fireball":
  140. shoot fireball at speed {_speed}
  141. message "%{{@table_prefix}.%{_name}%.Balle}%"
  142. wait 1 tick
  143. if line 2 of lore of player's tool contains "Mitrailleuse":
  144. loop all players:
  145. play raw sound "%{{@table_prefix}.%{_name}%.SonTir}%" to loop-player at location of player
  146. else:
  147. loop {{@table_prefix}.%{_name}%.NombreB} times:
  148. if "%{{@table_prefix}.%{_name}%.Balle}%" is "snowball":
  149. shoot snowball at speed {_speed}
  150. if "%{{@table_prefix}.%{_name}%.Balle}%" is "arrow":
  151. shoot arrow at speed {_speed}
  152. if "%{{@table_prefix}.%{_name}%.Balle}%" is "bottle of enchanting":
  153. shoot bottle of enchanting at speed {_speed}
  154. if "%{{@table_prefix}.%{_name}%.Balle}%" is "fireball":
  155. make the player shoot an fireball at speed {_speed}
  156. add 2 to {_speed}
  157. if {_dura} isn't greater than 0:
  158. delete player's tool
  159. stop
  160. stop
  161.  
  162.  
  163. on rightclick:
  164. if line 2 of lore of slot 40 of player contains "Catégorie":
  165. if clicked block is chest or trapped chest or ender chest:
  166. stop
  167. cancel event
  168. set {_name} to "%slot 40 of player%"
  169. if {db1.arme.%player%.rechargement} is true:
  170. stop
  171. name of slot 40 of player contains "Rech.":
  172. set the name of slot 40 of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0&2&l >>"
  173. set {_wait} to difference between {db1.arme.%player%.lastused} and now
  174. if {_wait} is less than {{@table_prefix}.%{_name}%.Cadence}:
  175. stop
  176. set {_string} to name of slot 40 of player
  177. replace "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l" in {_string} with ""
  178. replace "&2&l >>" in {_string} with ""
  179. set {_chargeur} to {_string} parsed as integer
  180. set {db1.arme.%player%.lastused} to now
  181. if {_chargeur} is 0:
  182. set {_munition} to the amount of {{@table_prefix}.%{_name}%.Munition} in the player's inventory
  183. message "%{_munition}%"
  184. if {_munition} is 0:
  185. stop
  186. if {_munition} is greater than {{@table_prefix}.%{_name}%.MunMax}-1:
  187. message "%{{@table_prefix}.%{_name}%.MunMax}-1%"
  188. set {db1.arme.%player%.rechargement} to true
  189. set action bar of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>"
  190. set the name of slot 40 of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>"
  191. loop all players in radius 20 around the player:
  192. play raw sound "%{{@table_prefix}.%{_name}%.SonCh}%" to loop-player at location of player
  193. wait {{@table_prefix}.%{_name}%.Tchargement}
  194. remove {{@table_prefix}.%{_name}%.MunMax} of {{@table_prefix}.%{_name}%.Munition} named "%{{@table_prefix}.%{_name}%.NomMunition}%" from player
  195. loop all items in the player's inventory:
  196. if name of loop-item contains "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>":
  197. set the name of loop-item to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{{@table_prefix}.%{_name}%.MunMax}%&2&l >>"
  198. set {db1.arme.%player%.rechargement} to false
  199. set action bar of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{{@table_prefix}.%{_name}%.MunMax}%&2&l >>"
  200. stop
  201. if {_munition} is less than {{@table_prefix}.%{_name}%.MunMax}:
  202. set {db1.arme.%player%.rechargement} to true
  203. set action bar of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>"
  204. set the name of slot 40 of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>"
  205. wait {{@table_prefix}.%{_name}%.Tchargement}
  206. loop all players in radius 20 around the player:
  207. play raw sound "%{{@table_prefix}.%{_name}%.SonCh}%" to loop-player at location of player
  208. set {_chargeur} to {_munition}
  209. remove all {{@table_prefix}.%{_name}%.Munition} named "%{{@table_prefix}.%{_name}%.NomMunition}%" from the player
  210. loop all items in the player's inventory:
  211. if name of loop-item contains "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l0 Rech.&2&l >>":
  212. set the name of loop-item to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{_chargeur}%&2&l >>"
  213. set {db1.arme.%player%.rechargement} to false
  214. set action bar of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{{@table_prefix}.%{_name}%.MunMax}%&2&l >>"
  215. stop
  216. if {_chargeur} is greater than 0:
  217. remove 1 from {_chargeur}
  218. set {_dura} to line 7 of lore of slot 40 of player
  219. if "%{_dura}%" is "<none>":
  220. set {_dura} to {{@table_prefix}.%{_name}%.Durabilite}
  221. replace "&fDurability: " and "/%{{@table_prefix}.%{_name}%.Durabilite}%" in {_dura} with ""
  222. set {_dura} to {_dura} parsed as an integer
  223. set metadata value "Damage" of player to {{@table_prefix}.%{_name}%.Degats}
  224. set {_speed} to {{@table_prefix}.%{_name}%.VitesseB}
  225. remove 1 from {_dura}
  226. set line 7 of lore of slot 40 of player to "&fDurability: %{_dura}%/%{{@table_prefix}.%{_name}%.Durabilite}%"
  227. if line 2 of lore of slot 40 of player don't contain "Mitrailleuse":
  228. loop all players in radius 20 around the player:
  229. play raw sound "%{{@table_prefix}.%{_name}%.SonTir}%" to loop-player at location of player
  230. set the name of slot 40 of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{_chargeur}%&2&l >>"
  231. set action bar of player to "%{{@table_prefix}.%{_name}%.Nom}%&2&l<< &c&l%{_chargeur}%&2&l >>"
  232. if line 2 of lore of slot 40 of player contains "Uzi" or "Mitrailleuse" or "Lance flamme":
  233. loop {{@table_prefix}.%{_name}%.NombreB} times:
  234. if "%{{@table_prefix}.%{_name}%.Balle}%" is "snowball":
  235. shoot snowball at speed {_speed}
  236. if "%{{@table_prefix}.%{_name}%.Balle}%" is "arrow":
  237. shoot arrow at speed {_speed}
  238. if "%{{@table_prefix}.%{_name}%.Balle}%" is "bottle of enchanting":
  239. shoot bottle of enchanting at speed {_speed}
  240. if "%{{@table_prefix}.%{_name}%.Balle}%" is "fireball":
  241. shoot fireball at speed {_speed}
  242. message "%{{@table_prefix}.%{_name}%.Balle}%"
  243. wait 1 tick
  244. if line 2 of lore of slot 40 of player contains "Mitrailleuse":
  245. loop all players:
  246. play raw sound "%{{@table_prefix}.%{_name}%.SonTir}%" to loop-player at location of player
  247. else:
  248. loop {{@table_prefix}.%{_name}%.NombreB} times:
  249. if "%{{@table_prefix}.%{_name}%.Balle}%" is "snowball":
  250. shoot snowball at speed {_speed}
  251. if "%{{@table_prefix}.%{_name}%.Balle}%" is "arrow":
  252. shoot arrow at speed {_speed}
  253. if "%{{@table_prefix}.%{_name}%.Balle}%" is "bottle of enchanting":
  254. shoot bottle of enchanting at speed {_speed}
  255. if "%{{@table_prefix}.%{_name}%.Balle}%" is "fireball":
  256. make the player shoot an fireball at speed {_speed}
  257. add 2 to {_speed}
  258. if {_dura} isn't greater than 0:
  259. delete slot 40 of player
  260. stop
  261. stop
  262.  
  263. command /bou:
  264. trigger:
  265. give stone sword with nbt "{AttributeModifiers:[{AttributeName:generic.attackDamage,Name:generic.attackDamage,Amount:50,Operation:0,UUIDMost:95487,UUIDLeast:970285}]}" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement