This could have been posted before but
In the Database or whatever server coding vmk runs in there is a special code for treasure magic that selects a random number, say there's 5 prizes it will be a number 0-5 and the 0 means nothing and the 1-5 will be one of the prizes, each number 1-5 will have a number id which is the id of the item. Treasure detectors job is to select a number 0-5 and award based on whatever prize there is to the number.
I know in a game private server someone made a code like this for a NPC that awards items randomly that worked in the same way.
So that's my assumption.
In the Database or whatever server coding vmk runs in there is a special code for treasure magic that selects a random number, say there's 5 prizes it will be a number 0-5 and the 0 means nothing and the 1-5 will be one of the prizes, each number 1-5 will have a number id which is the id of the item. Treasure detectors job is to select a number 0-5 and award based on whatever prize there is to the number.
I know in a game private server someone made a code like this for a NPC that awards items randomly that worked in the same way.
So that's my assumption.