Advertisement
Guest User

Untitled

a guest
Dec 9th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.57 KB | None | 0 0
  1. command /sell [<text>]:
  2.     trigger:
  3.         if player's inventory doesn't have ores or stone or iron_block or diamond_block:
  4.             send player title "&6&lSELL" with subtitle "&7Mine blocks then use /sell" for 3 seconds
  5.         if player's inventory has ores or stone or diamond_block or iron_block:
  6.            play "ui_button_click" to player
  7.            set {_stoneCount} to amount of stone in the player's inventory
  8.             set {_stoneWorth} to 1.1
  9.             remove all stone from player
  10.             set {_coalCount} to amount of coal_ore in the player's inventory
  11.            set {_coalWorth} to 2.2
  12.            remove all coal_ore from player
  13.            set {_ironCount} to amount of iron_ore in the player's inventory
  14.             set {_ironWorth} to 3.3
  15.             remove all iron_ore from player
  16.             set {_diamondCount} to amount of diamond_ore in the player's inventory
  17.            set {_diamondWorth} to 6.6
  18.            remove all diamond_ore from player
  19.            set {_diamondblockCount} to amount of diamond_block in the player's inventory
  20.             set {_damondblockWorth} to 7.7
  21.             remove all diamond_block from player
  22.             set {_IronblockCount} to amount of iron_block in the player's inventory
  23.            set {_IronblockWorth} to 4.4
  24.            remove all iron_block from player
  25.            set {_stoneSell} to {_stoneCount} * {_stoneWorth}
  26.            set {_coalSell} to {_coalCount} * {_coalWorth}
  27.            set {_ironSell} to {_ironCount} * {_ironWorth}
  28.            set {_diamondSell} to {_diamondCount} * {_diamondWorth}
  29.            set {_diamondblockSell} to {_diamondblockCount} * {_diamondblockWorth}
  30.            set {_IronblockSell} to {_IronblockCount} * {_IronblockWorth}
  31.            set {_totalSell} to {_stoneCount} + {_coalCount} + {_ironCount} + {_diamondCount} + {_diamondblockCount} + {_IronblockCount}
  32.            set {_totalProfit} to {_diamondblockSell} + {_stoneSell} + {_coalSell} + {_ironSell} + {_diamondSell} + {_IronblockSell}
  33.            set {%uuid of player%::balance} to ({%uuid of player%::balance} + {_totalProfit})
  34.            if {%uuid of player%::booster} = 0:
  35.                set player's action bar to "&8* &6&lSOLD &f&nx%{_totalSell}%&r &fblocks for &6&l$%{_totalProfit}%&8*"
  36.             else:
  37.                 set {%uuid of player%::balance} to ({%uuid of player%::balance} + {_totalProfit} * {%uuid of player%::booster})
  38.                 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