In the current version, that's not possible because the data in the starting rules are Integer and not IntFunction.
So I just updated that in our dev version and that will be possible in the next release.
Here an example to place a ball owned by P1 on the site 1 with a random state between 3 and 300:
(place "Ball1" 1 state:(value Random (range 3 300)))