Modèle:Random

De Inkipédia
Aller à la navigation Aller à la recherche

No type selected for {{random}}.

Syntax

{{random|<type=option>}} where option is:

  • bool (returns 0 or 1)
  • boolyn (returns no or yes)
  • coin (returns heads or tails)
  • dice (returns a number between 0 and 6)
  • int (returns a number between 0 and 9)
  • hex (returns a nibble between 0 and F)

Notes

  • If type is not specified, it prints a message (shown above).

Example

  • {{random|type=dice}} gives
  • 5
  • #{{random|type=hex}}{{random|type=hex}}{{random|type=hex}}{{random|type=hex}}{{random|type=hex}}{{random|type=hex}} gives
  • #B7C55B (useful for random color!)