MUDL:die roll
From SlothMUD Wiki
Summary
Function Name | die_roll |
---|---|
Settable | No |
Returns | Integer |
Parameter Options |
---|
Number of Dice (integer), Size of Dice (integer) |
This function performs a die roll using the specified number and size of dice. It is similar to using the "#d#" notation in MUDL but allows for variables to be provided rather than constants.
Example
setproc <parent> # NUM 3 setproc <parent> # SIZE 5 setproc <parent> # on_foo msg_room(%room, '' + die_roll(integer(get_attr('NUM')), integer(get_attr('SIZE')))), return(true) @ setproc <parent> # PROC_ENABLED 1