Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.29 KB | None | 0 0
  1. variables:
  2. {_total} = 0
  3. {_item1} = 0
  4. {_item2} = 0
  5. {_item3} = 0
  6. {_item4} = 0
  7. {_item5} = 0
  8. {_item6} = 0
  9. {_item7} = 0
  10. {_item8} = 0
  11. {_item9} = 0
  12. {_item10} = 0
  13. {_item11} = 0
  14. {_item12} = 0
  15. {_item13} = 0
  16.  
  17.  
  18.  
  19. command /sell [<text>]:
  20. trigger:
  21. if arg-1 is "hand":
  22. if player's held item is sugar cane:
  23. set {_item1} to amount of player's held item in player's inventory * {sugarcaneWorth}
  24. set {_sugarcaneCount} to amount of sugar_cane in player's inventory
  25. remove all sugar_cane from the player's inventory
  26. if player's held item is cactus:
  27. set {_item2} to amount of player's held item in player's inventory * {cactusWorth}
  28. set {_cactusCount} to amount of cactus in player's inventory
  29. remove all cactus from the player's inventory
  30. if player's held item is wheat item:
  31. set {_item3} to amount of player's held item in player's inventory * {wheatWorth}
  32. set {_wheatCount} to amount of wheat in player's inventory
  33. remove all wheat from the player's inventory
  34. if player's held item is rotten flesh:
  35. set {_item4} to amount of player's held item in player's inventory * {rottenWorth}
  36. set {_rottenCount} to amount of rotten_flesh in player's inventory
  37. remove all rotten_flesh from the player's inventory
  38. if player's held item is bone_item:
  39. set {_item5} to amount of player's held item in player's inventory * {boneWorth}
  40. set {_boneCount} to amount of bone_item in player's inventory
  41. remove all bone_item from the player's inventory
  42. if player's held item is arrow:
  43. set {_item6} to amount of player's held item in player's inventory * {arrowWorth}
  44. set {_arrowCount} to amount of arrow in player's inventory
  45. remove all arrow from the player's inventory
  46. if player's held item is blaze_rod:
  47. set {_item7} to amount of player's held item in player's inventory * {blazeWorth}
  48. set {_blazeRod} to amount of blaze_rod in player's inventory
  49. remove all blaze_rod from the player's inventory
  50. if player's held item is porkchop_item:
  51. set {_item8} to amount of player's held item in player's inventory * {porkWorth}
  52. set {_porkCount} to amount of porkchop_item in player's inventory
  53. remove all porkchop_item from the player's inventory
  54. if player's held item is raw_beef:
  55. set {_item9} to amount of player's held item in player's inventory * {beefWorth}
  56. set {_beefCount} to amount of raw_beef in player's inventory
  57. remove all raw_beef from the player's inventory
  58. if player's held item is leather:
  59. set {_item10} to amount of player's held item in player's inventory * {leatherWorth}
  60. set {_leatherCount} to amount of leather in player's inventory
  61. remove all leather from the player's inventory
  62. if player's held item is cobblestone:
  63. set {_item11} to amount of player's held item in player's inventory * {cobblestoneWorth}
  64. set {_cobblestoneCount} to amount of cobblestone in player's inventory
  65. remove all cobblestone from the player's inventory
  66. if player's held item is stone:
  67. set {_item12} to amount of player's held item in player's inventory * {stoneWorth}
  68. set {_stoneCount} to amount of stone in player's inventory
  69. remove all stone from the player's inventory
  70. if player's held item is dirt:
  71. set {_item13} to amount of player's held item in player's inventory * {dirtWorth}
  72. set {_dirtCount} to amount of dirt in player's inventory
  73. remove all dirt from the player's inventory
  74. if player's held item is pumpkin:
  75. set {_item14} to amount of player's held item in player's inventory * {pumpkinWorth}
  76. set {_pumpkinCount} to amount of pumpkin in player's inventory
  77. remove all pumpkin from the player's inventory
  78. if player's held item is nether_wart:
  79. set {_item15} to amount of player's held item in player's inventory * {wartWorth}
  80. set {_wartCount} to amount of nether_wart in player's inventory
  81. remove all nether_wart from the player's inventory
  82.  
  83.  
  84.  
  85. set {_totalCount} to {_wheatCount} + {_cactusCount} + {_sugarcaneCount} + {_rottenCount} + {_boneCount} + {_arrowCount} + {_blazeRod} + {_porkCount} + {_beefCount} + {_leatherCount}
  86. set {_totalProfit} to {_item1} + {_item2} + {_item3} + {_item4} + {_item5} + {_item6} + {_item7} + {_item8} + {_item9} + {_item10}
  87. set {_totalProfit} to {_totalProfit} * {booster::%player%}
  88. set {_totalBooster} to {_totalProfit} * {globalbooster}
  89. set {_afterSell} to {_totalProfit} + {_totalBooster}
  90. if {booster::%player%} is set:
  91. send "&3&m*-------------*------------*-------------*"
  92. send "&r"
  93. send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
  94. send "&7* &3BOOSTER: &7x%{booster::%player%}%"
  95. send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
  96. send "&7* &3PROFIT: &a$%{_totalProfit}%"
  97. send "&7* &3TOTAL: &a$%{_afterSell}%"
  98. send "&r"
  99. send "&3&m*-------------*------------*-------------*"
  100. add {_afterSell} to player's balance
  101. else:
  102. send "&cError: &7/sell (hand)/(all)"
  103. if arg-1 is "all":
  104. if player's inventory is not empty:
  105. play "ui_button_click" to player
  106. set {_sugarcaneWorth} to 3.5
  107. set {_rottenWorth} to 3
  108. set {_wheatWorth} to 2.5
  109. set {_cactusWorth} to 5
  110. set {_boneWorth} to 3.5
  111. set {_arrowWorth} to 3.5
  112. set {_blazeWorth} to 3.5
  113. set {_porkWorth} to 3.5
  114. set {_beefWorth} to 3.5
  115. set {_leatherWorth} to 3.5
  116. set {_cobblestoneWorth} to 3.5
  117. set {_stoneWorth} to 3.5
  118. set {_dirtWorth} to 3.5
  119. set {_pumpkinWorth} to 3.5
  120. set {_wartWorth} to 3.5
  121. set {_boneCount} to amount of bone_item in player's inventory
  122. set {_arrowCount} to amount of arrow in player's inventory
  123. set {_blazeCount} to amount of blaze_rod in player's inventory
  124. set {_porkCount} to amount of porkchop_item in player's inventory
  125. set {_beefCount} to amount of raw_beef in player's inventory
  126. set {_leatherCount} to amount of leather in player's inventory
  127. set {_rottenCount} to amount of rotten_flesh in player's inventory
  128. set {_wheatCount} to amount of wheat in player's inventory
  129. set {_cactusCount} to amount of cactus in player's inventory
  130. set {_sugarcaneCount} to amount of sugar_cane in player's inventory
  131. set {_cobblestoneCount} to amount of cobblestone in player's inventory
  132. set {_stoneCount} to amount of stone in player's inventory
  133. set {_dirtCount} to amount of dirt in player's inventory
  134. set {_pumpkinCount} to amount of pumpkin in player's inventory
  135. set {_wartCount} to amount of pumpkin in player's inventory
  136. remove all bone_item from player's inventory
  137. remove all arrow from player's inventory
  138. remove all blaze_rod from player's inventory
  139. remove all porkchop_item from player's inventory
  140. remove all raw_beef from player's inventory
  141. remove all leather from player's inventory
  142. remove all rotten_flesh from player's inventory
  143. remove all wheat from player's inventory
  144. remove all cactus from player's inventory
  145. remove all sugar_cane from player's inventory
  146. remove all cobblestone from player's inventory
  147. remove all stone from player's inventory
  148. remove all dirt from player's inventory
  149. remove all pumpkin from player's inventory
  150. remove all nether_wart from player's inventory
  151. set {_boneSell} to {_boneCount} * {_boneWorth}
  152. set {_arrowSell} to {_arrowCount} * {_arrowWorth}
  153. set {_blazeSell} to {_blazeCount} * {_blazeWorth}
  154. set {_porkSell} to {_porkCount} * {_porkWorth}
  155. set {_beefSell} to {_beefCount} * {_beefWorth}
  156. set {_leatherSell} to {_leatherCount} * {_leatherWorth}
  157. set {_rottenSell} to {_rottenCount} * {_rottenWorth}
  158. set {_sugarcaneSell} to {_sugarcaneCount} * {_sugarcaneWorth}
  159. set {_wheatSell} to {_wheatCount} * {_wheatWorth}
  160. set {_cactusSell} to {_cactusCount} * {_cactusWorth}
  161. set {_cobblestoneSell} to {_cobblestoneCount} * {_cobblestoneWorth}
  162. set {_stoneSell} to {_stoneCount} * {_stoneWorth}
  163. set {_dirtSell} to {_dirtCount} * {_dirtWorth}
  164. set {_pumpkinSell} to {_pumpkinCount} * {_pumpkinWorth}
  165. set {_wartSell} to {_wartCount} * {_wartWorth}
  166. set {_totalCount} to {_wheatCount} + {_cactusCount} + {_sugarcaneCount} + {_rottenCount} + {_boneCount} + {_arrowCount} + {_blazeCount} + {_porkCount} + {_beefCount} + {_leatherCount} + {_cobblestoneCount} + {_stoneCount} + {_dirtCount} + {_pumpkinCount} + {_wartCount}
  167. set {_totalProfit} to {_wheatSell} + {_cactusSell} + {_sugarcaneSell} + {_rottenSell} + {_boneSell} + {_arrowSell} + {_blazeSell} + {_porkSell} + {_beefSell} + {_leatherSell} + {_cobblestoneSell} + {_stoneSell} + {_dirtSell} + {_pumpkinSell} + {_wartSell}
  168. if {booster::%player%} is set:
  169. set {_totalProfit} to {_totalProfit} * {booster::%player%}
  170. set {_totalBooster} to {_totalProfit} * {globalbooster}
  171. set {_afterSell} to {_totalProfit} + {_totalBooster}
  172. send "&3&m*-------------*------------*-------------*"
  173. send "&r"
  174. send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
  175. send "&7* &3BOOSTER: &7x%{booster::%player%}%"
  176. send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
  177. send "&7* &3PROFIT: &a$%{_totalProfit}%"
  178. send "&7* &3TOTAL: &a$%{_afterSell}%"
  179. send "&r"
  180. send "&3&m*-------------*------------*-------------*"
  181. add {_afterSell} to player's balance
  182. else:
  183. send ""
  184. send "{@p} &cYou need items before selling"
  185. send ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement