Advertisement
twogz

Untitled

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