The Dink Network

Reply to Re: Random function: Helpo-pleaso

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
June 15th 2008, 12:17 PM
maidenb.gif
Sharp
Peasant She/Her Finland
 
From the old dinkc reference:

"int random(max, plus_this);
Random(10,1) would return a number between 1 and 10. Random(5,0) would return a number from 0 to 4. Simular to how C does it."

Check out some of the original Dink source files (e.g. s2-wand.c has a lot of randomization going on) for real examples of how to do it.