Grogs code is good, you just have to adjust it for only 4 players and ten rooms.
Another possible way to do this is to start with an array of 10 elements, each element holding its own index, i.e. Room(1)=1, Room(2)=2, etc.
Then simply mix them up. Pick one element and swap it with another one thousand times, and you'll have a random order. Give the first four rooms to the players.
Here is some code to illustrate this:
randomize timer()
` initialize the rooms
dim Rooms(10)
print "Starting values:"
for n = 1 to 10
Rooms(n)=n
print "Rooms(" + str$(n) + ")=" + str$(Rooms(n))
next x
` shuffle the rooms
for r = 1 to 1000
nRandom1 = rnd(9)+1
nRandom2 = rnd(9)+1
nTemp = Rooms(nRandom1)
Rooms(nRandom1) = Rooms(nRandom2)
Rooms(nRandom2) = nTemp
next r
` display the shuffled rooms
print ""
print "Shuffled values:"
for n = 1 to 10
print "Rooms(" + str$(n) + ")=" + str$(Rooms(n))
next n
wait key
You could even start with a string of "1234567890" and randomly take one character at a time, ending up with a string like "5467329108", then just use the first four characters as your rooms.
Here is some code for that:
randomize timer()
` initialize the strings
a$ = "1234567890"
b$ = ""
` display the starting string
print "Starting string:"
print a$
print ""
` shuffle the string
for n = 1 to 10
nLength = len(a$)
nRandom = rnd(nLength-1)+1
b$ = b$ + mid$(a$,nRandom)
a$ = left$(a$, nRandom-1)+right$(a$,nLength-nRandom)
next n
` display the shuffled string
print "Shuffled string:"
print b$
wait key