I made some assumptions about your needs. The code is somewhat adjustable, but if you want features I omitted, such as spawning ore inside caverns there will have to be some changes. As it is it only runs when the pick (just one of my assumptions) is in the player's inventory. The script does not run (and thereby spawn ore) just lying on the ground. I assumed you did not want ore spawning underwater (since your ore is actually a creature that could prove an interesting sight). The easiest way to do that was to make an elevation check since all water in exterior cells is at sea level. This would be problematic in an interior cell. In order to prevent the player from standing in one place waiting for the next ore to spawn, a cell change is required after the spawning of ore. Of course, the enterprising player could pass through a load door to achieve this, but I try not to invest too much time in saving the player from him/herself. However, it might be possible to close that exploit if you wish. The cell change, elevation check and random100 make the spawning pretty sporadic.
This is the code as I tested it. It depends on Morrowind only. With the frameCounter it is very efficient - but I added the memumode check to prevent player from standing with the menu open waiting for ore to spawn - at the very least it cost the player some time. The messageboxes were to help me judge the progress of the script while testing. You will want to comment them out before release, but you might welcome the feedback as you test and tweak the settings.
With these settings I spawned 4 ore (scribs) along the traditional (Ascadian Isles) route between Seyda Neen and Balmora. I think that is too frequent, and I suspected as much when I set the parameters. About half of that journey was 'at sea level' (below 500 units) so there was no chance of ore being spawned. You could lower that threshold elevation a little, but I think it is a reasonable minimum from preventing the spawning of ore in the water when the player is looking in that direction. The spawn distance of 2000 units can be changed. I would not want it so close to the player as to be noticeable, and depending on the mesh you are using it may not be noticeable at a near distance. Too far off and it is possible that the player will miss it entirely (turn in the path) or it will spawn in an undesirable location (such as water).
Other than changing the elevation cut-off. There are two ways of decreasing (or increasing) the frequency: increasing (or decreasing) the number of frame cycles for the script to return, and decreasing (or increasing) the value for Random100 to return as true. I feel a return on
if ( frameCounter < 300 ) reasonable, and although I have a five percent chance, I was thinking two or even one percent as reasonable. I did not test for very long, and hardly at all at higher elevations so my personal opinion could change. Of course, it is entirely up to you to decide what is reasonable for your application. Happily there are a number of ways you could adjust the script to give the results you wish.
Begin rts_MinersPickScript; Attached to rts_miners_pick.; When in player's inventory it will spawn ore some distance in front of the player.short frameCountershort oreSpawnedfloat playerZif ( menumode == 1 ) returnendifif ( CellChanged == 1 ) ; must be above frame counter - true only one frame set oreSpawned to 0 messagebox "Cell change - reset oreSpawned."endifset frameCounter to ( frameCounter + 1 )if ( frameCounter < 200 ) returnendifset frameCounter to 0if ( GetInterior == 1 ) returnendifif ( ( player->GetItemCount "rts_miners_pick" ) <= 0 ) returnendifset playerZ to ( player->GetPos Z )if ( ( playerZ ) < 500 ) messagebox "Player at sea level" returnendifif ( oreSpawned == 1 ) messagebox "Ore already spawned this cell." returnendifif ( Random100 >= 5 ) messagebox "Failed random chance." returnendifset oreSpawned to 1PlaceAtPC "scrib" 1 2000 0messagebox "Ore spawned."End rts_MinersPickScript