PHP Code:
if (playerenters||timeout) {
showimg 0,insom_gui-watch.png,screenwidth-105,0;
changeimgvis 0,4;
temp.thp=(temp.thp-1)%1201;
setarray temp.points,8;
temp.cx=screenwidth-52;
temp.cy=52;
temp.h=30;
temp.radian=(pi*temp.thp/50);
temp.points[0]=temp.cx+(sin(temp.radian)*4);
temp.points[1]=temp.cy+(cos(temp.radian)*4);
temp.points[2]=temp.cx-(cos(temp.radian)*1);
temp.points[3]=temp.cy+(sin(temp.radian)*1);
temp.points[4]=temp.cx-(sin(temp.radian)*temp.h);
temp.points[5]=temp.cy-(cos(temp.radian)*temp.h);
temp.points[6]=temp.cx+(cos(temp.radian)*1);
temp.points[7]=temp.cy-(sin(temp.radian)*1);
showpoly 1,temp.points;
changeimgvis 1,6;
changeimgcolors 1,0.1,0.1,0.1,1;
temp.h+=4;
temp.points[0]=temp.cx+(sin(temp.radian)*5);
temp.points[1]=temp.cy+(cos(temp.radian)*5);
temp.points[2]=temp.cx-(cos(temp.radian)*2);
temp.points[3]=temp.cy+(sin(temp.radian)*2);
temp.points[4]=temp.cx-(sin(temp.radian)*temp.h);
temp.points[5]=temp.cy-(cos(temp.radian)*temp.h);
temp.points[6]=temp.cx+(cos(temp.radian)*2);
temp.points[7]=temp.cy-(sin(temp.radian)*2);
showpoly 2,temp.points;
changeimgvis 2,5;
changeimgcolors 2,0.5,0.5,0.5,0.25;
temp.h=20;
temp.radian=(pi*temp.thp/600);
temp.points[0]=temp.cx+(sin(temp.radian)*4);
temp.points[1]=temp.cy+(cos(temp.radian)*4);
temp.points[2]=temp.cx-(cos(temp.radian)*2);
temp.points[3]=temp.cy+(sin(temp.radian)*2);
temp.points[4]=temp.cx-(sin(temp.radian)*temp.h);
temp.points[5]=temp.cy-(cos(temp.radian)*temp.h);
temp.points[6]=temp.cx+(cos(temp.radian)*2);
temp.points[7]=temp.cy-(sin(temp.radian)*2);
showpoly 3,temp.points;
changeimgvis 3,6;
changeimgcolors 3,0.1,0.1,0.1,1;
temp.h+=4;
temp.points[0]=temp.cx+(sin(temp.radian)*5);
temp.points[1]=temp.cy+(cos(temp.radian)*5);
temp.points[2]=temp.cx-(cos(temp.radian)*3);
temp.points[3]=temp.cy+(sin(temp.radian)*3);
temp.points[4]=temp.cx-(sin(temp.radian)*temp.h);
temp.points[5]=temp.cy-(cos(temp.radian)*temp.h);
temp.points[6]=temp.cx+(cos(temp.radian)*3);
temp.points[7]=temp.cy-(sin(temp.radian)*3);
showpoly 4,temp.points;
changeimgvis 4,5;
changeimgcolors 4,0.5,0.5,0.5,0.25;
timeout=0.05;
}
I'm sure a clever coder could make a for loop for the points, but I like it my way. Replace temp.thp with the number of minutes you wish to reflect. Adding a second hand is left as an exercise for the reader. (Hint: You could probably just increment temp.thp by 1/60.)