1

I am trying to make a map where if you buy something, the price increases by 15%, so a way to do that would be

/scoreboard players operation @p score1 *= @p score2

where score1 would be something like 15, and score2 would be 1.15% to increase score1. This would allow for almost infinite times, but scoreboards can not do decimals.

2

Add an objective with some fake players to keep track of numbers:

/scoreboard objectives add Numbers dummy
/scoreboard players set 115 Numbers 115
/scoreboard players set 100 Numbers 100

Then, whenever you want to increase it by 15%, multiply the player's score by 115, then divide it by 100:

/scoreboard players operation @p score1 *= 115 Numbers
/scoreboard players operation @p score1 /= 100 Numbers
  • Thanks! It works, and I never thought of doing it like that. :P – CreeperDust Jul 15 '16 at 22:34
  • @user155735 No problem. Press the tick on the left if the answer worked for you to confirm it. – SirBenet Jul 15 '16 at 22:43
  • Ok, I'm new on here if you can't tell by my username not being updated for some reason, but oh well. Thanks anyway! – CreeperDust Jul 15 '16 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.