Untested:
Code:
action warlock()
{
	player = me; 
	while (1) 
	{ 
		my.skill1 = 5 * time_step; 
		my.skill2 = 0; 
		vec_set (temp, my.x); 
		temp.z -= 3000; 
		my.skill3 = c_trace (my.x, temp, IGNORE_YOU + IGNORE_PASSABLE + USE_BOX); 
		if (destination != null)
		{
			vec_set (temp.x, destination.x); 
			vec_sub (temp.x, my.x);
			vec_to_angle (my.pan, temp); // turn towards the destination
			my.tilt = 0; // don't bow :)
			if (vec_dist (my.x, destination.x) > 40)
			{
				c_move(my,my.skill1,nullvector,IGNORE_PASSABLE);
				ent_animate(my,"walk",my.skill46,ANM_CYCLE);
				my.skill46 += 10 * time; // "walk" animation speed 
				my.skill46 %= 100; // loop animation 
			}
			else
			{
				set(destination,INVISIBLE);
				ent_animate(my,"idle",my.skill46,ANM_CYCLE); // play "stand" frames animation 
				my.skill46 += 2 * time_step; // "stand" animation speed 
				my.skill46 %= 100; // loop animation 
			}
		}
		wait (1); 
	}
}

And you should define a temp vector: VECTOR temp;