Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer H;
- integer M;
- string AP;
- integer T;
- integer S;
- list ROTATION = [<0.00000, 0.00000, 0.00000, 1.00000>, <0.00000, 0.00000, -0.05234, 0.99863>, <0.00000, 0.00000, -0.10453, 0.99452>, <0.00000, 0.00000, -0.15643, 0.98769>, <0.00000, 0.00000, -0.20791, 0.97815>, <0.00000, 0.00000, -0.25882, 0.96593>, <0.00000, 0.00000, -0.30902, 0.95106>, <0.00000, 0.00000, -0.35837, 0.93358>, <0.00000, 0.00000, -0.40674, 0.91355>, <0.00000, 0.00000, -0.45399, 0.89101>, <0.00000, 0.00000, -0.50000, 0.86603>, <0.00000, 0.00000, -0.54464, 0.83867>, <0.00000, 0.00000, -0.58779, 0.80902>, <0.00000, 0.00000, -0.62932, 0.77715>, <0.00000, 0.00000, -0.66913, 0.74314>, <0.00000, 0.00000, -0.70711, 0.70711>, <0.00000, 0.00000, -0.74314, 0.66913>, <0.00000, 0.00000, -0.77715, 0.62932>, <0.00000, 0.00000, -0.80902, 0.58779>, <0.00000, 0.00000, -0.83867, 0.54464>, <0.00000, 0.00000, -0.86603, 0.50000>, <0.00000, 0.00000, -0.89101, 0.45399>, <0.00000, 0.00000, -0.91355, 0.40674>, <0.00000, 0.00000, -0.93358, 0.35837>, <0.00000, 0.00000, -0.95106, 0.30902>, <0.00000, 0.00000, -0.96593, 0.25882>, <0.00000, 0.00000, -0.97815, 0.20791>, <0.00000, 0.00000, -0.98769, 0.15643>, <0.00000, 0.00000, -0.99452, 0.10453>, <0.00000, 0.00000, -0.99863, 0.05234>, <0.00000, 0.00000, -1.00000, 0.00000>, <0.00000, 0.00000, 0.99863, 0.05234>, <0.00000, 0.00000, 0.99452, 0.10453>, <0.00000, 0.00000, 0.98769, 0.15643>, <0.00000, 0.00000, 0.97815, 0.20791>, <0.00000, 0.00000, 0.96593, 0.25882>, <0.00000, 0.00000, 0.95106, 0.30902>, <0.00000, 0.00000, 0.93358, 0.35837>, <0.00000, 0.00000, 0.91355, 0.40674>, <0.00000, 0.00000, 0.89101, 0.45399>, <0.00000, 0.00000, 0.86603, 0.50000>, <0.00000, 0.00000, 0.83867, 0.54464>, <0.00000, 0.00000, 0.80902, 0.58779>, <0.00000, 0.00000, 0.77715, 0.62932>, <0.00000, 0.00000, 0.74314, 0.66913>, <0.00000, 0.00000, 0.70711, 0.70711>, <0.00000, 0.00000, 0.66913, 0.74314>, <0.00000, 0.00000, 0.62932, 0.77715>, <0.00000, 0.00000, 0.58779, 0.80902>, <0.00000, 0.00000, 0.54464, 0.83867>, <0.00000, 0.00000, 0.50000, 0.86603>, <0.00000, 0.00000, 0.45399, 0.89101>, <0.00000, 0.00000, 0.40674, 0.91355>, <0.00000, 0.00000, 0.35837, 0.93358>, <0.00000, 0.00000, 0.30902, 0.95106>, <0.00000, 0.00000, 0.25882, 0.96593>, <0.00000, 0.00000, 0.20791, 0.97815>, <0.00000, 0.00000, 0.15643, 0.98769>, <0.00000, 0.00000, 0.10453, 0.99452>, <0.00000, 0.00000, 0.05234, 0.99863>];
- default
- {
- on_rez(integer start_param)
- {
- // Restarts the script every time the object is rezzed
- llResetScript();
- }
- state_entry()
- {
- llSetTimerEvent(1);
- }
- timer()
- {
- integer T = (integer)llGetWallclock();
- if (T > 43200)
- {
- T = T - 43200;
- AP = "PM";
- H = T / 3600;
- integer Y = H * 3600;
- M = (T - Y) / 60;
- integer X = M * 60;
- S = (T - Y - X);
- llSetLocalRot(llList2Rot(ROTATION, S));
- }
- else
- {
- AP = "AM";
- H = T / 3600;
- integer Y = H * 3600;
- M = (T - Y) / 60;
- integer X = M * 60;
- S = (T - Y - X);
- llSetLocalRot(llList2Rot(ROTATION, S));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment