It seems that you are looking in a wrong place. This function gives item (item id is passed as an argument - "przedmiot") to player and all those random_nums (probably) define power of item.
If you want to make items 9 and 10 harder to obtain, then you should check where is this function called and change it, so that the 2nd argument will be equal 9 or 10 less often.