Advertisement
70sOn7

Custom Villager

Nov 12th, 2017
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.90 KB | None | 0 0
  1. on right click on villager:
  2. cancel event
  3. execute console command "/sshop %player%"
  4.  
  5. on right click on crafting table:
  6. cancel event
  7. execute console command "/sshop %player%"
  8.  
  9. command /shop:
  10. trigger:
  11. if sender has permission "villager.instant":
  12. make console execute "/sshop %player%"
  13. else:
  14. send "&6Shop&8: &7Opening in 3 seconds!"
  15. wait 17 ticks
  16. send "&6Shop&8: &7Opening in 2 seconds!"
  17. wait 17 ticks
  18. send "&6Shop&8: &7Opening in 1 second!"
  19. wait 17 ticks
  20. make console execute "/sshop %player%"
  21.  
  22. command /villager <text>:
  23. permission: villager.help
  24. permission message: &6Villager&8: &7You dont have access to this command!
  25. trigger:
  26. if arg-1 is not set:
  27. send "&6Villager&8: &7/villager (Create/Help)"
  28. stop
  29. if arg-1 is "help":
  30. send "&7&m-----------------------------------------------"
  31. send " &6Villager Help "
  32. send "&7&m-----------------------------------------------"
  33. send "&6Permissions:"
  34. send " &7* &6villager.instant &7(Makes '/shop' instant)"
  35. send " &7* &6vilager.create &7(Allows '/villager create')"
  36. send " "
  37. stop
  38. if arg-1 is "create":
  39. make player execute "/execute @p ~ ~ ~ /summon villager ~ ~ ~ {NoAI:1,Invulnerable:1}"
  40. send "&6Shop&8: &7Create villager!"
  41. send "&7* &7Use a name tag to name him"
  42. stop
  43.  
  44. command /sshop <player>:
  45. permission: *
  46. trigger:
  47. wait 1 tick
  48. open chest with 3 rows named "&6Shop" to argument 1
  49. wait 1 tick
  50. format slot 11 of argument 1 with iron chestplate named "&6Armor" with lore "&7The first tier of Armors" to run "armor %arg-1%"
  51. format slot 13 of argument 1 with stone sword named "&6Weapons" with lore "&7Get all the Weapons here!" to run "weapons %arg-1%"
  52. format slot 15 of argument 1 with diamond chestplate named "&6Armor 2" with lore "&7Upgraded Armor! Cost more!" to run "armor2 %arg-1%"
  53.  
  54. command /armor <player>:
  55. permission: *
  56. trigger:
  57. wait 1 tick
  58. open chest with 3 row named "&6Armor" to argument 1
  59. wait 1 tick
  60. format slot 10 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  61. format slot 11 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  62. format slot 12 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  63. format slot 13 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  64. format slot 14 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  65. format slot 15 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  66. format slot 16 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  67. format slot 18 of argument 1 with arrow named "&6Back" with lore "&7Go back" to run "sshop %arg-1%"
  68.  
  69. command /weapons <player>:
  70. permission: *
  71. trigger:
  72. wait 1 tick
  73. open chest with 3 row named "&6Weapons" to argument 1
  74. wait 1 tick
  75. format slot 10 of argument 1 with iron sword named "&6Iron Sword" with lore "&71 Gold Ingot" to run "weaponsb %arg-1% 1"
  76. format slot 12 of argument 1 with iron sword named "&6Iron Sword" with lore "&764 Gold Ingots|| ||&aSharp 5" to run "weaponsb %arg-1% 2"
  77. format slot 14 of argument 1 with diamond sword named "&6Diamond Sword" with lore "&72 Stacks Of Gold Ingots" to run "weaponsb %arg-1% 3"
  78. format slot 16 of argument 1 with diamond sword named "&6Diamond Sword" with lore "&732 Gold Blocks|| ||&aSharp 5" to run "weaponsb %arg-1% 4"
  79. format slot 18 of argument 1 with arrow named "&6Back" with lore "&7Go back" to run "sshop %arg-1%"
  80.  
  81. command /armor2 <player>:
  82. permission: *
  83. trigger:
  84. wait 1 tick
  85. open chest with 3 row named "&6Armor 2" to argument 1
  86. wait 1 tick
  87. format slot 10 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  88. format slot 11 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  89. format slot 12 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  90. format slot 13 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  91. format slot 14 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  92. format slot 15 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  93. format slot 16 of argument 1 with barrier named "&cPlace holder" with lore "&7Place holder" to run "sshop %arg-1%"
  94. format slot 18 of argument 1 with arrow named "&6Back" with lore "&7Go back" to run "sshop %arg-1%"
  95.  
  96. command /weaponsb <player> <text>:
  97. permission: *
  98. trigger:
  99. if arg-2 is "1":
  100. if arg 1's inventory contains 1 gold ingot:
  101. remove 1 gold ingot from arg 1's inventory
  102. make console execute "/minecraft:give %arg-1% iron_sword 1 0 {Unbreakable:1}"
  103. else:
  104. send "&6You need 1 gold ingot to buy this!"
  105. if arg-2 is "2":
  106. if arg 1's inventory contains 64 gold ingot:
  107. remove 64 gold ingots from arg 1's inventory
  108. make console execute "/minecraft:give %arg-1% iron_sword 1 0 {ench:[{id:16,lvl:5}],Unbreakable:1}"
  109. else:
  110. send "&6You need 64 gold ingots to buy this!"
  111. if arg-2 is "3":
  112. if arg 1's inventory contains 128 gold ingot:
  113. remove 128 gold ingots from arg 1's inventory
  114. make console execute "/Minecraft:give %player% diamond_sword 1 0 {Unbreakable:1}"
  115. else:
  116. send "&6You need 128&7&o(2 Stacks) &6of gold ingots to buy this!"
  117. if arg-2 is "4":
  118. if arg 1's inventory contains 32 gold block:
  119. remove 32 gold blocks from arg 1's inventory
  120. make console execute "/minecraft:give %arg-1% diamond_sword 1 0 {ench:[{id:16,lvl:5}],Unbreakable:1}"
  121. else:
  122. send "&6You need 32 gold blocks to buy this!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement