Number generator


#1

Help me find a plugin that when / roll (or another team) generates random numbers to players, so that another player in the vicinity would also see this (generator up to 100 for example). Displays only one number.


#2

I only understood that random numbers should be generated and those should be displayed somehow. Please rephrase your idea.


#3

I’m Russian. For example, a player writes in the chat "/ roll " he drops a random number 1 from 100. Another player nearby should also see that he is uses (command) (as in Garry’s mod, a game from random).


#4

Ah I understand. I’ll send you something later.


#5

I’ve got some wifi problems currently, I will message you when it’s working for me again.


#6

Install KtSkript and create a file like config/kt-skript/scripts/my-cool-script.ktskript and put this in there:

registerCommand("roll") {
  action(onlyPlayers = true) {
    val randomNumber = randomInt(start = 1, end = 100)
    val players = player.location.getNearbyEntitiesOfType<Player>(distance = 50.0)
    "&eThe random number is $randomNumber!".t.sendTo(players)
  }
}

Then execute the /roll command, and tweak the things (text, color, number range, max distance to other players).


#7

thanks, how can I thank you?


#8

No worries, you’re welcome.