NoHacksJustACow

Sell | Prison

Feb 23rd, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. variables:
  2. {globalbooster} = 0
  3.  
  4. options:
  5. p: &3&lInspired &8::&r
  6.  
  7. command /sell:
  8. trigger:
  9. set {_dirtWorth} to 1
  10. set {_cobbleWorth} to 2.5
  11. set {_stoneWorth} to 5
  12. set {_coalWorth} to 5
  13. set {_ironWorth} to 25
  14. set {_goldWorth} to 75
  15. set {_diamondWorth} to 250
  16. set {_emeraldWorth} to 500
  17. if player's held item is dirt:
  18. set {_item1} to amount of player's item in player's inventory * {_dirtWorth}
  19. set {_dirtCount} to amount of dirt in player's inventory
  20. remove all dirt from the player's inventory
  21. if player's held item is cobble stone:
  22. set {_item2} to amount of player's item in player's inventory * {_cobbleWorth}
  23. set {_cobbleCount} to amount of cobble stone in player's inventory
  24. remove all cobble stone from the player's inventory
  25. if player's held item is stone item:
  26. set {_item3} to amount of player's item in player's inventory * {_stoneWorth}
  27. set {_stoneCount} to amount of stone in player's inventory
  28. remove all stone from the player's inventory
  29. if player's held item is coal:
  30. set {_item4} to amount of player's item in player's inventory * {_coalWorth}
  31. set {_coalCount} to amount of coal in player's inventory
  32. remove all coal from the player's inventory
  33. if player's held item is iron ingot:
  34. set {_item5} to amount of player's item in player's inventory * {_ironWorth}
  35. set {_ironCount} to amount of iron ingot in player's inventory
  36. remove all iron ingot from the player's inventory
  37. if player's held item is gold ingot:
  38. set {_item6} to amount of player's item in player's inventory * {_goldWorth}
  39. set {_goldCount} to amount of gold ingot in player's inventory
  40. remove all gold from the player's inventory
  41. if player's held item is diamond:
  42. set {_item7} to amount of player's item in player's inventory * {_diamondWorth}
  43. set {_diamondCount} to amount of diamond in player's inventory
  44. remove all diamond from the player's inventory
  45. if player's held item is emerald:
  46. set {_item8} to amount of player's item in player's inventory * {_emeraldWorth}
  47. set {_emeraldCount} to amount of emerald in player's inventory
  48. remove all emerald from the player's inventory
  49. set {_totalCount} to {_dirtCount} + {_cobbleCount} + {_stoneCount} + {_coalCount} + {_ironCount} + {_goldCount} + {_diamondCount} + {_emeraldCount}
  50. set {_totalProfit} to {_item1} + {_item2} + {_item3} + {_item4} + {_item5} + {_item6} + {_item7} + {_item8}
  51. set {_totalProfit} to {_totalProfit} * {booster::%player%}
  52. set {_totalBooster} to {_totalProfit} * {globalbooster}
  53. set {_afterSell} to {_totalProfit} + {_totalBooster}
  54. if {booster::%player%} is set:
  55. send "&3&m*-------------*------------*-------------*"
  56. send "&r"
  57. send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
  58. send "&7* &3BOOSTER: &7x%{booster::%player%}%"
  59. send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
  60. send "&7* &3PROFIT: &a$%{_totalProfit}%"
  61. send "&7* &3TOTAL: &a$%{_afterSell}%"
  62. send "&r"
  63. send "&3&m*-------------*------------*-------------*"
  64. add {_afterSell} to player's balance
  65. else:
  66. send "&cError: &7/sell hand"
  67.  
  68. command /gb [<number>]:
  69. permission: admin
  70. trigger:
  71. if arg-1 is set:
  72. set {globalbooster} to arg-1
  73. broadcast "&c&lGLOBAL &8:: &3&l%player% &7&lSet the GlobalBooster to &c&lx%arg-1%"
  74. else:
  75. send "&c/globalbooster [number]"
  76.  
  77. command /autosell
  78. permission: auto.sell
  79. trigger:
  80. if {autosell::%player%} is not set:
  81. set {autosell::%player%} to true
  82. else:
  83. delete {autosell::%player%}
  84.  
  85. every 1 second in “World”:
  86. if {autosell::%player%} is true:
  87. make player execute "/sell all"
Advertisement
Add Comment
Please, Sign In to add comment