andsim

Untitled

Jul 3rd, 2011
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. integer H;
  2. integer M;
  3. string AP;
  4. integer T;
  5. integer S;
  6. 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>];
  7.  
  8. default
  9. {
  10. state_entry()
  11. {
  12. llSetTimerEvent(1);
  13. }
  14. timer()
  15. {
  16. integer T = (integer)llGetWallclock();
  17. if (T > 43200)
  18. {
  19. T = T - 43200;
  20. AP = "PM";
  21. H = T / 3600;
  22. integer Y = H * 3600;
  23. M = (T - Y) / 60;
  24. integer X = M * 60;
  25. S = (T - Y - X);
  26. llSetLocalRot(llList2Rot(ROTATION, S));
  27. }
  28. else
  29. {
  30. AP = "AM";
  31. H = T / 3600;
  32. integer Y = H * 3600;
  33. M = (T - Y) / 60;
  34. integer X = M * 60;
  35. S = (T - Y - X);
  36. llSetLocalRot(llList2Rot(ROTATION, S));
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment