MUDL:die roll

From WikiName
Revision as of 23:36, 7 November 2018 by Teker (talk | contribs) (Created page with " __TOC__ = Summary = {|class="abilitiestable" border="0" cellspacing="0" cellpadding="0" ! Function Name | die_roll |- ! Settable | No |- ! Returns | Integer |} {|class="...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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