setmonster subroutine