Guest User

SpeedCode1

a guest
Jun 2nd, 2015
1,350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. # Speed code 1: Un shop perso en cliquant sur les NPC !
  2.  
  3. options:
  4. pre : &4NPC &7>
  5.  
  6. on rightclick on a villager:
  7. cancel event
  8. wait 1 tick
  9. send "{@pre} &9Tout est à vendre !"
  10. wait 1 tick
  11. open chest with 2 rows named " &4NPC &cShop :" to player
  12. wait 1 tick
  13. set {_Count} to 0
  14. loop 18 times:
  15. format slot {_Count} of player with a white glass pane named "&0 .." to run " "
  16. add 1 to {_Count}
  17. wait 1 tick
  18. format slot 0 of player with a diamond helmet named "&aDiamond Helmet &6= &c1 Emeralds" to run [make console execute command "/buy helmet %player%"]
  19. format slot 1 of player with a diamond chestplate named "&aDiamond ChestPlate &6= &c3 Emerald" to run [make console execute command "/buy chest %player%"]
  20. format slot 2 of player with a diamond leggings named "&aDiamond Legging &6= &c3 Emerald" to run [make console execute command "/buy legg %player%"]
  21. format slot 3 of player with a diamond boots named "&aDiamond Boots &6= &c1 Emerald" to run [make console execute command "/buy boots %player%"]
  22. format slot 4 of player with a diamond sword named "&aDiamond Sword &6= &c1 Emerald" to run [make console execute command "/buy sword %player%"]
  23.  
  24. format slot 6 of player with a diamond shovel named "&aDiamond Shovel &6= &c1 Emerald" to run [make console execute command "/buy shovel %player%"]
  25. format slot 7 of player with a diamond pickaxe named "&aDiamond PickAxe &6= &c1 Emerald" to run [make console execute command "/buy pick %player%"]
  26. format slot 8 of player with a diamond axe named "&aDiamond Axe &6= &c1 Emerald" to run [make console execute command "/buy axe %player%"]
  27.  
  28. format slot 17 of player with a redstone named "&4EXIT !" to close
  29.  
  30.  
  31.  
  32.  
  33.  
  34. command /buy [<text>] <player>:
  35. executable by: console
  36. trigger:
  37. if arg 1 is "helmet":
  38. if player-arg has 1 emeralds:
  39. send "{@pre} &aTres bon choix !" to player-arg
  40. remove 1 emeralds from player-arg's inventory
  41. give a diamond helmet to player-arg
  42. else:
  43. send "{@pre} &cPas asser d'argent !" to player-arg
  44.  
  45. else if arg 1 is "chest":
  46. if player-arg has 3 emerald:
  47. send "{@pre} &aTres bon choix !" to player-arg
  48. remove 3 emeralds from player-arg's inventory
  49. give a diamond chestplate to player-arg
  50. else:
  51. send "{@pre} &cPas asser d'argent !" to player-arg
  52.  
  53. else if arg 1 is "legg":
  54. if player-arg has 3 emerald:
  55. send "{@pre} &aTres bon choix !" to player-arg
  56. remove 3 emeralds from player-arg's inventory
  57. give a diamond leggings to player-arg
  58. else:
  59. send "{@pre} &cPas asser d'argent !" to player-arg
  60.  
  61. else if arg 1 is "boots":
  62. if player-arg has 1 emerald:
  63. send "{@pre} &aTres bon choix !" to player-arg
  64. remove 1 emeralds from player-arg's inventory
  65. give a diamond boots to player-arg
  66. else:
  67. send "{@pre} &cPas asser d'argent !" to player-arg
  68.  
  69. else if arg 1 is "sword":
  70. if player-arg has 1 emerald:
  71. send "{@pre} &aTres bon choix !" to player-arg
  72. remove 1 emeralds from player-arg's inventory
  73. give a diamond sword to player-arg
  74. else:
  75. send "{@pre} &cPas asser d'argent !" to player-arg
  76.  
  77. else if arg 1 is "shovel":
  78. if player-arg has 1 emerald:
  79. send "{@pre} &aTres bon choix !" to player-arg
  80. remove 1 emeralds from player-arg's inventory
  81. give a diamond shovel to player-arg
  82. else:
  83. send "{@pre} &cPas asser d'argent !" to player-arg
  84.  
  85. else if arg 1 is "pick":
  86. if player-arg has 1 emerald:
  87. send "{@pre} &aTres bon choix !" to player-arg
  88. remove 1 emeralds from player-arg's inventory
  89. give a diamond pickaxe to player-arg
  90. else:
  91. send "{@pre} &cPas asser d'argent !" to player-arg
  92.  
  93. else if arg 1 is "axe":
  94. if player-arg has 1 emerald:
  95. send "{@pre} &aTres bon choix !" to player-arg
  96. remove 1 emeralds from player-arg's inventory
  97. give a diamond axe to player-arg
  98. else:
  99. send "{@pre} &cPas asser d'argent !" to player-arg
Advertisement
Add Comment
Please, Sign In to add comment