Just be aware that if you plan on spawning an orb piece at random until all pieces are activated, there's an increasing chance that the RandInt() call will return a orb piece number which has already been used. This might cause player frustration.
The easiest way to do this is create a global variable string and use AddGlobalVarString with the string to add being ""+RandomOrbNumberVariable. This way it just concatenates the most recent orb piece set active to the string. As an example:
GVar "OrbPiecesActivated"
"1"
"15"
"152"
"1523"
"15234"
Before you want to spawn an orb, do a check to see if StringContains(GlobalVariableHere, ""+NewOrbPieceNumberHere) evaluates as true, and if it does, re-generate a new random orb number. This is a great example of why hard-coding is bad
You'll need a variable to store the randomly generated number temporarily so you can run the check, and if it passes you can then use that variable when spawning the piece.
In some other languages you have to cast the number a string, but luckily AngelCode supports string concatenation with the + operator. But don't try adding a string on to an integer variable. That won't work. You can however, add integers on to strings. It will just stick that integer on to the end of it.