I took it from the template of the current beta and modified it, because the template material shifts in mat_effUVrender the texture cyclicly with total_ticks, but I prefer to do that on my own. So.. assign this material and in the refresh function replace .u and .v with skill1 and skill2. I guess its better when you store the effect part in the material in a .fx file, just because this is just the effect itself plus its naming convention and, well, I guess you will access the effect from the original grain material.

Code:

//--------------------------------------------------------------------
// UV Shifting
// FFP Effect, which shifts faster the texture than using .u/v
//--------------------------------------------------------------------
function mat_effUVrender();
function mat_effUVinit();

//primary effect material
material mat_effUV
{
event = mat_effUVinit;
effect = "
matrix matMtl;

technique effUVspeed
{
pass one
{
TextureTransformFlags[0] = Count2;
TextureTransform[0] = <matMtl>;
}
}
technique fallback { pass one { } }
";
}

//helper-function: Init
function mat_effUVinit()
{
mtl.matrix11 = float(1); // default u scale
mtl.matrix21 = 0;
mtl.matrix12 = 0;
mtl.matrix22 = float(1); // default v scale

mtl.event = mat_effUVrender;
mtl.ENABLE_RENDER = on;
}

//helper-function: refresh
function mat_effUVrender()
{
//Skill1 & Skill2 are used for the shifting
mtl.matrix31 = floatd(my.skill1, 256);
mtl.matrix32 = floatd(my.skill2, 256);
}