Just replace the weapons and locations with whatever ones you want. Also, this assumes you're using the people in the channel for the victim/murderer/witnesses. If that's not the case, just say so. Also, replace the %number_of_witnesses number with however many witnesses you want. I put 3 there, but you can change that. If there are fewer people in the channel than the number you enter + 2 (victim and murderer), it will automatically reduce the number to 2 less than the total people in the channel to prevent errors.

Code:
on *:text:!rcase:#: {
  echo -a Murderer: $murderer
  msg $chan Weapon: $weapon - Location: $location - Victim: $victim - Witnesses: $witnesses
}
on *:input:#: {
  if ($1 == !rcase) {
    echo -a Murderer: $murderer
    msg $chan Weapon: $weapon - Location: $location - Victim: $victim - Witnesses: $witnesses
  }
}
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)
}
alias victim {
  ; You need to get the victim BEFORE witnesses.
  unset %victim
  while (!%victim || %victim == %murderer) {
    set %victim $nick($chan,$rand(1,$nick($chan,0)))
  }
  return %victim
}
alias murderer {
  ; You need to get the murderer BEFORE the witnesses.
  unset %murderer
  while (!%murderer || %murderer == %victim) {
    set %murderer $nick($chan,$rand(1,$nick($chan,0)))
  }
  return %murderer
}
alias witnesses {
  ; You need to get the witnesses AFTER the victim and murderer are chosen.
  var %cnt = 1, %number_of_witnesses = 3
  if (%number_of_witnesses > $calc($nick($chan,0) - 2)) { var %number_of_witnesses = $v2 }
  if (%witnesses) { unset %witnesses }
  while (%cnt <= %number_of_witnesses) {
    while (!%witness || $istok(%witness,%murderer,32) || $istok(%witness,%victim,32) || %witness isin %witnesses) {
      var %witness = $nick($chan,$rand(1,$nick($chan,0)))
    }
    set %witnesses %witnesses %witness
    inc %cnt
  }
  return $replace(%witnesses,$chr(32),$chr(44) $+ $chr(32))
}


That will display the information if anyone types it. The murderer's name will be echoed instead of displayed in the channel as I'm sure you don't want that to be known to everyone.

Just remember that if people know the witnesses and the victim, unless you have many people in the channel, it may be obvious who the murderer is.

*EDIT* Fixed a typo.

Last edited by Riamus2; 17/02/07 03:20 AM.