Do you mean DEF by vit right? If that so I think it's located on src folders.
You should use {find all, find in files} function with DEF, VIT keywords. And find where the def by vit located.
After you found it adjust it and compile.
.@ mean this variable will deleted after you finish with that npcs.
$ mean 'server variable'
For more info please look at doc > script_commands
For the randomize you should do
set .Rand1, rand( getarraysize(.Ref) );
Again because it's located above 4 getitembound.
The simple way is.
Getitem > rand > Getitem> rand and so on.