just save the posted code as an .fx-file and then use:
Code:
  

material mat_name {
skin1=bmapname1; //if needed
skin2=bmapname2; //up to 4
flags=tangent;
}


and at the beginning of the main function i place an effect_load(mat_name,"filename.fx");

if there are skins needed, i mostly use the materialskins because of my testing purposes