Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. options:
  2. p: &e&lSELL » #Prefix
  3. name: &aSell Stick #Sell Stick Name
  4. 1demirfiyati: 3000 #1 iron ingot sell price
  5. 1altinfiyati: 4000 #1 gold ingot sell price
  6. 1elmasfiyati: 5000 #1 diamond sell price
  7. 1zumrutfiyati: 6000 #1 emerald sell price
  8. 1demirblock: 27000 #1 iron block sell price
  9. 1goldblock: 36000 #1 gold block sell price
  10. 1diablock: 45000 #1 diamond block sell price
  11. 1zumrutblock: 54000 #1 emerald block sell price
  12.  
  13. command /stick:
  14. trigger:
  15. give 1 stick named "{@name}" to player
  16. on leftclick on chest with stick:
  17. if name of player's tool is "{@name}":
  18. if {chests::%player%::*} contains location of clicked chest:
  19. if clicked chest contains iron ingot:
  20. set {_itemcounti} to number of all iron ingots in clicked chest
  21. remove {_itemcounti} of iron ingots from clicked chest's inventory
  22. add {@1demirfiyati} * {_itemcounti} to the player's money
  23. send "{@p} &a%{_itemcounti}% iron ingot selling. Earning: &c%{@1demirfiyati} * {_itemcounti}%"
  24. if clicked chest contains gold ingot:
  25. set {_itemcountg} to number of all gold ingots in clicked chest
  26. remove {_itemcountg} of gold ingots from clicked chest's inventory
  27. add {@1altinfiyati} * {_itemcountg} to the player's money
  28. send "{@p} &a%{_itemcountg}% gold ingot selling. Earning: &c%{@1altinfiyati} * {_itemcountg}%"
  29. if clicked chest contains diamond:
  30. set {_itemcountd} to number of all diamonds in clicked chest
  31. remove {_itemcountd} of diamonds from clicked chest's inventory
  32. add {@1elmasfiyati} * {_itemcountd} to the player's money
  33. send "{@p} &a%{_itemcountd}% diamond selling. Earning: &c%{@1elmasfiyati} * {_itemcountd}%"
  34. if clicked chest contains emerald:
  35. set {_itemcounte} to number of all emeralds in clicked chest
  36. remove {_itemcounte} of emeralds from clicked chest's inventory
  37. add {@1zumrutfiyati} * {_itemcounte} to the player's money
  38. send "{@p} &a%{_itemcounte}% emerald selling. Earning: &c%{@1zumrutfiyati} * {_itemcounte}%"
  39. if clicked chest contains iron block:
  40. set {_itemcountib} to number of all iron blocks in clicked chest
  41. remove {_itemcountib} of iron blocks from clicked chest's inventory
  42. add {@1demirblock} * {_itemcountib} to the player's money
  43. send "{@p} &a%{_itemcountib}% iron block selling. Earning: &c%{@1demirblock} * {_itemcountib}%"
  44. if clicked chest contains gold block:
  45. set {_itemcountgb} to number of all gold blocks in clicked chest
  46. remove {_itemcountgb} of gold blocks from clicked chest's inventory
  47. add {@1goldblock} * {_itemcountgb} to the player's money
  48. send "{@p} &a%{_itemcountgb}% gold block selling. Earning: &c%{@1goldblock} * {_itemcountgb}%"
  49. if clicked chest contains diamond block:
  50. set {_itemcountdb} to number of all diamond blocks in clicked chest
  51. remove {_itemcountdb} of diamond blocks from clicked chest's inventory
  52. add {@1diablock} * {_itemcountdb} to the player's money
  53. send "{@p} &a%{_itemcountdb}% diamond block selling. Earning: &c%{@1diablock} * {_itemcountdb}%"
  54. if clicked chest contains emerald block:
  55. set {_itemcounteb} to number of all emerald blocks in clicked chest
  56. remove {_itemcounteb} of emerald blocks from clicked chest's inventory
  57. add {@1zumrutblock} * {_itemcounteb} to the player's money
  58. send "{@p} &a%{_itemcounteb}% emerald block selling. Earning: &c%{@1zumrutblock} * {_itemcounteb}%"
  59. else:
  60. send "{@p} You can only sell mines in your own chest." to player
  61.  
  62. on place of chest:
  63. add event-block's location to {chests::%player%::*}
  64. on break of chest:
  65. if {chest::%player%::*} contains event-block's location:
  66. remove event-block's location from {chests::%player%::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement