Number generator

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.

1 Like

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

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).

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

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

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).

1 Like

thanks, how can I thank you?

No worries, you’re welcome.