Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.18 KB | None | 0 0
  1. command /marchand [<text>] [<text>] [<player>]:
  2. permission:*
  3. trigger:
  4. if arg 3 is set:
  5. set {_p} to arg 3
  6. else:
  7. set {_p} to player
  8.  
  9. if arg 1 is "main":
  10. create a gui slot 1, 2, 3, 4, 5, 6, 7, 9, 10, 16, 17, 19, 20, 21, 22, 23, 24 and 25 of {_p} with blue stained glass pane named " " to do nothing
  11. create a gui slot 0, 8, 18 and 26 of {_p} with air to do nothing
  12. create a gui slot 11 of {_p} with diamond chestplate named "&b&lArmures" to close then run console command "/marchand armures %{_p}%"
  13. create a gui slot 12 of {_p} with diamond sword named "&b&lArmes" to close then run console command "/marchand Attaque %{_p}%"
  14. create a gui slot 13 of {_p} with bow named "&b&lArmes spéciales" to close then run console command "/marchand defense %{_p}%"
  15. create a gui slot 14 of {_p} with bread named "&b&lNourriture" to close then run console command "/marchand Nourriture %{_p}%"
  16. create a gui slot 15 of {_p} with potion of healing named "&b&lPotions" to close then run console command "/marchand potions %{_p}%"
  17.  
  18. else if arg 1 is "armures":
  19. open virtual chest inventory with size 6 with name "&9Marchand d'équipements" to {_p}
  20. create a gui slot 1, 2, 3, 4, 5, 6, 7, 10 ,19, 28, 37, 25, 34, 43, 46, 47, 48, 49, 50, 51, 52, 18, 27, 26, 35 and 16 of {_p} with blue stained glass pane named " " to do nothing
  21. create a gui slot 0, 9, 36, 45, 8, 17, 44 and 53 of {_p} with air to do nothing
  22.  
  23. create a gui slot 11 of {_p} with leather helmet named "&9Chapeau en cuir" with lore "&aPrix &7: &21 Emraude" and "&fDurabilité &7:&f 55/55" and "&f&m " to run console command "/marchand buy chapeaucuir %{_p}%"
  24. create a gui slot 20 of {_p} with leather chestplate named "&9Tunique en cuir" with lore "&aPrix &7: &23 Emraudes" and "&fDurabilité &7:&f 80/80" and "&f&m " to run console command "/marchand buy tuniquecuir %{_p}%"
  25. create a gui slot 29 of {_p} with leather leggings named "&9Pantalon en cuir" with lore "&aPrix &7: &22 Emraudes" and "&fDurabilité &7:&f 75/75" and "&f&m " to run console command "/marchand buy pantaloncuir %{_p}%"
  26. create a gui slot 38 of {_p} with leather boots named "&9Bottes en cuir" with lore "&aPrix &7: &21 Emraude" and "&fDurabilité &7:&f 65/65" and "&f&m " to run console command "/marchand buy bottescuir %{_p}%"
  27.  
  28. create a gui slot 12 of {_p} with golden helmet named "&9Casque en or" with lore "&aPrix &7: &23 Emraudes" and "&fDurabilité &7:&f 77/77" and "&f&m " to run console command "/marchand buy casqueor %{_p}%"
  29. create a gui slot 21 of {_p} with golden chestplate named "&9Plastron en or" with lore "&aPrix &7: &29 Emraudes" and "&fDurabilité &7:&f 122/122" and "&f&m " to run console command "/marchand buy plastronor %{_p}%"
  30. create a gui slot 30 of {_p} with golden leggings named "&9Jambières en or" with lore "&aPrix &7: &26 Emraudes" and "&fDurabilité &7:&f 105/105" and "&f&m " to run console command "/marchand buy jambieresor %{_p}%"
  31. create a gui slot 39 of {_p} with golden boots named "&9Bottes en or" with lore "&aPrix &7: &23 Emraudes" and "&fDurabilité &7:&f 91/91" and "&f&m " to run console command "/marchand buy bottesor %{_p}%"
  32.  
  33. create a gui slot 13 of {_p} with chainmail helmet named "&9Casque de mailles" with lore "&aPrix &7: &24 Emraudes" and "&fDurabilité &7:&f 165/165" and "&f&m " to run console command "/marchand buy chapeaumailles %{_p}%"
  34. create a gui slot 22 of {_p} with chainmail chestplate named "&9Cotte de mailles" with lore "&aPrix &7: &212 Emraudes" and "&fDurabilité &7:&f 240/240" and "&f&m " to run console command "/marchand buy cottemailles %{_p}%"
  35. create a gui slot 31 of {_p} with chainmail leggings named "&9Jambières de mailles" with lore "&aPrix &7: &28 Emraudes" and "&fDurabilité &7:&f 225/225" and "&f&m " to run console command "/marchand buy jambieresmailles %{_p}%"
  36. create a gui slot 40 of {_p} with chainmail boots named "&9Bottes de mailles" with lore "&aPrix &7: &24 Emraudes" and "&fDurabilité &7:&f 195/195" and "&f&m " to run console command "/marchand buy bottesmailles %{_p}%"
  37.  
  38. create a gui slot 14 of {_p} with iron helmet named "&9Casque de fer" with lore "&aPrix &7: &210 Emraudes" and "&fDurabilité &7:&f 165/165" and "&f&m " to run console command "/marchand buy chapeaufer %{_p}%"
  39. create a gui slot 23 of {_p} with iron chestplate named "&9plastron de fer" with lore "&aPrix &7: &230 Emraudes" and "&fDurabilité &7:&f 240/240" and "&f&m " to run console command "/marchand buy plastronfer %{_p}%"
  40. create a gui slot 32 of {_p} with iron leggings named "&9Jambières de fer" with lore "&aPrix &7: &220 Emraudes" and "&fDurabilité &7:&f 225/225" and "&f&m " to run console command "/marchand buy jambieresfer %{_p}%"
  41. create a gui slot 41 of {_p} with iron boots named "&9Bottes de fer" with lore "&aPrix &7: &210 Emraudes" and "&fDurabilité &7:&f 195/195" and "&f&m " to run console command "/marchand buy bottesfer %{_p}%"
  42.  
  43. create a gui slot 15 of {_p} with diamond helmet named "&9Casque de diamant" with lore "&aPrix &7: &240 Emraudes" and "&fDurabilité &7:&f 363/363" and "&f&m " to run console command "/marchand buy chapeaudiamant %{_p}%"
  44. create a gui slot 24 of {_p} with diamond chestplate named "&9plastron de diamant" with lore "&aPrix &7: &2120 Emraudes" and "&fDurabilité &7:&f 528/528" and "&f&m " to run console command "/marchand buy plastrondiamant %{_p}%"
  45. create a gui slot 33 of {_p} with diamond leggings named "&9Jambières de diamant" with lore "&aPrix &7: &280 Emraudes" and "&fDurabilité &7:&f 495/495" and "&f&m " to run console command "/marchand buy jambieresdiamant %{_p}%"
  46. create a gui slot 42 of {_p} with diamond boots named "&9Bottes de diamant" with lore "&aPrix &7: &240 Emraudes" and "&fDurabilité &7:&f 429/429" and "&f&m " to run console command "/marchand buy bottesdiamant %{_p}%"
  47.  
  48. else if arg 1 is "attaque":
  49. open virtual chest inventory with size 3 with name "&9Marchand d'équipements" to {_p}
  50. create a gui slot 1, 2, 3, 4, 5, 6, 7, 9, 10, 16, 17, 19, 20, 21, 22, 23, 24 and 25 of {_p} with blue stained glass pane named " " to do nothing
  51. create a gui slot 0, 8, 18 and 26 of {_p} with air to do nothing
  52.  
  53. create a gui slot 11 of {_p} with wooden sword named "&9Épéen bois" with lore "&a&aPrix &7:&2 5 Emraudes" and "&fDurabilité &7:&f 59/59" and "&f&m " to run console command "/marchand buy epeebois %{_p}%"
  54. create a gui slot 12 of {_p} with gold sword named "&9Épée en or" with lore "&aPrix &7:&2 10 Emraudes" and "&fDurabilité &7:&f 32/32" and "&f&m " to run console command "/marchand buy epeeor %{_p}%"
  55. create a gui slot 13 of {_p} with stone sword named "&9Épée en pierre" with lore "&aPrix &7:&2 20 Emraudes" and "&fDurabilité &7:&f 131/131" and "&f&m " to run console command "/marchand buy epeepierre %{_p}%"
  56. create a gui slot 14 of {_p} with iron sword named "&9Épée en fer" with lore "&aPrix &7:&2 50 Emraudes" and "&fDurabilité &7:&f 250/250" and "&f&m " to run console command "/marchand buy epeefer %{_p}%"
  57. create a gui slot 15 of {_p} with diamond sword named "&9Épée en diamant" with lore "&aPrix &7:&2 100 Emraudes" and "&fDurabilité &7:&f 1561/1561" and "&f&m " to run console command "/marchand buy epeediamant %{_p}%"
  58.  
  59. else if arg 1 is "defense":
  60. open virtual chest inventory with size 3 with name "&9Marchand d'équipements" to {_p}
  61. create a gui slot 2, 3, 4, 5, 6, 9, 10, 11, 15, 16, 17, 20, 21 ,22 ,23 and 24 of {_p} with blue stained glass pane named " " to do nothing
  62. create a gui slot 0, 1, 7, 8, 18, 19, 25 and 26 of {_p} with air to do nothing
  63.  
  64. create a gui slot 12 of {_p} with bow named "&9Arc en bois" with lore "&aPrix &7: &2100 Emraudes" and "&fDurabilité &7:&f 384/384" and "&f&m " to run console command "/marchand buy bow %{_p}%"
  65. create a gui slot 13 of {_p} with shields named "&9Bouclier" with lore "&aPrix &7: &2100 Emraudes" and "&fDurabilité &7:&f 336/336" and "&f&m " to run console command "/marchand buy bouclier %{_p}%"
  66. create a gui slot 14 of {_p} with arrow named "&9Fléche" with lore "&aPrix &7: &21 Emraude" and "&fUtilisation &7:&f 1" and "&f&m " to run console command "/marchand buy fleche %{_p}%"
  67.  
  68. else if arg 1 is "Nourriture":
  69. open virtual chest inventory with size 3 with name "&9Marchand d'équipements" to {_p}
  70. create a gui slot 2, 3, 4, 5, 6, 9, 10, 11, 15, 16, 17, 20, 21 ,22 ,23 and 24 of {_p} with blue stained glass pane named " " to do nothing
  71. create a gui slot 0, 1, 7, 8, 18, 19, 25 and 26 of {_p} with air to do nothing
  72.  
  73. create a gui slot 12 of {_p} with bread named "&9Pain" with lore "&aPrix &7: &21 Emraude" and "&fRestaure &7:&f 5 &7(demi)&fGigots" and "&fSaturation &7:&f 6" and "&f&m " to run console command "/marchand buy pain %{_p}%"
  74. create a gui slot 13 of {_p} with cooked beef named "&9Steak" with lore "&aPrix &7: &22 Emraudes" and "&fRestaure &7:&f 8 &7(demi)&fGigots" and "&fSaturation &7:&f 12,8" and "&f&m " to run console command "/marchand buy steak %{_p}%"
  75. create a gui slot 14 of {_p} with golden carrot named "&9Carrote dorée" with lore "&aPrix &7: &23 Emraudes" and "&fRestaure &7:&f 6 &7(demi)&fGigots" and "&fSaturation &7:&f 14,4" and "&f&m " to run console command "/marchand buy carrote %{_p}%"
  76.  
  77. else if arg 1 is "potions":
  78. open virtual chest inventory with size 3 with name "&9Marchand d'équipements" to {_p}
  79. create a gui slot 2, 3, 4, 5, 6, 9, 10, 11, 15, 16, 17, 20, 21 ,22 ,23 and 24 of {_p} with blue stained glass pane named " " to do nothing
  80. create a gui slot 0, 1, 7, 8, 18, 19, 25 and 26 of {_p} with air to do nothing
  81.  
  82. create a gui slot 12 of {_p} with potion of healing named "&9Potion de sois" with lore "&aPrix &7: &21 Emraude" and "&fUtilisation &7:&f 1" and "&fNiveau &7:&f II" and "&f&m " to run console command "/marchand buy soins %{_p}%"
  83. create a gui slot 13 of {_p} with potion of strength named "&9Potion de force" with lore "&aPrix &7: &210 Emraudes" and "&fUtilisation &7:&f 1" and "&fDurée &7:&f 1:30" and "&fNiveau &7:&f II" and "&f&m " to run console command "/marchand buy force %{_p}%"
  84. create a gui slot 14 of {_p} with potion of speed named "&9Potion de rapidité" with lore "&aPrix &7: &22 Emraudes" and "&fUtilisation &7:&f 1" and "&fDurée &7:&f 1:30" and "&fNiveau &7:&f II" and "&f&m " to run console command "/marchand buy speed %{_p}%"
  85.  
  86. if arg 1 is "buy":
  87. loop all items in player's inventory:
  88. if loop-item is emerald:
  89. set {_pe} to amount of emerald in player's inventory
  90.  
  91. if arg 2 is "chapeaucuir":
  92. if {_pe} is greater than 1:
  93. remove 1 emerald from {_p}
  94. give 1 leather helmet to {_p}
  95. else:
  96. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  97.  
  98. if arg 2 is "tuniquecuir":
  99. if {_pe} is greater than 3:
  100. remove 3 emerald from{_p}
  101. give 1 leather chestplate to {_p}
  102. else:
  103. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  104.  
  105. if arg 2 is "pantaloncuir":
  106. if {_pe} is greater than 2:
  107. remove 2 emerald from {_p}
  108. give 1 leather leggings to {_p}
  109. else:
  110. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  111.  
  112. if arg 2 is "bottescuir":
  113. if {_pe} is greater than 2:
  114. remove 2 emerald from the player
  115. give 1 leather boots to the player
  116. else:
  117. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  118.  
  119. if arg 2 is "casqueor":
  120. if {_pe} is greater than 3:
  121. remove 3 emerald from {_p}
  122. give 1 golden helmet to {_p}
  123. else:
  124. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  125.  
  126. if arg 2 is "plastronor":
  127. if {_pe} is greater than 9:
  128. remove 9 emerald from {_p}
  129. give 1 golden chestplate to {_p}
  130. else:
  131. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  132.  
  133. if arg 2 is "jambieresor":
  134. if {_pe} is greater than 6:
  135. remove 6 emerald from {_p}
  136. give 1 golden leggings to {_p}
  137. else:
  138. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  139.  
  140. if arg 2 is "bottesor":
  141. if {_pe} is greater than 3:
  142. remove 3 emerald from {_p}
  143. give 1 golden boots to {_p}
  144. else:
  145. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  146.  
  147. if arg 2 is "chapeaumailles":
  148. if {_pe} is greater than 4:
  149. remove 4 emerald from {_p}
  150. give 1 chainmail helmet to {_p}
  151. else:
  152. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  153.  
  154. if arg 2 is "cottemailles":
  155. if {_pe} is greater than 12:
  156. remove 12 emerald from {_p}
  157. give 1 chainmail chestplate to {_p}
  158. else:
  159. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  160.  
  161. if arg 2 is "jambieresmailles":
  162. if {_pe} is greater than 7:
  163. remove 7 emerald from {_p}
  164. give 1 chainmail leggings to {_p}
  165. else:
  166. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  167.  
  168. if arg 2 is "bottesmailles":
  169. if {_pe} is greater than 4:
  170. remove 4 emerald from {_p}
  171. give 1 chainmail boots to {_p}
  172. else:
  173. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  174.  
  175. if arg 2 is "chapeaufer":
  176. if {_pe} is greater than 10:
  177. remove 10 emerald from {_p}
  178. give 1 iron helmet to {_p}
  179. else:
  180. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  181.  
  182. if arg 2 is "plastronfer":
  183. if {_pe} is greater than 30:
  184. remove 30 emerald from {_p}
  185. give 1 iron chestplate to {_p}
  186. else:
  187. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  188.  
  189. if arg 2 is "jambieresfer":
  190. if {_pe} is greater than 20:
  191. remove 20 emerald from {_p}
  192. give 1 iron leggings to {_p}
  193. else:
  194. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  195.  
  196. if arg 2 is "bottesfer":
  197. if {_pe} is greater than 10:
  198. remove 10 emerald from {_p}
  199. give 1 iron boots to {_p}
  200. else:
  201. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  202.  
  203. if arg 2 is "chapeaudiamant":
  204. if {_pe} is greater than 40:
  205. remove 40 emerald from {_p}
  206. give 1 diamond helmet to {_p}
  207. else:
  208. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  209.  
  210. if arg 2 is "plastrondiamant":
  211. if {_pe} is greater than 120:
  212. remove 120 emerald from {_p}
  213. give 1 diamond chestplate to {_p}
  214. else:
  215. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  216.  
  217. if arg 2 is "jambieresdiamant":
  218. if {_pe} is greater than 80:
  219. remove 80 emerald from {_p}
  220. give 1 diamond leggings to {_p}
  221. else:
  222. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  223.  
  224. if arg 2 is "bottesdiamant":
  225. if {_pe} is greater than 40:
  226. remove 40 emerald from {_p}
  227. give 1 diamond boots to {_p}
  228. else:
  229. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  230.  
  231. if arg 2 is "epeebois":
  232. if {_pe} is greater than 5:
  233. remove 5 emerald from {_p}
  234. give 1 wooden sword to {_p}
  235. else:
  236. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  237.  
  238. if arg 2 is "epeeor":
  239. if {_pe} is greater than 10:
  240. remove 10 emerald from {_p}
  241. give 1 gold sword to {_p}
  242. else:
  243. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  244.  
  245. if arg 2 is "epeepierre":
  246. if {_pe} is greater than 20:
  247. remove 20 emerald from {_p}
  248. give 1 stone sword to {_p}
  249. else:
  250. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  251.  
  252. if arg 2 is "epeefer":
  253. if {_pe} is greater than 50:
  254. remove 50 emerald from {_p}
  255. give 1 iron sword to {_p}
  256. else:
  257. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  258.  
  259. if arg 2 is "epeediamant":
  260. if {_pe} is greater than 100:
  261. remove 100 emerald from {_p}
  262. give 1 leather helmet to {_p}
  263. else:
  264. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  265.  
  266. if arg 2 is "bow":
  267. if {_pe} is greater than 100:
  268. remove 100 emerald from {_p}
  269. give 1 bow to {_p}
  270. else:
  271. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  272.  
  273. if arg 2 is "bouclier":
  274. if {_pe} is greater than 100:
  275. remove 100 emerald from {_p}
  276. give 1 shields to {_p}
  277. else:
  278. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  279.  
  280. if arg 2 is "fleche":
  281. if {_pe} is greater than 1:
  282. remove 1 emerald from {_p}
  283. give 1 arrow to {_p}
  284. else:
  285. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  286.  
  287. if arg 2 is "pain":
  288. if {_pe} is greater than 1:
  289. remove 1 emerald from {_p}
  290. give 1 bread to {_p}
  291. else:
  292. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  293.  
  294. if arg 2 is "steak":
  295. if {_pe} is greater than 2:
  296. remove 2 emerald from {_p}
  297. give 1 steak to {_p}
  298. else:
  299. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  300.  
  301. if arg 2 is "carrote":
  302. if {_pe} is greater than 3:
  303. remove 3 emerald from {_p}
  304. give 1 golden carrot to {_p}
  305. else:
  306. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  307.  
  308. if arg 2 is "soins":
  309. if {_pe} is greater than 1:
  310. remove 1 emerald from {_p}
  311. give 1 potion of healing 2 to {_p}
  312. else:
  313. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  314.  
  315. if arg 2 is "force":
  316. if {_pe} is greater than 10:
  317. remove 10 emerald from {_p}
  318. give 1 potion of strength 2 to {_p}
  319. else:
  320. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
  321.  
  322. if arg 2 is "speed":
  323. if {_pe} is greater than 2:
  324. remove 2 emerald from {_p}
  325. give 1 potion of speed to {_p}
  326. else:
  327. send "[LXFaction] Tu n'as pas assez d'émeraudes pour acheter cet objet !"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement