Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 3rd, 2010  |  syntax: None  |  size: 71.50 KB  |  hits: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #define TA      //no its not
  2.  
  3. piece  base, pelvis, pcuf, torso, turret, neck, head, ob1, bag, rpad, lpad;
  4. piece  armpivot, rshol, lshol, ruparm, luparm, lelb, relb, rloarm, lloarm;
  5. piece lwrist, rwrist, lhand, rhand, swordx, sword1, cut;
  6. piece  rupleg, lupleg, lloleg, rloleg, rupfoot, lupfoot, rlofoot, llofoot;
  7. piece  gun1, mag1, mag2, gunx, magx, pistol1, pflare, pistolx, shell, flare;
  8.  
  9. #include "SFXtype.h"
  10. #include "exptype.h"
  11.  
  12. static-var bMoving, bAiming, Static_Var_3, restore_delay, statechg_DesiredState, statechg_StateChanging;
  13. static-var dead, runtype, aimtype, down, regspeed, fastspeed, slowspeed, reglos, buzy, ohnoes, stance;
  14. static-var pistol, ammunition,  bullets, loaded, sready, sout;
  15.  
  16. #define SIG_AIM                         2
  17. //// for rifles
  18. #define SIG_AIM_2                       4
  19. // for pistol
  20. #define SIG_AIM_3                       8
  21. //// for rifle
  22.  
  23.  
  24. #ifndef MAX_SPEED
  25. #define MAX_SPEED 75
  26. #endif
  27. #ifndef CLOAKED
  28. #define CLOAKED 76
  29. #endif
  30.  
  31. RestoreAfterDelay()
  32. {
  33. sleep restore_delay;
  34. //alert
  35. if (dead == 0 && buzy == 0 && sready == 0)
  36.         {
  37.         if (pistol == 0)
  38.         {
  39.                 //fix from aiming
  40.                 if (runtype != 1)
  41.                 {
  42.                 turn torso to x-axis <0> speed <150>;
  43.                 turn head to x-axis <0> speed <150>;
  44.                 }
  45.                 turn turret to z-axis <0> now;
  46.                 turn torso to y-axis <0> speed <150>;
  47.                 turn head to z-axis <0> speed <150>;
  48.                 turn lloarm to x-axis <0> speed <150>;
  49.                 turn lloarm to y-axis <0> speed <150>;
  50.                 turn lloarm to z-axis <0> speed <150>;
  51.                 turn lshol to x-axis <0> speed <150>;
  52.                 turn lshol to y-axis <0> speed <150>;
  53.                 turn rshol to x-axis <0> speed <150>;
  54.                 turn rshol to y-axis <0> speed <150>;
  55.                 turn rhand to x-axis <0> speed <150>;
  56.                 turn rhand to y-axis <0> speed <150>;
  57.                 turn rhand to z-axis <0> speed <150>;
  58.                 turn rpad to x-axis <0> speed <150>;
  59.                 turn lpad to x-axis <0> speed <150>;
  60.                 //set up
  61.                 turn turret to y-axis <0> speed <150>;
  62.                 turn armpivot to x-axis <-15> speed <150>;
  63.                 turn lelb to x-axis <40> speed <150>;
  64.                 turn lelb to y-axis <-31> speed <150>;
  65.                 turn lelb to z-axis <64> speed <150>;
  66.                 turn lhand to x-axis <13> speed <150>;
  67.                 turn lhand to y-axis <-21> speed <150>;
  68.                 turn lhand to z-axis <-2> speed <150>;
  69.                 turn relb to x-axis <20> speed <150>;
  70.                 turn relb to y-axis <58> speed <150>;
  71.                 turn relb to z-axis <-22> speed <150>;
  72.         }
  73.         if (pistol != 0 && buzy == 0)
  74.         {
  75.                 if (runtype != 1)
  76.                 {
  77.                 turn torso to x-axis <0> speed <150>;
  78.                 turn head to x-axis <0> speed <150>;
  79.                 }
  80.                 turn turret to z-axis <0> now;
  81.                 turn armpivot to x-axis <-10> speed <150>;;
  82.                 turn torso to y-axis <0> speed <150>;
  83.                 turn head to z-axis <0> speed <150>;
  84.                 turn lloarm to x-axis <0> speed <150>;
  85.                 turn lloarm to y-axis <0> speed <150>;
  86.                 turn lloarm to z-axis <0> speed <150>;
  87.                 turn rpad to x-axis <0> speed <150>;
  88.                 turn lpad to x-axis <0> speed <150>;
  89.                
  90.                 turn lshol to x-axis <-29> speed <250>;
  91.                 turn lshol to y-axis <-19> speed <250>;
  92.                 turn lshol to z-axis <7> speed <250>;
  93.                 turn lelb to x-axis <57> speed <320>;
  94.                 turn lelb to y-axis <-7> speed <250>;
  95.                 turn lelb to z-axis <0> speed <250>;
  96.                 turn lhand to x-axis <-8> speed <250>;
  97.                 turn lhand to y-axis <5> speed <250>;
  98.                 turn lhand to z-axis <-4> speed <250>;
  99.                 turn rshol to x-axis <-40> speed <250>;
  100.                 turn rshol to y-axis <0> speed <250>;
  101.                 turn rshol to z-axis <-37> speed <250>;
  102.                 turn relb to x-axis <75> speed <250>;
  103.                 turn relb to y-axis <0> speed <250>;
  104.                 turn relb to z-axis <0> speed <250>;
  105.                 turn rhand to x-axis <0> speed <250>;
  106.                 turn rhand to y-axis <-20> speed <250>;
  107.                 turn rhand to z-axis <5> speed <250>;
  108.         }
  109.         sleep 200;
  110.         bAiming = 0;
  111.         }
  112. }
  113.  
  114. walk()
  115. {
  116.   if (down != 1 && buzy == 0)
  117.   {
  118.         if (runtype == 1)
  119.         {
  120.         turn torso to x-axis <45> now;
  121.         turn head to x-axis <-45> now;
  122.         turn head to z-axis <0> now;
  123.         }
  124.         if (runtype == 2)
  125.         {
  126.         turn torso to x-axis <20> now;
  127.         turn head to x-axis <-20> now;
  128.         turn head to z-axis <0> now;
  129.         }
  130.         if (runtype == 4)
  131.         {
  132.         turn torso to x-axis <0> now;
  133.         turn head to x-axis <0> now;
  134.         turn head to z-axis <0> now;
  135.         }
  136.         if( TRUE )
  137.         {
  138.                 turn turret to z-axis <0> now;
  139.                 turn armpivot to x-axis <-15> now;
  140.                 move pelvis to y-axis [0] now;
  141.                 turn rpad to x-axis <0> now;
  142.                 turn lpad to x-axis <0> now;
  143.                 turn rupleg to x-axis <5.670330> now;
  144.                 turn lupleg to x-axis <-26.467033> now;
  145.                 turn torso to y-axis <3.335165> now;
  146.                 turn lloleg to x-axis <26.967033> now;
  147.                 turn rloleg to x-axis <26.967033> now;
  148.                 turn rupfoot to x-axis <-19.824176> now;
  149.                 sleep (20 * (1 / runtype));
  150.         }
  151.         if( TRUE )
  152.         {
  153.                 turn rupleg to x-axis <-5.269231> now;
  154.                 turn lupleg to x-axis <-20.989011> now;
  155.                 turn torso to y-axis <1.681319> now;
  156.                 turn lloleg to x-axis <20.945055> now;
  157.                 turn rloleg to x-axis <41.368132> now;
  158.                 turn rupfoot to x-axis <-15.747253> now;
  159.                 sleep (18 * (1 / runtype));
  160.         }
  161.         if( TRUE )
  162.         {
  163.                 turn rupleg to x-axis <-9.071429> now;
  164.                 turn lupleg to x-axis <-12.670330> now;
  165.                 turn torso to y-axis <0> now;
  166.                 turn lloleg to x-axis <12.670330> now;
  167.                 turn rloleg to x-axis <43.571429> now;
  168.                 turn rupfoot to x-axis <-12.016484> now;
  169.                 sleep (10 * (1 / runtype));
  170.         }
  171.         if( TRUE )
  172.         {
  173.                 turn rupleg to x-axis <-21.357143> now;
  174.                 turn lupleg to x-axis <2.824176> now;
  175.                 turn torso to y-axis <-1.769231> now;
  176.                 turn lloleg to x-axis <3.560440> now;
  177.                 turn lupfoot to x-axis <-4.527473> now;
  178.                 turn rloleg to x-axis <52.505495> now;
  179.                 turn rupfoot to x-axis <0> now;
  180.                 sleep (10 * (1 / runtype));
  181.         }
  182.         if( TRUE )
  183.         {
  184.                 turn rupleg to x-axis <-35.923077> now;
  185.                 turn lupleg to x-axis <7.780220> now;
  186.                 turn torso to y-axis <-3.148352> now;
  187.                 turn lloleg to x-axis <8.203297> now;
  188.                 turn lupfoot to x-axis <-12.571429> now;
  189.                 turn rloleg to x-axis <54.390110> now;
  190.                 sleep (15 * (1 / runtype));
  191.         }
  192.         if( TRUE )
  193.         {
  194.                 turn rupleg to x-axis <-37.780220> now;
  195.                 turn lupleg to x-axis <10.137363> now;
  196.                 turn torso to y-axis <-4.203297> now;
  197.                 turn lloleg to x-axis <13.302198> now;
  198.                 turn lupfoot to x-axis <-16.714286> now;
  199.                 turn rloleg to x-axis <32.582418> now;
  200.                 sleep (15 * (1 / runtype));
  201.         }
  202.         if( TRUE )
  203.         {
  204.                 turn rupleg to x-axis <-28.758242> now;
  205.                 turn lupleg to x-axis <12.247253> now;
  206.                 turn torso to y-axis <-3.148352> now;
  207.                 turn lloleg to x-axis <19.659341> now;
  208.                 turn lupfoot to x-axis <-19.659341> now;
  209.                 turn rloleg to x-axis <28.758242> now;
  210.                 sleep (20 * (1 / runtype));
  211.         }
  212.         if( TRUE )
  213.         {
  214.                 turn rupleg to x-axis <-22.824176> now;
  215.                 turn lupleg to x-axis <2.824176> now;
  216.                 turn torso to y-axis <-1.879121> now;
  217.                 turn lloleg to x-axis <34.060440> now;
  218.                 turn rupfoot to x-axis <-6.313187> now;
  219.                 sleep (20 * (1 / runtype));
  220.         }
  221.         if( TRUE )
  222.         {
  223.                 turn rupleg to x-axis <-11.604396> now;
  224.                 turn lupleg to x-axis <-6.725275> now;
  225.                 turn torso to y-axis <0> now;
  226.                 turn lloleg to x-axis <39.401099> now;
  227.                 turn lupfoot to x-axis <-13.956044> now;
  228.                 turn rloleg to x-axis <19.005495> now;
  229.                 turn rupfoot to x-axis <-7.615385> now;
  230.                 sleep (20 * (1 / runtype));
  231.         }
  232.         if( TRUE )
  233.         {
  234.                 turn rupleg to x-axis <1.857143> now;
  235.                 turn lupleg to x-axis <-24.357143> now;
  236.                 turn torso to y-axis <1.879121> now;
  237.                 turn lloleg to x-axis <45.093407> now;
  238.                 turn lupfoot to x-axis <-7.703297> now;
  239.                 turn rloleg to x-axis <3.560440> now;
  240.                 turn rupfoot to x-axis <-4.934066> now;
  241.                 sleep (10 * (1 / runtype));
  242.         }
  243.         if( TRUE )
  244.         {
  245.                 turn rupleg to x-axis <7.148352> now;
  246.                 turn lupleg to x-axis <-28.181319> now;
  247.                 turn torso to y-axis <3.148352> now;
  248.                 turn rupfoot to x-axis <-9.813187> now;
  249.                 sleep (15 * (1 / runtype));
  250.         }
  251.         turn rupleg to x-axis <8.423077> now;
  252.         turn lupleg to x-axis <-32.060440> now;
  253.         turn torso to y-axis <4.203297> now;
  254.         turn lloleg to x-axis <27.527473> now;
  255.         turn lupfoot to x-axis <-2.857143> now;
  256.         turn rloleg to x-axis <24.670330> now;
  257.         turn rupfoot to x-axis <-33.313187> now;
  258.         sleep (20 * (1 / runtype));
  259.   }
  260. }
  261.  
  262. walklolegs()
  263. {
  264.   if (down != 1 && buzy == 0)
  265.   {
  266.         if( TRUE )
  267.         {
  268.                 turn turret to z-axis <0> now;
  269.                 move pelvis to y-axis [0] now;
  270.                 turn rupleg to x-axis <5.670330> now;
  271.                 turn lupleg to x-axis <-26.467033> now;
  272.                 turn lloleg to x-axis <26.967033> now;
  273.                 turn rloleg to x-axis <26.967033> now;
  274.                 turn rupfoot to x-axis <-19.824176> now;
  275.                 sleep (20 * (1 / runtype));
  276.         }
  277.         if( TRUE )
  278.         {
  279.                 turn rupleg to x-axis <-5.269231> now;
  280.                 turn lupleg to x-axis <-20.989011> now;
  281.                 turn lloleg to x-axis <20.945055> now;
  282.                 turn rloleg to x-axis <41.368132> now;
  283.                 turn rupfoot to x-axis <-15.747253> now;
  284.                 sleep (15 * (1 / runtype));
  285.         }
  286.         if( TRUE )
  287.         {
  288.                 turn rupleg to x-axis <-9.071429> now;
  289.                 turn lupleg to x-axis <-12.670330> now;
  290.                 turn lloleg to x-axis <12.670330> now;
  291.                 turn rloleg to x-axis <43.571429> now;
  292.                 turn rupfoot to x-axis <-12.016484> now;
  293.                 sleep (10 * (1 / runtype));
  294.         }
  295.         if( TRUE )
  296.         {
  297.                 turn rupleg to x-axis <-21.357143> now;
  298.                 turn lupleg to x-axis <2.824176> now;
  299.                 turn lloleg to x-axis <3.560440> now;
  300.                 turn lupfoot to x-axis <-4.527473> now;
  301.                 turn rloleg to x-axis <52.505495> now;
  302.                 turn rupfoot to x-axis <0> now;
  303.                 sleep (8 * (1 / runtype));
  304.         }
  305.         if( TRUE )
  306.         {
  307.                 turn rupleg to x-axis <-35.923077> now;
  308.                 turn lupleg to x-axis <7.780220> now;
  309.                 turn lloleg to x-axis <8.203297> now;
  310.                 turn lupfoot to x-axis <-12.571429> now;
  311.                 turn rloleg to x-axis <54.390110> now;
  312.                 sleep (10 * (1 / runtype));
  313.         }
  314.         if( TRUE )
  315.         {
  316.                 turn rupleg to x-axis <-37.780220> now;
  317.                 turn lupleg to x-axis <10.137363> now;
  318.                 turn lloleg to x-axis <13.302198> now;
  319.                 turn lupfoot to x-axis <-16.714286> now;
  320.                 turn rloleg to x-axis <32.582418> now;
  321.                 sleep (15 * (1 / runtype));
  322.         }
  323.         if( TRUE )
  324.         {
  325.                 turn rupleg to x-axis <-28.758242> now;
  326.                 turn lupleg to x-axis <12.247253> now;
  327.                 turn lloleg to x-axis <19.659341> now;
  328.                 turn lupfoot to x-axis <-19.659341> now;
  329.                 turn rloleg to x-axis <28.758242> now;
  330.                 sleep (20 * (1 / runtype));
  331.         }
  332.         if( TRUE )
  333.         {
  334.                 turn rupleg to x-axis <-22.824176> now;
  335.                 turn lupleg to x-axis <2.824176> now;
  336.                 turn lloleg to x-axis <34.060440> now;
  337.                 turn rupfoot to x-axis <-6.313187> now;
  338.                 sleep (15 * (1 / runtype));
  339.         }
  340.         if( TRUE )
  341.         {
  342.                 turn rupleg to x-axis <-11.604396> now;
  343.                 turn lupleg to x-axis <-6.725275> now;
  344.                 turn lloleg to x-axis <39.401099> now;
  345.                 turn lupfoot to x-axis <-13.956044> now;
  346.                 turn rloleg to x-axis <19.005495> now;
  347.                 turn rupfoot to x-axis <-7.615385> now;
  348.                 sleep (10 * (1 / runtype));
  349.         }
  350.         if( TRUE )
  351.         {
  352.                 turn rupleg to x-axis <1.857143> now;
  353.                 turn lupleg to x-axis <-24.357143> now;
  354.                 turn lloleg to x-axis <45.093407> now;
  355.                 turn lupfoot to x-axis <-7.703297> now;
  356.                 turn rloleg to x-axis <3.560440> now;
  357.                 turn rupfoot to x-axis <-4.934066> now;
  358.                 sleep (8 * (1 / runtype));
  359.         }
  360.         if( TRUE )
  361.         {
  362.                 turn rupleg to x-axis <7.148352> now;
  363.                 turn lupleg to x-axis <-28.181319> now;
  364.                 turn rupfoot to x-axis <-9.813187> now;
  365.                 sleep (10 * (1 / runtype));
  366.         }
  367.         turn rupleg to x-axis <8.423077> now;
  368.         turn lupleg to x-axis <-32.060440> now;
  369.         turn lloleg to x-axis <27.527473> now;
  370.         turn lupfoot to x-axis <-2.857143> now;
  371.         turn rloleg to x-axis <24.670330> now;
  372.         turn rupfoot to x-axis <-33.313187> now;
  373.         sleep (15 * (1 / runtype));
  374.        
  375.   }
  376. }
  377.  
  378. slither()
  379. {
  380.   if (down == 3 && buzy == 1)
  381.   {
  382.   set MAX_SPEED to ((regspeed / 8));
  383.   if( TRUE )
  384.         {
  385.         turn turret to z-axis <15> now;
  386.         turn relb to y-axis <15> now;
  387.         turn rhand to z-axis <90> now;
  388.         sleep 500;
  389.         }
  390.     if( TRUE )
  391.         {
  392.         turn turret to z-axis <15> now;
  393.         turn relb to y-axis <35> now;
  394.         turn lshol to x-axis <-37> now;
  395.         turn lelb to x-axis <56> now;
  396.         sleep 500;
  397.         }      
  398.          if( TRUE )
  399.         {
  400.         turn turret to z-axis <-15> now;
  401.         turn relb to y-axis <45> now;
  402.         turn lshol to x-axis <0> now;
  403.         turn lelb to x-axis <0> now;
  404.         sleep 500;
  405.         }
  406.         if( TRUE )
  407.         {
  408.         turn turret to z-axis <15> now;
  409.         turn relb to y-axis <35> now;
  410.         turn lshol to x-axis <-37> now;
  411.         turn lelb to x-axis <56> now;
  412.         sleep 500;
  413.         }
  414.   turn turret to z-axis <0> now;
  415.   }
  416. }
  417.  
  418. sit()
  419. {
  420. var seating;  //different kind of busy
  421. var transid;
  422. transid = get 94; //TRANSPORT_ID
  423. seating = get 100(transid); //cobid
  424. loaded = 1;
  425. if (seating == 101)
  426.         {
  427.         buzy = 2;
  428.         //clean up arm
  429.                 turn rloarm to x-axis <0> now;
  430.                 turn rloarm to y-axis <0> now;
  431.                 turn rloarm to z-axis <0> now; 
  432.                 turn ruparm to x-axis <0> now;
  433.                 turn ruparm to y-axis <0> now;
  434.                 turn ruparm to z-axis <0> now;
  435.                 turn rshol to x-axis <0> now;
  436.                 turn rshol to y-axis <0> now;
  437.                 turn rshol to z-axis <0> now;  
  438.                 turn rhand to y-axis <0> now;
  439.                 turn rhand to z-axis <0> now;                  
  440.                 turn lloarm to x-axis <0> now;
  441.                 turn lloarm to y-axis <0> now;
  442.                 turn lloarm to z-axis <0> now;
  443.                 turn lshol to x-axis <0> now;
  444.                 turn lshol to y-axis <0> now;
  445.                 turn lshol to z-axis <0> now;
  446.                 turn lhand to y-axis <0> now;
  447.                 turn lhand to z-axis <0> now;
  448.         turn pelvis to x-axis <-20> now;
  449.         turn turret to x-axis <20> now;
  450.         turn rupleg to x-axis <-50> now;
  451.         turn lupleg to x-axis <-50> now;
  452.         turn armpivot to x-axis <-40> now;
  453.         turn lelb to x-axis <37> now;
  454.         turn lelb to y-axis <-50> now;
  455.         turn lelb to z-axis <28> now;
  456.         turn lhand to x-axis <-32> now;
  457.         turn relb to x-axis <37> now;
  458.         turn relb to y-axis <50> now;
  459.         turn relb to z-axis <-28> now;
  460.         turn rhand to x-axis <-32> now;
  461.         hide gun1;
  462.         hide mag1;
  463.         hide mag2;
  464.         hide pistol1;
  465.         hide sword1;
  466.         show swordx;
  467.         show pistolx;
  468.         show gunx;
  469.         show magx;
  470.         turn gunx to x-axis <20> now;
  471.         turn gunx to y-axis <-35> now;
  472.         turn gunx to z-axis <-30> now;
  473.         }
  474.        
  475. if (seating == 102)
  476.         {
  477.         buzy = 0;
  478.         down = 1; //not too busy to shoot
  479.         set MAX_SPEED to 1;
  480.         set ARMORED to 1;
  481. set 85 to (reglos / 2);
  482. turn pelvis to x-axis <0> now;
  483. turn pelvis to y-axis <0> now;
  484. turn pelvis to y-axis <0> now;
  485. turn turret to x-axis <0> now;
  486. turn turret to y-axis <0> now;
  487. turn turret to y-axis <0> now;
  488. turn armpivot to x-axis <0> now;
  489. move pelvis to y-axis [-3.50000] now;
  490. move pelvis to z-axis [1.00000] now;
  491. turn lupleg to x-axis <-80> now;
  492. turn lloleg to x-axis <80> now;
  493. turn rloleg to x-axis <66> now;
  494. turn rupfoot to x-axis <68> now;       
  495.         }
  496. sleep 5;
  497. }
  498.  
  499. stand()
  500. {
  501.         //in knee
  502. move pelvis to y-axis [-3.50000] now;
  503. move pelvis to z-axis [1.00000] now;
  504. turn lupleg to x-axis <-80> now;
  505. turn lloleg to x-axis <80> now;
  506. turn rupleg to x-axis <10> now;
  507. turn rloleg to x-axis <66> now;
  508. turn rupfoot to x-axis <68> now;
  509.                 //clean up upper body
  510.         turn pelvis to x-axis <0> now;
  511.         turn pelvis to y-axis <0> now;
  512.         turn pelvis to y-axis <0> now;
  513.         turn turret to x-axis <0> now;
  514.         turn turret to y-axis <0> now;
  515.         turn turret to y-axis <0> now;
  516.         turn gunx to x-axis <0> now;
  517.         turn gunx to y-axis <0> now;
  518.         turn gunx to z-axis <0> now;
  519.                 turn relb to x-axis <0> now;
  520.                 turn relb to y-axis <0> now;
  521.                 turn relb to x-axis <0> now;
  522.                 turn rloarm to x-axis <0> now;
  523.                 turn rloarm to y-axis <0> now;
  524.                 turn rloarm to z-axis <0> now;
  525.                 turn rshol to x-axis <0> now;
  526.                 turn rshol to y-axis <0> now;
  527.                 turn rshol to z-axis <0> now;
  528.                 turn rhand to x-axis <0> now;
  529.                 turn rhand to y-axis <0> now;
  530.                 turn rhand to z-axis <0> now;          
  531.                 turn lelb to x-axis <0> now;
  532.                 turn lelb to y-axis <0> now;
  533.                 turn lelb to x-axis <0> now;
  534.                 turn lloarm to x-axis <0> now;
  535.                 turn lloarm to y-axis <0> now;
  536.                 turn lloarm to z-axis <0> now;
  537.                 turn lshol to x-axis <0> now;
  538.                 turn lshol to y-axis <0> now;
  539.                 turn lshol to x-axis <0> now;
  540.                 turn lhand to x-axis <0> now;
  541.                 turn lhand to y-axis <0> now;
  542.                 turn lhand to z-axis <0> now;
  543.                 sleep 1;
  544. if ((pistol == 0) && (sready == 0))
  545.         {
  546.                 turn turret to y-axis <0> now;
  547.                 turn armpivot to x-axis <-15> now;
  548.                 turn lelb to x-axis <41> now;
  549.                 turn lelb to y-axis <-10> now;
  550.                 turn lelb to z-axis <105> now;
  551.                 turn lhand to x-axis <24> now;
  552.                 turn lhand to y-axis <-4> now;
  553.                 turn lhand to z-axis <-4> now;
  554.                 turn relb to x-axis <20> now;
  555.                 turn relb to y-axis <58> now;
  556.                 turn relb to z-axis <-22> now;
  557.                 hide gunx;
  558.                 hide magx;
  559.                 show gun1;
  560.                 show mag1;
  561.                 }
  562. if ((pistol != 0) && (sready == 0))
  563.         {      
  564.                 turn lshol to x-axis <-29> speed <250>;
  565.                 turn lshol to y-axis <-19> speed <250>;
  566.                 turn lshol to z-axis <7> speed <250>;
  567.                 turn lelb to x-axis <57> speed <320>;
  568.                 turn lelb to y-axis <-7> speed <250>;
  569.                 turn lelb to z-axis <0> speed <250>;
  570.                 turn lhand to x-axis <-8> speed <250>;
  571.                 turn lhand to y-axis <5> speed <250>;
  572.                 turn lhand to z-axis <-4> speed <250>;
  573.                 turn rshol to x-axis <-40> speed <250>;
  574.                 turn rshol to y-axis <0> speed <250>;
  575.                 turn rshol to z-axis <-37> speed <250>;
  576.                 turn relb to x-axis <75> speed <250>;
  577.                 turn relb to y-axis <0> speed <250>;
  578.                 turn relb to z-axis <0> speed <250>;
  579.                 turn rhand to x-axis <0> speed <250>;
  580.                 turn rhand to y-axis <-20> speed <250>;
  581.                 turn rhand to z-axis <5> speed <250>;
  582.                 show pistol1;
  583.                 hide pistolx;
  584.         }      
  585. if (sready == 1)
  586.         {
  587.                 turn lshol to x-axis <-25> now;
  588.                 turn lshol to y-axis <-57> now;
  589.                 turn lshol to z-axis <0> now;
  590.                 turn lelb to x-axis <37> now;
  591.                 turn lelb to y-axis <10> now;
  592.                 turn lelb to z-axis <0> now;
  593.                 turn lhand to x-axis <-38> now;
  594.                 turn lhand to y-axis <17> now;
  595.                 turn lhand to z-axis <0> now;
  596.                 turn rshol to x-axis <-26> now;
  597.                 turn rshol to y-axis <0> now;
  598.                 turn rshol to z-axis <0> now;
  599.                 turn relb to x-axis <32> now;
  600.                 turn relb to y-axis <33> now;
  601.                 turn relb to z-axis <0> now;           
  602.                 turn rhand to x-axis <-30> now;
  603.                 turn rhand to y-axis <-19> now;
  604.                 turn rhand to z-axis <0> now;
  605.                 sleep 300;
  606.         }      
  607. sleep 80;
  608. move pelvis to y-axis [-2.300000] now;
  609. move pelvis to z-axis [0.600000] now;
  610. turn lupleg to x-axis <-50> now;
  611. turn lloleg to x-axis <50> now;
  612. turn lupfoot to y-axis <0> now;
  613. turn lupfoot to x-axis <0> now;
  614. turn rloleg to x-axis <60> now;
  615. sleep 80;
  616. turn pelvis to x-axis <0> now;
  617. move pelvis to y-axis [-1.300000] now;
  618. turn lupleg to x-axis <-30> now;
  619. turn lloleg to x-axis <30> now;
  620. turn lupfoot to x-axis <0> now;
  621. turn rupleg to x-axis <10> now;
  622. turn rloleg to x-axis <30> now;
  623. turn rupfoot to x-axis <-30> now;
  624. sleep 80;
  625. turn pelvis to x-axis <0> now;
  626. move pelvis to y-axis [0.00000] now;
  627. move pelvis to z-axis [0.000000] now;
  628. turn lupleg to x-axis <0> now;
  629. turn lloleg to x-axis <0> now;
  630. turn lupfoot to x-axis <0> now;
  631. turn rupleg to x-axis <0> now;
  632. turn rloleg to x-axis <0> now;
  633. turn rupfoot to x-axis <0> now;
  634. sleep 60;
  635. down = 0;
  636. set ARMORED to 0;
  637. set 85 to reglos;
  638.                 if (runtype == 1)
  639.                                 {
  640.                                 set MAX_SPEED to slowspeed;
  641.                                 }
  642.                         if (runtype == 4)
  643.                                 {
  644.                                 set MAX_SPEED to fastSpeed;
  645.                                 }
  646.                         if (runtype == 2)
  647.                                 {
  648.                                 set MAX_SPEED to regspeed;
  649.                                 }
  650. }
  651.  
  652. kneel()
  653. {
  654. set MAX_SPEED to 1;
  655. set 85 to ((reglos * 4) / 5);
  656. down = 1;
  657. sleep 500;
  658. turn pelvis to x-axis <0> now;
  659. move pelvis to y-axis [0.000000] now;
  660. move pelvis to z-axis [0.000000] now;
  661. turn lupleg to x-axis <0> now;
  662. turn lloleg to x-axis <0> now;
  663. turn lupfoot to x-axis <0> now;
  664. turn rupleg to x-axis <0> now;
  665. turn rloleg to x-axis <0> now;
  666. turn rupfoot to x-axis <0> now;
  667. sleep 80;
  668. turn pelvis to x-axis <0> now;
  669. move pelvis to y-axis [-1.200000] now;
  670. turn lupleg to x-axis <-30> now;
  671. turn lloleg to x-axis <30> now;
  672. turn lupfoot to x-axis <0> now;
  673. turn rupleg to x-axis <10> now;
  674. turn rloleg to x-axis <30> now;
  675. turn rupfoot to x-axis <-30> now;
  676. sleep 80;
  677. move pelvis to y-axis [-2.300000] now;
  678. move pelvis to z-axis [0.600000] now;
  679. turn lupleg to x-axis <-50> now;
  680. turn lloleg to x-axis <50> now;
  681. turn lupfoot to y-axis <0> now;
  682. turn lupfoot to x-axis <0> now;
  683. turn rloleg to x-axis <60> now;
  684. sleep 80;
  685. move pelvis to y-axis [-3.50000] now;
  686. move pelvis to z-axis [1.00000] now;
  687. turn lupleg to x-axis <-80> now;
  688. turn lloleg to x-axis <80> now;
  689. turn rloleg to x-axis <56> now;  //was 66
  690. turn rupfoot to x-axis <48> now;  //was 68
  691. sleep 100;
  692. set ARMORED to 1;
  693. }
  694.  
  695. jumpup()
  696. {
  697.         //get up
  698.                 turn turret to z-axis <0> now;
  699.                 turn rhand to z-axis <90> now;
  700.                 turn relb to y-axis <35> now;
  701.                 turn lshol to x-axis <0> now;
  702.                 turn lelb to x-axis <0> now;
  703.                 sleep 300;
  704.                 move pelvis to y-axis [-6] now;
  705.                 move pelvis to z-axis [4] now;
  706.                 turn pelvis to x-axis <65> now;
  707.                 turn armpivot to x-axis <-45> now;
  708.                 turn lpad to x-axis <-25> now;
  709.                 turn rpad to x-axis <-25> now;
  710.                 turn turret to x-axis <-15> now;
  711.                 turn lelb to x-axis <50> now;
  712.                 turn relb to x-axis <46> now;
  713.                 turn rhand to x-axis <-47> now;
  714.                 turn lloleg to x-axis <15> now;
  715.                 turn rloleg to x-axis <15> now;
  716.                 turn gunx to x-axis <-20> now;
  717.                 sleep 200;
  718.                 move pelvis to y-axis [-5] now;
  719.                 move pelvis to z-axis [3] now; 
  720.                 turn pelvis to x-axis <57> now;
  721.                 turn armpivot to x-axis <-36> now;
  722.                 turn turret to x-axis <-5> now;
  723.                 turn lupleg to x-axis <-71> now;
  724.                 turn lloleg to x-axis <88> now;
  725.                 turn gunx to x-axis <-50> now;
  726.                 sleep 100;
  727.                 move pelvis to y-axis [-4] now;
  728.                 move pelvis to y-axis [2] now; 
  729.                 turn pelvis to x-axis <45> now;
  730.                 turn pelvis to z-axis <-18> now;       
  731.                 turn gunx to x-axis <-80> now;
  732.                 turn armpivot to x-axis <-49> now;
  733.                 turn llofoot to x-axis <0> now;
  734.                 turn lupleg to x-axis <-125> now;
  735.                 turn lloleg to x-axis <76> now;
  736.                 turn rupleg to x-axis <-10> now;
  737.                 turn rloleg to x-axis <28> now;
  738.                 turn rlofoot to x-axis <30> now;
  739.                 turn rhand to x-axis <-9> now;
  740.                 sleep 100;
  741.                 move pelvis to y-axis [-3.5] now;      
  742.                 move pelvis to y-axis [1] now;
  743.                 turn pelvis to x-axis <0> now; 
  744.                 turn pelvis to z-axis <0> now;
  745.                 turn turret to x-axis <0> now; 
  746.                 turn armpivot to x-axis <-10> now;
  747.                 turn lpad to x-axis <-5> now;
  748.                 turn lpad to x-axis <-5> now;          
  749.                 turn torso to y-axis <0> now;
  750.                 turn head to z-axis <0> now;
  751.                 turn lloarm to x-axis <0> now;
  752.                 turn lloarm to y-axis <0> now;
  753.                 turn lloarm to z-axis <0> now;
  754.                 turn lupleg to x-axis <-80> now;
  755.                 turn lloleg to x-axis <80> now;
  756.                 turn rupleg to x-axis <20> now;
  757.                 turn rloleg to x-axis <35> now;
  758.                 turn rupfoot to x-axis <68> now;
  759.                 turn lshol to x-axis <0> now;
  760.                 turn lelb to x-axis <0> now;
  761.                 turn relb to x-axis <0> now;
  762.                 turn relb to y-axis <0> now;
  763.                 turn rhand to x-axis <0> now;
  764.                 turn rhand to z-axis <0> now;
  765.                 sleep 100;               
  766.                  // from kneel
  767.                 turn head to x-axis <-5> now;
  768.                 turn rpad to x-axis <0> now;
  769.                 turn lpad to x-axis <0> now;
  770.                 move pelvis to y-axis [-3.50000] now;
  771.                 move pelvis to z-axis [1.00000] now;
  772.                 turn lupleg to x-axis <-80> now;
  773.                 turn lloleg to x-axis <80> now;
  774.                 turn rloleg to x-axis <66> now;
  775.                 turn rupfoot to x-axis <68> now;
  776.                 sleep 100;
  777.                 move pelvis to y-axis [-2.300000] now;
  778.                 move pelvis to z-axis [0.600000] now;
  779.                 turn lupleg to x-axis <-50> now;
  780.                 turn lloleg to x-axis <50> now;
  781.                 turn lupfoot to y-axis <0> now;
  782.                 turn lupfoot to x-axis <0> now;
  783.                 turn rloleg to x-axis <60> now;
  784.                 sleep 100;
  785.                 turn pelvis to x-axis <0> now;
  786.                 move pelvis to y-axis [-1.300000] now;
  787.                 turn lupleg to x-axis <-30> now;
  788.                 turn lloleg to x-axis <30> now;
  789.                 turn lupfoot to x-axis <0> now;
  790.                 turn rupleg to x-axis <10> now;
  791.                 turn rloleg to x-axis <30> now;
  792.                 turn rupfoot to x-axis <-30> now;
  793.                 sleep 100;
  794.                 turn pelvis to x-axis <0> now;
  795.                 move pelvis to y-axis [0.00000] now;
  796.                 move pelvis to z-axis [0.000000] now;
  797.                 turn lupleg to x-axis <0> now;
  798.                 turn lloleg to x-axis <0> now;
  799.                 turn lupfoot to x-axis <0> now;
  800.                 turn rupleg to x-axis <0> now;
  801.                 turn rloleg to x-axis <0> now;
  802.                 turn rupfoot to x-axis <0> now;
  803.                 //clean up arms
  804.                 turn relb to x-axis <0> now;
  805.                 turn relb to y-axis <0> now;
  806.                 turn relb to z-axis <0> now;
  807.                 turn rloarm to x-axis <0> now;
  808.                 turn rloarm to y-axis <0> now;
  809.                 turn rloarm to z-axis <0> now;
  810.                 turn rshol to x-axis <0> now;
  811.                 turn rshol to y-axis <0> now;
  812.                 turn rshol to z-axis <0> now;
  813.                 turn rhand to x-axis <0> now;
  814.                 turn rhand to y-axis <0> now;
  815.                 turn rhand to z-axis <0> now;          
  816.                 turn lelb to x-axis <0> now;
  817.                 turn lelb to y-axis <0> now;
  818.                 turn lelb to z-axis <0> now;
  819.                 turn lloarm to x-axis <0> now;
  820.                 turn lloarm to y-axis <0> now;
  821.                 turn lloarm to z-axis <0> now;
  822.                 turn lshol to x-axis <0> now;
  823.                 turn lshol to y-axis <0> now;
  824.                 turn lshol to z-axis <0> now;
  825.                 turn lhand to x-axis <0> now;
  826.                 turn lhand to y-axis <0> now;
  827.                 turn lhand to z-axis <0> now;
  828.                 turn gunx to x-axis <0> now;
  829.                 sleep 500;
  830.                 if (pistol ==0)
  831.                         {
  832.                         turn turret to y-axis <0> speed <150>;
  833.                         turn armpivot to x-axis <-15> speed <150>;
  834.                         turn lelb to x-axis <40> speed <150>;
  835.                         turn lelb to y-axis <-31> speed <150>;
  836.                         turn lelb to z-axis <64> speed <150>;
  837.                         turn lhand to x-axis <13> speed <150>;
  838.                         turn lhand to y-axis <-21> speed <150>;
  839.                         turn lhand to z-axis <-2> speed <150>;
  840.                         turn relb to x-axis <20> speed <150>;
  841.                         turn relb to y-axis <58> speed <150>;
  842.                         turn relb to z-axis <-22> speed <150>;
  843.                         }
  844.                 if (pistol != 0)
  845.                         {
  846.                 turn lshol to x-axis <-29> speed <250>;
  847.                 turn lshol to y-axis <-19> speed <250>;
  848.                 turn lshol to z-axis <7> speed <250>;
  849.                 turn lelb to x-axis <57> speed <320>;
  850.                 turn lelb to y-axis <-7> speed <250>;
  851.                 turn lelb to z-axis <0> speed <250>;
  852.                 turn lhand to x-axis <-8> speed <250>;
  853.                 turn lhand to y-axis <5> speed <250>;
  854.                 turn lhand to z-axis <-4> speed <250>;
  855.                 turn rshol to x-axis <-40> speed <250>;
  856.                 turn rshol to y-axis <0> speed <250>;
  857.                 turn rshol to z-axis <-37> speed <250>;
  858.                 turn relb to x-axis <75> speed <250>;
  859.                 turn relb to y-axis <0> speed <250>;
  860.                 turn relb to z-axis <0> speed <250>;
  861.                 turn rhand to x-axis <0> speed <250>;
  862.                 turn rhand to y-axis <-20> speed <250>;
  863.                 turn rhand to z-axis <5> speed <250>;
  864.                         }
  865.                  ohnoes = 0;
  866.                  buzy = 0;
  867.                  down = 0;
  868.                  set ARMORED to 0;
  869.                  set 85 to reglos;
  870.                                         if (runtype == 1)
  871.                                         {
  872.                                         set MAX_SPEED to slowspeed;
  873.                                         }
  874.                                 if (runtype == 4)
  875.                                         {
  876.                                         set MAX_SPEED to fastSpeed;
  877.                                         }
  878.                                 if (runtype == 2)
  879.                                         {
  880.                                         set MAX_SPEED to regspeed;
  881.                                         }
  882. }
  883.  
  884. cover()
  885. {
  886. if (buzy == 1 && dead == 0)
  887.         {
  888.                 set ARMORED to 1;
  889.                 set 85 to (reglos / 2);
  890.                 set MAX_SPEED to ((regspeed / 8));
  891.                 //face forward
  892.                 turn turret to y-axis <0> now;
  893.                 turn turret to x-axis <0> now;
  894.                 turn torso to x-axis <0> now;
  895.                 turn torso to y-axis <0> now;
  896.                 turn pelvis to x-axis <0> now;
  897.                 turn pelvis to y-axis <0> now;                         
  898.                 turn armpivot to x-axis <0> now;
  899.                 //clean up arms
  900.                 turn relb to x-axis <0> now;
  901.                 turn relb to y-axis <0> now;
  902.                 turn relb to z-axis <0> now;
  903.                 turn rloarm to x-axis <0> now;
  904.                 turn rloarm to y-axis <0> now;
  905.                 turn rloarm to z-axis <0> now;
  906.                 turn rshol to x-axis <0> now;
  907.                 turn rshol to y-axis <0> now;
  908.                 turn rshol to z-axis <0> now;
  909.                 turn rhand to x-axis <0> now;
  910.                 turn rhand to y-axis <0> now;
  911.                 turn rhand to z-axis <0> now;          
  912.                 turn lelb to x-axis <0> now;
  913.                 turn lelb to y-axis <0> now;
  914.                 turn lelb to z-axis <0> now;
  915.                 turn lloarm to x-axis <0> now;
  916.                 turn lloarm to y-axis <0> now;
  917.                 turn lloarm to z-axis <0> now;
  918.                 turn lshol to x-axis <0> now;
  919.                 turn lshol to y-axis <0> now;
  920.                 turn lshol to z-axis <0> now;
  921.                 turn lhand to x-axis <0> now;
  922.                 turn lhand to y-axis <0> now;
  923.                 turn lhand to z-axis <0> now;          
  924.                 //clean        
  925.                 sleep 500;
  926.                 //fall over
  927.                 move pelvis to y-axis [-6.5] now;
  928.                 move pelvis to z-axis [5.00000] now;
  929.                 turn pelvis to x-axis <85> speed <300>;
  930.                 turn armpivot to x-axis <-89> now;
  931.                 turn head to x-axis <-55> now;
  932.                                 turn lloarm to x-axis <0> now;
  933.                                 turn lloarm to y-axis <0> now;
  934.                                 turn lloarm to z-axis <0> now;
  935.                                 turn lshol to x-axis <0> now;
  936.                                 turn lshol to y-axis <0> now;
  937.                                 turn rshol to x-axis <0> now;
  938.                                 turn rshol to y-axis <0> now;
  939.                                 turn rhand to x-axis <0> now;
  940.                                 turn rhand to y-axis <0> now;
  941.                                 turn rhand to z-axis <0> now;
  942.                                 turn rpad to x-axis <-55> now;
  943.                                 turn lpad to x-axis <-55> now;
  944.                 turn lupleg to x-axis <0> now;
  945.                 turn lloleg to x-axis <-10> now;
  946.                 turn lupfoot to x-axis <0> now;
  947.                 turn rupleg to x-axis <0> now;
  948.                 turn rloleg to x-axis <-10> now;
  949.                 turn rupfoot to x-axis <0> now;
  950.                 turn rlofoot to x-axis <30> now;
  951.                 turn llofoot to x-axis <30> now;
  952.                 sleep 200;
  953.                 wait-for-turn pelvis around x-axis;
  954.                 down = 3;
  955.                 sleep 1000;
  956.                 while (ohnoes > 39)
  957.                         {
  958.                         ohnoes = ohnoes - 2;
  959.                         sleep 500;
  960.                         }
  961.                 if (ohnoes < 40)
  962.                                  {
  963.                                  call-script jumpup();
  964.                                  }     
  965.                 sleep 800;     
  966.         }
  967.         return 0;
  968. }
  969.  
  970. InitState()
  971. {
  972.         statechg_DesiredState = TRUE;
  973.         statechg_StateChanging = FALSE;
  974. }
  975.  
  976. MotionControl(moving, aiming, justmoved)
  977. {
  978.         while( get BUILD_PERCENT_LEFT )
  979.         {
  980.                 sleep 800;
  981.         }
  982.         call-script stand();  //what
  983.         justmoved = TRUE;
  984.         while( TRUE )
  985.         {
  986.                 moving = bMoving;
  987.                 aiming = bAiming;
  988.         if ((stance == 0) && (loaded == 0))
  989.                 {
  990.                 buzy = 2;
  991.                 call-script sit();
  992.                 }
  993.         if ((stance != 0) && (loaded == 1))
  994.                 {
  995.                 buzy = 0; //stop being buz2
  996.                 loaded = 0;
  997.                 call-script stand();
  998.                 }
  999.         if( (moving == 1) && (down == 1) && (stance != 0) && (buzy != 2))
  1000.                                 {
  1001.                                 call-script stand();
  1002.                                 }
  1003.                                 else
  1004.                 if( moving )
  1005.                 {
  1006.                          if (down == 0)
  1007.                                 {
  1008.                                 if (runtype == 1)
  1009.                                         {
  1010.                                         set MAX_SPEED to slowspeed;
  1011.                                         }
  1012.                                 if (runtype == 4)
  1013.                                         {
  1014.                                         set MAX_SPEED to fastSpeed;
  1015.                                         }
  1016.                                 if (runtype == 2)
  1017.                                         {
  1018.                                         set MAX_SPEED to regspeed;
  1019.                                         }
  1020.                                 }
  1021.                         if( buzy == 1 )
  1022.                         {
  1023.                                 Static_Var_3 = 1;
  1024.                                 call-script slither();
  1025.                         }
  1026.                         if( aiming && buzy == 0)
  1027.                         {
  1028.                                 Static_Var_3 = 1;
  1029.                                 call-script walklolegs();
  1030.                         }
  1031.                         if( !aiming && buzy ==0)
  1032.                         {
  1033.                                 Static_Var_3 = 0;
  1034.                                 call-script walk();
  1035.                         }
  1036.                         justmoved = TRUE;
  1037.                 }
  1038.                 if( !moving )
  1039.                 {
  1040.                         Static_Var_3 = 1;
  1041.                         if( justmoved && buzy == 0)
  1042.                         {
  1043.                                 turn rupleg to x-axis <0> speed <200.071429>;
  1044.                                 turn rloleg to x-axis <0> speed <200.071429>;
  1045.                                 turn rupfoot to x-axis <0> speed <200.071429>;
  1046.                                 turn lupleg to x-axis <0> speed <200.071429>;
  1047.                                 turn lloleg to x-axis <0> speed <200.071429>;
  1048.                                 turn lupfoot to x-axis <0> speed <200.071429>;
  1049.                                 if( !aiming )
  1050.                                 {
  1051.                                         turn torso to y-axis <0> speed <90.027473>;
  1052.                                 }
  1053.                                 justmoved = FALSE;
  1054.                         }
  1055.                         sleep 50;
  1056.                 }
  1057.                 sleep 200;  //has to be low?
  1058.         }
  1059. }
  1060.  
  1061. Create()
  1062. {
  1063.         hide flare;
  1064.         hide cut;
  1065.         hide pflare;
  1066.         hide shell;
  1067.         hide pistol1;
  1068.         hide sword1;
  1069.         hide gunx;
  1070.         hide magx;
  1071.         hide mag2;     
  1072.         sout = 0;
  1073.         sready = 0;
  1074.         bullets = 40;     ////////change per weapon system
  1075.         ammunition = 8;
  1076.         pistol = 0;
  1077.         runtype = 2;
  1078.         aimtype = 1;
  1079.         down = 0;
  1080.         dead = 0;
  1081.         buzy = 0;
  1082.         bMoving = FALSE;
  1083.         bAiming = 0;
  1084.         set ARMORED to 0;
  1085.         Static_Var_3 = 1;
  1086.         loaded = 0;
  1087.         stance = 99;
  1088.         reglos = get 85; //los
  1089.         restore_delay = 2000;
  1090.         FastSpeed = (get MAX_SPEED);
  1091.         RegSpeed = ((get MAX_SPEED)/2);
  1092.         SlowSpeed = ((get MAX_SPEED)/4);
  1093.         start-script MotionControl();
  1094.         call-script InitState();
  1095.         set 1025 to 100;
  1096.         sleep 200;
  1097.                 turn armpivot to x-axis <-15> now;
  1098.                 turn lelb to x-axis <41> now;
  1099.                 turn lelb to y-axis <-10> now;
  1100.                 turn lelb to z-axis <105> now;
  1101.                 turn lhand to x-axis <24> now;
  1102.                 turn lhand to y-axis <-4> now;
  1103.                 turn lhand to z-axis <-4> now;
  1104.                 turn relb to x-axis <20> now;
  1105.                 turn relb to y-axis <58> now;
  1106.                 turn relb to z-axis <-22> now;
  1107. }
  1108.  
  1109. StartMoving()
  1110. {      
  1111.         bMoving = TRUE;
  1112.         if (down == 1 && buzy == 0)
  1113.                 {
  1114.                 call-script stand();
  1115.                 }
  1116. }
  1117.  
  1118. StopMoving()
  1119. {
  1120.         bMoving = FALSE;
  1121.         if (runtype == 1 && buzy == 0)
  1122.         {
  1123.         sleep 500;
  1124.         if (bMoving == FALSE)
  1125.                 {
  1126.                 call-script kneel();
  1127.                 }
  1128.         }      
  1129. }
  1130.  
  1131.  
  1132. setSFXoccupy(type)
  1133. {
  1134. stance = type;
  1135. }
  1136.  
  1137. QueryNanoPiece(piecenum)
  1138. {
  1139.         piecenum = rhand;
  1140. }
  1141.  
  1142. ToPistol()
  1143. {
  1144. //set up stance
  1145.         while (buzy != 0)
  1146.         {
  1147.         sleep 800;
  1148.         }
  1149.         pistol = 8; //stop dancing
  1150.         turn head to x-axis <0> speed <150>;
  1151.                 turn torso to y-axis <0> speed <150>;
  1152.                 turn head to z-axis <0> speed <150>;
  1153.                 turn lloarm to x-axis <0> speed <150>;
  1154.                 turn lloarm to y-axis <0> speed <150>;
  1155.                 turn lloarm to z-axis <0> speed <150>;
  1156.                 turn lshol to x-axis <0> speed <150>;
  1157.                 turn lshol to y-axis <0> speed <150>;
  1158.                 turn rshol to x-axis <0> speed <150>;
  1159.                 turn rshol to y-axis <0> speed <150>;
  1160.                 turn rhand to x-axis <0> speed <150>;
  1161.                 turn rhand to y-axis <0> speed <150>;
  1162.                 turn rhand to z-axis <0> speed <150>;
  1163.                 turn rpad to x-axis <0> speed <150>;
  1164.                 turn lpad to x-axis <0> speed <150>;
  1165.                 //set up
  1166.                 turn turret to y-axis <0> speed <150>;
  1167.                 turn armpivot to x-axis <-15> speed <150>;
  1168.                 turn lelb to x-axis <40> speed <150>;
  1169.                 turn lelb to y-axis <-31> speed <150>;
  1170.                 turn lelb to z-axis <64> speed <150>;
  1171.                 turn lhand to x-axis <13> speed <150>;
  1172.                 turn lhand to y-axis <-21> speed <150>;
  1173.                 turn lhand to z-axis <-2> speed <150>;
  1174.                 turn relb to x-axis <20> speed <150>;
  1175.                 turn relb to y-axis <58> speed <150>;
  1176.                 turn relb to z-axis <-22> speed <150>;
  1177.         sleep 500;
  1178.                 turn lhand to x-axis <44> speed <150>;
  1179.                 turn lhand to z-axis <-37> speed <150>;
  1180.                 turn lshol to x-axis <26> speed <150>;
  1181.         sleep 200;
  1182.                 hide gun1;
  1183.                 hide mag1;
  1184.                 hide mag2;
  1185.                 show gunx;
  1186.                 show magx;
  1187.         sleep 200;
  1188.                 turn lshol to x-axis <39> speed <250>;
  1189.                 turn lshol to y-axis <38> speed <250>;
  1190.                 turn lshol to z-axis <-15> speed <250>;
  1191.                 turn lelb to x-axis <14> speed <250>;
  1192.                 turn lelb to z-axis <101> speed <250>;
  1193.                 turn rshol to x-axis <24> speed <250>;
  1194.                 turn rshol to z-axis <25> speed <250>;
  1195.                 turn rhand to x-axis <51> speed <250>;
  1196.                 turn rhand to y-axis <-16> speed <250>;
  1197.                 turn rhand to z-axis <-17> speed <250>;
  1198.         sleep 200;
  1199.                 hide pistolx;
  1200.                 show pistol1;
  1201.                 turn rshol to x-axis <56> speed <250>;
  1202.                 turn relb to x-axis <-9> speed <150>;
  1203.                 turn relb to y-axis <33> speed <250>;
  1204.                 turn relb to z-axis <-1> speed <150>;
  1205.                 turn lshol to x-axis <24> speed <250>;
  1206.                 turn lshol to y-axis <-21> speed <250>;
  1207.                 turn lshol to z-axis <-7> speed <250>;
  1208.         sleep 200;
  1209.                 turn lshol to x-axis <24> speed <250>;
  1210.                 turn lshol to z-axis <-7> speed <250>;
  1211.                 turn rshol to x-axis <-2> speed <250>;
  1212.                 turn rshol to z-axis <-14> speed <250>;
  1213.                 turn relb to x-axis <20> speed <150>;
  1214.                 turn rhand to x-axis <23> speed <250>;
  1215.                 turn rhand to z-axis <5> speed <250>;
  1216.         sleep 200;     
  1217.                 turn lshol to x-axis <-29> speed <250>;
  1218.                 turn lshol to y-axis <-19> speed <250>;
  1219.                 turn lshol to z-axis <7> speed <250>;
  1220.                 turn lelb to x-axis <57> speed <250>;
  1221.                 turn lelb to y-axis <-7> speed <250>;
  1222.                 turn lelb to z-axis <0> speed <250>;
  1223.                 turn lhand to x-axis <-8> speed <250>;
  1224.                 turn lhand to y-axis <5> speed <250>;
  1225.                 turn lhand to z-axis <-4> speed <250>;
  1226.                 turn rshol to x-axis <-40> speed <250>;
  1227.                 turn rshol to z-axis <-37> speed <250>;
  1228.                 turn relb to x-axis <75> speed <250>;
  1229.                 turn relb to y-axis <0> speed <250>;
  1230.                 turn relb to z-axis <0> speed <250>;
  1231.                 turn rhand to x-axis <0> speed <250>;
  1232.                 turn rhand to y-axis <-20> speed <250>;
  1233.                 turn rhand to z-axis <5> speed <250>;
  1234.         pistol = 2; // ready to use
  1235. // ignore              
  1236. }
  1237.  
  1238. ToRifle()
  1239. {
  1240.         while (buzy != 0)
  1241.         {
  1242.         sleep 800;
  1243.         }
  1244. pistol = 8; //stop moving
  1245.                 turn armpivot to x-axis <-10> speed <150>;
  1246.                 turn head to x-axis <0> speed <150>;
  1247.                 turn torso to y-axis <0> speed <150>;
  1248.                 turn head to z-axis <0> speed <150>;
  1249.                 turn lloarm to x-axis <0> speed <150>;
  1250.                 turn lloarm to y-axis <0> speed <150>;
  1251.                 turn lloarm to z-axis <0> speed <150>;
  1252.                 turn rpad to x-axis <0> speed <150>;
  1253.                 turn lpad to x-axis <0> speed <150>;   
  1254.                 turn lshol to x-axis <-29> speed <250>;
  1255.                 turn lshol to y-axis <-19> speed <250>;
  1256.                 turn lshol to z-axis <7> speed <250>;
  1257.                 turn lelb to x-axis <57> speed <250>;
  1258.                 turn lelb to y-axis <-7> speed <250>;
  1259.                 turn lelb to z-axis <0> speed <250>;
  1260.                 turn lhand to x-axis <-8> speed <250>;
  1261.                 turn lhand to y-axis <5> speed <250>;
  1262.                 turn lhand to z-axis <-4> speed <250>;
  1263.                 turn rshol to x-axis <-40> speed <250>;
  1264.                 turn rshol to y-axis <0> speed <250>;
  1265.                 turn rshol to z-axis <-37> speed <250>;
  1266.                 turn relb to x-axis <75> speed <250>;
  1267.                 turn relb to y-axis <0> speed <250>;
  1268.                 turn relb to z-axis <0> speed <250>;
  1269.                 turn rhand to x-axis <0> speed <250>;
  1270.                 turn rhand to y-axis <-20> speed <250>;
  1271.                 turn rhand to z-axis <5> speed <250>;
  1272.         sleep 500;
  1273.                 turn lshol to x-axis <24> speed <250>;
  1274.                 turn lshol to z-axis <-7> speed <250>;
  1275.                 turn rshol to x-axis <-2> speed <250>;
  1276.                 turn rshol to z-axis <-14> speed <250>;
  1277.                 turn relb to x-axis <20> speed <150>;
  1278.                 turn rhand to x-axis <23> speed <250>;
  1279.                 turn rhand to z-axis <5> speed <250>;
  1280.         sleep 200;
  1281.                 turn rshol to x-axis <56> speed <250>;
  1282.                 turn relb to x-axis <-9> speed <150>;
  1283.                 turn relb to y-axis <33> speed <250>;
  1284.                 turn relb to z-axis <-1> speed <150>;
  1285.                 turn lshol to x-axis <24> speed <250>;
  1286.                 turn lshol to y-axis <-21> speed <250>;
  1287.                 turn lshol to z-axis <-7> speed <250>;
  1288.         sleep 200;
  1289.                 hide pistol1;
  1290.                 show pistolx;
  1291.                 turn lshol to x-axis <39> speed <250>;
  1292.                 turn lshol to y-axis <38> speed <250>;
  1293.                 turn lshol to z-axis <-15> speed <250>;
  1294.                 turn lelb to x-axis <14> speed <250>;
  1295.                 turn lelb to z-axis <101> speed <250>;
  1296.                 turn rshol to x-axis <24> speed <250>;
  1297.                 turn rshol to z-axis <25> speed <250>;
  1298.                 turn rhand to x-axis <51> speed <250>;
  1299.                 turn rhand to y-axis <-16> speed <250>;
  1300.                 turn rhand to z-axis <-17> speed <250>;
  1301.         sleep 200;
  1302.                 turn turret to y-axis <0> speed <150>;
  1303.                 turn armpivot to x-axis <-15> speed <150>;
  1304.                 turn lelb to x-axis <41> speed <150>;
  1305.                 turn lelb to y-axis <-10> speed <150>;
  1306.                 turn lelb to z-axis <105> speed <150>;
  1307.                 turn lhand to y-axis <-4> speed <150>;
  1308.                 turn relb to x-axis <20> speed <150>;
  1309.                 turn relb to y-axis <58> speed <150>;
  1310.                 turn relb to z-axis <-22> speed <150>;
  1311.                 turn lhand to x-axis <44> speed <150>;
  1312.                 turn lhand to z-axis <-37> speed <150>;
  1313.                 turn lshol to x-axis <26> speed <150>;
  1314.                 turn lshol to y-axis <0> speed <150>;
  1315.         sleep 200;
  1316.                 hide gunx;
  1317.                 hide magx;
  1318.                 show gun1;
  1319.                 show mag1;
  1320.         sleep 200;
  1321.                 turn head to x-axis <0> speed <150>;
  1322.                 turn torso to y-axis <0> speed <150>;
  1323.                 turn head to z-axis <0> speed <150>;
  1324.                 turn lloarm to x-axis <0> speed <150>;
  1325.                 turn lloarm to y-axis <0> speed <150>;
  1326.                 turn lloarm to z-axis <0> speed <150>;
  1327.                 turn lshol to x-axis <0> speed <150>;
  1328.                 turn lshol to y-axis <0> speed <150>;
  1329.                 turn rshol to x-axis <0> speed <150>;
  1330.                 turn rshol to y-axis <0> speed <150>;
  1331.                 turn rhand to x-axis <0> speed <150>;
  1332.                 turn rhand to y-axis <0> speed <150>;
  1333.                 turn rhand to z-axis <0> speed <150>;
  1334.                 turn rpad to x-axis <0> speed <150>;
  1335.                 turn lpad to x-axis <0> speed <150>;
  1336.                 //set up
  1337.                 turn turret to y-axis <0> speed <150>;
  1338.                 turn armpivot to x-axis <-15> speed <150>;
  1339.                 turn lelb to x-axis <40> speed <150>;
  1340.                 turn lelb to y-axis <-31> speed <150>;
  1341.                 turn lelb to z-axis <64> speed <150>;
  1342.                 turn lhand to x-axis <13> speed <150>;
  1343.                 turn lhand to y-axis <-21> speed <150>;
  1344.                 turn lhand to z-axis <-2> speed <150>;
  1345.                 turn relb to x-axis <20> speed <150>;
  1346.                 turn relb to y-axis <58> speed <150>;
  1347.                 turn relb to z-axis <-22> speed <150>;
  1348. pistol = 0;
  1349. }
  1350.  
  1351.  
  1352. Reloading()
  1353. {
  1354. //aiming set
  1355. while (buzy != 0)
  1356.         {
  1357.         sleep 800;
  1358.         }
  1359. ammunition = ammunition - 1;
  1360. set 1025 to (ammunition * 100) / 8;
  1361. turn armpivot to x-axis <0> now;
  1362.                 turn rpad to x-axis <-15> speed <150>;
  1363.                 turn lpad to x-axis <-15> speed <150>;
  1364.                 turn head to x-axis <0> speed <150>;
  1365.                 turn torso to y-axis <-15> speed <150>;
  1366.                 turn head to z-axis <0> speed <150>;
  1367.                 turn lshol to x-axis <-66> speed <150>;
  1368.                 turn lshol to y-axis <-25> speed <150>;
  1369.                 turn lelb to x-axis <67> speed <150>;
  1370.                 turn lelb to y-axis <47> speed <150>;
  1371.                 turn lelb to z-axis <105> speed <150>;
  1372.                 turn lloarm to x-axis <21> speed <150>;
  1373.                 turn lloarm to y-axis <-4> speed <150>;
  1374.                 turn lloarm to z-axis <-2> speed <150>;        
  1375.                 turn lhand to x-axis <-14> speed <150>;
  1376.                 turn lhand to y-axis <-9> speed <150>;
  1377.                 turn lhand to z-axis <-25> speed <150>;
  1378.                 turn rshol to x-axis <-44> speed <150>;
  1379.                 turn rshol to y-axis <28> speed <150>;
  1380.                 turn relb to x-axis <14> speed <150>;
  1381.                 turn relb to y-axis <29> speed <150>;
  1382.                 turn relb to z-axis <-22> speed <150>;
  1383.                 turn rhand to x-axis <21> speed <150>;
  1384.                 turn rhand to y-axis <-32> speed <150>;
  1385.                 turn rhand to z-axis <14> speed <150>;
  1386. sleep 50;
  1387. //drop mag
  1388. move mag1 to y-axis [-13.00000] speed [8];
  1389.         turn lshol to x-axis <-35> speed <850>;
  1390.         turn lshol to y-axis <0> speed <850>;
  1391. sleep 100;
  1392. move mag1 to y-axis [-13.00000] speed [16];
  1393. move mag1 to z-axis [1.50000] speed [16];
  1394. sleep 100;
  1395. move mag1 to y-axis [-13.000000] speed [32];
  1396.         turn lpad to x-axis <15> speed <250>;
  1397.        
  1398.         turn lshol to x-axis <56> speed <1200>;
  1399.         turn lshol to y-axis <-8> speed <750>;
  1400.         turn lshol to z-axis <-11> speed <650>;
  1401.         turn lelb to x-axis <6> speed <650>;
  1402.         turn lelb to y-axis <-59> speed <650>;
  1403.         turn lelb to z-axis <84> speed <850>;
  1404.         turn lloarm to x-axis <0> speed <650>;
  1405.         turn lloarm to y-axis <0> speed <650>;
  1406.         turn lloarm to z-axis <-48> speed <650>;
  1407. sleep 100;
  1408. move mag1 to y-axis [-13.000000] speed [64];
  1409. move mag1 to z-axis [3.00000] speed [64];
  1410. sleep 200;
  1411. move mag1 to y-axis [-13.00000] speed [128];
  1412. move mag1 to z-axis [4.50000] speed [128];
  1413. sleep 200;
  1414. turn mag1 to x-axis <90> speed <500>;
  1415. turn lelb to y-axis <-54> speed <350>;
  1416. sleep 100;
  1417. hide mag1;
  1418. turn lelb to y-axis <-59> speed <350>;
  1419. show mag2;
  1420. sleep 100;
  1421.         turn lshol to x-axis <29> speed <250>;
  1422.         turn lshol to y-axis <0> speed <250>;
  1423.         turn lshol to z-axis <-12> speed <250>;
  1424.         turn lelb to x-axis <55> speed <250>;
  1425.         turn lelb to y-axis <-8> speed <250>;
  1426.         turn lelb to z-axis <48> speed <250>;
  1427.         turn lloarm to z-axis <0> speed <250>;
  1428.         turn lpad to x-axis <0> speed <150>;
  1429. sleep 100;
  1430.         turn relb to x-axis <9> speed <150>;
  1431.         turn relb to y-axis <1> speed <150>;
  1432.         turn relb to z-axis <-22> speed <150>;
  1433.         turn lshol to x-axis <-5> speed <150>;
  1434.         turn lshol to y-axis <-19> speed <150>;
  1435.         turn lelb to x-axis <17> speed <150>;
  1436.         turn lelb to y-axis <-2> speed <150>;
  1437.         turn lelb to z-axis <45> speed <150>;
  1438.         turn lloarm to y-axis <-34> speed <150>;
  1439.         turn lhand to y-axis <62> speed <150>;
  1440. sleep 100;
  1441.                 move mag1 to y-axis [0] now;
  1442.                 move mag1 to z-axis [0] now;
  1443.                 turn rhand to x-axis <2> speed <150>;
  1444.                 turn rhand to y-axis <-48> speed <150>;
  1445.         turn lshol to x-axis <-13> speed <150>;
  1446.         turn lshol to y-axis <-38> speed <150>;
  1447.         turn lshol to z-axis <-12> speed <150>;
  1448.         turn lelb to y-axis <-13> speed <150>;
  1449.                 turn lhand to x-axis <-37> speed <150>;
  1450.                 turn lhand to z-axis <-25> speed <150>;
  1451. sleep 60;
  1452.         turn lshol to z-axis <-6> speed <150>;
  1453.         hide mag2;  //was below
  1454.         show mag1;
  1455. sleep 200;
  1456.         turn lshol to x-axis <-24> speed <150>;
  1457.         turn lshol to y-axis <-10> speed <150>;
  1458.         turn lshol to z-axis <-6> speed <150>;
  1459.         turn lelb to x-axis <20> speed <150>;
  1460.         turn lelb to z-axis <0> speed <150>;
  1461.         turn lhand to x-axis <-14> speed <150>;
  1462.         turn lhand to y-axis <-9> speed <150>;
  1463.         turn lhand to z-axis <-25> speed <150>;
  1464. sleep 100;
  1465.         turn rhand to x-axis <21> speed <150>;
  1466.         turn rhand to y-axis <-32> speed <150>;
  1467.         turn rhand to z-axis <-6> speed <150>;
  1468.         turn relb to x-axis <14> speed <150>;
  1469.         turn relb to y-axis <29> speed <150>;
  1470.         turn relb to z-axis <-22> speed <150>;
  1471.         turn lpad to x-axis <-5> speed <250>;
  1472.                 turn lshol to x-axis <-52> speed <150>;
  1473.                 turn lshol to y-axis <-37> speed <150>;
  1474.                 turn lshol to y-axis <-6> speed <150>;
  1475.                 turn lelb to x-axis <25> speed <150>;
  1476.                 turn lelb to y-axis <50> speed <150>;
  1477.                 turn lelb to z-axis <23> speed <150>;
  1478. sleep 100;
  1479.                 turn lelb to x-axis <25> speed <450>;
  1480.                 turn lelb to y-axis <50> speed <450>;
  1481.                 turn lelb to z-axis <23> speed <450>;
  1482. sleep 100;
  1483.                 turn lshol to x-axis <-31> speed <250>;
  1484.                 turn lshol to y-axis <-24> speed <250>;
  1485.                 turn lshol to y-axis <-15> speed <250>;
  1486.                 turn lelb to x-axis <43> speed <250>;
  1487.                 turn lelb to y-axis <45> speed <250>;
  1488.                 turn lelb to z-axis <23> speed <250>;
  1489. sleep 100;
  1490.                 turn rpad to x-axis <-15> speed <150>;
  1491.                 turn lpad to x-axis <-15> speed <150>;
  1492.                 turn head to x-axis <8> speed <150>;
  1493.                 turn torso to y-axis <-30> speed <150>;
  1494.                 turn head to z-axis <-12> speed <150>;
  1495.                 turn lshol to x-axis <-66> speed <150>;
  1496.                 turn lshol to y-axis <-25> speed <150>;
  1497.                 turn lshol to y-axis <0> speed <150>;
  1498.                 turn lelb to x-axis <67> speed <150>;
  1499.                 turn lelb to y-axis <47> speed <150>;
  1500.                 turn lelb to z-axis <105> speed <150>;
  1501.                 turn lloarm to x-axis <21> speed <150>;
  1502.                 turn lloarm to y-axis <-4> speed <150>;
  1503.                 turn lloarm to z-axis <-2> speed <150>;        
  1504.                 turn lhand to x-axis <-14> speed <150>;
  1505.                 turn lhand to y-axis <-9> speed <150>;
  1506.                 turn lhand to z-axis <-25> speed <150>;
  1507.                 turn rshol to x-axis <-44> speed <150>;
  1508.                 turn rshol to y-axis <28> speed <150>;
  1509.                 turn relb to x-axis <14> speed <150>;
  1510.                 turn relb to y-axis <29> speed <150>;
  1511.                 turn relb to z-axis <-22> speed <150>;
  1512.                 turn rhand to x-axis <21> speed <150>;
  1513.                 turn rhand to y-axis <-32> speed <150>;
  1514.                 turn rhand to z-axis <14> speed <150>;
  1515.         bullets = 40;
  1516. }
  1517.  
  1518. ReloadGun()
  1519. {
  1520. while (buzy != 0 )
  1521. {
  1522. //wait for not buzy
  1523. sleep 1000;
  1524. }
  1525. if (dead == 0 && buzy == 0)
  1526.         {
  1527.         call-script Reloading();
  1528.         }
  1529. }
  1530.  
  1531. Refill()
  1532. {
  1533. if (ammunition <= 3) //3 mags left
  1534.         {
  1535. ammunition = 9; //1 extra for the reloading
  1536. set 1025 to 100;
  1537. call-script Reloading();
  1538.         }
  1539. }
  1540.  
  1541. tosword()
  1542. {
  1543. if (sready == 1)
  1544.  {
  1545.         sout = 1; //0on back 1getting 2ready 3swung 4reseting
  1546.         while (buzy != 0) //wait for un buzy
  1547.         {
  1548.         sleep 1000;
  1549.         }
  1550.         if ((pistol == 0) && (dead == 0))
  1551.                 {
  1552.                 turn head to x-axis <0> speed <150>;
  1553.                 turn torso to y-axis <0> speed <150>;
  1554.                 turn head to z-axis <0> speed <150>;
  1555.                 turn lloarm to x-axis <0> speed <150>;
  1556.                 turn lloarm to y-axis <0> speed <150>;
  1557.                 turn lloarm to z-axis <0> speed <150>;
  1558.                 turn lshol to x-axis <0> speed <150>;
  1559.                 turn lshol to y-axis <0> speed <150>;
  1560.                 turn rshol to z-axis <0> speed <150>;
  1561.                 turn rshol to x-axis <0> speed <150>;
  1562.                 turn rshol to y-axis <0> speed <150>;
  1563.                 turn rhand to x-axis <0> speed <150>;
  1564.                 turn rhand to y-axis <0> speed <150>;
  1565.                 turn rhand to z-axis <0> speed <150>;
  1566.                 turn rpad to x-axis <0> speed <150>;
  1567.                 turn lpad to x-axis <0> speed <150>;
  1568.                 //set up
  1569.                 turn turret to y-axis <0> speed <150>;
  1570.                 turn armpivot to x-axis <-15> speed <150>;
  1571.                 turn lelb to x-axis <40> speed <150>;
  1572.                 turn lelb to y-axis <-31> speed <150>;
  1573.                 turn lelb to z-axis <64> speed <150>;
  1574.                 turn lhand to x-axis <13> speed <150>;
  1575.                 turn lhand to y-axis <-21> speed <150>;
  1576.                 turn lhand to z-axis <-2> speed <150>;
  1577.                 turn relb to x-axis <20> speed <150>;
  1578.                 turn relb to y-axis <58> speed <150>;
  1579.                 turn relb to z-axis <-22> speed <150>;
  1580.         sleep 500;
  1581.                 turn lhand to x-axis <44> speed <150>;
  1582.                 turn lhand to z-axis <-37> speed <150>;
  1583.                 turn lshol to x-axis <26> speed <150>;
  1584.         sleep 200;
  1585.                 hide gun1;
  1586.                 hide mag1;
  1587.                 hide mag2;
  1588.                 show gunx;
  1589.                 show magx;  //end drop rifle
  1590.                 }
  1591.         if (pistol != 0 && dead == 0)
  1592.                 {
  1593.                 turn armpivot to x-axis <-10> speed <150>;
  1594.                 turn head to x-axis <0> speed <150>;
  1595.                 turn torso to y-axis <0> speed <150>;
  1596.                 turn head to z-axis <0> speed <150>;
  1597.                 turn lloarm to x-axis <0> speed <150>;
  1598.                 turn lloarm to y-axis <0> speed <150>;
  1599.                 turn lloarm to z-axis <0> speed <150>;
  1600.                 turn rpad to x-axis <0> speed <150>;
  1601.                 turn lpad to x-axis <0> speed <150>;   
  1602.                 turn lshol to x-axis <-29> speed <250>;
  1603.                 turn lshol to y-axis <-19> speed <250>;
  1604.                 turn lshol to z-axis <7> speed <250>;
  1605.                 turn lelb to x-axis <57> speed <250>;
  1606.                 turn lelb to y-axis <-7> speed <250>;
  1607.                 turn lelb to z-axis <0> speed <250>;
  1608.                 turn lhand to x-axis <-8> speed <250>;
  1609.                 turn lhand to y-axis <5> speed <250>;
  1610.                 turn lhand to z-axis <-4> speed <250>;
  1611.                 turn rshol to x-axis <-40> speed <250>;
  1612.                 turn rshol to y-axis <0> speed <250>;
  1613.                 turn rshol to z-axis <-37> speed <250>;
  1614.                 turn relb to x-axis <75> speed <250>;
  1615.                 turn relb to y-axis <0> speed <250>;
  1616.                 turn relb to z-axis <0> speed <250>;
  1617.                 turn rhand to x-axis <0> speed <250>;
  1618.                 turn rhand to y-axis <-20> speed <250>;
  1619.                 turn rhand to z-axis <5> speed <250>;
  1620.         sleep 500;
  1621.                 turn lshol to x-axis <24> speed <250>;
  1622.                 turn lshol to z-axis <-7> speed <250>;
  1623.                 turn rshol to x-axis <-2> speed <250>;
  1624.                 turn rshol to z-axis <-14> speed <250>;
  1625.                 turn relb to x-axis <20> speed <150>;
  1626.                 turn rhand to x-axis <23> speed <250>;
  1627.                 turn rhand to z-axis <5> speed <250>;
  1628.         sleep 200;
  1629.                 turn rshol to x-axis <56> speed <250>;
  1630.                 turn relb to x-axis <-9> speed <150>;
  1631.                 turn relb to y-axis <33> speed <250>;
  1632.                 turn relb to z-axis <-1> speed <150>;
  1633.                 turn lshol to x-axis <24> speed <250>;
  1634.                 turn lshol to y-axis <-21> speed <250>;
  1635.                 turn lshol to z-axis <-7> speed <250>;
  1636.         sleep 200;
  1637.                 hide pistol1;
  1638.                 show pistolx;
  1639.                 }
  1640.                 //go to sword
  1641.                 sleep 100;
  1642.                 turn armpivot to x-axis <0> speed <400>;
  1643.                 turn lshol to x-axis <0> speed <400>;
  1644.                 turn lshol to y-axis <0> speed <400>;
  1645.                 turn lshol to z-axis <-34> speed <400>;
  1646.                 turn lelb to x-axis <65> speed <400>;
  1647.                 turn lelb to y-axis <0> speed <400>;
  1648.                 turn lelb to z-axis <0> speed <400>;
  1649.                 turn rpad to x-axis <-17> speed <400>;
  1650.                 turn rpad to y-axis <-117> speed <400>;
  1651.                 turn rshol to x-axis <-131> speed <400>;
  1652.                 turn rshol to y-axis <0> speed <400>;
  1653.                 turn rshol to z-axis <0> speed <400>;
  1654.                 turn relb to x-axis <-10> speed <400>;
  1655.                 turn relb to y-axis <-8> speed <400>;
  1656.                 turn relb to z-axis <0> speed <400>;           
  1657.                 turn lhand to x-axis <0> speed <400>;
  1658.                 turn lhand to y-axis <0> speed <400>;
  1659.                 turn lhand to z-axis <0> speed <400>;
  1660.                 sleep 600;
  1661.                 hide swordx;
  1662.                 show sword1;
  1663.                 sleep 300;
  1664.                 turn lshol to x-axis <-25> speed <400>;
  1665.                 turn lshol to y-axis <-57> speed <400>;
  1666.                 turn lshol to z-axis <0> speed <400>;
  1667.                 turn lelb to x-axis <37> speed <400>;
  1668.                 turn lelb to y-axis <10> speed <400>;
  1669.                 turn lelb to z-axis <0> speed <400>;
  1670.                 turn lhand to x-axis <-38> speed <400>;
  1671.                 turn lhand to y-axis <17> speed <400>;
  1672.                 turn lhand to z-axis <0> speed <400>;
  1673.                 turn rshol to x-axis <-26> speed <400>;
  1674.                 turn rshol to y-axis <0> speed <400>;
  1675.                 turn rshol to z-axis <0> speed <400>;
  1676.                 turn relb to x-axis <32> speed <400>;
  1677.                 turn relb to y-axis <33> speed <400>;
  1678.                 turn relb to z-axis <0> speed <400>;           
  1679.                 turn rhand to x-axis <-30> speed <400>;
  1680.                 turn rhand to y-axis <-19> speed <400>;
  1681.                 turn rhand to z-axis <0> speed <400>;
  1682.                 sleep 600;
  1683.                 sout = 2;
  1684.  }                             
  1685. }
  1686.  
  1687. swordaway()
  1688. {
  1689.                 turn turret to y-axis <0> speed <300>;
  1690.                 sleep 300;
  1691.                 turn armpivot to x-axis <0> now;
  1692.                 turn lshol to x-axis <0> now;
  1693.                 turn lshol to y-axis <0> now;
  1694.                 turn lshol to z-axis <-34> now;
  1695.                 turn lelb to x-axis <65> now;
  1696.                 turn lelb to y-axis <0> now;
  1697.                 turn lelb to z-axis <0> now;
  1698.                 turn rpad to x-axis <-17> now;
  1699.                 turn rpad to y-axis <-117> now;
  1700.                 turn rshol to x-axis <-131> now;
  1701.                 turn rshol to y-axis <0> now;
  1702.                 turn rshol to z-axis <0> now;
  1703.                 turn relb to x-axis <-10> now;
  1704.                 turn relb to y-axis <-8> now;
  1705.                 turn relb to z-axis <0> now;           
  1706.                 turn lhand to x-axis <0> now;
  1707.                 turn lhand to y-axis <0> now;
  1708.                 turn lhand to z-axis <0> now;
  1709.                 sleep 600;
  1710.                 hide sword1;
  1711.                 show swordx;
  1712.                 sleep 200;
  1713.                 turn lshol to x-axis <0> now;  //now clean up the mess
  1714.                 turn lshol to y-axis <0> now;
  1715.                 turn lshol to z-axis <0> now;
  1716.                 turn lelb to x-axis <0> now;
  1717.                 turn lelb to y-axis <0> now;
  1718.                 turn lelb to z-axis <0> now;
  1719.                 turn lhand to x-axis <0> now;
  1720.                 turn lhand to y-axis <0> now;
  1721.                 turn lhand to z-axis <0> now;
  1722.                 turn rshol to x-axis <0> now;
  1723.                 turn rshol to y-axis <0> now;
  1724.                 turn rshol to z-axis <0> now;
  1725.                 turn relb to x-axis <0> now;
  1726.                 turn relb to y-axis <0> now;
  1727.                 turn relb to z-axis <0> now;           
  1728.                 turn rhand to x-axis <0> now;
  1729.                 turn rhand to y-axis <0> now;
  1730.                 turn rhand to z-axis <0> now;
  1731.                 sleep 500;
  1732.                 sout = 0;
  1733. }
  1734.  
  1735. resetsword()
  1736. {
  1737. sout = 8; //stop asking
  1738. while (buzy != 0)
  1739.         {
  1740.         sleep 1000;
  1741.         }
  1742. if (sready == 1)
  1743.         {
  1744.                 sout = 4; ///stop askign to reset;
  1745.                 sleep (rand (3,8) * 100);  //now unswing
  1746.                 turn torso to y-axis <0> speed <900>;
  1747.                 turn head to y-axis <0> speed <900>;
  1748.                 turn lshol to x-axis <-25> now;
  1749.                 turn lshol to y-axis <-57> now;
  1750.                 turn lshol to z-axis <0> now;
  1751.                 turn lelb to x-axis <37> now;
  1752.                 turn lelb to y-axis <10> now;
  1753.                 turn lelb to z-axis <0> now;
  1754.                 turn lhand to x-axis <-38> now;
  1755.                 turn lhand to y-axis <17> now;
  1756.                 turn lhand to z-axis <0> now;
  1757.                 turn rshol to x-axis <-26> now;
  1758.                 turn rshol to y-axis <0> now;
  1759.                 turn rshol to z-axis <0> now;
  1760.                 turn relb to x-axis <32> now;
  1761.                 turn relb to y-axis <33> now;
  1762.                 turn relb to z-axis <0> now;           
  1763.                 turn rhand to x-axis <-30> now;
  1764.                 turn rhand to y-axis <-19> now;
  1765.                 turn rhand to z-axis <0> now;
  1766.                 sleep 600;  
  1767.                 sout = 2; //ready
  1768.         }
  1769. }
  1770.  
  1771. RestoreAfterSwing()
  1772. {
  1773. sleep restore_delay;
  1774. if (sready ==1 && dead == 0)
  1775.         {
  1776.         turn turret to y-axis <0> speed <300>;
  1777.         call-script resetsword();
  1778.         }
  1779. }
  1780.  
  1781. Toggle(t,value)
  1782. {
  1783.  
  1784. if(t==1)
  1785.         {
  1786.         if(value==0)
  1787.                 {
  1788.                 aimtype = 1;  
  1789.                 }
  1790.         if(value==1)
  1791.                 {
  1792.                 aimtype = 2;
  1793.                 }
  1794.         if(value==2)
  1795.                 {
  1796.                 aimtype = 3;
  1797.                 }
  1798.         }
  1799. if(t==2)
  1800.         {
  1801.         if(value==0)
  1802.                 {
  1803.                 runtype = 2;  ;
  1804.                 set 76 to 0;
  1805.                 }
  1806.         if(value==1)
  1807.                 {
  1808.                 runtype = 1;
  1809.                 set 76 to 1;
  1810.                 if (bmoving ==0)
  1811.                         {
  1812.                         call-script kneel();
  1813.                         }
  1814.                 }
  1815.         if(value==2)
  1816.                 {
  1817.                 runtype = 4;
  1818.                 set 76 to 0;
  1819.                 }
  1820.         }      
  1821. if(t==3)
  1822.         {
  1823.         if(value==0 )
  1824.                 {
  1825.                         if (sready==1)
  1826.                         {
  1827.                         sready = 0;
  1828.                         call-script swordaway();
  1829.                         }
  1830.                         while (sout != 0)
  1831.                         {
  1832.                         sleep 800;
  1833.                         }
  1834.                         if (pistol == 0)
  1835.                                 {
  1836.                                 call-script torifle();
  1837.                                 return 0;
  1838.                                 }
  1839.                         if (pistol != 0)
  1840.                                 {
  1841.                                 call-script topistol();
  1842.                                 return 0;
  1843.                                 }
  1844.                 }        
  1845.         if(value==1 )
  1846.                 {
  1847.                         sready = 1;
  1848.                                 if (pistol == 0)
  1849.                                 {  //setup
  1850.                                 turn turret to y-axis <0> now;
  1851.                                 turn armpivot to x-axis <-15> now;
  1852.                                 turn lelb to x-axis <40> now;
  1853.                                 turn lelb to y-axis <-31> now;
  1854.                                 turn lelb to z-axis <64> now;
  1855.                                 turn lhand to x-axis <13> now;
  1856.                                 turn lhand to y-axis <-21> now;
  1857.                                 turn lhand to z-axis <-2> now;
  1858.                                 turn relb to x-axis <20> now;
  1859.                                 turn relb to y-axis <58> now;
  1860.                                 turn relb to z-axis <-22> now;
  1861.                                 sleep 200;
  1862.                                 }
  1863.                         if (pistol != 0)
  1864.                                 {
  1865.                                 turn turret to y-axis <0> now;
  1866.                                 turn armpivot to x-axis <-15> now;
  1867.                                 turn lshol to x-axis <-29> now;
  1868.                                 turn lshol to y-axis <-19> now;
  1869.                                 turn lshol to z-axis <7> now;
  1870.                                 turn lelb to x-axis <57> now;
  1871.                                 turn lelb to y-axis <-7> now;
  1872.                                 turn lelb to z-axis <0> now;
  1873.                                 turn lhand to x-axis <-8> now;
  1874.                                 turn lhand to y-axis <5> now;
  1875.                                 turn lhand to z-axis <-4> now;
  1876.                                 turn rshol to x-axis <-40> now;
  1877.                                 turn rshol to y-axis <0> now;
  1878.                                 turn rshol to z-axis <-37> now;
  1879.                                 turn relb to x-axis <75> now;
  1880.                                 turn relb to y-axis <0> now;
  1881.                                 turn relb to z-axis <0> now;
  1882.                                 turn rhand to x-axis <0> now;
  1883.                                 turn rhand to y-axis <-20> now;
  1884.                                 turn rhand to z-axis <5> now;
  1885.                                 sleep 200;
  1886.                                 }          
  1887.                                 if (sout == 0)
  1888.                                 {
  1889.                                 call-script tosword();
  1890.                                 }
  1891.                         return 0;
  1892.                 }
  1893.         }
  1894. }
  1895.  
  1896. AimFromweapon3(piecenum)
  1897. {
  1898.         piecenum = armpivot;
  1899. }
  1900.  
  1901. Queryweapon3(piecenum)
  1902. {
  1903.         piecenum = flare;
  1904. }
  1905.  
  1906. AimFromWeapon4(piecenum)
  1907. {
  1908.         piecenum = armpivot;
  1909. }
  1910.  
  1911. QueryWeapon4(piecenum)
  1912. {
  1913.         piecenum = flare;
  1914. }
  1915.  
  1916. AimFromWeapon5(piecenum)
  1917. {
  1918.         piecenum = armpivot;
  1919. }
  1920.  
  1921. QueryWeapon5(piecenum)
  1922. {
  1923.         piecenum = flare;
  1924. }
  1925.  
  1926. AimFromWeapon2(piecenum)
  1927. {
  1928.         piecenum = armpivot;
  1929. }
  1930.  
  1931. QueryWeapon2(piecenum)
  1932. {
  1933.         piecenum = pflare;
  1934. }
  1935.  
  1936. AimFromweapon1(piecenum)
  1937. {
  1938.         piecenum = armpivot;
  1939. }
  1940.  
  1941. QueryWeapon1(piecenum)
  1942. {
  1943.         piecenum = cut;
  1944. }
  1945.  
  1946. Shot3()
  1947. {
  1948.                 bullets = bullets - 1;
  1949.                 emit-sfx 1025 from flare;
  1950.                 emit-sfx 1024 from shell;
  1951.         turn relb to x-axis <11> speed <800>;
  1952.         turn lelb to x-axis <64> speed <800>;
  1953.         sleep 100;
  1954.         turn relb to x-axis <14> speed <300>;
  1955.         turn lelb to x-axis <67> speed <300>;
  1956.         if (bullets < 1)
  1957.                 {
  1958.                 bullets = 0; //need reload
  1959.                 if (ammunition > 0)
  1960.                         {
  1961.                         start-script ReloadGun();
  1962.                         }      
  1963.                 }
  1964. return (1);
  1965. }
  1966.  
  1967. Shot4()
  1968. {
  1969.                 bullets = bullets - 1;
  1970.                 emit-sfx 1025 from flare;
  1971.                 emit-sfx 1024 from shell;
  1972.         turn relb to x-axis <11> speed <800>;
  1973.         turn lelb to x-axis <64> speed <800>;
  1974.         sleep 100;
  1975.         turn relb to x-axis <14> speed <300>;
  1976.         turn lelb to x-axis <67> speed <300>;
  1977.         if (bullets < 1)
  1978.                 {
  1979.                 bullets = 0; //need reload
  1980.                 if (ammunition > 0)
  1981.                         {
  1982.                         start-script ReloadGun();
  1983.                         }      
  1984.                 }
  1985. return (1);    
  1986. }
  1987.  
  1988. Shot5()
  1989. {
  1990.                 bullets = bullets - 1;
  1991.                 emit-sfx 1025 from flare;
  1992.                 emit-sfx 1024 from shell;
  1993.         turn relb to x-axis <11> speed <800>;
  1994.         turn lelb to x-axis <64> speed <800>;
  1995.         sleep 100;
  1996.         turn relb to x-axis <14> speed <300>;
  1997.         turn lelb to x-axis <67> speed <300>;
  1998.         if (bullets < 1)
  1999.                 {
  2000.                 bullets = 0; //need reload
  2001.                 if (ammunition > 0)
  2002.                         {
  2003.                         start-script ReloadGun();
  2004.                         }      
  2005.                 }
  2006. return (1);
  2007. }
  2008.  
  2009. FireWeapon2()
  2010. {
  2011.         emit-sfx 1026 from pflare;
  2012.         sleep 50;
  2013.         turn relb to x-axis <72> speed <800>;
  2014.         turn lelb to x-axis <54> speed <800>;
  2015.         sleep 100;
  2016.         turn relb to x-axis <75> speed <400>;
  2017.         turn lelb to x-axis <57> speed <400>;
  2018.         return (1);    
  2019. }
  2020.  
  2021. Fireweapon1()
  2022. {
  2023.         sout = 3; //is out but not ready
  2024.         turn torso to y-axis <66> now;
  2025.         turn head to y-axis <-30> now;
  2026.         turn rhand to x-axis <-30> now;
  2027.         turn rhand to y-axis <-19> now;
  2028.         turn rhand to z-axis <-71> now;
  2029.         turn lelb to x-axis <48> now;
  2030.         turn lelb to y-axis <-9> now;
  2031.         turn lelb to z-axis <0> now;   
  2032.         sleep 50;
  2033.         call-script resetsword();
  2034.         return (1);    
  2035. }
  2036.  
  2037. Aimweapon3(Func_Var_1, Func_Var_2)
  2038. {
  2039.        
  2040.         if( runtype == 4 && bMoving == 1 )
  2041.         {
  2042.         return (0);
  2043.         }
  2044.         if((aimtype != 1) or (pistol != 0) or (dead == 1) or (buzy != 0) or (sready ==1))
  2045.         {
  2046.         return (0);
  2047.         }
  2048.         else
  2049.                         if (ammunition <= 0 && pistol  == 0)
  2050.                         {
  2051.                         pistol = 1;
  2052.                         call-script ToPistol();
  2053.                         return 0;
  2054.                         }
  2055.         if ( aimtype == 1 && buzy == 0)        
  2056.         {
  2057.         signal SIG_AIM;
  2058.         set-signal-mask SIG_AIM;
  2059.         bAiming = TRUE;
  2060.         while( !Static_Var_3 )
  2061.                 {
  2062.                 sleep 5;
  2063.                 }
  2064.                 if (runtype == 4)
  2065.                         {
  2066.                         turn head to x-axis <8> speed <650>;
  2067.                         turn head to z-axis <-12> speed <650>;
  2068.                         turn torso to x-axis <0> speed <650>;
  2069.                         }
  2070.                 if (runtype == 2)
  2071.                         {
  2072.                         turn head to x-axis <-20> speed <650>;
  2073.                         turn head to z-axis <-6> speed <650>;
  2074.                         turn torso to x-axis <20> speed <650>;
  2075.                         }
  2076.                 if (runtype == 1)
  2077.                         {
  2078.                         turn head to x-axis <-45> speed <650>;
  2079.                         turn head to z-axis <-2> speed <650>;
  2080.                         turn torso to x-axis <45> speed <650>;
  2081.                         }
  2082.                 turn rpad to x-axis <-15> speed <650>;
  2083.                 turn lpad to x-axis <-15> speed <650>;
  2084.                 turn torso to y-axis <-30> speed <650>;
  2085.                 turn lshol to x-axis <-66> speed <650>;
  2086.                 turn lshol to y-axis <-25> speed <650>;
  2087.                 turn lelb to x-axis <67> speed <650>;
  2088.                 turn lelb to y-axis <47> speed <650>;
  2089.                 turn lelb to z-axis <105> speed <650>;
  2090.                 turn lloarm to x-axis <21> speed <650>;
  2091.                 turn lloarm to y-axis <-4> speed <650>;
  2092.                 turn lloarm to z-axis <-2> speed <650>;        
  2093.                 turn lhand to x-axis <-14> speed <650>;
  2094.                 turn lhand to y-axis <-9> speed <650>;
  2095.                 turn lhand to z-axis <-25> speed <650>;
  2096.                 turn rshol to x-axis <-44> speed <650>;
  2097.                 turn rshol to y-axis <28> speed <650>;
  2098.                 turn relb to x-axis <14> speed <650>;
  2099.                 turn relb to y-axis <29> speed <650>;
  2100.                 turn relb to z-axis <-22> speed <650>;
  2101.                 turn rhand to x-axis <21> speed <650>;
  2102.                 turn rhand to y-axis <-32> speed <650>;
  2103.                 turn rhand to z-axis <14> speed <650>;
  2104.         if (runtype == 4)
  2105.                 {      
  2106.                 if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
  2107.                         {
  2108.                         return 0;
  2109.                         }
  2110.                 else
  2111.                 turn turret to y-axis Func_Var_1 speed <600>;  
  2112.                 turn armpivot to x-axis <0> - Func_Var_2 speed <350>;
  2113.                 }
  2114.         if (runtype == 2)
  2115.                 {      
  2116.                 if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
  2117.                         {
  2118.                         return 0;
  2119.                         }
  2120.                 else
  2121.                 turn turret to y-axis Func_Var_1 speed <600>;
  2122.                 turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
  2123.                 }
  2124.         if (runtype == 1)
  2125.                 {      
  2126.                 if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
  2127.                         {
  2128.                         return 0;
  2129.                         }
  2130.                 else
  2131.                 turn turret to y-axis Func_Var_1 speed <600>;
  2132.                 turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
  2133.                 }      
  2134.         wait-for-turn turret around y-axis;
  2135.         start-script RestoreAfterDelay();
  2136.         if(bullets < 1)
  2137.         {
  2138.         return (0);
  2139.         }
  2140.         else
  2141.         return (1);
  2142.         }
  2143. }
  2144.  
  2145. AimWeapon4(Func_Var_1, Func_Var_2)
  2146. {
  2147.         if( runtype == 4 && bMoving == 1 )
  2148.         {
  2149.         return (0);
  2150.         }
  2151.         if((aimtype != 2) or (pistol != 0) or (dead == 1) or (buzy != 0) or (sready ==1))
  2152.         {
  2153.         return (0);
  2154.         }
  2155.         else
  2156.                         if (ammunition <= 0 && pistol  == 0)
  2157.                         {
  2158.                         pistol = 1;
  2159.                         call-script ToPistol();
  2160.                         return 0;
  2161.                         }
  2162.         if ( aimtype == 2 && buzy == 0)        
  2163.         {
  2164.         signal SIG_AIM;
  2165.         set-signal-mask SIG_AIM;
  2166.         bAiming = TRUE;
  2167.                 while( !Static_Var_3 )
  2168.                 {
  2169.                 sleep 5;
  2170.                 }
  2171.                 if (runtype == 4)
  2172.                         {
  2173.                         turn head to x-axis <8> speed <650>;
  2174.                         turn head to z-axis <-12> speed <650>;
  2175.                         turn torso to x-axis <0> speed <650>;
  2176.                         }
  2177.                 if (runtype == 2)
  2178.                         {
  2179.                         turn head to x-axis <-20> speed <650>;
  2180.                         turn head to z-axis <-6> speed <650>;
  2181.                         turn torso to x-axis <20> speed <650>;
  2182.                         }
  2183.                 if (runtype == 1)
  2184.                         {
  2185.                         turn head to x-axis <-45> speed <650>;
  2186.                         turn head to z-axis <-2> speed <650>;
  2187.                         turn torso to x-axis <45> speed <650>;
  2188.                         }
  2189.                 turn rpad to x-axis <-15> speed <650>;
  2190.                 turn lpad to x-axis <-15> speed <650>;
  2191.                 turn torso to y-axis <-30> speed <650>;
  2192.                 turn lshol to x-axis <-66> speed <650>;
  2193.                 turn lshol to y-axis <-25> speed <650>;
  2194.                 turn lelb to x-axis <67> speed <650>;
  2195.                 turn lelb to y-axis <47> speed <650>;
  2196.                 turn lelb to z-axis <105> speed <650>;
  2197.                 turn lloarm to x-axis <21> speed <650>;
  2198.                 turn lloarm to y-axis <-4> speed <650>;
  2199.                 turn lloarm to z-axis <-2> speed <650>;        
  2200.                 turn lhand to x-axis <-14> speed <650>;
  2201.                 turn lhand to y-axis <-9> speed <650>;
  2202.                 turn lhand to z-axis <-25> speed <650>;
  2203.                 turn rshol to x-axis <-44> speed <650>;
  2204.                 turn rshol to y-axis <28> speed <650>;
  2205.                 turn relb to x-axis <14> speed <650>;
  2206.                 turn relb to y-axis <29> speed <650>;
  2207.                 turn relb to z-axis <-22> speed <650>;
  2208.                 turn rhand to x-axis <21> speed <650>;
  2209.                 turn rhand to y-axis <-32> speed <650>;
  2210.                 turn rhand to z-axis <14> speed <650>;
  2211.         if (runtype == 4)
  2212.                 {      
  2213.                 if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
  2214.                         {
  2215.                         return 0;
  2216.                         }
  2217.                 else
  2218.                 turn turret to y-axis Func_Var_1 speed <600>;  
  2219.                 turn armpivot to x-axis <0> - Func_Var_2 speed <350>;
  2220.                 }
  2221.         if (runtype == 2)
  2222.                 {      
  2223.                 if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
  2224.                         {
  2225.                         return 0;
  2226.                         }
  2227.                 else
  2228.                 turn turret to y-axis Func_Var_1 speed <600>;
  2229.                 turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
  2230.                 }
  2231.         if (runtype == 1)
  2232.                 {      
  2233.                 if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
  2234.                         {
  2235.                         return 0;
  2236.                         }
  2237.                 else
  2238.                 turn turret to y-axis Func_Var_1 speed <600>;
  2239.                 turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
  2240.                 }
  2241.         wait-for-turn turret around y-axis;
  2242.         start-script RestoreAfterDelay();
  2243.         if(bullets < 1)
  2244.         {
  2245.         return (0);
  2246.         }
  2247.         else
  2248.         return (1);
  2249.         }
  2250. }
  2251.  
  2252. AimWeapon5(Func_Var_1, Func_Var_2)
  2253. {
  2254.         if( runtype == 4 && bMoving == 1 )
  2255.         {
  2256.         return (0);
  2257.         }
  2258.         if((aimtype != 3) or (pistol != 0) or (dead == 1) or (buzy != 0) or (sready ==1))
  2259.         {
  2260.         return (0);
  2261.         }
  2262.         else
  2263.                         if (ammunition <= 0 && pistol  == 0)
  2264.                         {
  2265.                         pistol = 1;
  2266.                         call-script ToPistol();
  2267.                         return 0;
  2268.                         }
  2269.         if ( aimtype == 3 && buzy == 0)        
  2270.         {
  2271.         signal SIG_AIM;
  2272.         set-signal-mask SIG_AIM;
  2273.         bAiming = TRUE;
  2274.                 while( !Static_Var_3 )
  2275.                 {
  2276.                 sleep 5;
  2277.                 }
  2278.                 if (runtype == 4)
  2279.                         {
  2280.                         turn head to x-axis <8> speed <650>;
  2281.                         turn head to z-axis <-12> speed <650>;
  2282.                         turn torso to x-axis <0> speed <650>;
  2283.                         }
  2284.                 if (runtype == 2)
  2285.                         {
  2286.                         turn head to x-axis <-20> speed <650>;
  2287.                         turn head to z-axis <-6> speed <650>;
  2288.                         turn torso to x-axis <20> speed <650>;
  2289.                         }
  2290.                 if (runtype == 1)
  2291.                         {
  2292.                         turn head to x-axis <-45> speed <650>;
  2293.                         turn head to z-axis <-2> speed <650>;
  2294.                         turn torso to x-axis <45> speed <650>;
  2295.                         }
  2296.                 turn rpad to x-axis <-15> speed <650>;
  2297.                 turn lpad to x-axis <-15> speed <650>;
  2298.                 turn torso to y-axis <-30> speed <650>;
  2299.                 turn lshol to x-axis <-66> speed <650>;
  2300.                 turn lshol to y-axis <-25> speed <650>;
  2301.                 turn lelb to x-axis <67> speed <650>;
  2302.                 turn lelb to y-axis <47> speed <650>;
  2303.                 turn lelb to z-axis <105> speed <650>;
  2304.                 turn lloarm to x-axis <21> speed <650>;
  2305.                 turn lloarm to y-axis <-4> speed <650>;
  2306.                 turn lloarm to z-axis <-2> speed <650>;        
  2307.                 turn lhand to x-axis <-14> speed <650>;
  2308.                 turn lhand to y-axis <-9> speed <650>;
  2309.                 turn lhand to z-axis <-25> speed <650>;
  2310.                 turn rshol to x-axis <-44> speed <650>;
  2311.                 turn rshol to y-axis <28> speed <650>;
  2312.                 turn relb to x-axis <14> speed <650>;
  2313.                 turn relb to y-axis <29> speed <650>;
  2314.                 turn relb to z-axis <-22> speed <650>;
  2315.                 turn rhand to x-axis <21> speed <650>;
  2316.                 turn rhand to y-axis <-32> speed <650>;
  2317.                 turn rhand to z-axis <14> speed <650>;
  2318.                
  2319.         if (runtype == 4)
  2320.                 {      
  2321.                 if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
  2322.                         {
  2323.                         return 0;
  2324.                         }
  2325.                 else
  2326.                 turn turret to y-axis Func_Var_1 speed <600>;
  2327.                 turn armpivot to x-axis <0> - Func_Var_2 speed <350>;  
  2328.                 }
  2329.         if (runtype == 2)
  2330.                 {      
  2331.                 if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
  2332.                         {
  2333.                         return 0;
  2334.                         }
  2335.                 else
  2336.                 turn turret to y-axis Func_Var_1 speed <600>;
  2337.                 turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
  2338.                 }
  2339.         if (runtype == 1)
  2340.                 {      
  2341.                 if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
  2342.                         {
  2343.                         return 0;
  2344.                         }
  2345.                 else
  2346.                 turn turret to y-axis Func_Var_1 speed <600>;
  2347.                 turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
  2348.                 }
  2349.         wait-for-turn turret around y-axis;
  2350.         start-script RestoreAfterDelay();
  2351.                 if(bullets < 1)
  2352.                 {
  2353.                 return (0);
  2354.                 }
  2355.         else
  2356.         return (1);
  2357.         }
  2358. }
  2359.  
  2360. AimWeapon2(Func_Var_1, Func_Var_2)
  2361. {
  2362.         if( runtype == 4 && bMoving == 1 )
  2363.         {
  2364.         return (0);
  2365.         }
  2366.         if ((dead == 1 ) or ( pistol != 2 ))
  2367.         {
  2368.         return (0);
  2369.         }
  2370.         if (pistol == 2 && buzy == 0)
  2371.         {
  2372.                 if ( ammunition >= 1)
  2373.                         {
  2374.                         pistol = 3; //transitiion to rifle
  2375.                         call-script ToRifle();
  2376.                         sleep 800;
  2377.                         }
  2378.                 signal SIG_AIM_2;
  2379.                 set-signal-mask SIG_AIM_2;
  2380.                 bAiming = TRUE;
  2381.         while( !Static_Var_3 )
  2382.                 {
  2383.                 sleep 5;
  2384.                 }
  2385.                 if (runtype == 4)
  2386.                         {
  2387.                         turn head to x-axis <8> speed <650>;
  2388.                         turn head to z-axis <-12> speed <650>;
  2389.                         turn torso to x-axis <0> speed <650>;
  2390.                         }
  2391.                 if (runtype == 2)
  2392.                         {
  2393.                         turn head to x-axis <-20> speed <650>;
  2394.                         turn head to z-axis <-6> speed <650>;
  2395.                         turn torso to x-axis <20> speed <650>;
  2396.                         }
  2397.                 if (runtype == 1)
  2398.                         {
  2399.                         turn head to x-axis <-45> speed <650>;
  2400.                         turn head to z-axis <-2> speed <650>;
  2401.                         turn torso to x-axis <45> speed <650>;
  2402.                         }
  2403.                 turn torso to y-axis <0> speed <650>;
  2404.                 turn lloarm to x-axis <0> speed <650>;
  2405.                 turn lloarm to y-axis <0> speed <650>;
  2406.                 turn lloarm to z-axis <0> speed <650>;
  2407.                 turn rpad to x-axis <0> speed <650>;
  2408.                 turn lpad to x-axis <0> speed <650>;
  2409.                
  2410.                 turn rshol to x-axis <-78> speed <250>;
  2411.                 turn rshol to y-axis <0> speed <250>;
  2412.                 turn rshol to z-axis <-37> speed <250>;
  2413.                 turn relb to x-axis <75> speed <250>;
  2414.                 turn relb to y-axis <0> speed <250>;
  2415.                 turn relb to z-axis <0> speed <250>;
  2416.                 turn rhand to x-axis <3> speed <250>;
  2417.                 turn rhand to y-axis <-21> speed <250>;
  2418.                 turn rhand to z-axis <0> speed <250>;  
  2419.                 turn lshol to x-axis <-64> speed <250>;
  2420.                 turn lshol to y-axis <-19> speed <250>;
  2421.                 turn lshol to z-axis <7> speed <250>;
  2422.                 turn lelb to x-axis <57> speed <250>;
  2423.                 turn lelb to y-axis <-2> speed <250>;
  2424.                 turn lelb to z-axis <0> speed <250>;
  2425.                 turn lhand to x-axis <-8> speed <250>;
  2426.                 turn lhand to y-axis <5> speed <250>;
  2427.                 turn lhand to z-axis <-4> speed <250>;
  2428.                        
  2429.         if (runtype == 4)
  2430.                 {      
  2431.                 if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
  2432.                         {
  2433.                         return 0;
  2434.                         }
  2435.                 else
  2436.                 turn turret to y-axis Func_Var_1 speed <600>;  
  2437.                 turn armpivot to x-axis <0> - Func_Var_2 speed <350>;
  2438.                 }
  2439.         if (runtype == 2)
  2440.                 {      
  2441.                 if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
  2442.                         {
  2443.                         return 0;
  2444.                         }
  2445.                 else
  2446.                 turn turret to y-axis Func_Var_1 speed <600>;
  2447.                 turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
  2448.                 }
  2449.         if (runtype == 1)
  2450.                 {      
  2451.                 if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
  2452.                         {
  2453.                         return 0;
  2454.                         }
  2455.                 else
  2456.                 turn turret to y-axis Func_Var_1 speed <600>;
  2457.                 turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
  2458.                 }
  2459.         wait-for-turn armpivot around x-axis;
  2460.         wait-for-turn turret around y-axis;
  2461.         start-script RestoreAfterDelay();
  2462.         return (1);
  2463.         }
  2464. }
  2465.  
  2466. Aimweapon1(Func_Var_1, Func_Var_2 )
  2467. {
  2468.         if(dead == 1)
  2469.         {
  2470.         return (0);
  2471.         }
  2472.         if (sready == 1 && sout == 0)
  2473.                 {
  2474.                 call-script tosword();
  2475.                 }      
  2476.         if (sready == 1 && sout == 3)
  2477.                 {
  2478.                 call-script resetsword();
  2479.                 }      
  2480.         if (sready == 1 && buzy == 0)
  2481.                 {
  2482.                 signal SIG_AIM_3;
  2483.                 set-signal-mask SIG_AIM_3;
  2484.                 bAiming = 1;
  2485.         //set up gun
  2486.                 if (runtype == 4)
  2487.                         {
  2488.                         turn head to x-axis <8> speed <650>;
  2489.                         turn torso to x-axis <0> speed <650>;
  2490.                         }
  2491.                 if (runtype == 2)
  2492.                         {
  2493.                         turn head to x-axis <-20> speed <650>;
  2494.                         turn torso to x-axis <20> speed <650>;
  2495.                         }
  2496.                 if (runtype == 1)
  2497.                         {
  2498.                         turn head to x-axis <-45> speed <650>;
  2499.                         turn torso to x-axis <45> speed <650>;
  2500.                         }
  2501.                         //if (( Func_Var_1 > <100>) && ( Func_Var_1 < <260>))
  2502.                         //{
  2503.                         //return 0;
  2504.                         //}            
  2505.         turn turret to y-axis Func_Var_1 speed <600>;
  2506.         turn torso to y-axis <-66> speed <500>;
  2507.         turn head to y-axis <58> speed <500>;
  2508.         turn rhand to x-axis <-30> speed <500>;
  2509.         turn rhand to y-axis <-19> speed <500>;
  2510.         turn rhand to z-axis <-71> speed <500>;
  2511.         wait-for-turn torso around y-axis;
  2512.         wait-for-turn turret around y-axis;
  2513.         start-script RestoreAfterSwing();
  2514.         return (1);
  2515.                 }
  2516. }
  2517.  
  2518. StartBuilding(Func_Var_1, Func_Var_2)
  2519. {
  2520.         while( !Static_Var_3 )
  2521.         {
  2522.                 sleep 100;
  2523.         }
  2524.         while (buzy !=0)
  2525.         {
  2526.         sleep 800;
  2527.         }
  2528.         if (buzy == 0)
  2529.         {
  2530.                         if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
  2531.                         {
  2532.                         return 0;
  2533.                         }
  2534.         turn turret to y-axis Func_Var_1 speed <300.071429>;
  2535.         wait-for-turn turret around y-axis;
  2536.         set INBUILDSTANCE to 1;
  2537.         }
  2538. }
  2539.  
  2540. TargetCleared(Func_Var_1)
  2541. {
  2542.         signal 2;
  2543.         set-signal-mask 2;
  2544.         call-script RestoreAfterDelay();
  2545. }
  2546.  
  2547. StopBuilding()
  2548. {
  2549.         set INBUILDSTANCE to 0;
  2550.         signal 2;
  2551.         set-signal-mask 2;
  2552.         call-script RestoreAfterDelay();
  2553. }
  2554.  
  2555. SweetSpot(piecenum)
  2556. {
  2557.         piecenum = torso;
  2558. }
  2559.  
  2560. HitByWeaponId(var1posZ,var2posX,id,shot_power)
  2561. {
  2562. var rando;
  2563.         if (buzy == 0 && stance != 0)
  2564.                 {
  2565.                 if (id == 48)   //sword
  2566.                         {
  2567.                         ohnoes = rand (0,32);
  2568.                         if (sready == 1 ) { ohnoes = ohnoes - 16; }
  2569.                         if (ohnoes >= 8)
  2570.                                 {
  2571.                                 buzy = 1; //dont shoot
  2572.                                 turn torso to x-axis <45> speed <600>;
  2573.                                 turn armpivot to x-axis <-30> speed <600>;
  2574.                                 sleep (50 * ohnoes);
  2575.                                 turn torso to x-axis <0> speed <300>;
  2576.                                 turn armpivot to x-axis <0> speed <300>;       
  2577.                                 sleep 200;
  2578.                                 buzy = 0;
  2579.                                 }
  2580.                         }
  2581.                 if (id == 100)   //light suppression
  2582.                         {
  2583.                         ohnoes = rand (0,60);
  2584.                         }
  2585.                 if (id == 101)  //med supprsion
  2586.                          {
  2587.                          ohnoes = rand (0,80);                   
  2588.                          }
  2589.                 if (id == 102)  //heavy suppression
  2590.                          {
  2591.                         ohnoes = rand (0,100);                   
  2592.                         }
  2593.                         if (down == 1 ) { ohnoes = ohnoes - 10; }
  2594.                 if ( ohnoes >= 40 )    
  2595.                         {
  2596.                         buzy = 1;
  2597.                         start-script cover();  
  2598.                         }
  2599.                 }
  2600. if (runtype == 4)
  2601.         {
  2602.         rando = rand(1,10);
  2603.         if (rando == 10) {return 0;}
  2604.         else   
  2605.         rando = rand(50,150);
  2606.         return rando;
  2607.         }
  2608. if (runtype == 2)
  2609.         {
  2610.         rando = rand(1,5);
  2611.         if (rando == 5) {return 0;}
  2612.         else
  2613.         rando = rand(80,120);
  2614.         return rando;
  2615.         }
  2616. if (runtype == 1)
  2617.         {
  2618.         ohnoes = ohnoes - 10; //lower fear
  2619.         rando = rand(1,2);
  2620.         if (rando == 2) {return 0;}
  2621.         else
  2622.         rando = rand(60,100);
  2623.         return rando;
  2624.         }
  2625. }
  2626.  
  2627. Killed(severity, corpsetype)
  2628. {
  2629.         dead = 1;      
  2630.         set MAX_SPEED to 1;
  2631.        
  2632.         if(  severity <= 500 )
  2633.         {
  2634.         if (down != 1 && buzy == 0)
  2635.                 {
  2636.                 move pelvis to y-axis [0] speed [12];
  2637.                 move base to z-axis [0] speed [12];
  2638.                 }
  2639.         turn turret to x-axis <0> speed <250>;
  2640.         //fall part 1
  2641.         turn gun1 to x-axis <10> speed <300>;
  2642.         move gun1 to z-axis [3] speed [5];
  2643.         move gun1 to y-axis [0.2] speed [5];
  2644.         turn base to x-axis <29> speed <300>;
  2645.         turn base to z-axis <26> speed <300>;
  2646.         turn turret to y-axis <30> speed <300>;
  2647.         turn torso to y-axis <0> speed <300>;
  2648.         turn torso to x-axis <10> speed <300>;
  2649.         turn head to x-axis <21> speed <300>;
  2650.         turn lpad to x-axis <10> speed <300>;
  2651.         turn rpad to x-axis <10> speed <300>;
  2652.         turn armpivot to x-axis <0> speed <300>;
  2653.         turn lshol to y-axis <36> speed <300>;
  2654.         turn rshol to y-axis <-30> speed <300>;
  2655.         turn relb to x-axis <33> speed <300>;
  2656.         turn rupleg to x-axis <15> speed <300>;
  2657.         wait-for-turn base around x-axis;
  2658.         sleep 100;
  2659. //fall part 2
  2660. turn gun1 to x-axis <30> speed <500>;
  2661. move gun1 to y-axis [3] speed [9];
  2662. turn base to x-axis <65> speed <500>;
  2663. turn base to y-axis <8> speed <500>;
  2664. turn base to z-axis <26> speed <500>;
  2665. turn pelvis to x-axis <16> speed <500>;
  2666. turn armpivot to x-axis <21> speed <500>;
  2667. turn relb to y-axis <-40> speed <500>;
  2668. wait-for-turn base around x-axis;
  2669. //fall part 3
  2670. turn gun1 to x-axis <-65> speed <500>;
  2671. turn gun1 to y-axis <-11> speed <500>;
  2672. turn gun1 to z-axis <22> speed <500>;
  2673. move gun1 to x-axis [0.2] speed [6];
  2674. move gun1 to y-axis [5.3] speed [6];
  2675. move gun1 to z-axis [3.5] speed [6];
  2676. turn base to x-axis <90> speed <500>;
  2677. turn torso to x-axis <-15> speed <500>;
  2678. turn torso to y-axis <-23> speed <500>;
  2679. turn torso to z-axis <-3> speed <500>;
  2680. turn armpivot to x-axis <-6> speed <500>;
  2681. turn lelb to x-axis <33> speed <500>;
  2682. turn lelb to y-axis <-54> speed <500>;
  2683. turn lelb to z-axis <-1> speed <500>;
  2684. turn rupleg to x-axis <0> speed <500>;
  2685. turn lloleg to x-axis <-15> speed <500>;
  2686. turn lupfoot to x-axis <10> speed <500>;
  2687. turn lupfoot to y-axis <45> speed <500>;
  2688. turn lupfoot to z-axis <-20> speed <500>;
  2689. turn rloleg to x-axis <-20> speed <500>;
  2690. turn rupfoot to x-axis <-30> speed <500>;
  2691. wait-for-turn lupfoot around y-axis;
  2692.         corpsetype = 1;
  2693.         return (0);
  2694.         }
  2695.  
  2696.         if( severity > 300 )
  2697.         {
  2698.                 corpsetype = 3;
  2699.                 return (0);
  2700.         }
  2701.         corpsetype = 1;
  2702.         return (0);
  2703. }