Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.56 KB | None | 0 0
  1. command /sell [<text>]:
  2. trigger:
  3. if arg-1 is "hand":
  4. if player's held item is sugar cane:
  5. set {_item1} to amount of player's held item in player's inventory * {sugarcaneWorth}
  6. set {_sugarcaneCount} to amount of sugar_cane in player's inventory
  7. remove all sugar_cane from the player's inventory
  8. if player's held item is cactus:
  9. set {_item2} to amount of player's held item in player's inventory * {cactusWorth}
  10. set {_cactusCount} to amount of cactus in player's inventory
  11. remove all cactus from the player's inventory
  12. if player's held item is wheat item:
  13. set {_item3} to amount of player's held item in player's inventory * {wheatWorth}
  14. set {_wheatCount} to amount of wheat in player's inventory
  15. if player's held item is rotten flesh:
  16. set {_item4} to amount of player's held item in player's inventory * {rottenWorth}
  17. set {_rottenCount} to amount of rotten_flesh in player's inventory
  18. remove all rotten_flesh from the player's inventory
  19. if player's held item is bone:
  20. set {_item5} to amount of player's held item in player's inventory * {boneWorth}
  21. set {_boneCount} to amount of bone in player's inventory
  22. remove all bone from the player's inventory
  23. if player's held item is arrow:
  24. set {_item6} to amount of player's held item in player's inventory * {arrowWorth}
  25. set {_arrowCount} to amount of arrow in player's inventory
  26. remove all arrow from the player's inventory
  27. if player's held item is blaze_rod:
  28. set {_item7} to amount of player's held item in player's inventory * {blazeWorth}
  29. set {_blazeRod} to amount of blaze_rod in player's inventory
  30. remove all blaze_rod from the player's inventory
  31. if player's held item is raw_porkchop:
  32. set {_item8} to amount of player's held item in player's inventory * {porkWorth}
  33. set {_porkCount} to amount of raw_porkchop in player's inventory
  34. remove all raw_porkchop from the player's inventory
  35. if player's held item is raw_beef:
  36. set {_item9} to amount of player's held item in player's inventory * {beefWorth}
  37. set {_beefCount} to amount of raw_beef in player's inventory
  38. remove all raw_beef from the player's inventory
  39. if player's held item is leather:
  40. set {_item10} to amount of player's held item in player's inventory * {leatherWorth}
  41. set {_leatherCount} to amount of leather in player's inventory
  42. remove all leather from the player's inventory
  43. set {_totalCount} to {_wheatCount} + {_cactusCount} + {_sugarcaneCount} + {_rottenCount} + {_boneCount} + {_arrowCount} + {_blazeRod} + {_porkCount} + {_beefCount} + {_leatherCount}
  44. set {_totalProfit} to {_item1} + {_item2} + {_item3} + {_item4} + {_item5} + {_item6} + {_item7} + {_item8} + {_item9} + {_item10}
  45. set {_totalProfit} to {_totalProfit} * {booster::%player%}
  46. set {_totalBooster} to {_totalProfit} * {globalbooster}
  47. set {_afterSell} to {_totalProfit} + {_totalBooster}
  48. if {booster::%player%} is set:
  49. send "&3&m*-------------*------------*-------------*"
  50. send "&r"
  51. send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
  52. send "&7* &3BOOSTER: &7x%{booster::%player%}%"
  53. send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
  54. send "&7* &3PROFIT: &a$%{_totalProfit}%"
  55. send "&7* &3TOTAL: &a$%{_afterSell}%"
  56. send "&r"
  57. send "&3&m*-------------*------------*-------------*"
  58. add {_afterSell} to player's balance
  59. else:
  60. send "&cError: &7/sell (hand)/(all)"
  61. if arg-1 is "all":
  62. if player's inventory is not empty:
  63. play "ui_button_click" to player
  64. set {_rottenWorth} to 3
  65. set {_wheatWorth} to 2.5
  66. set {_cactusWorth} to 5
  67. set {_boneWorth} to 3.5
  68. set {_arrowWorth} to 3.5
  69. set {_blazeWorth} to 3.5
  70. set {_porkWorth} to 3.5
  71. set {_beefWorth} to 3.5
  72. set {_leatherWorth} to 3.5
  73. set {_boneCount} to amount of bone in player's inventory
  74. set {_arrowCount} to amount of arrow in player's inventory
  75. set {_blazeCount} to amount of blaze_rod in player's inventory
  76. set {_porkCount} to amount of raw_porkchop in player's inventory
  77. set {_beefCount} to amount of raw_beef in player's inventory
  78. set {_leatherCount} to amount of leather in player's inventory
  79. set {_rottenCount} to amount of rotten_flesh in player's inventory
  80. set {_wheatCount} to amount of wheat in player's inventory
  81. set {_cactusCount} to amount of cactus in player's inventory
  82. set {_sugarcaneCount} to amount of sugar_cane in player's inventory
  83. remove all bone from player's inventory
  84. remove all arrow from player's inventory
  85. remove all blaze_rod from player's inventory
  86. remove all raw_porkchop from player's inventory
  87. remove all raw_beef from player's inventory
  88. remove all leather from player's inventory
  89. remove all rotten_flesh from player's inventory
  90. remove all wheat from player's inventory
  91. remove all cactus from player's inventory
  92. remove all sugar_cane from player's inventory
  93. set {_boneSell} to {_boneCount} * {_boneWorth}
  94. set {_arrowSell} to {_arrowCount} * {_arrowWorth}
  95. set {_blazeSell} to {_blazeCount} * {_blazeWorth}
  96. set {_porkSell} to {_porkCount} * {_porkWorth}
  97. set {_beefSell} to {_beefCount} * {_beefWorth}
  98. set {_leatherSell} to {_leatherCount} * {_leatherWorth}
  99. set {_rottenSell} to {_rottenCount} * {_rottenWorth}
  100. set {_sugarcaneSell} to {_sugarcaneCount} * {_sugarcaneWorth}
  101. set {_wheatSell} to {_wheatCount} * {_wheatWorth}
  102. set {_cactusSell} to {_cactusCount} * {_cactusWorth}
  103. set {_totalCount} to {_wheatCount} + {_cactusCount} + {_sugarcaneCount} + {_rottenCount} + {_boneCount} + {_arrowCount} + {_blazeCount} + {_porkCount} + {_beefCount} + {_leatherCount}
  104. set {_totalProfit} to {_wheatSell} + {_cactusSell} + {_sugarcaneSell} + {_rottenSell} + {_boneSell} + {_arrowSell} + {_blazeSell} + {_porkSell} + {_beefSell} + {_leatherSell} +
  105. if {booster::%player%} is set:
  106. set {_totalProfit} to {_totalProfit} * {booster::%player%}
  107. set {_totalBooster} to {_totalProfit} * {globalbooster}
  108. set {_afterSell} to {_totalProfit} + {_totalBooster}
  109. send "&3&m*-------------*------------*-------------*"
  110. send "&r"
  111. send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
  112. send "&7* &3BOOSTER: &7x%{booster::%player%}%"
  113. send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
  114. send "&7* &3PROFIT: &a$%{_totalProfit}%"
  115. send "&7* &3TOTAL: &a$%{_afterSell}%"
  116. send "&r"
  117. send "&3&m*-------------*------------*-------------*"
  118. add {_afterSell} to player's balance
  119. else:
  120. send ""
  121. send "{@p} &cYou need items before selling"
  122. send ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement