#JavaScript (ES6) 271 (w,h,z=(s,q=0)=>'| '.slice(0,q)+s.repeat(w).substr(h%2*6+q,w*6-q-~-q)+` | `.slice(~q),a='|_ _| (_) ',b=' _) (_ _ ',c='|_ _|_( )_',t=z(' _____')+z('|_ _| ',2,--h)+z(b,3)+z(c))=>eval("for(;--h;)t+=z(a,2)+z(b,3)+z(c)")+z(a,2)+z(' _) (_ ',3)+z('|_____',1) *Less golfed* (w,h, z=(s,q=0)=>'| '.slice(0,q)+s.repeat(w).substr(h%2*6+q,w*6-q-~-q)+' |\n'.slice(~q), a='|_ _| (_) ', b=' _) (_ _ ', c='|_ _|_( )_', t=z(' _____')+z('|_ _| ',2,--h)+z(b,3)+z(c) )=>{ for(;--h;) t+=z(a,2)+z(b,3)+z(c); return t+z(a,2)+z(' _) (_ ',3)+z('|_____',1) } <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> F= (w,h,z=(s,q=0)=>'| '.slice(0,q)+s.repeat(w).substr(h%2*6+q,w*6-q-~-q)+` | `.slice(~q),a='|_ _| (_) ',b=' _) (_ _ ',c='|_ _|_( )_',t=z(' _____')+z('|_ _| ',2,--h)+z(b,3)+z(c))=>eval("for(;--h;)t+=z(a,2)+z(b,3)+z(c)")+z(a,2)+z(' _) (_ ',3)+z('|_____',1) function update() { var i=I.value.match(/\d+/g) if (i) { [w,h]=i if (+w>1 & +h>1) O.textContent=F(+w,+h) } } update() <!-- language: lang-html --> <input id=I value='3 4' oninput='update()'> <pre id=O></pre> <!-- end snippet -->