I'm looking for a couple of ways of getting random numbers
First way
Picking random numbers from the inventory
Example:
Say player has items with IDs: 1, 5, 14, 16, 19, 22, 27, 31
Pick 5 random ones: 5, 16, 19, 22, 27, 31
Store each number into variable:
num1 -> 62
num2 -> 63
num3 -> 64
num4 -> 65
num5 -> 66
Second way
Picking random numbers from list
Example:
List has these ids: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25
Pick 5 random ones: 1, 7, 9, 17, 25
Store each number into variable
num1 -> 67
num2 -> 68
num3 -> 69
num4 -> 70
num5 -> 71
How would i go about doing this?
First way
Picking random numbers from the inventory
Example:
Say player has items with IDs: 1, 5, 14, 16, 19, 22, 27, 31
Pick 5 random ones: 5, 16, 19, 22, 27, 31
Store each number into variable:
num1 -> 62
num2 -> 63
num3 -> 64
num4 -> 65
num5 -> 66
Second way
Picking random numbers from list
Example:
List has these ids: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25
Pick 5 random ones: 1, 7, 9, 17, 25
Store each number into variable
num1 -> 67
num2 -> 68
num3 -> 69
num4 -> 70
num5 -> 71
How would i go about doing this?