Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- p: &e&lSELL » #Prefix
- name: &aSell Stick #Sell Stick Name
- 1demirfiyati: 3000 #1 iron ingot sell price
- 1altinfiyati: 4000 #1 gold ingot sell price
- 1elmasfiyati: 5000 #1 diamond sell price
- 1zumrutfiyati: 6000 #1 emerald sell price
- 1demirblock: 27000 #1 iron block sell price
- 1goldblock: 36000 #1 gold block sell price
- 1diablock: 45000 #1 diamond block sell price
- 1zumrutblock: 54000 #1 emerald block sell price
- command /stick:
- trigger:
- give 1 stick named "{@name}" to player
- on leftclick on chest with stick:
- if name of player's tool is "{@name}":
- if {chests::%player%::*} contains location of clicked chest:
- if clicked chest contains iron ingot:
- set {_itemcounti} to number of all iron ingots in clicked chest
- remove {_itemcounti} of iron ingots from clicked chest's inventory
- add {@1demirfiyati} * {_itemcounti} to the player's money
- send "{@p} &a%{_itemcounti}% iron ingot selling. Earning: &c%{@1demirfiyati} * {_itemcounti}%"
- if clicked chest contains gold ingot:
- set {_itemcountg} to number of all gold ingots in clicked chest
- remove {_itemcountg} of gold ingots from clicked chest's inventory
- add {@1altinfiyati} * {_itemcountg} to the player's money
- send "{@p} &a%{_itemcountg}% gold ingot selling. Earning: &c%{@1altinfiyati} * {_itemcountg}%"
- if clicked chest contains diamond:
- set {_itemcountd} to number of all diamonds in clicked chest
- remove {_itemcountd} of diamonds from clicked chest's inventory
- add {@1elmasfiyati} * {_itemcountd} to the player's money
- send "{@p} &a%{_itemcountd}% diamond selling. Earning: &c%{@1elmasfiyati} * {_itemcountd}%"
- if clicked chest contains emerald:
- set {_itemcounte} to number of all emeralds in clicked chest
- remove {_itemcounte} of emeralds from clicked chest's inventory
- add {@1zumrutfiyati} * {_itemcounte} to the player's money
- send "{@p} &a%{_itemcounte}% emerald selling. Earning: &c%{@1zumrutfiyati} * {_itemcounte}%"
- if clicked chest contains iron block:
- set {_itemcountib} to number of all iron blocks in clicked chest
- remove {_itemcountib} of iron blocks from clicked chest's inventory
- add {@1demirblock} * {_itemcountib} to the player's money
- send "{@p} &a%{_itemcountib}% iron block selling. Earning: &c%{@1demirblock} * {_itemcountib}%"
- if clicked chest contains gold block:
- set {_itemcountgb} to number of all gold blocks in clicked chest
- remove {_itemcountgb} of gold blocks from clicked chest's inventory
- add {@1goldblock} * {_itemcountgb} to the player's money
- send "{@p} &a%{_itemcountgb}% gold block selling. Earning: &c%{@1goldblock} * {_itemcountgb}%"
- if clicked chest contains diamond block:
- set {_itemcountdb} to number of all diamond blocks in clicked chest
- remove {_itemcountdb} of diamond blocks from clicked chest's inventory
- add {@1diablock} * {_itemcountdb} to the player's money
- send "{@p} &a%{_itemcountdb}% diamond block selling. Earning: &c%{@1diablock} * {_itemcountdb}%"
- if clicked chest contains emerald block:
- set {_itemcounteb} to number of all emerald blocks in clicked chest
- remove {_itemcounteb} of emerald blocks from clicked chest's inventory
- add {@1zumrutblock} * {_itemcounteb} to the player's money
- send "{@p} &a%{_itemcounteb}% emerald block selling. Earning: &c%{@1zumrutblock} * {_itemcounteb}%"
- else:
- send "{@p} You can only sell mines in your own chest." to player
- on place of chest:
- add event-block's location to {chests::%player%::*}
- on break of chest:
- if {chest::%player%::*} contains event-block's location:
- remove event-block's location from {chests::%player%::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement