Modèle:Random

De Inkipédia
Révision datée du 5 novembre 2015 à 13:56 par Slate (discussion | contributions) (copy-paste error)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
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
  • 1
  • #{{random|type=hex}}{{random|type=hex}}{{random|type=hex}}{{random|type=hex}}{{random|type=hex}}{{random|type=hex}} gives
  • #BFFE56 (useful for random color!)