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 cobble stone or emerald ore:
- send player title "&6&lSELL" with subtitle "&7Mine blocks then use /sell" for 3 seconds
- if player's inventory has ores or stone or cobble stone or emerald ore:
- play "ui_button_click" to player
- set {_stoneCount} to amount of stone in the player's inventory
- set {_stoneWorth} to 2.2
- remove all stone from player
- set {_coalCount} to amount of coal_ore in the player's inventory
- set {_coalWorth} to 3.5
- remove all coal_ore from player
- set {_ironCount} to amount of iron_ore in the player's inventory
- set {_ironWorth} to 6.3
- remove all iron_ore from player
- set {_goldCount} to amount of gold_ore in the player's inventory
- set {_goldWorth} to 4.6
- remove all gold_ore from player
- set {_diamondCount} to amount of diamond_ore in the player's inventory
- set {_diamondWorth} to 9
- remove all diamond_ore from player
- set {_emeraldCount} to amount of emerald_ore in the player's inventory
- set {_emeraldWorth} to 13
- remove all emerald_ore from player
- set {_cobbleCount} to amount of cobble stone in the player's inventory
- set {_cobbleWorth} to 3.1
- remove all cobble_stone from player
- set {_stoneSell} to {_stoneCount} * {_stoneWorth}
- set {_coalSell} to {_coalCount} * {_coalWorth}
- set {_ironSell} to {_ironCount} * {_ironWorth}
- set {_goldSell} to {_goldCount} * {_goldWorth}
- set {_diamondSell} to {_diamondCount} * {_diamondWorth}
- set {_emeraldSell} to {_emeraldCount} * {_emeraldWorth}
- set {_cobbleSell} to {_cobbleCount} * {_cobbleWorth}
- set {_totalSell} to {_stoneCount} + {_coalCount} + {_ironCount} + {_goldCount} + {_diamondCount} + {_emeraldCount} + {_cobbleCount}
- set {_totalProfit} to {_stoneSell} + {_coalSell} + {_ironSell} + {_goldSell} + {_diamondSell} + {_emeraldSell} + {_cobbleSell}
- set {Coins::%player%} to ({Coins::%player%} + {_totalProfit})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement