To get a random number in Basic just use the rand command or the randInt(1,100)->D where 1 and 100 are the intervals you want to use and D is the stored value.