Advertisement
twogz

Untitled

Jul 22nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.55 KB | None | 0 0
  1. command /sell [<text>]:
  2. trigger:
  3.  
  4. if arg 1 is "cobblestone":
  5. if player has cobblestone:
  6. while amount of cobblestone in player's inventory is bigger than 0:
  7. add 1 to {_amount.%player%}
  8. remove 1 cobble from player's inventory
  9. add 0.10 to {_payout.%player%}
  10. message ""
  11. message " &e&lSold %{_amount.%player%}% Items:"
  12. message ""
  13. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  14. message "&7 and received &a$%{_payout.%player%}% &7in total."
  15. message ""
  16. add {_payout.%player%} to player's balance
  17. stop
  18. else:
  19. message "&c&lHey! &7You don't have enough of this item to sell it."
  20.  
  21. if arg 1 is "stone":
  22. if player has stone:
  23. while amount of stone in player's inventory is bigger than 0:
  24. add 1 to {_amount.%player%}
  25. remove 1 stone from player's inventory
  26. add 2 to {_payout.%player%}
  27. message ""
  28. message " &e&lSold %{_amount.%player%}% Items:"
  29. message ""
  30. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  31. message "&7 and received &a$%{_payout.%player%}% &7in total."
  32. message ""
  33. add {_payout.%player%} to player's balance
  34. stop
  35. else:
  36. message "&c&lHey! &7You don't have enough of this item to sell it."
  37.  
  38. if arg 1 is "charcoal":
  39. if player has charcoal:
  40. while amount of charcoal in player's inventory is bigger than 0:
  41. add 1 to {_amount.%player%}
  42. remove 1 charcoal from player's inventory
  43. add 0.20 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.  
  55. if arg 1 is "coal":
  56. if player has coal item:
  57. while amount of coal item in player's inventory is bigger than 0:
  58. add 1 to {_amount.%player%}
  59. remove 1 coal item from player's inventory
  60. add 3 to {_payout.%player%}
  61. message ""
  62. message " &e&lSold %{_amount.%player%}% Items:"
  63. message ""
  64. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  65. message "&7 and received &a$%{_payout.%player%}% &7in total."
  66. message ""
  67. add {_payout.%player%} to player's balance
  68. stop
  69. else:
  70. message "&c&lHey! &7You don't have enough of this item to sell it."
  71.  
  72. if arg 1 is "ironnugget":
  73. if player has iron nugget:
  74. while amount of iron nugget in player's inventory is bigger than 0:
  75. add 1 to {_amount.%player%}
  76. remove 1 iron nugget from player's inventory
  77. add 0.30 to {_payout.%player%}
  78. message ""
  79. message " &e&lSold %{_amount.%player%}% Items:"
  80. message ""
  81. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  82. message "&7 and received &a$%{_payout.%player%}% &7in total."
  83. message ""
  84. add {_payout.%player%} to player's balance
  85. stop
  86. else:
  87. message "&c&lHey! &7You don't have enough of this item to sell it."
  88.  
  89. if arg 1 is "ironingot":
  90. if player has iron ingot:
  91. while amount of iron ingot in player's inventory is bigger than 0:
  92. add 1 to {_amount.%player%}
  93. remove 1 iron ingot from player's inventory
  94. add 4 to {_payout.%player%}
  95. message ""
  96. message " &e&lSold %{_amount.%player%}% Items:"
  97. message ""
  98. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  99. message "&7 and received &a$%{_payout.%player%}% &7in total."
  100. message ""
  101. add {_payout.%player%} to player's balance
  102. stop
  103. else:
  104. message "&c&lHey! &7You don't have enough of this item to sell it."
  105.  
  106. if arg 1 is "goldnugget":
  107. if player has gold nugget:
  108. while amount of gold nugget in player's inventory is bigger than 0:
  109. add 1 to {_amount.%player%}
  110. remove 1 gold nugget from player's inventory
  111. add 0.40 to {_payout.%player%}
  112. message ""
  113. message " &e&lSold %{_amount.%player%}% Items:"
  114. message ""
  115. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  116. message "&7 and received &a$%{_payout.%player%}% &7in total."
  117. message ""
  118. add {_payout.%player%} to player's balance
  119. stop
  120. else:
  121. message "&c&lHey! &7You don't have enough of this item to sell it."
  122.  
  123. if arg 1 is "goldingot":
  124. if player has gold ingot:
  125. while amount of gold ingot in player's inventory is bigger than 0:
  126. add 1 to {_amount.%player%}
  127. remove 1 gold ingot from player's inventory
  128. add 5 to {_payout.%player%}
  129. message ""
  130. message " &e&lSold %{_amount.%player%}% Items:"
  131. message ""
  132. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  133. message "&7 and received &a$%{_payout.%player%}% &7in total."
  134. message ""
  135. add {_payout.%player%} to player's balance
  136. stop
  137. else:
  138. message "&c&lHey! &7You don't have enough of this item to sell it."
  139.  
  140.  
  141. if arg 1 is not set:
  142. execute player command "/sellall"
  143.  
  144. if arg 1 is "log":
  145. if player has 17:0:
  146. while amount of 17:0 in player's inventory is bigger than 0:
  147. add 1 to {_amount.%player%}
  148. remove 1 17:0 from player's inventory
  149. add 0.50 to {_payout.%player%}
  150. message ""
  151. message " &e&lSold %{_amount.%player%}% Items:"
  152. message ""
  153. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  154. message "&7 and received &a$%{_payout.%player%}% &7in total."
  155. message ""
  156. add {_payout.%player%} to player's balance
  157. stop
  158. else:
  159. message "&c&lHey! &7You don't have enough of this item to sell it."
  160.  
  161. if arg 1 is "fish":
  162. if player has raw fish:
  163. while amount of raw fish in player's inventory is bigger than 0:
  164. add 1 to {_amount.%player%}
  165. remove 1 raw fish from player's inventory
  166. add 0.75 to {_payout.%player%}
  167. message ""
  168. message " &e&lSold %{_amount.%player%}% Items:"
  169. message ""
  170. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  171. message "&7 and received &a$%{_payout.%player%}% &7in total."
  172. message ""
  173. add {_payout.%player%} to player's balance
  174. stop
  175. else:
  176. message "&c&lHey! &7You don't have enough of this item to sell it."
  177.  
  178. if arg 1 is "salmon":
  179. if player has raw salmon:
  180. while amount of raw salmon in player's inventory is bigger than 0:
  181. add 1 to {_amount.%player%}
  182. remove 1 salmon from player's inventory
  183. add 2 to {_payout.%player%}
  184. message ""
  185. message " &e&lSold %{_amount.%player%}% Items:"
  186. message ""
  187. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  188. message "&7 and received &a$%{_payout.%player%}% &7in total."
  189. message ""
  190. add {_payout.%player%} to player's balance
  191. stop
  192. else:
  193. message "&c&lHey! &7You don't have enough of this item to sell it."
  194.  
  195. if arg 1 is "pufferfish":
  196. if player has pufferfish:
  197. while amount of pufferfish in player's inventory is bigger than 0:
  198. add 1 to {_amount.%player%}
  199. remove 1 pufferfish from player's inventory
  200. add 50 to {_payout.%player%}
  201. message ""
  202. message " &e&lSold %{_amount.%player%}% Items:"
  203. message ""
  204. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  205. message "&7 and received &a$%{_payout.%player%}% &7in total."
  206. message ""
  207. add {_payout.%player%} to player's balance
  208. stop
  209. else:
  210. message "&c&lHey! &7You don't have enough of this item to sell it."
  211.  
  212. if arg 1 is "porkchop":
  213. if player has porkchop:
  214. while amount of porkchop in player's inventory is bigger than 0:
  215. add 1 to {_amount.%player%}
  216. remove 1 porkchop from player's inventory
  217. add 13.50 to {_payout.%player%}
  218. message ""
  219. message " &e&lSold %{_amount.%player%}% Items:"
  220. message ""
  221. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  222. message "&7 and received &a$%{_payout.%player%}% &7in total."
  223. message ""
  224. add {_payout.%player%} to player's balance
  225. stop
  226. else:
  227. message "&c&lHey! &7You don't have enough of this item to sell it."
  228.  
  229.  
  230. if arg 1 is not set:
  231. execute player command "/sellall"
  232.  
  233. command /sellall:
  234. trigger:
  235. open chest with 4 rows named "Sell your items" to player
  236.  
  237. wait 0.6 ticks
  238.  
  239. format slot 0 of player with paper named "&a&lYour Balance" with lore "&fMoney &a%player's balance%" to be unstealable
  240.  
  241. format slot 10 of player with cobblestone named "&e&lLow Quality Stone" with lore "&7&oTier 1 Item||||&fPrice &a$0.10 each||&r ||&6&lClick &fto sell all your low quality stone." to run [player command "/sell cobblestone"]
  242. format slot 19 of player with stone named "&e&lHigh Quality Stone" with lore "&7&oTier 2 Item||||&fPrice &a$2 each||&r ||&6&lClick &fto sell all your high quality stone." to run [player command "/sell stone"]
  243. format slot 11 of player with charcoal named "&e&lLow Quality Coal" with lore "&7&oTier 1 Item||||&fPrice &a$0.20 each||&r ||&6&lClick &fto sell all your low quality coal." to run [player command "/sell charcoal"]
  244. format slot 20 of player with coal item named "&e&lHigh Quality Coal" with lore "&7&oTier 2 Item||||&fPrice &a$3 each||&r ||&6&lClick &fto sell all your high quality coal." to run [player command "/sell coal"]
  245. format slot 12 of player with iron nugget named "&e&lLow Quality Iron" with lore "&7&oTier 1 Item||||&fPrice &a$0.30 each||&r ||&6&lClick &fto sell all your low quality iron." to run [player command "/sell ironnugget"]
  246. format slot 21 of player with iron ingot named "&e&lHigh Quality Iron" with lore "&7&oTier 2 Item||||&fPrice &a$4 each||&r ||&6&lClick &fto sell all your high quality iron" to run [player command "/sell ironingot"]
  247. format slot 13 of player with gold nugget named "&e&lLow Quality Gold" with lore "&7&oTier 1 Item||||&fPrice &a$0.40 each||&r ||&6&lClick &fto sell all your low quality gold." to run [player command "/sell goldnugget"]
  248. format slot 22 of player with gold ingot named "&e&lHigh Quality Gold" with lore "&7&oTier 2 Item||||&fPrice &a$5 each||&r ||&6&lClick &fto sell all your high quality gold" to run [player command "/sell goldingot"]
  249. format slot 14 of player with 17:0 named "&e&lLog" with lore "&7&oTier 1 Item||||&fPrice &a$0.50 each||&r ||&6&lClick &fto sell all your log" to run [player command "/sell log"]
  250. format slot 23 of player with raw fish named "&e&lRaw Fish" with lore "&7&oTier 2 Item||||&fPrice &a$0.75 each||&r ||&6&lClick &fto sell all your fish" to run [player command "/sell fish"]
  251. format slot 15 of player with raw salmon named "&e&lRaw Salmon" with lore "&7&oTier 3 Item||||&fPrice &a$2 each||&r ||&6&lClick &fto sell all your salmon" to run [player command "/sell salmon"]
  252. format slot 24 of player with pufferfish named "&e&lPufferfish" with lore "&7&oTier 4 Item||||&fPrice &a$50 each||&r ||&6&lClick &fto sell all your pufferfish" to run [player command "/sell pufferfish"]
  253. format slot 16 of player with porkchop named "&e&lPorkchop" with lore "&7&oTier 2 Item||||&fPrice &a$13.50 each||&r ||&6&lClick &fto sell all your porkchop" to run [player command "/sell porkchop"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement