Կաղապարը վերադարձվում է կեղծ–պատահական ամբողջ թիվ 0 մինչև count-1։

Գործածում:
  • {{Rand|count|seed|prime}}
  • Բոլոր պարամետրերը ոչ պարտադիր են, և ունեն լռելյայն արժեքներ։ Բոլորը պետք է լինեն դրական ամբողջ թիվ։
  • count–ի լռելյայն արժեքը 100 է (այսինքն լռելյայն, կաղապարը վերադարձնում է պտահական թիվ 0-ից 99), այն չպետք է լինի 0։
  • Լռելյայն seed–ը {{#time:z}} է։ (այս պահին 88, այսինքն տարվա մեջ, այն օրի համարը, երբ էջը հիշվել է, կամ վերջին անգամ մաքրվել է քեշը) և կարող է լինել ցանկացած այլ ամբողջ դրական թիվ (օգտագործվում է նույն էջում զանազան արժեքներ տալու համար)։
  • Լռելյայն prime 67 է, և պետք է լինի, 17-ից մեծ պարզ թիվ (օգտագործվում է նույն էջում զանազան արժեքներ տալու համար)։
0–ից 999-ը պատահական թվեր գեներացնելու օրինակներ։:
  • {{Rand|1000}} = 80
  • {{Rand|1000|88|67}} = 80 (same as above)
  • {{Rand|1000|88|61}} = 603 (this and others should all be different)
  • {{Rand|1000|6}} = 586
  • {{Rand|1000|5}} = 519
  • {{Rand|1000|4}} = 452
  • {{Rand|1000|3}} = 385
  • {{Rand|1000|2}} = 318
  • {{Rand|1000|1}} = 251
  • {{Rand|1000|0}} = 184
  • {{Rand|1000|1|17}} = 204 (varying the prime number)
  • {{Rand|1000|1|19}} = 527
  • {{Rand|1000|1|23}} = 170
  • {{Rand|1000|1|29}} = 120
  • {{Rand|1000|1|31}} = 450
  • {{Rand|1000|1|37}} = 391
  • {{Rand|1000|1|41}} = 58
  • {{Rand|1000|1|43}} = 352
  • {{Rand|1000|1|47}} = 980
  • {{Rand|1000|1|51}} = 627
  • {{Rand|1000|1|53}} = 979
  • {{Rand|1000|1|59}} = 902
  • {{Rand|1000|1|61}} = 235
  • {{Rand|1000|1|67}} = 184
  • {{Rand|1000|1|71}} = 794
  • {{Rand|1000|1|73}} = 143
  • {{Rand|1000|1|79}} = 123
Note:
  • Varying seed linearly generates numbers that generate a linear sequence on the same page, with equal cyclic steps;
  • Varying prime (provided that they are odd prime numbers) generates pseudo-random that have independent random distribution.
  • Note that when count is even (such as 100 by default, or 1000 in the examples above), the generated numbers (on the same page) are all odd or all even when you are varying the seed or prime, unless half of the calls use an even seed and the others used an odd seed. However, later invocations will still alternate odd and even numbers on output (this problem only occurs on the same page where multiple random numbers are invoked).
  • On the same page, multiple invocations of this template with the same parameters will generate the same output value, so it is possible to create multiple links related to the same article.