Jump to content

/Roll: Difference between revisions

From fCraft Wiki
Rwojy (talk | contribs)
mNo edit summary
No edit summary
Line 1: Line 1:
{{CommandBox
{{CommandBox
|name=/Roll
|name=/Roll
|purpose=Fun
|purpose=Picks a random number
|uses=Fun commands
|uses=/Roll
 
/Roll Max
 
/Roll Min Max
|cat=Chat
|cat=Chat
|aliases=N/A
|aliases=
|perm=Chat
|perm=Chat
|console=Yes
|console=Yes
|}}
|}}


==<code>/Roll</code> base==
==<code>/Roll</code>==
'''/Roll''' is a fun/games command. The base usage is as follows.<br>
:Prints a random number between 1 and 100 (inclusive). All numbers have 1% chance of rolling.
<code> (input) /roll  (output) Player1 rolled 50 (1,100) </code><br>
 
==<code>/Roll Max</code>==
:Prints a random number between 1 and specified Max number (also inclusive). Percent chance of any number rolling is <code>100/(Max-1)</code>.


==<code>/Roll</code> Minimum and/or Maximum input==
==<code>/Roll Min Max</code>==
Roll can be used with a specified maximum number, or both a minimum and a maximum. The maximum number is limited to 2^31-1, or 2,147,483,647.<br>
:Prints a random number between given Min and Max numbers (also inclusive). Percent chance of any number rolling is <code>100/(Max-Min)</code>.
<code> (input) /roll 50 (output) Player1 rolled 33 (1,100)<br>
(input) /roll 187 366  (output) Player1 rolled 265 (187,366) </code>

Revision as of 11:38, 6 June 2011

Command
/Roll

Picks a random number

Usage

/Roll

/Roll Max

/Roll Min Max

CategoryChat
Required permissionsChat
Usable from console?Yes
Introduced in[[Version history#{{{v}}}|fCraft {{{v}}}]]


/Roll

Prints a random number between 1 and 100 (inclusive). All numbers have 1% chance of rolling.

/Roll Max

Prints a random number between 1 and specified Max number (also inclusive). Percent chance of any number rolling is 100/(Max-1).

/Roll Min Max

Prints a random number between given Min and Max numbers (also inclusive). Percent chance of any number rolling is 100/(Max-Min).