Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {_total} = 0
- {_item1} = 0
- {_item2} = 0
- {_item3} = 0
- {_item4} = 0
- {_item5} = 0
- {_item6} = 0
- {_item7} = 0
- {_item8} = 0
- {_item9} = 0
- {_item10} = 0
- {_item11} = 0
- {_item12} = 0
- {_item13} = 0
- command /sell [<text>]:
- trigger:
- if arg-1 is "hand":
- if player's held item is sugar cane:
- set {_item1} to amount of player's held item in player's inventory * {sugarcaneWorth}
- set {_sugarcaneCount} to amount of sugar_cane in player's inventory
- remove all sugar_cane from the player's inventory
- if player's held item is cactus:
- set {_item2} to amount of player's held item in player's inventory * {cactusWorth}
- set {_cactusCount} to amount of cactus in player's inventory
- remove all cactus from the player's inventory
- if player's held item is wheat item:
- set {_item3} to amount of player's held item in player's inventory * {wheatWorth}
- set {_wheatCount} to amount of wheat in player's inventory
- remove all wheat from the player's inventory
- if player's held item is rotten flesh:
- set {_item4} to amount of player's held item in player's inventory * {rottenWorth}
- set {_rottenCount} to amount of rotten_flesh in player's inventory
- remove all rotten_flesh from the player's inventory
- if player's held item is bone_item:
- set {_item5} to amount of player's held item in player's inventory * {boneWorth}
- set {_boneCount} to amount of bone_item in player's inventory
- remove all bone_item from the player's inventory
- if player's held item is arrow:
- set {_item6} to amount of player's held item in player's inventory * {arrowWorth}
- set {_arrowCount} to amount of arrow in player's inventory
- remove all arrow from the player's inventory
- if player's held item is blaze_rod:
- set {_item7} to amount of player's held item in player's inventory * {blazeWorth}
- set {_blazeRod} to amount of blaze_rod in player's inventory
- remove all blaze_rod from the player's inventory
- if player's held item is porkchop_item:
- set {_item8} to amount of player's held item in player's inventory * {porkWorth}
- set {_porkCount} to amount of porkchop_item in player's inventory
- remove all porkchop_item from the player's inventory
- if player's held item is raw_beef:
- set {_item9} to amount of player's held item in player's inventory * {beefWorth}
- set {_beefCount} to amount of raw_beef in player's inventory
- remove all raw_beef from the player's inventory
- if player's held item is leather:
- set {_item10} to amount of player's held item in player's inventory * {leatherWorth}
- set {_leatherCount} to amount of leather in player's inventory
- remove all leather from the player's inventory
- if player's held item is cobblestone:
- set {_item11} to amount of player's held item in player's inventory * {cobblestoneWorth}
- set {_cobblestoneCount} to amount of cobblestone in player's inventory
- remove all cobblestone from the player's inventory
- if player's held item is stone:
- set {_item12} to amount of player's held item in player's inventory * {stoneWorth}
- set {_stoneCount} to amount of stone in player's inventory
- remove all stone from the player's inventory
- if player's held item is dirt:
- set {_item13} to amount of player's held item in player's inventory * {dirtWorth}
- set {_dirtCount} to amount of dirt in player's inventory
- remove all dirt from the player's inventory
- if player's held item is pumpkin:
- set {_item14} to amount of player's held item in player's inventory * {pumpkinWorth}
- set {_pumpkinCount} to amount of pumpkin in player's inventory
- remove all pumpkin from the player's inventory
- if player's held item is nether_wart:
- set {_item15} to amount of player's held item in player's inventory * {wartWorth}
- set {_wartCount} to amount of nether_wart in player's inventory
- remove all nether_wart from the player's inventory
- set {_totalCount} to {_wheatCount} + {_cactusCount} + {_sugarcaneCount} + {_rottenCount} + {_boneCount} + {_arrowCount} + {_blazeRod} + {_porkCount} + {_beefCount} + {_leatherCount}
- set {_totalProfit} to {_item1} + {_item2} + {_item3} + {_item4} + {_item5} + {_item6} + {_item7} + {_item8} + {_item9} + {_item10}
- set {_totalProfit} to {_totalProfit} * {booster::%player%}
- set {_totalBooster} to {_totalProfit} * {globalbooster}
- set {_afterSell} to {_totalProfit} + {_totalBooster}
- if {booster::%player%} is set:
- send "&3&m*-------------*------------*-------------*"
- send "&r"
- send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
- send "&7* &3BOOSTER: &7x%{booster::%player%}%"
- send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
- send "&7* &3PROFIT: &a$%{_totalProfit}%"
- send "&7* &3TOTAL: &a$%{_afterSell}%"
- send "&r"
- send "&3&m*-------------*------------*-------------*"
- add {_afterSell} to player's balance
- else:
- send "&cError: &7/sell (hand)/(all)"
- if arg-1 is "all":
- if player's inventory is not empty:
- play "ui_button_click" to player
- set {_sugarcaneWorth} to 3.5
- set {_rottenWorth} to 3
- set {_wheatWorth} to 2.5
- set {_cactusWorth} to 5
- set {_boneWorth} to 3.5
- set {_arrowWorth} to 3.5
- set {_blazeWorth} to 3.5
- set {_porkWorth} to 3.5
- set {_beefWorth} to 3.5
- set {_leatherWorth} to 3.5
- set {_cobblestoneWorth} to 3.5
- set {_stoneWorth} to 3.5
- set {_dirtWorth} to 3.5
- set {_pumpkinWorth} to 3.5
- set {_wartWorth} to 3.5
- set {_boneCount} to amount of bone_item in player's inventory
- set {_arrowCount} to amount of arrow in player's inventory
- set {_blazeCount} to amount of blaze_rod in player's inventory
- set {_porkCount} to amount of porkchop_item in player's inventory
- set {_beefCount} to amount of raw_beef in player's inventory
- set {_leatherCount} to amount of leather in player's inventory
- set {_rottenCount} to amount of rotten_flesh in player's inventory
- set {_wheatCount} to amount of wheat in player's inventory
- set {_cactusCount} to amount of cactus in player's inventory
- set {_sugarcaneCount} to amount of sugar_cane in player's inventory
- set {_cobblestoneCount} to amount of cobblestone in player's inventory
- set {_stoneCount} to amount of stone in player's inventory
- set {_dirtCount} to amount of dirt in player's inventory
- set {_pumpkinCount} to amount of pumpkin in player's inventory
- set {_wartCount} to amount of pumpkin in player's inventory
- remove all bone_item from player's inventory
- remove all arrow from player's inventory
- remove all blaze_rod from player's inventory
- remove all porkchop_item from player's inventory
- remove all raw_beef from player's inventory
- remove all leather from player's inventory
- remove all rotten_flesh from player's inventory
- remove all wheat from player's inventory
- remove all cactus from player's inventory
- remove all sugar_cane from player's inventory
- remove all cobblestone from player's inventory
- remove all stone from player's inventory
- remove all dirt from player's inventory
- remove all pumpkin from player's inventory
- remove all nether_wart from player's inventory
- set {_boneSell} to {_boneCount} * {_boneWorth}
- set {_arrowSell} to {_arrowCount} * {_arrowWorth}
- set {_blazeSell} to {_blazeCount} * {_blazeWorth}
- set {_porkSell} to {_porkCount} * {_porkWorth}
- set {_beefSell} to {_beefCount} * {_beefWorth}
- set {_leatherSell} to {_leatherCount} * {_leatherWorth}
- set {_rottenSell} to {_rottenCount} * {_rottenWorth}
- set {_sugarcaneSell} to {_sugarcaneCount} * {_sugarcaneWorth}
- set {_wheatSell} to {_wheatCount} * {_wheatWorth}
- set {_cactusSell} to {_cactusCount} * {_cactusWorth}
- set {_cobblestoneSell} to {_cobblestoneCount} * {_cobblestoneWorth}
- set {_stoneSell} to {_stoneCount} * {_stoneWorth}
- set {_dirtSell} to {_dirtCount} * {_dirtWorth}
- set {_pumpkinSell} to {_pumpkinCount} * {_pumpkinWorth}
- set {_wartSell} to {_wartCount} * {_wartWorth}
- set {_totalCount} to {_wheatCount} + {_cactusCount} + {_sugarcaneCount} + {_rottenCount} + {_boneCount} + {_arrowCount} + {_blazeCount} + {_porkCount} + {_beefCount} + {_leatherCount} + {_cobblestoneCount} + {_stoneCount} + {_dirtCount} + {_pumpkinCount} + {_wartCount}
- set {_totalProfit} to {_wheatSell} + {_cactusSell} + {_sugarcaneSell} + {_rottenSell} + {_boneSell} + {_arrowSell} + {_blazeSell} + {_porkSell} + {_beefSell} + {_leatherSell} + {_cobblestoneSell} + {_stoneSell} + {_dirtSell} + {_pumpkinSell} + {_wartSell}
- if {booster::%player%} is set:
- set {_totalProfit} to {_totalProfit} * {booster::%player%}
- set {_totalBooster} to {_totalProfit} * {globalbooster}
- set {_afterSell} to {_totalProfit} + {_totalBooster}
- send "&3&m*-------------*------------*-------------*"
- send "&r"
- send "&7* &3COUNT: &7&nx%{_totalCount}%&r"
- send "&7* &3BOOSTER: &7x%{booster::%player%}%"
- send "&7* &3GLOBALBOOSTER: &7x%{globalbooster}%"
- send "&7* &3PROFIT: &a$%{_totalProfit}%"
- send "&7* &3TOTAL: &a$%{_afterSell}%"
- send "&r"
- send "&3&m*-------------*------------*-------------*"
- add {_afterSell} to player's balance
- else:
- send ""
- send "{@p} &cYou need items before selling"
- send ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement