Originally Posted By: Feyl0rd
If you have a command that uses !d something and triggers off of that then you can either switch the on text event to be !diceX where X is the number you'd like to roll.
Before:
Code:
on *:text:!d20:#:msg $chan $nick rolled a ( $r(1,20) ).

The above code will roll a d20 when !d20 is typed in the channel. If you want it to be !dice20 then change !d20 to be what you would like. Example:
Code:
on *:text:!dice20:#:msg $chan $nick rolled a ( $r(1,20) ).

It will now instead roll a d20 only when !dice20 is said.


How could you get that to work with this?

Code:
on *:text:!d*:#:{
  var %h = $right($1,2-)
  if %h < 10 {
    var %h = $right($1,1-)
    msg $chan $upper($nick) rolled a ( $r(1,%h) ).
  }
  else {
  msg $chan $upper($nick) rolled a ( $r(1,%h) ). }
}

Last edited by Majeye; 11/02/15 07:19 PM.