Of course, it is possible, although you will need to make a list of random characters beforehand, then create a function:
function getRandom(min, max)
{
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
and apply the result of it where you want: either to data character ID, or event ID, or else