Advertisement
twogz

Untitled

Jul 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.10 KB | None | 0 0
  1. on first join:
  2. set {level.%uuid of player%} to 0
  3. set {xp.%uuid of player%} to 0
  4. set {xpmax.%uuid of player%} to 10
  5.  
  6. on break:
  7. if player's gamemode is survival:
  8. cancel event
  9. if event-block is coal ore:
  10. give coal to player
  11. execute console command "/xp give %player% 1"
  12. set event-block to cobblestone
  13. wait 3 seconds
  14. set event-block to coal ore
  15.  
  16. command /reset:
  17. trigger:
  18. set {level.%uuid of player%} to 0
  19. set {xp.%uuid of player%} to 0
  20. set {xpmax.%uuid of player%} to 10
  21.  
  22. on chat:
  23. cancel event
  24. if {prefix.%uuid of player%} is not set:
  25. broadcast "&eLvl. %{level.%uuid of player%}% &7%player%: %message%"
  26.  
  27. else:
  28. broadcast "&eLvl. %{level.%uuid of player%}% %{prefix.%uuid of player%}% %player%&f: %message%"
  29.  
  30. on right click on ender chest:
  31. if {level.%uuid of player%} < 20:
  32. cancel event
  33. message "&c&lHey! &7You must be &bLevel 20 &7to access the Vault!"
  34.  
  35. command /miner:
  36. trigger:
  37. if {level.%uuid of player%} < 10:
  38. message "&c&lHey! &7You must be &bLevel 10 &7to talk to The Miner"
  39. else:
  40. message "&a[NPC] Miner: &fHey there, what do you need?"
  41. open chest with 5 rows named "The Miner" to player
  42.  
  43. wait 0.6 ticks
  44.  
  45. format slot 4 of player with nether star named "&a&l%player%'s Balance" with lore "&fYou have &2%player's balance%" to be unstealable
  46.  
  47. command /xp [<text>] [<player>] [<integer>]:
  48. permission: *
  49. trigger:
  50. if arg 1 is "give":
  51. add arg 3 to {xp.%uuid of arg 2%}
  52. if {xp.%uuid of arg 2%} >= {xpmax.%uuid of arg 2%}:
  53. add 1 to {level.%uuid of arg 2%}
  54. add 2 to {xpmax.%uuid of arg 2%}
  55. set {xp.%uuid of arg 2%} to 0
  56. message "&aYou are now level %{level.%uuid of arg 2%}%!" to arg 2
  57. message "&eNext Level: %{xp.%uuid of arg 2%}%/%{xpmax.%uuid of arg 2%}% XP Remaining" to arg 2
  58.  
  59. command /merchant:
  60. trigger:
  61. message "&a[NPC] Merchant: &fHey %player%, come sell some items!"
  62. open chest with 5 rows named "The Merchant" to player
  63.  
  64. wait 0.6 ticks
  65.  
  66. format slot 4 of player with nether star named "&a&l%player%'s Balance" with lore "&fYou have &2%player's balance%" to be unstealable
  67.  
  68. format slot 20 of player with coal item named "&eCoal" with lore "&cRequired Level: 0||||&fPrice: &a$0.10 each||||&fClick here to sell." to run [player command "/sell coal"]
  69.  
  70. format slot 21 of player with iron ingot named "&eIron" with lore "&cRequired Level: 10||||&fPrice: &a$0.15 each||||&fClick here to sell." to run [player command "/sell iron"]
  71.  
  72. format slot 22 of player with gold ingot named "&eGold" with lore "&cRequired Level: 20||||&fPrice: &a$0.20 each||||&fClick here to sell." to run [player command "/sell gold"]
  73.  
  74. format slot 23 of player with redstone dust named "&eRedstone" with lore "&cRequired Level: 30||||&fPrice: &a$0.30 each||||&fClick here to sell." to run [player command "/sell redstone"]
  75.  
  76. format slot 24 of player with lapis lazuli named "&eLapis Lazuli" with lore "&cRequired Level: 40||||&fPrice: &a$0.50 each||||&fClick here to sell." to run [player command "/sell lapis"]
  77.  
  78. format slot 30 of player with diamond named "&eDiamond" with lore "&cRequired Level: 50||||&fPrice: &a$1 each||||&fClick here to sell." to run [player command "/sell diamond"]
  79.  
  80. format slot 31 of player with emerald named "&eEmerald" with lore "&cRequired Level: 75||||&fPrice: &a$1.75 each||||&fClick here to sell." to run [player command "/sell emerald"]
  81.  
  82. format slot 32 of player with quartz item named "&eQuartz" with lore "&cRequired Level: 100||||&fPrice: &a$2.50 each||||&fClick here to sell." to run [player command "/sell quartz"]
  83.  
  84. command /prefix [<player>] [<text>]:
  85. permission: prefix.*
  86. trigger:
  87. set {prefix.%uuid of arg 1%} to "%coloured arg 2%"
  88. message "&aSet %arg 1%'s prefix to %coloured arg 2%"
  89.  
  90. if arg 2 is not set:
  91. delete {prefix.%uuid of arg 1%}
  92.  
  93. command /sell [<text>]:
  94. trigger:
  95. if arg 1 is not set:
  96. execute player command "/merchant"
  97.  
  98. if arg 1 is "coal":
  99. if player has coal item:
  100. while amount of coal item in player's inventory is bigger than 0:
  101. add 1 to {_amount.%player%}
  102. remove 1 coal item from player's inventory
  103. add 0.10 to {_payout.%player%}
  104. message ""
  105. message " &aSold %{_amount.%player%}% Items:"
  106. message ""
  107. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  108. message "&7 and received &b$%{_payout.%player%}% &7in total."
  109. message ""
  110. add {_payout.%player%} to player's balance
  111. stop
  112. else:
  113. message "&c&lHey! &7You don't have enough of this item to sell it."
  114.  
  115. if arg 1 is "iron":
  116. if player has iron ingot:
  117. while amount of iron ingot in player's inventory is bigger than 0:
  118. add 1 to {_amount.%player%}
  119. remove 1 iron ingot from player's inventory
  120. add 0.15 to {_payout.%player%}
  121. message ""
  122. message " &aSold %{_amount.%player%}% Items:"
  123. message ""
  124. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  125. message "&7 and received &b$%{_payout.%player%}% &7in total."
  126. message ""
  127. add {_payout.%player%} to player's balance
  128. stop
  129. else:
  130. message "&c&lHey! &7You don't have enough of this item to sell it."
  131.  
  132. if arg 1 is "gold":
  133. if player has gold ingot:
  134. while amount of gold ingot in player's inventory is bigger than 0:
  135. add 1 to {_amount.%player%}
  136. remove 1 gold ingot from player's inventory
  137. add 0.20 to {_payout.%player%}
  138. message ""
  139. message " &aSold %{_amount.%player%}% Items:"
  140. message ""
  141. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  142. message "&7 and received &b$%{_payout.%player%}% &7in total."
  143. message ""
  144. add {_payout.%player%} to player's balance
  145. stop
  146. else:
  147. message "&c&lHey! &7You don't have enough of this item to sell it."
  148.  
  149. if arg 1 is "redstone":
  150. if player has redstone dust:
  151. while amount of redstone dust in player's inventory is bigger than 0:
  152. add 1 to {_amount.%player%}
  153. remove 1 redstone dust from player's inventory
  154. add 0.30 to {_payout.%player%}
  155. message ""
  156. message " &aSold %{_amount.%player%}% Items:"
  157. message ""
  158. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  159. message "&7 and received &b$%{_payout.%player%}% &7in total."
  160. message ""
  161. add {_payout.%player%} to player's balance
  162. stop
  163. else:
  164. message "&c&lHey! &7You don't have enough of this item to sell it."
  165.  
  166. if arg 1 is "lapis":
  167. if player has lapis lazuli:
  168. while amount of lapis lazli in player's inventory is bigger than 0:
  169. add 1 to {_amount.%player%}
  170. remove 1 lapis lazuli from player's inventory
  171. add 0.50 to {_payout.%player%}
  172. message ""
  173. message " &aSold %{_amount.%player%}% Items:"
  174. message ""
  175. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  176. message "&7 and received &b$%{_payout.%player%}% &7in total."
  177. message ""
  178. add {_payout.%player%} to player's balance
  179. stop
  180. else:
  181. message "&c&lHey! &7You don't have enough of this item to sell it."
  182.  
  183. if arg 1 is "diamond":
  184. if player has diamond:
  185. while amount of diamond in player's inventory is bigger than 0:
  186. add 1 to {_amount.%player%}
  187. remove 1 diamond from player's inventory
  188. add 1 to {_payout.%player%}
  189. message ""
  190. message " &aSold %{_amount.%player%}% Items:"
  191. message ""
  192. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  193. message "&7 and received &b$%{_payout.%player%}% &7in total."
  194. message ""
  195. add {_payout.%player%} to player's balance
  196. stop
  197. else:
  198. message "&c&lHey! &7You don't have enough of this item to sell it."
  199.  
  200. if arg 1 is "emerald":
  201. if player has emerald:
  202. while amount of emerald in player's inventory is bigger than 0:
  203. add 1 to {_amount.%player%}
  204. remove 1 emerald from player's inventory
  205. add 1.75 to {_payout.%player%}
  206. message ""
  207. message " &aSold %{_amount.%player%}% Items:"
  208. message ""
  209. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  210. message "&7 and received &b$%{_payout.%player%}% &7in total."
  211. message ""
  212. add {_payout.%player%} to player's balance
  213. stop
  214. else:
  215. message "&c&lHey! &7You don't have enough of this item to sell it."
  216.  
  217. if arg 1 is "quartz":
  218. if player has quartz item:
  219. while amount of quartz item in player's inventory is bigger than 0:
  220. add 1 to {_amount.%player%}
  221. remove 1 quartz item from player's inventory
  222. add 2.50 to {_payout.%player%}
  223. message ""
  224. message " &aSold %{_amount.%player%}% Items:"
  225. message ""
  226. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  227. message "&7 and received &b$%{_payout.%player%}% &7in total."
  228. message ""
  229. add {_payout.%player%} to player's balance
  230. stop
  231. else:
  232. message "&c&lHey! &7You don't have enough of this item to sell it."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement