Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /sell [<text>]:
- trigger:
- if player's inventory doesn't have ores or stone or iron_block or diamond_block:
- send player title "&6&lSELL" with subtitle "&7Mine blocks then use /sell" for 3 seconds
- if player's inventory has ores or stone or diamond_block or iron_block:
- play "ui_button_click" to player
- set {_stoneCount} to amount of stone in the player's inventory
- set {_stoneWorth} to 1.1
- remove all stone from player
- set {_coalCount} to amount of coal_ore in the player's inventory
- set {_coalWorth} to 2.2
- remove all coal_ore from player
- set {_ironCount} to amount of iron_ore in the player's inventory
- set {_ironWorth} to 3.3
- remove all iron_ore from player
- set {_diamondCount} to amount of diamond_ore in the player's inventory
- set {_diamondWorth} to 6.6
- remove all diamond_ore from player
- set {_diamondblockCount} to amount of diamond_block in the player's inventory
- set {_damondblockWorth} to 7.7
- remove all diamond_block from player
- set {_IronblockCount} to amount of iron_block in the player's inventory
- set {_IronblockWorth} to 4.4
- remove all iron_block from player
- set {_stoneSell} to {_stoneCount} * {_stoneWorth}
- set {_coalSell} to {_coalCount} * {_coalWorth}
- set {_ironSell} to {_ironCount} * {_ironWorth}
- set {_diamondSell} to {_diamondCount} * {_diamondWorth}
- set {_diamondblockSell} to {_diamondblockCount} * {_diamondblockWorth}
- set {_IronblockSell} to {_IronblockCount} * {_IronblockWorth}
- set {_totalSell} to {_stoneCount} + {_coalCount} + {_ironCount} + {_diamondCount} + {_diamondblockCount} + {_IronblockCount}
- set {_totalProfit} to {_diamondblockSell} + {_stoneSell} + {_coalSell} + {_ironSell} + {_diamondSell} + {_IronblockSell}
- set {%uuid of player%::balance} to ({%uuid of player%::balance} + {_totalProfit})
- if {%uuid of player%::booster} = 0:
- set player's action bar to "&8* &6&lSOLD &f&nx%{_totalSell}%&r &fblocks for &6&l$%{_totalProfit}%&8*"
- else:
- set {%uuid of player%::balance} to ({%uuid of player%::balance} + {_totalProfit} * {%uuid of player%::booster})
- set player's action bar to "&8* &6&lSOLD &f&nx%{_totalSell}%&r &fblocks for &6&l$%{_totalProfit} * {%uuid of player%::booster}% &f( &6Booster Active &f) &8*"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement