skAyo Posted July 19, 2022 Share Posted July 19, 2022 Here's a simple gen sell skript for all of you nerds creating gen servers. command /sell: trigger: sell(player, coal, 1) sell(player, iron, 5) add {-temp::%player%} to player's balance send title "&a&lSOLD" with subtitle "&fYou sold all items for &2&l$%{-temp::%player%}%" play sound "block.note_block.pling" with volume 2 to player delete {-temp::%player%} function sell(P: player, I: itemtype, N: int): set {_am} to amount of {_I} in {_P}'s inventory set {_am} to ({_am} * {_N}) remove all {_I} from {_P}'s inventory add {_am} to {-temp::%{_P}%} 1 Link to comment Share on other sites More sharing options...
Pryzmm Posted July 20, 2022 Share Posted July 20, 2022 22 hours ago, skAyo said: Here's a simple gen sell skript for all of you nerds creating gen servers. command /sell: trigger: sell(player, coal, 1) sell(player, iron, 5) add {-temp::%player%} to player's balance send title "&a&lSOLD" with subtitle "&fYou sold all items for &2&l$%{-temp::%player%}%" play sound "block.note_block.pling" with volume 2 to player delete {-temp::%player%} function sell(P: player, I: itemtype, N: int): set {_am} to amount of {_I} in {_P}'s inventory set {_am} to ({_am} * {_N}) remove all {_I} from {_P}'s inventory add {_am} to {-temp::%{_P}%} nice Owner of Lifestealed, Exploratory, Encore, UNOfficially and Observed OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - 5/8/2024 [MOD] 5/8/2024 - Present Link to comment Share on other sites More sharing options...
Glemt Posted September 12, 2022 Share Posted September 12, 2022 Nice codes, but you don't have to make an local variable for that skript Which would make your server run more smooth Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now