NoHacksJustACow

#sell

Jan 30th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.95 KB | None | 0 0
  1. variables:
  2. {globalbooster} = 0
  3.  
  4. options:
  5. p: &3&lCowsFarm &8::&r
  6.  
  7. command /sell [<text>]:
  8. trigger:
  9. if arg-1 is "hand":
  10. set {_rottenWorth} to 2.5
  11. set {_wheatWorth} to 2.5
  12. set {_boneWorth} to 2.5
  13. set {_arrowWorth} to 2.5
  14. set {_blazeWorth} to 2.5
  15. set {_porkWorth} to 2.5
  16. set {_beefWorth} to 2.5
  17. set {_leatherWorth} to 2.5
  18. set {_wartWorth} to 15
  19. set {_cactusWorth} to 10
  20. set {_sugarcaneWorth} to 5
  21. set {_pumpkinWorth} to 4.0
  22. set {_seedsWorth} to 0.01
  23. set {_cobblestoneWorth} to .25
  24. set {_stoneWorth} to .25
  25. set {_dirtWorth} to .25
  26. if player's held item is sugar cane:
  27. set {_item1} to amount of player's held item in player's inventory * {_sugarcaneWorth}
  28. set {_sugarcaneCount} to amount of sugar_cane in player's inventory
  29. remove all sugar_cane from the player's inventory
  30. if player's held item is cactus:
  31. set {_item2} to amount of player's held item in player's inventory * {_cactusWorth}
  32. set {_cactusCount} to amount of cactus in player's inventory
  33. remove all cactus from the player's inventory
  34. if player's held item is wheat item:
  35. set {_item3} to amount of player's held item in player's inventory * {_wheatWorth}
  36. set {_wheatCount} to amount of wheat in player's inventory
  37. remove all wheat from the player's inventory
  38. if player's held item is rotten flesh:
  39. set {_item4} to amount of player's held item in player's inventory * {_rottenWorth}
  40. set {_rottenCount} to amount of rotten_flesh in player's inventory
  41. remove all rotten_flesh from the player's inventory
  42. if player's held item is bone_item:
  43. set {_item5} to amount of player's held item in player's inventory * {_boneWorth}
  44. set {_boneCount} to amount of bone_item in player's inventory
  45. remove all bone_item from the player's inventory
  46. if player's held item is arrow:
  47. set {_item6} to amount of player's held item in player's inventory * {_arrowWorth}
  48. set {_arrowCount} to amount of arrow in player's inventory
  49. remove all arrow from the player's inventory
  50. if player's held item is blaze_rod:
  51. set {_item7} to amount of player's held item in player's inventory * {_blazeWorth}
  52. set {_blazeRod} to amount of blaze_rod in player's inventory
  53. remove all blaze_rod from the player's inventory
  54. if player's held item is porkchop_item:
  55. set {_item8} to amount of player's held item in player's inventory * {_porkWorth}
  56. set {_porkCount} to amount of porkchop_item in player's inventory
  57. remove all porkchop_item from the player's inventory
  58. if player's held item is raw_beef:
  59. set {_item9} to amount of player's held item in player's inventory * {_beefWorth}
  60. set {_beefCount} to amount of raw_beef in player's inventory
  61. remove all raw_beef from the player's inventory
  62. if player's held item is leather:
  63. set {_item10} to amount of player's held item in player's inventory * {_leatherWorth}
  64. set {_leatherCount} to amount of leather in player's inventory
  65. remove all leather from the player's inventory
  66. if player's held item is cobble:
  67. set {_item11} to amount of player's held item in player's inventory * {_cobblestoneWorth}
  68. set {_cobblestoneCount} to amount of cobble in player's inventory
  69. remove all cobble from the player's inventory
  70. if player's held item is stone:
  71. set {_item12} to amount of player's held item in player's inventory * {_stoneWorth}
  72. set {_stoneCount} to amount of stone in player's inventory
  73. remove all stone from the player's inventory
  74. if player's held item is dirt:
  75. set {_item13} to amount of player's held item in player's inventory * {_dirtWorth}
  76. set {_dirtCount} to amount of dirt in player's inventory
  77. remove all dirt from the player's inventory
  78. if player's held item is pumpkin:
  79. set {_item14} to amount of player's held item in player's inventory * {_pumpkinWorth}
  80. set {_pumpkinCount} to amount of pumpkin in player's inventory
  81. remove all pumpkin from the player's inventory
  82. if player's held item is nether_wart:
  83. set {_item15} to amount of player's held item in player's inventory * {_wartWorth}
  84. set {_wartCount} to amount of nether_wart in player's inventory
  85. remove all nether_wart from the player's inventory
  86. if player's held item is seeds:
  87. set {_item16} to amount of player's held item in player's inventory * {_seedsWorth}
  88. set {_seedsCount} to amount of seeds in player's inventory
  89. remove all seeds from the player's inventory
  90. set {_totalCount} to {_wheatCount} + {_cactusCount} + {_sugarcaneCount} + {_rottenCount} + {_boneCount} + {_arrowCount} + {_blazeRod} + {_porkCount} + {_beefCount} + {_leatherCount} + {_cobblestoneCount} + {_stoneCount} + {_dirtCount} + {_pumpkinCount} + {_wartCount} + {_seedsCount}
  91. set {_totalProfit} to {_item1} + {_item2} + {_item3} + {_item4} + {_item5} + {_item6} + {_item7} + {_item8} + {_item9} + {_item10} + {_item11} + {_item12} + {_item13} + {_item14} + {_item15} + {_item16}
  92. set {_totalProfit} to {_totalProfit} * {booster::%player%}
  93. set {_totalBooster} to {_totalProfit} * {globalbooster}
  94. set {_afterSell} to {_totalProfit} + {_totalBooster}
  95. if {booster::%player%} is set:
  96. send "&3&m*-------------*------------*-------------*"
  97. send "&r"
  98. send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
  99. send "&7* &3BOOSTER: &7x%{booster::%player%}%"
  100. send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
  101. send "&7* &3PROFIT: &a$%{_totalProfit}%"
  102. send "&7* &3TOTAL: &a$%{_afterSell}%"
  103. send "&r"
  104. send "&3&m*-------------*------------*-------------*"
  105. add {_afterSell} to player's balance
  106. else:
  107. send "&cError: &7/sell hand"
  108.  
  109. command /gb [<number>]:
  110. permission: admin
  111. trigger:
  112. if arg-1 is set:
  113. set {globalbooster} to arg-1
  114. broadcast "&c&lGLOBAL &8:: &3&l%player% &7&lSet the GlobalBooster to &c&lx%arg-1%"
  115. else:
  116. send "&c/globalbooster [number]"
Add Comment
Please, Sign In to add comment