Advertisement
twogz

Untitled

Jul 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. command /sell [<text>]:
  2. trigger:
  3. if arg 1 is "coal":
  4. if player has coal item:
  5. while amount of coal item in player's inventory is bigger than 0:
  6. add 1 to {_amount.%player%}
  7. remove 1 coal item from player's inventory
  8. add 0.10 to {_payout.%player%}
  9. message ""
  10. message " &aSold %{_amount.%player%}% Items:"
  11. message ""
  12. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  13. message "&7 and received &b$%{_payout.%player%}% &7in total."
  14. message ""
  15. add {_payout.%player%} to player's balance
  16. stop
  17. else:
  18. message "&c&lHey! &7You don't have enough of this item to sell it."
  19.  
  20. if arg 1 is "iron":
  21. if player has iron ingot:
  22. while amount of iron ingot in player's inventory is bigger than 0:
  23. add 1 to {_amount.%player%}
  24. remove 1 iron ingot from player's inventory
  25. add 0.15 to {_payout.%player%}
  26. message ""
  27. message " &aSold %{_amount.%player%}% Items:"
  28. message ""
  29. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  30. message "&7 and received &b$%{_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.  
  37. if arg 1 is "gold":
  38. if player has gold ingot:
  39. while amount of gold ingot in player's inventory is bigger than 0:
  40. add 1 to {_amount.%player%}
  41. remove 1 gold ingot from player's inventory
  42. add 0.20 to {_payout.%player%}
  43. message ""
  44. message " &aSold %{_amount.%player%}% Items:"
  45. message ""
  46. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  47. message "&7 and received &b$%{_payout.%player%}% &7in total."
  48. message ""
  49. add {_payout.%player%} to player's balance
  50. stop
  51. else:
  52. message "&c&lHey! &7You don't have enough of this item to sell it."
  53.  
  54. if arg 1 is "redstone":
  55. if player has redstone dust:
  56. while amount of redstone dust in player's inventory is bigger than 0:
  57. add 1 to {_amount.%player%}
  58. remove 1 redstone dust from player's inventory
  59. add 0.30 to {_payout.%player%}
  60. message ""
  61. message " &aSold %{_amount.%player%}% Items:"
  62. message ""
  63. message "&7 You sold &d%{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  64. message "&7 and received &b$%{_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."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement