Every time a player kills someone with a bounty of X, X gets added to points. If I saw a player with a bounty of 2, my points score would be added by 2.
I want to know if it's possible, how to do it and if it changes a lot in 1.13. I am working in 1.12.2 currently, but will be updating.
Yes I added everything correctly. Just double-checked now, still doesn't work. The repeating command block is active, and I have tested it. I am not getting any points. My friend sent me a solution that didn't work either, here it is.
It still doesn't work. Maybe you both misunderstood me?
If I kill a person with a bounty of 5, I should recieve 5 points. I have tested them, and it doesn't do that. Just wanted to make sure there aren't any misunderstandings.
You have done @p on almost all the selectors, is this a mistake?
Chain: scoreboard players set @p[score_bountykills_min=1] bountykills 0
Chain: scoreboard players set @p[score_bountydeaths_min=1] bounty 0
Chain: scoreboard players set @p[score_bountydeaths_min=1] bountydeaths 0
Basically what you sent me. Would like to mention points is actually 'playerKillCount' but I don't think that matters. I will continue to troubleshoot, if you find a mistake in your contraption (which I don't think is the case since this seems like it would work) please tell me. Regardless, thanks for the help!
It still doesn't work. Maybe you both misunderstood me?
If I kill a person with a bounty of 5, I should recieve 5 points. I have tested them, and it doesn't do that. Just wanted to make sure there aren't any misunderstandings.
You have done @p on almost all the selectors, is this a mistake?
From TheCommandFreak
1. scoreboard players add @a[score_bountykills_min=1] bounty 1
2. scoreboard players operation @p[score_bountykills_min=1] points += @p[score_bountydeaths_min=1] bounty
3. scoreboard players set @p[score_bountykills_min=1] bountykills 0
4. scoreboard players set @p[score_bountydeaths_min=1] bounty 0
5. scoreboard players set @p[score_bountydeaths_min=1] bountydeaths 0
Image key
purple: repeating_command_block
blue: chain_command_block
Logically, these commands should work. Are the commands in the order as shown in the attached image (top row)? Also, are the command blocks pointed in the right direction (into the next one)?
If yes, then are the commands placed in the command blocks in the correct order. If still yes, then there may be a weird problem, and you should upload your map somewhere so we can fix it for you manually?
If your commands are all in repeating command blocks, such as the bottom row in the picture, that may be the issue, as some command blocks may run at 'incorrect' times
Edit: (based on your previous comment which i missed)
For these commands,
points should be type dummy
bounty should be type dummy
bountykills shuold be type playerKillCount
bountydeaths should be type deathCount
bounty stores values whenever you kill someone due to command 1
points is the total number of points earned from killing people with a bounty (command 2)
bountykills is simply to detect whether you killed someone
bountydeaths is simply to detect if you were killed by someone
"'@p' doesn't target dead players, so '@p[score_bountydeaths_min=1]' probably won't find anyone. Try replacing all of the @p with @a[c=1], I think that should work"
So I replaced all of the '@p' with '@a[c=1]' and it worked.
On my server I want to add bounties.
Scores: bounty, points
bounty is 'playerKillCount'
points is 'dummy'
Every time a player kills someone with a bounty of X, X gets added to points. If I saw a player with a bounty of 2, my points score would be added by 2.
I want to know if it's possible, how to do it and if it changes a lot in 1.13. I am working in 1.12.2 currently, but will be updating.
Thanks, eliaslinde.
EDIT: SOLVED
The final work is
Rep: scoreboard players add @a[score_bountykills_min=1] bounty 1
Chain: scoreboard players operation @a[score_bountykills_min=1,c=1] points += @a[score_bountydeaths_min=1,c=1] bounty
Chain: scoreboard players set @a[score_bountykills_min=1,c=1] bountykills 0
Chain: scoreboard players set @a[score_bountydeaths_min=1,c=1] bounty 0
Chain: scoreboard players set @a[score_bountydeaths_min=1,c=1] bountydeaths
Scores[/b]
bounty as dummy
points as dummy
bountykills as playerKillCount
bountydeaths as deathCount
You should also add a death scoreboard. Also add another playerKillCount.
scoreboard objectives add ded deathCount
scoreboard objectives add kill playerKillCount
Then do this in a loop:
/scoreboard players operation @a[score_kill_min=1] points += @a[score_ded_min=1] bounty
/scoreboard players set @a[score_ded_min=1] ded 0
/scoreboard players set @a[score_kill_min=1] kill 0
YouTube: https://www.youtube.com/channel/UCzGDRYWcrGreMmQFo_d5N5Q
Facebook:https://goo.gl/s0r12d
Website:https://theusaf.weebly.com
JavaScript Projects: https://theusaf.github.io
Link Shortener: https://shortr.github.io
Twitter:https://www.twitter.com/theusafyt
Doesn't work, thanks anyways =/
Yes I added everything correctly. Just double-checked now, still doesn't work. The repeating command block is active, and I have tested it. I am not getting any points. My friend sent me a solution that didn't work either, here it is.
scoreboard players add @a[score_bountykills_min=1] bounty 1
scoreboard players reset @a[score_bountykills_min=1] bountykills
scoreboard players operation @a[score_bountydeaths_min=1] points += @s[score_bounty_min=1] bounty
scoreboard players reset @a[score_bountydeaths_min=1] bounty
scoreboard players reset @a[score_bountydeaths_min=1] bountydeaths
bounty as 'dummy'
points as 'dummy'
bountykills as 'playerKillCount'
bountydeaths as 'deathCount'
(I am aware that in theusafyoutube's command block contraption bounty would be playerKillCount)
It still doesn't work. Maybe you both misunderstood me?
If I kill a person with a bounty of 5, I should recieve 5 points. I have tested them, and it doesn't do that. Just wanted to make sure there aren't any misunderstandings.
You have done @p on almost all the selectors, is this a mistake?
Rep:
Chain: scoreboard players add @a[score_bountykills_min=1] bounty 1
Chain: scoreboard players operation @p[score_bountykills_min=1] points += @p[score_bountydeaths_min=1] bounty
Chain: scoreboard players set @p[score_bountykills_min=1] bountykills 0
Chain: scoreboard players set @p[score_bountydeaths_min=1] bounty 0
Chain: scoreboard players set @p[score_bountydeaths_min=1] bountydeaths 0
Basically what you sent me. Would like to mention points is actually 'playerKillCount' but I don't think that matters. I will continue to troubleshoot, if you find a mistake in your contraption (which I don't think is the case since this seems like it would work) please tell me. Regardless, thanks for the help!
From TheCommandFreak
1. scoreboard players add @a[score_bountykills_min=1] bounty 1
2. scoreboard players operation @p[score_bountykills_min=1] points += @p[score_bountydeaths_min=1] bounty
3. scoreboard players set @p[score_bountykills_min=1] bountykills 0
4. scoreboard players set @p[score_bountydeaths_min=1] bounty 0
5. scoreboard players set @p[score_bountydeaths_min=1] bountydeaths 0
Image key
purple: repeating_command_block
blue: chain_command_block
Logically, these commands should work. Are the commands in the order as shown in the attached image (top row)? Also, are the command blocks pointed in the right direction (into the next one)?
If yes, then are the commands placed in the command blocks in the correct order. If still yes, then there may be a weird problem, and you should upload your map somewhere so we can fix it for you manually?
If your commands are all in repeating command blocks, such as the bottom row in the picture, that may be the issue, as some command blocks may run at 'incorrect' times
Edit: (based on your previous comment which i missed)
For these commands,
points should be type dummy
bounty should be type dummy
bountykills shuold be type playerKillCount
bountydeaths should be type deathCount
bounty stores values whenever you kill someone due to command 1
points is the total number of points earned from killing people with a bounty (command 2)
bountykills is simply to detect whether you killed someone
bountydeaths is simply to detect if you were killed by someone
Also, bounty is reset upon death (command 4)
YouTube: https://www.youtube.com/channel/UCzGDRYWcrGreMmQFo_d5N5Q
Facebook:https://goo.gl/s0r12d
Website:https://theusaf.weebly.com
JavaScript Projects: https://theusaf.github.io
Link Shortener: https://shortr.github.io
Twitter:https://www.twitter.com/theusafyt
,Found the issue!
It was the selector. SirBenet told me on Discord
"'@p' doesn't target dead players, so '@p[score_bountydeaths_min=1]' probably won't find anyone. Try replacing all of the @p with @a[c=1], I think that should work"
So I replaced all of the '@p' with '@a[c=1]' and it worked.
Thanks to both of you <3
The final work is
Rep: scoreboard players add @a[score_bountykills_min=1] bounty 1
Chain: scoreboard players operation @a[score_bountykills_min=1,c=1] points += @a[score_bountydeaths_min=1,c=1] bounty
Chain: scoreboard players set @a[score_bountykills_min=1,c=1] bountykills 0
Chain: scoreboard players set @a[score_bountydeaths_min=1,c=1] bounty 0
Chain: scoreboard players set @a[score_bountydeaths_min=1,c=1] bountydeaths
Scores
bounty as dummy
points as dummy
bountykills as playerKillCount
bountydeaths as deathCount