For example, say I enter \'10\' for the amount of values, and \'10000\' as a total amount.
The script would need to randomize 10 different numbers that all equal up
maybe something like this:
set max amount remaining to the target number
loop for 1 to the number of values you want - 1
get a random number from 0 to the max amount remaining
set new max amount remaining to old max amount remaining minus the current random number
repeat loop
you will end up with a 'remainder' so the last number is determined by whatever is left over to make up the original total.