/set %dead $rand(1,15)
change that to
/var %dead = $rand(1,15)
unless u have some reason for storing the last %dead value used (which doesnt look like its the case)
Using the /VAR command means the variable exists only in the script it was created in, and well be deleted when that script ends. (u do need to have the = in there tho)
PS: the / is not needed in any script files by the way /set /var /describe is all the same as var set describe etc.