I was wondering whether or not I was able to create a 'hit' system on my server (hit like the SMP live server, being instructed to kill another player).
I've come up with an idea for this by making a timer that every five minutes has a 30% chance of selecting a hit. If a hit is selected two players will be selected at random, one to kill and one to be killed. I was hoping this could be done on command blocks but I'm not sure how to do it myself.
If someone could perhaps steer me in the right direction it would be greatly appreciated.
oh yeah, and it'd be pretty epic if only the person who has to kill was told directly, theirs only 8 people on the server so if specific names are needed in commands that would be possible.
Names include:
adventure_time46
DatedMars
McSlurryTheGamer
H_CN
spot_spot
cozysleeper
ditch664072
chazkiller2012
I hope someone with enough intellect could help me out.
And if anyone has any suggestions feel free to let me know I'm always up for ideas.
The random chance can be done with a dropper randomizer that's really easy to set up, and can be done by using the design in the attached images with the dropper hooked up to a daylight sensor of some sort.
However, generating the random names for the hit has an issue. The easiest way to do that would be the command:
tell @r You're being contracted to kill @r
However, this does mean it could contract a player to have a hit on themselves. It would also only select players that are online, but that's probably best for something like this.
The Meaning of Life, the Universe, and Everything.
Location:
Quebec
Join Date:
6/29/2014
Posts:
50
Minecraft:
Avarthar
Member Details
Small fix for the "tell @r" command above.
You could do something like this: (Tested in 1.14, but should work for 1.13 too.)
If they can use commands (are operators or have permissions set for it.):
/execute as @r run tell @s YOUR MESSAGE @r[distance=1..]
If only your server and/or yourself can use commands like tell and such:
/execute at @r run tell @p[distance=0] Go Kill: @r[distance=1..]
Breakdown:
"execute at/as @r" - Executes the command at or as the selected player, in this case choosen at random.
"run tell @s/@p" - Sends a message in chat to the selected player or closest player. ("distance=0" is not needed, but ensure only the player on the position the command is ran at is selected.)
"YOUR MESSAGE" - Replace this with the message you want.
"@r[distance=1..]" - Chooses a random entity 1 or more blocks away from the selected player. You can place this wherever you want in the message.
(For example "tell @p[distance=0] Your target is @r[distance=1..]. Go kill him." would work too.)
Ps. Trust me. My D&D character has an intellect score of 3.
YOYO, Freshasstaste here,
I was wondering whether or not I was able to create a 'hit' system on my server (hit like the SMP live server, being instructed to kill another player).
I've come up with an idea for this by making a timer that every five minutes has a 30% chance of selecting a hit. If a hit is selected two players will be selected at random, one to kill and one to be killed. I was hoping this could be done on command blocks but I'm not sure how to do it myself.
If someone could perhaps steer me in the right direction it would be greatly appreciated.
oh yeah, and it'd be pretty epic if only the person who has to kill was told directly, theirs only 8 people on the server so if specific names are needed in commands that would be possible.
Names include:
adventure_time46
DatedMars
McSlurryTheGamer
H_CN
spot_spot
cozysleeper
ditch664072
chazkiller2012
I hope someone with enough intellect could help me out.
And if anyone has any suggestions feel free to let me know I'm always up for ideas.
Thanks
The random chance can be done with a dropper randomizer that's really easy to set up, and can be done by using the design in the attached images with the dropper hooked up to a daylight sensor of some sort.
However, generating the random names for the hit has an issue. The easiest way to do that would be the command:
tell @r You're being contracted to kill @r
However, this does mean it could contract a player to have a hit on themselves. It would also only select players that are online, but that's probably best for something like this.
Check out my mod! You can find it on CurseForge here:
https://www.curseforge.com/minecraft/mc-mods/the-spookjams-mod
Small fix for the "tell @r" command above.
You could do something like this: (Tested in 1.14, but should work for 1.13 too.)
If they can use commands (are operators or have permissions set for it.):
If only your server and/or yourself can use commands like tell and such:
Breakdown:
"execute at/as @r" - Executes the command at or as the selected player, in this case choosen at random.
"run tell @s/@p" - Sends a message in chat to the selected player or closest player. ("distance=0" is not needed, but ensure only the player on the position the command is ran at is selected.)
"YOUR MESSAGE" - Replace this with the message you want.
"@r[distance=1..]" - Chooses a random entity 1 or more blocks away from the selected player. You can place this wherever you want in the message.
(For example "tell @p[distance=0] Your target is @r[distance=1..]. Go kill him." would work too.)
Ps. Trust me. My D&D character has an intellect score of 3.
Most of my replies are boring at best, but you cannot say I did not try. Just like this signature for example.
I never would've thought of that. I'll have to find some uses for this. Thanks.
Check out my mod! You can find it on CurseForge here:
https://www.curseforge.com/minecraft/mc-mods/the-spookjams-mod
Those are command parameters we learn over time Glad my input could by of some help ^^
Most of my replies are boring at best, but you cannot say I did not try. Just like this signature for example.