Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /sell:
- aliases: s, sellall, esell
- trigger:
- set {_stone} to amount of stone in player's inventory
- set {_coal} to amount of coal in player's inventory
- set {_iron} to amount of iron ingot in player's inventory
- set {_gold} to amount of gold ingot in player's inventory
- set {_diamond} to amount of diamond in player's inventory
- set {_emerald} to amount of emerald in player's inventory
- add {stoneinbackpack.%player%} to {_stone}
- add {coalinbackpack.%player%} to {_coal}
- add {ironinbackpack.%player%} to {_iron}
- add {goldinbackpack.%player%} to {_gold}
- add {diamondinbackpack.%player%} to {_diamond}
- add {emeraldinbackpack.%player%} to {_emerald}
- set {_amountsold} to {_stone}
- add {_coal} to {_amountsold}
- add {_iron} to {_amountsold}
- add {_gold} to {_amountsold}
- add {_diamond} to {_amountsold}
- add {_emerald} to {_amountsold}
- set {itemsinbackpack.%player%} to 0
- set {stoneinbackpack.%player%} to 0
- set {coalinbackpack.%player%} to 0
- set {ironinbackpack.%player%} to 0
- set {goldinbackpack.%player%} to 0
- set {diamondinbackpack.%player%} to 0
- set {emeraldinbackpack.%player%} to 0
- remove 2304 stone from the player's inventory
- remove 2304 coal from the player's inventory
- remove 2304 iron ingot from the player's inventory
- remove 2304 gold ingot from the player's inventory
- remove 2304 diamond from the player's inventory
- remove 2304 emerald from the player's inventory
- set {_global} to difference between {global.multiplier.sell.timeleft} and now
- set {_moneyearned} to {_stone}*{@StonePrice}*{multiplier.sell.global}*{multiplier.donor.%player%}*{multiplier.merchant.%player%}
- add {_coal}*{@CoalPrice}*{multiplier.sell.%player%}*{multiplier.donor.%player%}*{multiplier.merchant.%player%} to {_moneyearned}
- add {_iron}*{@IronPrice}*{multiplier.sell.%player%}*{multiplier.donor.%player%}*{multiplier.merchant.%player%} to {_moneyearned}
- add {_gold}*{@GoldPrice}*{multiplier.sell.%player%}*{multiplier.donor.%player%}*{multiplier.merchant.%player%} to {_moneyearned}
- add {_diamond}*{@DiamondPrice}*{multiplier.sell.%player%}*{multiplier.donor.%player%}*{multiplier.merchant.%player%} to {_moneyearned}
- add {_emerald}*{@EmeraldPrice}*{multiplier.sell.%player%}*{multiplier.donor.%player%}*{multiplier.merchant.%player%} to {_moneyearned}
- set {_multi} to {multiplier.donor.%player%}*{multiplier.merchant.%player%}*{multiplier.sell.%player%}
- if {multiplier.sell.global} is greater than 1:
- set {_moneyearned} to {_moneyearned}*{multiplier.sell.global}
- add {_moneyearned} to the player's money
- set the player's action bar to "&7Sold &a%{_amountsold}% &7Items for &f$&a%{_moneyearned}% &a&l(*%{_multi}%) &c%{multiplier.sell.global}%x Global Multiplier by &a%{boosteruser}% &7For &a%difference between {_global} and {sell.multi.global.time}%"
- else:
- add {_moneyearned} to the player's money
- set the player's action bar to "&7Sold &a%{_amountsold}% &7Items for &f$&a%{_moneyearned}% &a&l(*%{_multi}%)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement