Advertisement
twogz

Untitled

Jul 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.68 KB | None | 0 0
  1. command /sell [<text>]:
  2. trigger:
  3. if arg 1 is not set:
  4. open chest with 5 rows named "Sell your items..." to player
  5.  
  6. wait 0.6 ticks
  7.  
  8. format slot 0 of player with book named "&e&l%player%'s balance" with lore "&fMoney &a%player's balance%" to be unstealable
  9.  
  10. format slot 10 of player with coal ore named "&e&lCoal Ore" with lore "&r ||&fPrice &a$0.15 each||&r ||&6&lClick &fto sell all your coal ore." to run [player command "/sell coalore"]
  11.  
  12. format slot 11 of player with iron ore named "&e&lIron Ore" with lore "&r ||&fPrice &a$0.45 each||&r ||&6&lClick &fto sell all your coal ore." to run [player command "/sell ironore"]
  13.  
  14. format slot 12 of player with gold ore named "&e&lGold Ore" with lore "&r ||&fPrice &a$0.75 each||&r ||&6&lClick &fto sell all your coal ore." to run [player command "/sell goldore"]
  15.  
  16. format slot 13 of player with diamond ore named "&e&lDiamond Ore" with lore "&r ||&fPrice &a$1.35 each||&r ||&6&lClick &fto sell all your coal ore." to run [player command "/sell diamondore"]
  17.  
  18. format slot 14 of player with emerald ore named "&e&lEmerald Ore" with lore "&r ||&fPrice &a$2 each||&r ||&6&lClick &fto sell all your emerald ore." to run [player command "/sell emeraldore"]
  19.  
  20. format slot 15 of player with quartz ore named "&e&lQuartz Ore" with lore "&r ||&fPrice &a$3.50 each||&r ||&6&lClick &fto sell all your quartz ore." to run [player command "/sell quartzore"]
  21.  
  22. if arg 1 is "coalore":
  23. if player has coal ore:
  24. while amount of coal ore in player's inventory is bigger than 0:
  25. add 1 to {_amount.%player%}
  26. remove 1 coal ore from player's inventory
  27. add 0.15 to {_payout.%player%}
  28. message ""
  29. message " &e&lSold %{_amount.%player%}% Items:"
  30. message ""
  31. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  32. message "&7 and received &a$%{_payout.%player%}% &7in total."
  33. message ""
  34. add {_payout.%player%} to player's balance
  35. stop
  36. else:
  37. message "&c&lHey! &7You don't have enough of this item to sell it."
  38. if arg 1 is "ironore":
  39. if player has iron ore:
  40. while amount of iron ore in player's inventory is bigger than 0:
  41. add 1 to {_amount.%player%}
  42. remove 1 iron ore from player's inventory
  43. add 0.45 to {_payout.%player%}
  44. message ""
  45. message " &e&lSold %{_amount.%player%}% Items:"
  46. message ""
  47. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  48. message "&7 and received &a$%{_payout.%player%}% &7in total."
  49. message ""
  50. add {_payout.%player%} to player's balance
  51. stop
  52. else:
  53. message "&c&lHey! &7You don't have enough of this item to sell it."
  54. if arg 1 is "goldore":
  55. if player has gold ore:
  56. while amount of gold ore in player's inventory is bigger than 0:
  57. add 1 to {_amount.%player%}
  58. remove 1 gold ore from player's inventory
  59. add 0.75 to {_payout.%player%}
  60. message ""
  61. message " &e&lSold %{_amount.%player%}% Items:"
  62. message ""
  63. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  64. message "&7 and received &a$%{_payout.%player%}% &7in total."
  65. message ""
  66. add {_payout.%player%} to player's balance
  67. stop
  68. else:
  69. message "&c&lHey! &7You don't have enough of this item to sell it."
  70. if arg 1 is "diamondore":
  71. if player has diamond ore:
  72. while amount of diamond ore in player's inventory is bigger than 0:
  73. add 1 to {_amount.%player%}
  74. remove 1 diamond ore from player's inventory
  75. add 1.35 to {_payout.%player%}
  76. message ""
  77. message " &e&lSold %{_amount.%player%}% Items:"
  78. message ""
  79. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  80. message "&7 and received &a$%{_payout.%player%}% &7in total."
  81. message ""
  82. add {_payout.%player%} to player's balance
  83. stop
  84. else:
  85. message "&c&lHey! &7You don't have enough of this item to sell it."
  86. if arg 1 is "emeraldore":
  87. if player has emerald ore:
  88. while amount of emerald ore in player's inventory is bigger than 0:
  89. add 1 to {_amount.%player%}
  90. remove 1 emerald ore from player's inventory
  91. add 2 to {_payout.%player%}
  92. message ""
  93. message " &e&lSold %{_amount.%player%}% Items:"
  94. message ""
  95. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  96. message "&7 and received &a$%{_payout.%player%}% &7in total."
  97. message ""
  98. add {_payout.%player%} to player's balance
  99. stop
  100. else:
  101. message "&c&lHey! &7You don't have enough of this item to sell it."
  102. if arg 1 is "quartzore":
  103. if player has quartz ore:
  104. while amount of quartz ore in player's inventory is bigger than 0:
  105. add 1 to {_amount.%player%}
  106. remove 1 quartz ore from player's inventory
  107. add 3.50 to {_payout.%player%}
  108. message ""
  109. message " &e&lSold %{_amount.%player%}% Items:"
  110. message ""
  111. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  112. message "&7 and received &a$%{_payout.%player%}% &7in total."
  113. message ""
  114. add {_payout.%player%} to player's balance
  115. stop
  116. else:
  117. message "&c&lHey! &7You don't have enough of this item to sell it."
  118.  
  119. command /purchase [<text>]:
  120. trigger:
  121. if arg 1 is "woodpick":
  122. if player's balance >= 15:
  123. remove 15 from player's balance
  124. message "&a[NPC] Miner: &fThanks for buying a &eWooden Pickaxe &ffor &2$15&f, &e%player%&f!"
  125. give wood pick to player
  126. else:
  127. message "&c&lHey! &7You don't have enough money to buy this!"
  128. if arg 1 is "stonepick":
  129. if {level::%uuid of player%} >= 5:
  130. if player's balance >= 30:
  131. remove 30 from player's balance
  132. message "&a[NPC] Miner: &fThanks for buying a &eStone Pickaxe &ffor &2$30&f, &e%player%&f!"
  133. give stone pick to player
  134. else:
  135. message "&c&lHey! &7You don't have enough money to buy this!"
  136. else:
  137. message "&c&lHey! &7You must be Level 5 or higher to purchase this."
  138. if arg 1 is "ironpick":
  139. if {level::%uuid of player%} >= 10:
  140. if player's balance >= 45:
  141. remove 45 from player's balance
  142. message "&a[NPC] Miner: &fThanks for buying a &eIron Pickaxe &ffor &2$45&f, &e%player%&f!"
  143. give iron pick to player
  144. else:
  145. message "&c&lHey! &7You don't have enough money to buy this!"
  146. else:
  147. message "&c&lHey! &7You must be Level 10 or higher to purchase this."
  148. if arg 1 is "diamondpick":
  149. if {level::%uuid of player%} >= 20:
  150. if player's balance >= 75:
  151. remove 75 from player's balance
  152. message "&a[NPC] Miner: &fThanks for buying a &eDiamond Pickaxe &ffor &2$45&f, &e%player%&f!"
  153. give diamond pick to player
  154. else:
  155. message "&c&lHey! &7You don't have enough money to buy this!"
  156. else:
  157. message "&c&lHey! &7You must be Level 20 or higher to purchase this."
  158. if arg 1 is "goldpick":
  159. if {level::%uuid of player%} >= 30:
  160. if player's balance >= 150:
  161. remove 150 from player's balance
  162. message "&a[NPC] Miner: &fThanks for buying a &eGold Pickaxe &ffor &2$45&f, &e%player%&f!"
  163. give gold pick to player
  164. else:
  165. message "&c&lHey! &7You don't have enough money to buy this!"
  166. else:
  167. message "&c&lHey! &7You must be Level 30 or higher to purchase this."
  168. if arg 1 is "woodpick2":
  169. if player's balance >= 30:
  170. remove 30 from player's balance
  171. message "&a[NPC] Miner: &fThanks for buying a &eWooden Pickaxe Tier 2 &ffor &2$30&f, &e%player%&f!"
  172. give wood pick of efficiency 1 to player
  173. else:
  174. message "&c&lHey! &7You don't have enough money to buy this!"
  175. if arg 1 is "woodpick3":
  176. if player's balance >= 60:
  177. remove 60 from player's balance
  178. message "&a[NPC] Miner: &fThanks for buying a &eWooden Pickaxe Tier 3 &ffor &2$60&f, &e%player%&f!"
  179. give wood pick of efficiency 2 to player
  180. else:
  181. message "&c&lHey! &7You don't have enough money to buy this!"
  182. if arg 1 is "stonepick2":
  183. if {level::%uuid of player%} >= 5:
  184. if player's balance >= 60:
  185. remove 60 from player's balance
  186. message "&a[NPC] Miner: &fThanks for buying a &eStone Pickaxe Tier 2 &ffor &2$60&f, &e%player%&f!"
  187. give stone pick of efficiency 1 to player
  188. else:
  189. message "&c&lHey! &7You don't have enough money to buy this!"
  190. else:
  191. message "&c&lHey! &7You must be Level 5 or higher to purchase this."
  192.  
  193. if arg 1 is "stonepick3":
  194. if {level::%uuid of player%} >= 5:
  195. if player's balance >= 120:
  196. remove 120 from player's balance
  197. message "&a[NPC] Miner: &fThanks for buying a &eStone Pickaxe Tier 3 &ffor &2$120&f, &e%player%&f!"
  198. give stone pick of efficiency 2 to player
  199. else:
  200. message "&c&lHey! &7You don't have enough money to buy this!"
  201. else:
  202. message "&c&lHey! &7You must be Level 5 or higher to purchase this."
  203.  
  204. if arg 1 is "ironpick2":
  205. if {level::%uuid of player%} >= 10:
  206. if player's balance >= 90:
  207. remove 90 from player's balance
  208. message "&a[NPC] Miner: &fThanks for buying a &eIron Pickaxe Tier 2 &ffor &2$90&f, &e%player%&f!"
  209. give iron pick of efficiency 1 to player
  210. else:
  211. message "&c&lHey! &7You don't have enough money to buy this!"
  212. else:
  213. message "&c&lHey! &7You must be Level 10 or higher to purchase this."
  214.  
  215. if arg 1 is "ironpick3":
  216. if {level::%uuid of player%} >= 10:
  217. if player's balance >= 90:
  218. remove 90 from player's balance
  219. message "&a[NPC] Miner: &fThanks for buying a &eIron Pickaxe Tier 2 &ffor &2$90&f, &e%player%&f!"
  220. give iron pick of efficiency 1 to player
  221. else:
  222. message "&c&lHey! &7You don't have enough money to buy this!"
  223. else:
  224. message "&c&lHey! &7You must be Level 10 or higher to purchase this."
  225.  
  226. if arg 1 is "diamondpick2":
  227. if {level::%uuid of player%} >= 20:
  228. if player's balance >= 150:
  229. remove 150 from player's balance
  230. message "&a[NPC] Miner: &fThanks for buying a &eDiamond Pickaxe Tier 2 &ffor &2$150&f, &e%player%&f!"
  231. give diamond pick of efficiency 1 to player
  232. else:
  233. message "&c&lHey! &7You don't have enough money to buy this!"
  234. else:
  235. message "&c&lHey! &7You must be Level 20 or higher to purchase this."
  236.  
  237. if arg 1 is "diamondpick3":
  238. if {level::%uuid of player%} >= 20:
  239. if player's balance >= 300:
  240. remove 300 from player's balance
  241. message "&a[NPC] Miner: &fThanks for buying a &eDiamond Pickaxe Tier 3 &ffor &2$300&f, &e%player%&f!"
  242. give diamond pick of efficiency 2 to player
  243. else:
  244. message "&c&lHey! &7You don't have enough money to buy this!"
  245. else:
  246. message "&c&lHey! &7You must be Level 20 or higher to purchase this."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement