Hi

Here you go

But it isn't tested, just wrote it right out of my mind
Code:
define speed,skill1;
define speed_x,skill1;
define speed_y,skill2;
define speed_z,skill3;
// Change these to fit your needs
define cam_dist,100; // Distance to camera
define cam_height,80; // Camera height
define movement_speed,10; // Movement speed
string stand_anim = "stand"; // Stand animation
string walk_anim = "walk"; // Walk/run animation
action thePlayer
{
// I'm the player ;)
player = me;
// Player main loop
while(my)
{
// Set speeds
my.speed_x = ((key_w | key_cur) - (key_s | key_cud)) * movement_speed;
my.speed_y = ((key_d | key_cur) - (key_a | key_cur)) * movement_speed;
my.speed_z = 0;
// Move me
c_move(my,vector(my.speed_x * time,my.speed_y * time,0),vector(0,0,my.speed_z * time),ignore_passable + glide);
// Animate
if(vec_dist(my.speed,nullvector) < 5)
{
ent_animate(my,stand_anim,my.skill46,ANM_CYCLE);
my.skill46 += 2 * time;
}
else
{
ent_animate(my,walk_anim,my.skill46,ANM_CYCLE);
my.skill46 += 8 * time;
}
my.skill46 %= 100; // Get the rest of a division by 100
// Set the camera position
camera.x = my.x + fcos(my.pan,cam_dist);
camera.y = my.y + fsin(my.pan,cam_dist);
camera.z = cam_height;
// Make the camera looking at the player
vec_set(temp,my.x);
vec_sub(temp,camera.x);
vec_to_angle(camera.pan,temp);
// Avoid endless loops
wait(1);
}
}