1
How can I create a system, where a player get's a reward and some text telling them they reached the next level? The levels are the standard above the hotbar levels. So anyone know how to do that?
Create an account or sign in to comment.
27
1
Players won't be leveling up a lot anyway. The first batch of levels should be to around 15 and that would last a few months before more have to be released.
1
Even though there aren't XP orbs a large quantity that increases the level by more than 1 in one go (/xp can do this) it'll still pose a problem. Imo the difficult part is to know how many, and what levels just got passed (i.e each level gained).
1
Just use tags.
on a clock:
/scoreboard players set @a[tag=!Applied] Level 0
/scoreboard players tag @a[tag=!Applied] add Applied
on a clock:
/scoreboard players set @a[tag=!Applied] Level 0
/scoreboard players tag @a[tag=!Applied] add Applied
1
How can I set new players to have a score of then? By giving all people with lm=0 a score of 0 for l1c, l2c, etc. ?
1
Are you using curly brackets? youre supposed to use [ ] in target selectors. If the command doesn't work than that's probably why.
Also, The way you're system is working wont function, because when people start they have an unidentified score, not equal to 0.
Also, The way you're system is working wont function, because when people start they have an unidentified score, not equal to 0.
1
Here is the system I tried, however the command doesn't work. Maybe this will help.
/execute @a{lm=1, score_l1c_min=0} ~ ~ ~ /give @p cake
The cake is only a temporary thing to see if the system works. I want to put another repeater command block next to that that gives all players with lm=1 the score of 1 in l1c. l1c is a scoreboard that stands for "level 1 claimed" to see if a player claimed the reward for reaching a specific level or not.
Good idea?
/execute @a{lm=1, score_l1c_min=0} ~ ~ ~ /give @p cake
The cake is only a temporary thing to see if the system works. I want to put another repeater command block next to that that gives all players with lm=1 the score of 1 in l1c. l1c is a scoreboard that stands for "level 1 claimed" to see if a player claimed the reward for reaching a specific level or not.
Good idea?
1
This is quite stupid XD
That would require an objective for each level.
Instead, you can use one objective to track the previous level and the target selectors l and lm to track the current level.
Compare the current level with the previous level and if the current level is higher, make stuff happen.
Those commands I posted all the way in the beginning do that exact thing. They target everyone with a level that's higher than the previous level and make stuff happen to them.
Please re-read
That would require an objective for each level.
Instead, you can use one objective to track the previous level and the target selectors l and lm to track the current level.
Compare the current level with the previous level and if the current level is higher, make stuff happen.
Those commands I posted all the way in the beginning do that exact thing. They target everyone with a level that's higher than the previous level and make stuff happen to them.
Please re-read
1
Ok?
1
Hey Heklo
1
Yes using commands and command blocks.
1
I can't have pluigns. I don't even know how to make them.
1
Well, then, I think you'll have a hard time.
Then how did you developed your anit-cheat system "SpyFort?!" Using command blocks?!?
Then how did you developed your anit-cheat system "SpyFort?!" Using command blocks?!?
1
Maybe you should simply write a plugin which is going track player's level and on level up, announce new level and give the reward? Hm? This will be much easier, in terms of implementation (for programmer) IMO, AFAIK you can code
1
Same here, I can't really understand any of the ideas. If you need any more clarification on anything I want in the system, please let me know.
1
Yes, I didn't think you wanted it displayed there. I'm not sure of a way to perfect it without that, perhaps you could ask Bertie to elaborate on his idea. (I don't understand other peoples ideas)
1
But doesn't it remove xp from a player?
1
Running my three commands in a that order will work, I've tested it.
1
.Could I maybe have a visualisation of this as I don't fully understand. Plus does it support more than one player?
1
If you give a player more than 1 level of xp at a time, the system he provided will overload. The fix I specified can take unlimited amount of xp at once.
Also, if youre using mechanisms to give xp, why don't you just skip it and go directly to /scoreboard players add
Also, if youre using mechanisms to give xp, why don't you just skip it and go directly to /scoreboard players add
1
Um. Wouldn't levelling that way be broken, taking XP farms into consideration.
1
It's actually smart to use the leveling system. It provides exponential increase in goal. And for most gametypes it would make things more difficult. Could be great for maps and games.
And the OP probs doesn't want to apply a leveling system with rewards to a survival server. Just assuming though...
And the OP probs doesn't want to apply a leveling system with rewards to a survival server. Just assuming though...
1
use the selectors l and lm (maximum level number and minimum level number)
Also use a scoreboard objective to count the previous levels.
/scoreboard objectives add Level dummy
/scoreboard players set @a Level 0
/tell @a[lm=1,l=1,score_Level_min=0,score_Level=0] You reached level 1!
/scoreboard players set @a[lm=1,l=1,score_Level_min=0,score_Level=0] Level 1
/tell @a[lm=2,l=2,score_Level_min=1,score_Level=1] You reached level 2!
/scoreboard players set @a[lm=2,l=2,score_Level_min=1,score_Level=1] Level 2
/tell @a[lm=3,l=3,score_Level_min=2,score_Level=2] You reached level 3!
/scoreboard players set @a[lm=3,l=3,score_Level_min=2,score_Level=2] Level 3
Also use a scoreboard objective to count the previous levels.
/scoreboard objectives add Level dummy
/scoreboard players set @a Level 0
/tell @a[lm=1,l=1,score_Level_min=0,score_Level=0] You reached level 1!
/scoreboard players set @a[lm=1,l=1,score_Level_min=0,score_Level=0] Level 1
/tell @a[lm=2,l=2,score_Level_min=1,score_Level=1] You reached level 2!
/scoreboard players set @a[lm=2,l=2,score_Level_min=1,score_Level=1] Level 2
/tell @a[lm=3,l=3,score_Level_min=2,score_Level=2] You reached level 3!
/scoreboard players set @a[lm=3,l=3,score_Level_min=2,score_Level=2] Level 3
1
This is a good concept, but unfortunately it will get jammed easily. This is due to the fact that level 1 is needed to get to level 2. If a player was to pick up a large xp orb and gain more than 1 level, the system will not know how to react. That is why it needs a reset system:
/scoreboard players add @a[lm=1] Level 1
/tellraw @a[lm=1] [{"text":"You have reached level ","color":"aqua"},{"score":{"objective":"Level","name":"*","value":"0"},"color":"red"}]
/xp -1L @a[lm=1]
Running in this order, it will:
- add an objective level to the player with 1 xp level
- tell them the specific level they are at
- reset their xp, but keep their level score
P.S. The first command needs to be on always active, with a repeater command block. The other two have to be always active, but with chain command blocks.
Hope this works our for you, let me know if there's any problems with it.
/scoreboard players add @a[lm=1] Level 1
/tellraw @a[lm=1] [{"text":"You have reached level ","color":"aqua"},{"score":{"objective":"Level","name":"*","value":"0"},"color":"red"}]
/xp -1L @a[lm=1]
Running in this order, it will:
- add an objective level to the player with 1 xp level
- tell them the specific level they are at
- reset their xp, but keep their level score
P.S. The first command needs to be on always active, with a repeater command block. The other two have to be always active, but with chain command blocks.
Hope this works our for you, let me know if there's any problems with it.
1
You can also remove the l=# arguments from the commands above
That means that if the previous level is lower than ANY level, it will update...
You can use the same group of selector arguments for other commands, as long as /scoreboard is last.
You create each group of commands as a tower of command blocks, using an impulse command block at the bottom and chain command blocks going upwards.
Then for every level you place multiple towers behind each other in a numerical order. You connect the towers with repeaters and run a redstone signal through it, using a clock. Make sure that one pulse can travel to the end of the line, before another pulse starts
That means that if the previous level is lower than ANY level, it will update...
You can use the same group of selector arguments for other commands, as long as /scoreboard is last.
You create each group of commands as a tower of command blocks, using an impulse command block at the bottom and chain command blocks going upwards.
Then for every level you place multiple towers behind each other in a numerical order. You connect the towers with repeaters and run a redstone signal through it, using a clock. Make sure that one pulse can travel to the end of the line, before another pulse starts
1
[DELETED]
1
are you referring to gaining xp?
1
Each time you earn an entire level, yes,
And how would the mechanism look like? Plus how about giving items at reaching a level?
There are no xp farms on the server.
There are no xp orbs. Only mechanisms that do /xp
use the selectors l and lm (maximum level number and minimum level number)
Also use a scoreboard objective to count the previous levels.
/scoreboard objectives add Level dummy
/scoreboard players set @a Level 0
/tell @a[lm=1,l=1,score_Level_min=0,score_Level=0] You reached level 1!
/scoreboard players set @a[lm=1,l=1,score_Level_min=0,score_Level=0] Level 1
/tell @a[lm=2,l=2,score_Level_min=1,score_Level=1] You reached level 2!
/scoreboard players set @a[lm=2,l=2,score_Level_min=1,score_Level=1] Level 2
/tell @a[lm=3,l=3,score_Level_min=2,score_Level=2] You reached level 3!
/scoreboard players set @a[lm=3,l=3,score_Level_min=2,score_Level=2] Level 3
And how would the mechanism look like? Plus how about giving items at reaching a level?
Um. Wouldn't levelling that way be broken, taking XP farms into consideration.
There are no xp farms on the server.
This is a good concept, but unfortunately it will get jammed easily. This is due to the fact that level 1 is needed to get to level 2. If a player was to pick up a large xp orb and gain more than 1 level, the system will not know how to react. That is why it needs a reset system:
/scoreboard players add @a[lm=1] Level 1
/tellraw @a[lm=1] [{"text":"You have reached level ","color":"aqua"},{"score":{"objective":"Level","name":"*","value":"0"},"color":"red"}]
/xp -1L @a[lm=1]
Running in this order, it will:
- add an objective level to the player with 1 xp level
- tell them the specific level they are at
- reset their xp, but keep their level score
P.S. The first command needs to be on always active, with a repeater command block. The other two have to be always active, but with chain command blocks.
Hope this works our for you, let me know if there's any problems with it.
There are no xp orbs. Only mechanisms that do /xp