If you want to adapt the moves of the staff to the hand of the warlock without animations, you can use a second vec_for_vertex instruction to turn the staff depending the hand without animations:
Code:
function staff()
{
    VECTOR wpos;
    VECTOR temp;
     while(1)
      {
	set(my,PASSABLE);
	vec_for_vertex(wpos, player, 23);
	my.x = wpos.x;
	my.y= wpos.y;
	my.z = wpos.z;
	vec_for_vertex(temp, player, 24);//the vertex to look at
	vec_diff(temp, temp, my.x);//results in a vector that points from my.x to temp
	vec_to_angle(my.pan, temp);
	
	wait(1);
      }
}


Disadvantage of this way is that the staff can flip under certain circumstances. But that's another thing.