One method would be to use custom identifiers for each:
alias weapon {
var %weapons = knife,axe,gun,rope
var %rand = $rand(1,$numtok(%weapons,44))
return $gettok(%weapons,%rand,44)
}
alias location {
var %location = bedroom,dining room,kitchen,study
var %rand = $rand(1,$numtok(%location,44))
return $gettok(%location,%rand,44)
}
alias murdertime {
return $rand(1,12) $+ : $+ $rand(1,60) $+ $iif($rand(1,2) == 1,am,pm)
}
Etc.
Then, when you want to use a piece of data, you just use the identifier. For example:
//echo -a $murdertime
//echo -a $weapon
//echo -a $location
You can, of course, combine these into one //echo -a //msg or whatever.
If you're storing the data for later use, then put it into a variable when you first generate the information:
//set %weapon $weapon
For the victim, witnesses, and killer, I'm sure you probably want to use people in the room. So you'd use
$nick($chan,$rand(1,$nick($chan,0))) to get a random person. Then compare that to others so you don't have the same person in 2 different roles.