(I'm not using GUI or Jass)
Wrong on both accounts I guess?
Jass is the scripting language wc3 triggers use and GUI stands for "Graphical User Interface" - it is the graphical representation of Jass (tho it misses many functions pure jass has). The pseudo-code you posted seems to be of GUI nature, so you're basically using jass without knowing it
Anyway, back to your issue. What I would do is simply swap regions and decrement the range of the random number.
Look at this:
-
Set reg[1] = Region<01>
-
Set reg[2] = Region<02>
-
Set reg[3] = Region<03>
-
Set reg[4] = Region<04>
I just used 4 regions for simplicity. Now do this:
-
Set int_num = Random number between 1 and 4
Notice I saved the value into a variable.
Now I move the hero to reg[int_num]. Next thing I do, I swap the region on index int_num with last region. Let's say int_num is number 2.
set reg[1] = Region<01>
set reg[2] = Region<02>
set reg[3] = Region<03>
set reg[4] = Region<04>
and swap the two colored ones:
set reg[1] = Region<01>
set reg[2] = Region<04>
set reg[3] = Region<03>
set reg[4] = Region<02>
By decrementing the max range of the random number by 1, I basically do this:
set reg[1] = Region<01>
set reg[2] = Region<04>
set reg[3] = Region<03>
set reg[4] = Region<02>
Now all I do is pick random number between 1 and 3! I decremented the range by 1, because under index 4 is the already used region. When I choose the second region, I swap it with the last unused region (in this case, the currently last unused region is region under index 3) and decrement the range by 1 again.
To know which region you need to swap, you need the int_num variable to refer to that region.
check this:
-
Region selection
-

Events
-

Conditions
-

Actions
-


-------- Initialization on match start --------
-


Set max_region = 8
-


-------- - you can even set here regions anew if needed or use ITE block if they are not yet created --------
-


-------- /////////////////////////// --------
-


-------- I just assumed here there will be 4 heroes matched up, hence the 'to 4' loop --------
-


For each (Integer loop_var) from 1 to 4, do (Actions)
-



Loop - Actions
-




Set index = (Random integer number between 1 and max_region)
-




Unit - Move hero[loop_var] instantly to reg[index]
-




-------- /////////////////////////// --------
-




-------- I save the region here into slot #9, because that slot will never be used by any region (since max_region is 8 or less) --------
-




Set reg[9] = reg[index]
-




Set reg[index] = reg[max_region]
-




Set reg[max_region] = reg[9]
-




Set max_region = (max_region - 1)
A side note: I advise using points instead of regions to prevent unnecessary memory leaks. In the trigger above, the array reg is actually variable of type "point", not "region".