- #define TA //no its not
- piece base, pelvis, pcuf, torso, turret, neck, head, ob1, bag, rpad, lpad;
- piece armpivot, rshol, lshol, ruparm, luparm, lelb, relb, rloarm, lloarm;
- piece lwrist, rwrist, lhand, rhand, swordx, sword1, cut;
- piece rupleg, lupleg, lloleg, rloleg, rupfoot, lupfoot, rlofoot, llofoot;
- piece gun1, mag1, mag2, gunx, magx, pistol1, pflare, pistolx, shell, flare;
- #include "SFXtype.h"
- #include "exptype.h"
- static-var bMoving, bAiming, Static_Var_3, restore_delay, statechg_DesiredState, statechg_StateChanging;
- static-var dead, runtype, aimtype, down, regspeed, fastspeed, slowspeed, reglos, buzy, ohnoes, stance;
- static-var pistol, ammunition, bullets, loaded, sready, sout;
- #define SIG_AIM 2
- //// for rifles
- #define SIG_AIM_2 4
- // for pistol
- #define SIG_AIM_3 8
- //// for rifle
- #ifndef MAX_SPEED
- #define MAX_SPEED 75
- #endif
- #ifndef CLOAKED
- #define CLOAKED 76
- #endif
- RestoreAfterDelay()
- {
- sleep restore_delay;
- //alert
- if (dead == 0 && buzy == 0 && sready == 0)
- {
- if (pistol == 0)
- {
- //fix from aiming
- if (runtype != 1)
- {
- turn torso to x-axis <0> speed <150>;
- turn head to x-axis <0> speed <150>;
- }
- turn turret to z-axis <0> now;
- turn torso to y-axis <0> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lloarm to x-axis <0> speed <150>;
- turn lloarm to y-axis <0> speed <150>;
- turn lloarm to z-axis <0> speed <150>;
- turn lshol to x-axis <0> speed <150>;
- turn lshol to y-axis <0> speed <150>;
- turn rshol to x-axis <0> speed <150>;
- turn rshol to y-axis <0> speed <150>;
- turn rhand to x-axis <0> speed <150>;
- turn rhand to y-axis <0> speed <150>;
- turn rhand to z-axis <0> speed <150>;
- turn rpad to x-axis <0> speed <150>;
- turn lpad to x-axis <0> speed <150>;
- //set up
- turn turret to y-axis <0> speed <150>;
- turn armpivot to x-axis <-15> speed <150>;
- turn lelb to x-axis <40> speed <150>;
- turn lelb to y-axis <-31> speed <150>;
- turn lelb to z-axis <64> speed <150>;
- turn lhand to x-axis <13> speed <150>;
- turn lhand to y-axis <-21> speed <150>;
- turn lhand to z-axis <-2> speed <150>;
- turn relb to x-axis <20> speed <150>;
- turn relb to y-axis <58> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- }
- if (pistol != 0 && buzy == 0)
- {
- if (runtype != 1)
- {
- turn torso to x-axis <0> speed <150>;
- turn head to x-axis <0> speed <150>;
- }
- turn turret to z-axis <0> now;
- turn armpivot to x-axis <-10> speed <150>;;
- turn torso to y-axis <0> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lloarm to x-axis <0> speed <150>;
- turn lloarm to y-axis <0> speed <150>;
- turn lloarm to z-axis <0> speed <150>;
- turn rpad to x-axis <0> speed <150>;
- turn lpad to x-axis <0> speed <150>;
- turn lshol to x-axis <-29> speed <250>;
- turn lshol to y-axis <-19> speed <250>;
- turn lshol to z-axis <7> speed <250>;
- turn lelb to x-axis <57> speed <320>;
- turn lelb to y-axis <-7> speed <250>;
- turn lelb to z-axis <0> speed <250>;
- turn lhand to x-axis <-8> speed <250>;
- turn lhand to y-axis <5> speed <250>;
- turn lhand to z-axis <-4> speed <250>;
- turn rshol to x-axis <-40> speed <250>;
- turn rshol to y-axis <0> speed <250>;
- turn rshol to z-axis <-37> speed <250>;
- turn relb to x-axis <75> speed <250>;
- turn relb to y-axis <0> speed <250>;
- turn relb to z-axis <0> speed <250>;
- turn rhand to x-axis <0> speed <250>;
- turn rhand to y-axis <-20> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- }
- sleep 200;
- bAiming = 0;
- }
- }
- walk()
- {
- if (down != 1 && buzy == 0)
- {
- if (runtype == 1)
- {
- turn torso to x-axis <45> now;
- turn head to x-axis <-45> now;
- turn head to z-axis <0> now;
- }
- if (runtype == 2)
- {
- turn torso to x-axis <20> now;
- turn head to x-axis <-20> now;
- turn head to z-axis <0> now;
- }
- if (runtype == 4)
- {
- turn torso to x-axis <0> now;
- turn head to x-axis <0> now;
- turn head to z-axis <0> now;
- }
- if( TRUE )
- {
- turn turret to z-axis <0> now;
- turn armpivot to x-axis <-15> now;
- move pelvis to y-axis [0] now;
- turn rpad to x-axis <0> now;
- turn lpad to x-axis <0> now;
- turn rupleg to x-axis <5.670330> now;
- turn lupleg to x-axis <-26.467033> now;
- turn torso to y-axis <3.335165> now;
- turn lloleg to x-axis <26.967033> now;
- turn rloleg to x-axis <26.967033> now;
- turn rupfoot to x-axis <-19.824176> now;
- sleep (20 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-5.269231> now;
- turn lupleg to x-axis <-20.989011> now;
- turn torso to y-axis <1.681319> now;
- turn lloleg to x-axis <20.945055> now;
- turn rloleg to x-axis <41.368132> now;
- turn rupfoot to x-axis <-15.747253> now;
- sleep (18 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-9.071429> now;
- turn lupleg to x-axis <-12.670330> now;
- turn torso to y-axis <0> now;
- turn lloleg to x-axis <12.670330> now;
- turn rloleg to x-axis <43.571429> now;
- turn rupfoot to x-axis <-12.016484> now;
- sleep (10 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-21.357143> now;
- turn lupleg to x-axis <2.824176> now;
- turn torso to y-axis <-1.769231> now;
- turn lloleg to x-axis <3.560440> now;
- turn lupfoot to x-axis <-4.527473> now;
- turn rloleg to x-axis <52.505495> now;
- turn rupfoot to x-axis <0> now;
- sleep (10 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-35.923077> now;
- turn lupleg to x-axis <7.780220> now;
- turn torso to y-axis <-3.148352> now;
- turn lloleg to x-axis <8.203297> now;
- turn lupfoot to x-axis <-12.571429> now;
- turn rloleg to x-axis <54.390110> now;
- sleep (15 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-37.780220> now;
- turn lupleg to x-axis <10.137363> now;
- turn torso to y-axis <-4.203297> now;
- turn lloleg to x-axis <13.302198> now;
- turn lupfoot to x-axis <-16.714286> now;
- turn rloleg to x-axis <32.582418> now;
- sleep (15 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-28.758242> now;
- turn lupleg to x-axis <12.247253> now;
- turn torso to y-axis <-3.148352> now;
- turn lloleg to x-axis <19.659341> now;
- turn lupfoot to x-axis <-19.659341> now;
- turn rloleg to x-axis <28.758242> now;
- sleep (20 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-22.824176> now;
- turn lupleg to x-axis <2.824176> now;
- turn torso to y-axis <-1.879121> now;
- turn lloleg to x-axis <34.060440> now;
- turn rupfoot to x-axis <-6.313187> now;
- sleep (20 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-11.604396> now;
- turn lupleg to x-axis <-6.725275> now;
- turn torso to y-axis <0> now;
- turn lloleg to x-axis <39.401099> now;
- turn lupfoot to x-axis <-13.956044> now;
- turn rloleg to x-axis <19.005495> now;
- turn rupfoot to x-axis <-7.615385> now;
- sleep (20 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <1.857143> now;
- turn lupleg to x-axis <-24.357143> now;
- turn torso to y-axis <1.879121> now;
- turn lloleg to x-axis <45.093407> now;
- turn lupfoot to x-axis <-7.703297> now;
- turn rloleg to x-axis <3.560440> now;
- turn rupfoot to x-axis <-4.934066> now;
- sleep (10 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <7.148352> now;
- turn lupleg to x-axis <-28.181319> now;
- turn torso to y-axis <3.148352> now;
- turn rupfoot to x-axis <-9.813187> now;
- sleep (15 * (1 / runtype));
- }
- turn rupleg to x-axis <8.423077> now;
- turn lupleg to x-axis <-32.060440> now;
- turn torso to y-axis <4.203297> now;
- turn lloleg to x-axis <27.527473> now;
- turn lupfoot to x-axis <-2.857143> now;
- turn rloleg to x-axis <24.670330> now;
- turn rupfoot to x-axis <-33.313187> now;
- sleep (20 * (1 / runtype));
- }
- }
- walklolegs()
- {
- if (down != 1 && buzy == 0)
- {
- if( TRUE )
- {
- turn turret to z-axis <0> now;
- move pelvis to y-axis [0] now;
- turn rupleg to x-axis <5.670330> now;
- turn lupleg to x-axis <-26.467033> now;
- turn lloleg to x-axis <26.967033> now;
- turn rloleg to x-axis <26.967033> now;
- turn rupfoot to x-axis <-19.824176> now;
- sleep (20 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-5.269231> now;
- turn lupleg to x-axis <-20.989011> now;
- turn lloleg to x-axis <20.945055> now;
- turn rloleg to x-axis <41.368132> now;
- turn rupfoot to x-axis <-15.747253> now;
- sleep (15 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-9.071429> now;
- turn lupleg to x-axis <-12.670330> now;
- turn lloleg to x-axis <12.670330> now;
- turn rloleg to x-axis <43.571429> now;
- turn rupfoot to x-axis <-12.016484> now;
- sleep (10 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-21.357143> now;
- turn lupleg to x-axis <2.824176> now;
- turn lloleg to x-axis <3.560440> now;
- turn lupfoot to x-axis <-4.527473> now;
- turn rloleg to x-axis <52.505495> now;
- turn rupfoot to x-axis <0> now;
- sleep (8 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-35.923077> now;
- turn lupleg to x-axis <7.780220> now;
- turn lloleg to x-axis <8.203297> now;
- turn lupfoot to x-axis <-12.571429> now;
- turn rloleg to x-axis <54.390110> now;
- sleep (10 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-37.780220> now;
- turn lupleg to x-axis <10.137363> now;
- turn lloleg to x-axis <13.302198> now;
- turn lupfoot to x-axis <-16.714286> now;
- turn rloleg to x-axis <32.582418> now;
- sleep (15 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-28.758242> now;
- turn lupleg to x-axis <12.247253> now;
- turn lloleg to x-axis <19.659341> now;
- turn lupfoot to x-axis <-19.659341> now;
- turn rloleg to x-axis <28.758242> now;
- sleep (20 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-22.824176> now;
- turn lupleg to x-axis <2.824176> now;
- turn lloleg to x-axis <34.060440> now;
- turn rupfoot to x-axis <-6.313187> now;
- sleep (15 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <-11.604396> now;
- turn lupleg to x-axis <-6.725275> now;
- turn lloleg to x-axis <39.401099> now;
- turn lupfoot to x-axis <-13.956044> now;
- turn rloleg to x-axis <19.005495> now;
- turn rupfoot to x-axis <-7.615385> now;
- sleep (10 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <1.857143> now;
- turn lupleg to x-axis <-24.357143> now;
- turn lloleg to x-axis <45.093407> now;
- turn lupfoot to x-axis <-7.703297> now;
- turn rloleg to x-axis <3.560440> now;
- turn rupfoot to x-axis <-4.934066> now;
- sleep (8 * (1 / runtype));
- }
- if( TRUE )
- {
- turn rupleg to x-axis <7.148352> now;
- turn lupleg to x-axis <-28.181319> now;
- turn rupfoot to x-axis <-9.813187> now;
- sleep (10 * (1 / runtype));
- }
- turn rupleg to x-axis <8.423077> now;
- turn lupleg to x-axis <-32.060440> now;
- turn lloleg to x-axis <27.527473> now;
- turn lupfoot to x-axis <-2.857143> now;
- turn rloleg to x-axis <24.670330> now;
- turn rupfoot to x-axis <-33.313187> now;
- sleep (15 * (1 / runtype));
- }
- }
- slither()
- {
- if (down == 3 && buzy == 1)
- {
- set MAX_SPEED to ((regspeed / 8));
- if( TRUE )
- {
- turn turret to z-axis <15> now;
- turn relb to y-axis <15> now;
- turn rhand to z-axis <90> now;
- sleep 500;
- }
- if( TRUE )
- {
- turn turret to z-axis <15> now;
- turn relb to y-axis <35> now;
- turn lshol to x-axis <-37> now;
- turn lelb to x-axis <56> now;
- sleep 500;
- }
- if( TRUE )
- {
- turn turret to z-axis <-15> now;
- turn relb to y-axis <45> now;
- turn lshol to x-axis <0> now;
- turn lelb to x-axis <0> now;
- sleep 500;
- }
- if( TRUE )
- {
- turn turret to z-axis <15> now;
- turn relb to y-axis <35> now;
- turn lshol to x-axis <-37> now;
- turn lelb to x-axis <56> now;
- sleep 500;
- }
- turn turret to z-axis <0> now;
- }
- }
- sit()
- {
- var seating; //different kind of busy
- var transid;
- transid = get 94; //TRANSPORT_ID
- seating = get 100(transid); //cobid
- loaded = 1;
- if (seating == 101)
- {
- buzy = 2;
- //clean up arm
- turn rloarm to x-axis <0> now;
- turn rloarm to y-axis <0> now;
- turn rloarm to z-axis <0> now;
- turn ruparm to x-axis <0> now;
- turn ruparm to y-axis <0> now;
- turn ruparm to z-axis <0> now;
- turn rshol to x-axis <0> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn rhand to y-axis <0> now;
- turn rhand to z-axis <0> now;
- turn lloarm to x-axis <0> now;
- turn lloarm to y-axis <0> now;
- turn lloarm to z-axis <0> now;
- turn lshol to x-axis <0> now;
- turn lshol to y-axis <0> now;
- turn lshol to z-axis <0> now;
- turn lhand to y-axis <0> now;
- turn lhand to z-axis <0> now;
- turn pelvis to x-axis <-20> now;
- turn turret to x-axis <20> now;
- turn rupleg to x-axis <-50> now;
- turn lupleg to x-axis <-50> now;
- turn armpivot to x-axis <-40> now;
- turn lelb to x-axis <37> now;
- turn lelb to y-axis <-50> now;
- turn lelb to z-axis <28> now;
- turn lhand to x-axis <-32> now;
- turn relb to x-axis <37> now;
- turn relb to y-axis <50> now;
- turn relb to z-axis <-28> now;
- turn rhand to x-axis <-32> now;
- hide gun1;
- hide mag1;
- hide mag2;
- hide pistol1;
- hide sword1;
- show swordx;
- show pistolx;
- show gunx;
- show magx;
- turn gunx to x-axis <20> now;
- turn gunx to y-axis <-35> now;
- turn gunx to z-axis <-30> now;
- }
- if (seating == 102)
- {
- buzy = 0;
- down = 1; //not too busy to shoot
- set MAX_SPEED to 1;
- set ARMORED to 1;
- set 85 to (reglos / 2);
- turn pelvis to x-axis <0> now;
- turn pelvis to y-axis <0> now;
- turn pelvis to y-axis <0> now;
- turn turret to x-axis <0> now;
- turn turret to y-axis <0> now;
- turn turret to y-axis <0> now;
- turn armpivot to x-axis <0> now;
- move pelvis to y-axis [-3.50000] now;
- move pelvis to z-axis [1.00000] now;
- turn lupleg to x-axis <-80> now;
- turn lloleg to x-axis <80> now;
- turn rloleg to x-axis <66> now;
- turn rupfoot to x-axis <68> now;
- }
- sleep 5;
- }
- stand()
- {
- //in knee
- move pelvis to y-axis [-3.50000] now;
- move pelvis to z-axis [1.00000] now;
- turn lupleg to x-axis <-80> now;
- turn lloleg to x-axis <80> now;
- turn rupleg to x-axis <10> now;
- turn rloleg to x-axis <66> now;
- turn rupfoot to x-axis <68> now;
- //clean up upper body
- turn pelvis to x-axis <0> now;
- turn pelvis to y-axis <0> now;
- turn pelvis to y-axis <0> now;
- turn turret to x-axis <0> now;
- turn turret to y-axis <0> now;
- turn turret to y-axis <0> now;
- turn gunx to x-axis <0> now;
- turn gunx to y-axis <0> now;
- turn gunx to z-axis <0> now;
- turn relb to x-axis <0> now;
- turn relb to y-axis <0> now;
- turn relb to x-axis <0> now;
- turn rloarm to x-axis <0> now;
- turn rloarm to y-axis <0> now;
- turn rloarm to z-axis <0> now;
- turn rshol to x-axis <0> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn rhand to x-axis <0> now;
- turn rhand to y-axis <0> now;
- turn rhand to z-axis <0> now;
- turn lelb to x-axis <0> now;
- turn lelb to y-axis <0> now;
- turn lelb to x-axis <0> now;
- turn lloarm to x-axis <0> now;
- turn lloarm to y-axis <0> now;
- turn lloarm to z-axis <0> now;
- turn lshol to x-axis <0> now;
- turn lshol to y-axis <0> now;
- turn lshol to x-axis <0> now;
- turn lhand to x-axis <0> now;
- turn lhand to y-axis <0> now;
- turn lhand to z-axis <0> now;
- sleep 1;
- if ((pistol == 0) && (sready == 0))
- {
- turn turret to y-axis <0> now;
- turn armpivot to x-axis <-15> now;
- turn lelb to x-axis <41> now;
- turn lelb to y-axis <-10> now;
- turn lelb to z-axis <105> now;
- turn lhand to x-axis <24> now;
- turn lhand to y-axis <-4> now;
- turn lhand to z-axis <-4> now;
- turn relb to x-axis <20> now;
- turn relb to y-axis <58> now;
- turn relb to z-axis <-22> now;
- hide gunx;
- hide magx;
- show gun1;
- show mag1;
- }
- if ((pistol != 0) && (sready == 0))
- {
- turn lshol to x-axis <-29> speed <250>;
- turn lshol to y-axis <-19> speed <250>;
- turn lshol to z-axis <7> speed <250>;
- turn lelb to x-axis <57> speed <320>;
- turn lelb to y-axis <-7> speed <250>;
- turn lelb to z-axis <0> speed <250>;
- turn lhand to x-axis <-8> speed <250>;
- turn lhand to y-axis <5> speed <250>;
- turn lhand to z-axis <-4> speed <250>;
- turn rshol to x-axis <-40> speed <250>;
- turn rshol to y-axis <0> speed <250>;
- turn rshol to z-axis <-37> speed <250>;
- turn relb to x-axis <75> speed <250>;
- turn relb to y-axis <0> speed <250>;
- turn relb to z-axis <0> speed <250>;
- turn rhand to x-axis <0> speed <250>;
- turn rhand to y-axis <-20> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- show pistol1;
- hide pistolx;
- }
- if (sready == 1)
- {
- turn lshol to x-axis <-25> now;
- turn lshol to y-axis <-57> now;
- turn lshol to z-axis <0> now;
- turn lelb to x-axis <37> now;
- turn lelb to y-axis <10> now;
- turn lelb to z-axis <0> now;
- turn lhand to x-axis <-38> now;
- turn lhand to y-axis <17> now;
- turn lhand to z-axis <0> now;
- turn rshol to x-axis <-26> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn relb to x-axis <32> now;
- turn relb to y-axis <33> now;
- turn relb to z-axis <0> now;
- turn rhand to x-axis <-30> now;
- turn rhand to y-axis <-19> now;
- turn rhand to z-axis <0> now;
- sleep 300;
- }
- sleep 80;
- move pelvis to y-axis [-2.300000] now;
- move pelvis to z-axis [0.600000] now;
- turn lupleg to x-axis <-50> now;
- turn lloleg to x-axis <50> now;
- turn lupfoot to y-axis <0> now;
- turn lupfoot to x-axis <0> now;
- turn rloleg to x-axis <60> now;
- sleep 80;
- turn pelvis to x-axis <0> now;
- move pelvis to y-axis [-1.300000] now;
- turn lupleg to x-axis <-30> now;
- turn lloleg to x-axis <30> now;
- turn lupfoot to x-axis <0> now;
- turn rupleg to x-axis <10> now;
- turn rloleg to x-axis <30> now;
- turn rupfoot to x-axis <-30> now;
- sleep 80;
- turn pelvis to x-axis <0> now;
- move pelvis to y-axis [0.00000] now;
- move pelvis to z-axis [0.000000] now;
- turn lupleg to x-axis <0> now;
- turn lloleg to x-axis <0> now;
- turn lupfoot to x-axis <0> now;
- turn rupleg to x-axis <0> now;
- turn rloleg to x-axis <0> now;
- turn rupfoot to x-axis <0> now;
- sleep 60;
- down = 0;
- set ARMORED to 0;
- set 85 to reglos;
- if (runtype == 1)
- {
- set MAX_SPEED to slowspeed;
- }
- if (runtype == 4)
- {
- set MAX_SPEED to fastSpeed;
- }
- if (runtype == 2)
- {
- set MAX_SPEED to regspeed;
- }
- }
- kneel()
- {
- set MAX_SPEED to 1;
- set 85 to ((reglos * 4) / 5);
- down = 1;
- sleep 500;
- turn pelvis to x-axis <0> now;
- move pelvis to y-axis [0.000000] now;
- move pelvis to z-axis [0.000000] now;
- turn lupleg to x-axis <0> now;
- turn lloleg to x-axis <0> now;
- turn lupfoot to x-axis <0> now;
- turn rupleg to x-axis <0> now;
- turn rloleg to x-axis <0> now;
- turn rupfoot to x-axis <0> now;
- sleep 80;
- turn pelvis to x-axis <0> now;
- move pelvis to y-axis [-1.200000] now;
- turn lupleg to x-axis <-30> now;
- turn lloleg to x-axis <30> now;
- turn lupfoot to x-axis <0> now;
- turn rupleg to x-axis <10> now;
- turn rloleg to x-axis <30> now;
- turn rupfoot to x-axis <-30> now;
- sleep 80;
- move pelvis to y-axis [-2.300000] now;
- move pelvis to z-axis [0.600000] now;
- turn lupleg to x-axis <-50> now;
- turn lloleg to x-axis <50> now;
- turn lupfoot to y-axis <0> now;
- turn lupfoot to x-axis <0> now;
- turn rloleg to x-axis <60> now;
- sleep 80;
- move pelvis to y-axis [-3.50000] now;
- move pelvis to z-axis [1.00000] now;
- turn lupleg to x-axis <-80> now;
- turn lloleg to x-axis <80> now;
- turn rloleg to x-axis <56> now; //was 66
- turn rupfoot to x-axis <48> now; //was 68
- sleep 100;
- set ARMORED to 1;
- }
- jumpup()
- {
- //get up
- turn turret to z-axis <0> now;
- turn rhand to z-axis <90> now;
- turn relb to y-axis <35> now;
- turn lshol to x-axis <0> now;
- turn lelb to x-axis <0> now;
- sleep 300;
- move pelvis to y-axis [-6] now;
- move pelvis to z-axis [4] now;
- turn pelvis to x-axis <65> now;
- turn armpivot to x-axis <-45> now;
- turn lpad to x-axis <-25> now;
- turn rpad to x-axis <-25> now;
- turn turret to x-axis <-15> now;
- turn lelb to x-axis <50> now;
- turn relb to x-axis <46> now;
- turn rhand to x-axis <-47> now;
- turn lloleg to x-axis <15> now;
- turn rloleg to x-axis <15> now;
- turn gunx to x-axis <-20> now;
- sleep 200;
- move pelvis to y-axis [-5] now;
- move pelvis to z-axis [3] now;
- turn pelvis to x-axis <57> now;
- turn armpivot to x-axis <-36> now;
- turn turret to x-axis <-5> now;
- turn lupleg to x-axis <-71> now;
- turn lloleg to x-axis <88> now;
- turn gunx to x-axis <-50> now;
- sleep 100;
- move pelvis to y-axis [-4] now;
- move pelvis to y-axis [2] now;
- turn pelvis to x-axis <45> now;
- turn pelvis to z-axis <-18> now;
- turn gunx to x-axis <-80> now;
- turn armpivot to x-axis <-49> now;
- turn llofoot to x-axis <0> now;
- turn lupleg to x-axis <-125> now;
- turn lloleg to x-axis <76> now;
- turn rupleg to x-axis <-10> now;
- turn rloleg to x-axis <28> now;
- turn rlofoot to x-axis <30> now;
- turn rhand to x-axis <-9> now;
- sleep 100;
- move pelvis to y-axis [-3.5] now;
- move pelvis to y-axis [1] now;
- turn pelvis to x-axis <0> now;
- turn pelvis to z-axis <0> now;
- turn turret to x-axis <0> now;
- turn armpivot to x-axis <-10> now;
- turn lpad to x-axis <-5> now;
- turn lpad to x-axis <-5> now;
- turn torso to y-axis <0> now;
- turn head to z-axis <0> now;
- turn lloarm to x-axis <0> now;
- turn lloarm to y-axis <0> now;
- turn lloarm to z-axis <0> now;
- turn lupleg to x-axis <-80> now;
- turn lloleg to x-axis <80> now;
- turn rupleg to x-axis <20> now;
- turn rloleg to x-axis <35> now;
- turn rupfoot to x-axis <68> now;
- turn lshol to x-axis <0> now;
- turn lelb to x-axis <0> now;
- turn relb to x-axis <0> now;
- turn relb to y-axis <0> now;
- turn rhand to x-axis <0> now;
- turn rhand to z-axis <0> now;
- sleep 100;
- // from kneel
- turn head to x-axis <-5> now;
- turn rpad to x-axis <0> now;
- turn lpad to x-axis <0> now;
- move pelvis to y-axis [-3.50000] now;
- move pelvis to z-axis [1.00000] now;
- turn lupleg to x-axis <-80> now;
- turn lloleg to x-axis <80> now;
- turn rloleg to x-axis <66> now;
- turn rupfoot to x-axis <68> now;
- sleep 100;
- move pelvis to y-axis [-2.300000] now;
- move pelvis to z-axis [0.600000] now;
- turn lupleg to x-axis <-50> now;
- turn lloleg to x-axis <50> now;
- turn lupfoot to y-axis <0> now;
- turn lupfoot to x-axis <0> now;
- turn rloleg to x-axis <60> now;
- sleep 100;
- turn pelvis to x-axis <0> now;
- move pelvis to y-axis [-1.300000] now;
- turn lupleg to x-axis <-30> now;
- turn lloleg to x-axis <30> now;
- turn lupfoot to x-axis <0> now;
- turn rupleg to x-axis <10> now;
- turn rloleg to x-axis <30> now;
- turn rupfoot to x-axis <-30> now;
- sleep 100;
- turn pelvis to x-axis <0> now;
- move pelvis to y-axis [0.00000] now;
- move pelvis to z-axis [0.000000] now;
- turn lupleg to x-axis <0> now;
- turn lloleg to x-axis <0> now;
- turn lupfoot to x-axis <0> now;
- turn rupleg to x-axis <0> now;
- turn rloleg to x-axis <0> now;
- turn rupfoot to x-axis <0> now;
- //clean up arms
- turn relb to x-axis <0> now;
- turn relb to y-axis <0> now;
- turn relb to z-axis <0> now;
- turn rloarm to x-axis <0> now;
- turn rloarm to y-axis <0> now;
- turn rloarm to z-axis <0> now;
- turn rshol to x-axis <0> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn rhand to x-axis <0> now;
- turn rhand to y-axis <0> now;
- turn rhand to z-axis <0> now;
- turn lelb to x-axis <0> now;
- turn lelb to y-axis <0> now;
- turn lelb to z-axis <0> now;
- turn lloarm to x-axis <0> now;
- turn lloarm to y-axis <0> now;
- turn lloarm to z-axis <0> now;
- turn lshol to x-axis <0> now;
- turn lshol to y-axis <0> now;
- turn lshol to z-axis <0> now;
- turn lhand to x-axis <0> now;
- turn lhand to y-axis <0> now;
- turn lhand to z-axis <0> now;
- turn gunx to x-axis <0> now;
- sleep 500;
- if (pistol ==0)
- {
- turn turret to y-axis <0> speed <150>;
- turn armpivot to x-axis <-15> speed <150>;
- turn lelb to x-axis <40> speed <150>;
- turn lelb to y-axis <-31> speed <150>;
- turn lelb to z-axis <64> speed <150>;
- turn lhand to x-axis <13> speed <150>;
- turn lhand to y-axis <-21> speed <150>;
- turn lhand to z-axis <-2> speed <150>;
- turn relb to x-axis <20> speed <150>;
- turn relb to y-axis <58> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- }
- if (pistol != 0)
- {
- turn lshol to x-axis <-29> speed <250>;
- turn lshol to y-axis <-19> speed <250>;
- turn lshol to z-axis <7> speed <250>;
- turn lelb to x-axis <57> speed <320>;
- turn lelb to y-axis <-7> speed <250>;
- turn lelb to z-axis <0> speed <250>;
- turn lhand to x-axis <-8> speed <250>;
- turn lhand to y-axis <5> speed <250>;
- turn lhand to z-axis <-4> speed <250>;
- turn rshol to x-axis <-40> speed <250>;
- turn rshol to y-axis <0> speed <250>;
- turn rshol to z-axis <-37> speed <250>;
- turn relb to x-axis <75> speed <250>;
- turn relb to y-axis <0> speed <250>;
- turn relb to z-axis <0> speed <250>;
- turn rhand to x-axis <0> speed <250>;
- turn rhand to y-axis <-20> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- }
- ohnoes = 0;
- buzy = 0;
- down = 0;
- set ARMORED to 0;
- set 85 to reglos;
- if (runtype == 1)
- {
- set MAX_SPEED to slowspeed;
- }
- if (runtype == 4)
- {
- set MAX_SPEED to fastSpeed;
- }
- if (runtype == 2)
- {
- set MAX_SPEED to regspeed;
- }
- }
- cover()
- {
- if (buzy == 1 && dead == 0)
- {
- set ARMORED to 1;
- set 85 to (reglos / 2);
- set MAX_SPEED to ((regspeed / 8));
- //face forward
- turn turret to y-axis <0> now;
- turn turret to x-axis <0> now;
- turn torso to x-axis <0> now;
- turn torso to y-axis <0> now;
- turn pelvis to x-axis <0> now;
- turn pelvis to y-axis <0> now;
- turn armpivot to x-axis <0> now;
- //clean up arms
- turn relb to x-axis <0> now;
- turn relb to y-axis <0> now;
- turn relb to z-axis <0> now;
- turn rloarm to x-axis <0> now;
- turn rloarm to y-axis <0> now;
- turn rloarm to z-axis <0> now;
- turn rshol to x-axis <0> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn rhand to x-axis <0> now;
- turn rhand to y-axis <0> now;
- turn rhand to z-axis <0> now;
- turn lelb to x-axis <0> now;
- turn lelb to y-axis <0> now;
- turn lelb to z-axis <0> now;
- turn lloarm to x-axis <0> now;
- turn lloarm to y-axis <0> now;
- turn lloarm to z-axis <0> now;
- turn lshol to x-axis <0> now;
- turn lshol to y-axis <0> now;
- turn lshol to z-axis <0> now;
- turn lhand to x-axis <0> now;
- turn lhand to y-axis <0> now;
- turn lhand to z-axis <0> now;
- //clean
- sleep 500;
- //fall over
- move pelvis to y-axis [-6.5] now;
- move pelvis to z-axis [5.00000] now;
- turn pelvis to x-axis <85> speed <300>;
- turn armpivot to x-axis <-89> now;
- turn head to x-axis <-55> now;
- turn lloarm to x-axis <0> now;
- turn lloarm to y-axis <0> now;
- turn lloarm to z-axis <0> now;
- turn lshol to x-axis <0> now;
- turn lshol to y-axis <0> now;
- turn rshol to x-axis <0> now;
- turn rshol to y-axis <0> now;
- turn rhand to x-axis <0> now;
- turn rhand to y-axis <0> now;
- turn rhand to z-axis <0> now;
- turn rpad to x-axis <-55> now;
- turn lpad to x-axis <-55> now;
- turn lupleg to x-axis <0> now;
- turn lloleg to x-axis <-10> now;
- turn lupfoot to x-axis <0> now;
- turn rupleg to x-axis <0> now;
- turn rloleg to x-axis <-10> now;
- turn rupfoot to x-axis <0> now;
- turn rlofoot to x-axis <30> now;
- turn llofoot to x-axis <30> now;
- sleep 200;
- wait-for-turn pelvis around x-axis;
- down = 3;
- sleep 1000;
- while (ohnoes > 39)
- {
- ohnoes = ohnoes - 2;
- sleep 500;
- }
- if (ohnoes < 40)
- {
- call-script jumpup();
- }
- sleep 800;
- }
- return 0;
- }
- InitState()
- {
- statechg_DesiredState = TRUE;
- statechg_StateChanging = FALSE;
- }
- MotionControl(moving, aiming, justmoved)
- {
- while( get BUILD_PERCENT_LEFT )
- {
- sleep 800;
- }
- call-script stand(); //what
- justmoved = TRUE;
- while( TRUE )
- {
- moving = bMoving;
- aiming = bAiming;
- if ((stance == 0) && (loaded == 0))
- {
- buzy = 2;
- call-script sit();
- }
- if ((stance != 0) && (loaded == 1))
- {
- buzy = 0; //stop being buz2
- loaded = 0;
- call-script stand();
- }
- if( (moving == 1) && (down == 1) && (stance != 0) && (buzy != 2))
- {
- call-script stand();
- }
- else
- if( moving )
- {
- if (down == 0)
- {
- if (runtype == 1)
- {
- set MAX_SPEED to slowspeed;
- }
- if (runtype == 4)
- {
- set MAX_SPEED to fastSpeed;
- }
- if (runtype == 2)
- {
- set MAX_SPEED to regspeed;
- }
- }
- if( buzy == 1 )
- {
- Static_Var_3 = 1;
- call-script slither();
- }
- if( aiming && buzy == 0)
- {
- Static_Var_3 = 1;
- call-script walklolegs();
- }
- if( !aiming && buzy ==0)
- {
- Static_Var_3 = 0;
- call-script walk();
- }
- justmoved = TRUE;
- }
- if( !moving )
- {
- Static_Var_3 = 1;
- if( justmoved && buzy == 0)
- {
- turn rupleg to x-axis <0> speed <200.071429>;
- turn rloleg to x-axis <0> speed <200.071429>;
- turn rupfoot to x-axis <0> speed <200.071429>;
- turn lupleg to x-axis <0> speed <200.071429>;
- turn lloleg to x-axis <0> speed <200.071429>;
- turn lupfoot to x-axis <0> speed <200.071429>;
- if( !aiming )
- {
- turn torso to y-axis <0> speed <90.027473>;
- }
- justmoved = FALSE;
- }
- sleep 50;
- }
- sleep 200; //has to be low?
- }
- }
- Create()
- {
- hide flare;
- hide cut;
- hide pflare;
- hide shell;
- hide pistol1;
- hide sword1;
- hide gunx;
- hide magx;
- hide mag2;
- sout = 0;
- sready = 0;
- bullets = 40; ////////change per weapon system
- ammunition = 8;
- pistol = 0;
- runtype = 2;
- aimtype = 1;
- down = 0;
- dead = 0;
- buzy = 0;
- bMoving = FALSE;
- bAiming = 0;
- set ARMORED to 0;
- Static_Var_3 = 1;
- loaded = 0;
- stance = 99;
- reglos = get 85; //los
- restore_delay = 2000;
- FastSpeed = (get MAX_SPEED);
- RegSpeed = ((get MAX_SPEED)/2);
- SlowSpeed = ((get MAX_SPEED)/4);
- start-script MotionControl();
- call-script InitState();
- set 1025 to 100;
- sleep 200;
- turn armpivot to x-axis <-15> now;
- turn lelb to x-axis <41> now;
- turn lelb to y-axis <-10> now;
- turn lelb to z-axis <105> now;
- turn lhand to x-axis <24> now;
- turn lhand to y-axis <-4> now;
- turn lhand to z-axis <-4> now;
- turn relb to x-axis <20> now;
- turn relb to y-axis <58> now;
- turn relb to z-axis <-22> now;
- }
- StartMoving()
- {
- bMoving = TRUE;
- if (down == 1 && buzy == 0)
- {
- call-script stand();
- }
- }
- StopMoving()
- {
- bMoving = FALSE;
- if (runtype == 1 && buzy == 0)
- {
- sleep 500;
- if (bMoving == FALSE)
- {
- call-script kneel();
- }
- }
- }
- setSFXoccupy(type)
- {
- stance = type;
- }
- QueryNanoPiece(piecenum)
- {
- piecenum = rhand;
- }
- ToPistol()
- {
- //set up stance
- while (buzy != 0)
- {
- sleep 800;
- }
- pistol = 8; //stop dancing
- turn head to x-axis <0> speed <150>;
- turn torso to y-axis <0> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lloarm to x-axis <0> speed <150>;
- turn lloarm to y-axis <0> speed <150>;
- turn lloarm to z-axis <0> speed <150>;
- turn lshol to x-axis <0> speed <150>;
- turn lshol to y-axis <0> speed <150>;
- turn rshol to x-axis <0> speed <150>;
- turn rshol to y-axis <0> speed <150>;
- turn rhand to x-axis <0> speed <150>;
- turn rhand to y-axis <0> speed <150>;
- turn rhand to z-axis <0> speed <150>;
- turn rpad to x-axis <0> speed <150>;
- turn lpad to x-axis <0> speed <150>;
- //set up
- turn turret to y-axis <0> speed <150>;
- turn armpivot to x-axis <-15> speed <150>;
- turn lelb to x-axis <40> speed <150>;
- turn lelb to y-axis <-31> speed <150>;
- turn lelb to z-axis <64> speed <150>;
- turn lhand to x-axis <13> speed <150>;
- turn lhand to y-axis <-21> speed <150>;
- turn lhand to z-axis <-2> speed <150>;
- turn relb to x-axis <20> speed <150>;
- turn relb to y-axis <58> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- sleep 500;
- turn lhand to x-axis <44> speed <150>;
- turn lhand to z-axis <-37> speed <150>;
- turn lshol to x-axis <26> speed <150>;
- sleep 200;
- hide gun1;
- hide mag1;
- hide mag2;
- show gunx;
- show magx;
- sleep 200;
- turn lshol to x-axis <39> speed <250>;
- turn lshol to y-axis <38> speed <250>;
- turn lshol to z-axis <-15> speed <250>;
- turn lelb to x-axis <14> speed <250>;
- turn lelb to z-axis <101> speed <250>;
- turn rshol to x-axis <24> speed <250>;
- turn rshol to z-axis <25> speed <250>;
- turn rhand to x-axis <51> speed <250>;
- turn rhand to y-axis <-16> speed <250>;
- turn rhand to z-axis <-17> speed <250>;
- sleep 200;
- hide pistolx;
- show pistol1;
- turn rshol to x-axis <56> speed <250>;
- turn relb to x-axis <-9> speed <150>;
- turn relb to y-axis <33> speed <250>;
- turn relb to z-axis <-1> speed <150>;
- turn lshol to x-axis <24> speed <250>;
- turn lshol to y-axis <-21> speed <250>;
- turn lshol to z-axis <-7> speed <250>;
- sleep 200;
- turn lshol to x-axis <24> speed <250>;
- turn lshol to z-axis <-7> speed <250>;
- turn rshol to x-axis <-2> speed <250>;
- turn rshol to z-axis <-14> speed <250>;
- turn relb to x-axis <20> speed <150>;
- turn rhand to x-axis <23> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- sleep 200;
- turn lshol to x-axis <-29> speed <250>;
- turn lshol to y-axis <-19> speed <250>;
- turn lshol to z-axis <7> speed <250>;
- turn lelb to x-axis <57> speed <250>;
- turn lelb to y-axis <-7> speed <250>;
- turn lelb to z-axis <0> speed <250>;
- turn lhand to x-axis <-8> speed <250>;
- turn lhand to y-axis <5> speed <250>;
- turn lhand to z-axis <-4> speed <250>;
- turn rshol to x-axis <-40> speed <250>;
- turn rshol to z-axis <-37> speed <250>;
- turn relb to x-axis <75> speed <250>;
- turn relb to y-axis <0> speed <250>;
- turn relb to z-axis <0> speed <250>;
- turn rhand to x-axis <0> speed <250>;
- turn rhand to y-axis <-20> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- pistol = 2; // ready to use
- // ignore
- }
- ToRifle()
- {
- while (buzy != 0)
- {
- sleep 800;
- }
- pistol = 8; //stop moving
- turn armpivot to x-axis <-10> speed <150>;
- turn head to x-axis <0> speed <150>;
- turn torso to y-axis <0> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lloarm to x-axis <0> speed <150>;
- turn lloarm to y-axis <0> speed <150>;
- turn lloarm to z-axis <0> speed <150>;
- turn rpad to x-axis <0> speed <150>;
- turn lpad to x-axis <0> speed <150>;
- turn lshol to x-axis <-29> speed <250>;
- turn lshol to y-axis <-19> speed <250>;
- turn lshol to z-axis <7> speed <250>;
- turn lelb to x-axis <57> speed <250>;
- turn lelb to y-axis <-7> speed <250>;
- turn lelb to z-axis <0> speed <250>;
- turn lhand to x-axis <-8> speed <250>;
- turn lhand to y-axis <5> speed <250>;
- turn lhand to z-axis <-4> speed <250>;
- turn rshol to x-axis <-40> speed <250>;
- turn rshol to y-axis <0> speed <250>;
- turn rshol to z-axis <-37> speed <250>;
- turn relb to x-axis <75> speed <250>;
- turn relb to y-axis <0> speed <250>;
- turn relb to z-axis <0> speed <250>;
- turn rhand to x-axis <0> speed <250>;
- turn rhand to y-axis <-20> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- sleep 500;
- turn lshol to x-axis <24> speed <250>;
- turn lshol to z-axis <-7> speed <250>;
- turn rshol to x-axis <-2> speed <250>;
- turn rshol to z-axis <-14> speed <250>;
- turn relb to x-axis <20> speed <150>;
- turn rhand to x-axis <23> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- sleep 200;
- turn rshol to x-axis <56> speed <250>;
- turn relb to x-axis <-9> speed <150>;
- turn relb to y-axis <33> speed <250>;
- turn relb to z-axis <-1> speed <150>;
- turn lshol to x-axis <24> speed <250>;
- turn lshol to y-axis <-21> speed <250>;
- turn lshol to z-axis <-7> speed <250>;
- sleep 200;
- hide pistol1;
- show pistolx;
- turn lshol to x-axis <39> speed <250>;
- turn lshol to y-axis <38> speed <250>;
- turn lshol to z-axis <-15> speed <250>;
- turn lelb to x-axis <14> speed <250>;
- turn lelb to z-axis <101> speed <250>;
- turn rshol to x-axis <24> speed <250>;
- turn rshol to z-axis <25> speed <250>;
- turn rhand to x-axis <51> speed <250>;
- turn rhand to y-axis <-16> speed <250>;
- turn rhand to z-axis <-17> speed <250>;
- sleep 200;
- turn turret to y-axis <0> speed <150>;
- turn armpivot to x-axis <-15> speed <150>;
- turn lelb to x-axis <41> speed <150>;
- turn lelb to y-axis <-10> speed <150>;
- turn lelb to z-axis <105> speed <150>;
- turn lhand to y-axis <-4> speed <150>;
- turn relb to x-axis <20> speed <150>;
- turn relb to y-axis <58> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- turn lhand to x-axis <44> speed <150>;
- turn lhand to z-axis <-37> speed <150>;
- turn lshol to x-axis <26> speed <150>;
- turn lshol to y-axis <0> speed <150>;
- sleep 200;
- hide gunx;
- hide magx;
- show gun1;
- show mag1;
- sleep 200;
- turn head to x-axis <0> speed <150>;
- turn torso to y-axis <0> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lloarm to x-axis <0> speed <150>;
- turn lloarm to y-axis <0> speed <150>;
- turn lloarm to z-axis <0> speed <150>;
- turn lshol to x-axis <0> speed <150>;
- turn lshol to y-axis <0> speed <150>;
- turn rshol to x-axis <0> speed <150>;
- turn rshol to y-axis <0> speed <150>;
- turn rhand to x-axis <0> speed <150>;
- turn rhand to y-axis <0> speed <150>;
- turn rhand to z-axis <0> speed <150>;
- turn rpad to x-axis <0> speed <150>;
- turn lpad to x-axis <0> speed <150>;
- //set up
- turn turret to y-axis <0> speed <150>;
- turn armpivot to x-axis <-15> speed <150>;
- turn lelb to x-axis <40> speed <150>;
- turn lelb to y-axis <-31> speed <150>;
- turn lelb to z-axis <64> speed <150>;
- turn lhand to x-axis <13> speed <150>;
- turn lhand to y-axis <-21> speed <150>;
- turn lhand to z-axis <-2> speed <150>;
- turn relb to x-axis <20> speed <150>;
- turn relb to y-axis <58> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- pistol = 0;
- }
- Reloading()
- {
- //aiming set
- while (buzy != 0)
- {
- sleep 800;
- }
- ammunition = ammunition - 1;
- set 1025 to (ammunition * 100) / 8;
- turn armpivot to x-axis <0> now;
- turn rpad to x-axis <-15> speed <150>;
- turn lpad to x-axis <-15> speed <150>;
- turn head to x-axis <0> speed <150>;
- turn torso to y-axis <-15> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lshol to x-axis <-66> speed <150>;
- turn lshol to y-axis <-25> speed <150>;
- turn lelb to x-axis <67> speed <150>;
- turn lelb to y-axis <47> speed <150>;
- turn lelb to z-axis <105> speed <150>;
- turn lloarm to x-axis <21> speed <150>;
- turn lloarm to y-axis <-4> speed <150>;
- turn lloarm to z-axis <-2> speed <150>;
- turn lhand to x-axis <-14> speed <150>;
- turn lhand to y-axis <-9> speed <150>;
- turn lhand to z-axis <-25> speed <150>;
- turn rshol to x-axis <-44> speed <150>;
- turn rshol to y-axis <28> speed <150>;
- turn relb to x-axis <14> speed <150>;
- turn relb to y-axis <29> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- turn rhand to x-axis <21> speed <150>;
- turn rhand to y-axis <-32> speed <150>;
- turn rhand to z-axis <14> speed <150>;
- sleep 50;
- //drop mag
- move mag1 to y-axis [-13.00000] speed [8];
- turn lshol to x-axis <-35> speed <850>;
- turn lshol to y-axis <0> speed <850>;
- sleep 100;
- move mag1 to y-axis [-13.00000] speed [16];
- move mag1 to z-axis [1.50000] speed [16];
- sleep 100;
- move mag1 to y-axis [-13.000000] speed [32];
- turn lpad to x-axis <15> speed <250>;
- turn lshol to x-axis <56> speed <1200>;
- turn lshol to y-axis <-8> speed <750>;
- turn lshol to z-axis <-11> speed <650>;
- turn lelb to x-axis <6> speed <650>;
- turn lelb to y-axis <-59> speed <650>;
- turn lelb to z-axis <84> speed <850>;
- turn lloarm to x-axis <0> speed <650>;
- turn lloarm to y-axis <0> speed <650>;
- turn lloarm to z-axis <-48> speed <650>;
- sleep 100;
- move mag1 to y-axis [-13.000000] speed [64];
- move mag1 to z-axis [3.00000] speed [64];
- sleep 200;
- move mag1 to y-axis [-13.00000] speed [128];
- move mag1 to z-axis [4.50000] speed [128];
- sleep 200;
- turn mag1 to x-axis <90> speed <500>;
- turn lelb to y-axis <-54> speed <350>;
- sleep 100;
- hide mag1;
- turn lelb to y-axis <-59> speed <350>;
- show mag2;
- sleep 100;
- turn lshol to x-axis <29> speed <250>;
- turn lshol to y-axis <0> speed <250>;
- turn lshol to z-axis <-12> speed <250>;
- turn lelb to x-axis <55> speed <250>;
- turn lelb to y-axis <-8> speed <250>;
- turn lelb to z-axis <48> speed <250>;
- turn lloarm to z-axis <0> speed <250>;
- turn lpad to x-axis <0> speed <150>;
- sleep 100;
- turn relb to x-axis <9> speed <150>;
- turn relb to y-axis <1> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- turn lshol to x-axis <-5> speed <150>;
- turn lshol to y-axis <-19> speed <150>;
- turn lelb to x-axis <17> speed <150>;
- turn lelb to y-axis <-2> speed <150>;
- turn lelb to z-axis <45> speed <150>;
- turn lloarm to y-axis <-34> speed <150>;
- turn lhand to y-axis <62> speed <150>;
- sleep 100;
- move mag1 to y-axis [0] now;
- move mag1 to z-axis [0] now;
- turn rhand to x-axis <2> speed <150>;
- turn rhand to y-axis <-48> speed <150>;
- turn lshol to x-axis <-13> speed <150>;
- turn lshol to y-axis <-38> speed <150>;
- turn lshol to z-axis <-12> speed <150>;
- turn lelb to y-axis <-13> speed <150>;
- turn lhand to x-axis <-37> speed <150>;
- turn lhand to z-axis <-25> speed <150>;
- sleep 60;
- turn lshol to z-axis <-6> speed <150>;
- hide mag2; //was below
- show mag1;
- sleep 200;
- turn lshol to x-axis <-24> speed <150>;
- turn lshol to y-axis <-10> speed <150>;
- turn lshol to z-axis <-6> speed <150>;
- turn lelb to x-axis <20> speed <150>;
- turn lelb to z-axis <0> speed <150>;
- turn lhand to x-axis <-14> speed <150>;
- turn lhand to y-axis <-9> speed <150>;
- turn lhand to z-axis <-25> speed <150>;
- sleep 100;
- turn rhand to x-axis <21> speed <150>;
- turn rhand to y-axis <-32> speed <150>;
- turn rhand to z-axis <-6> speed <150>;
- turn relb to x-axis <14> speed <150>;
- turn relb to y-axis <29> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- turn lpad to x-axis <-5> speed <250>;
- turn lshol to x-axis <-52> speed <150>;
- turn lshol to y-axis <-37> speed <150>;
- turn lshol to y-axis <-6> speed <150>;
- turn lelb to x-axis <25> speed <150>;
- turn lelb to y-axis <50> speed <150>;
- turn lelb to z-axis <23> speed <150>;
- sleep 100;
- turn lelb to x-axis <25> speed <450>;
- turn lelb to y-axis <50> speed <450>;
- turn lelb to z-axis <23> speed <450>;
- sleep 100;
- turn lshol to x-axis <-31> speed <250>;
- turn lshol to y-axis <-24> speed <250>;
- turn lshol to y-axis <-15> speed <250>;
- turn lelb to x-axis <43> speed <250>;
- turn lelb to y-axis <45> speed <250>;
- turn lelb to z-axis <23> speed <250>;
- sleep 100;
- turn rpad to x-axis <-15> speed <150>;
- turn lpad to x-axis <-15> speed <150>;
- turn head to x-axis <8> speed <150>;
- turn torso to y-axis <-30> speed <150>;
- turn head to z-axis <-12> speed <150>;
- turn lshol to x-axis <-66> speed <150>;
- turn lshol to y-axis <-25> speed <150>;
- turn lshol to y-axis <0> speed <150>;
- turn lelb to x-axis <67> speed <150>;
- turn lelb to y-axis <47> speed <150>;
- turn lelb to z-axis <105> speed <150>;
- turn lloarm to x-axis <21> speed <150>;
- turn lloarm to y-axis <-4> speed <150>;
- turn lloarm to z-axis <-2> speed <150>;
- turn lhand to x-axis <-14> speed <150>;
- turn lhand to y-axis <-9> speed <150>;
- turn lhand to z-axis <-25> speed <150>;
- turn rshol to x-axis <-44> speed <150>;
- turn rshol to y-axis <28> speed <150>;
- turn relb to x-axis <14> speed <150>;
- turn relb to y-axis <29> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- turn rhand to x-axis <21> speed <150>;
- turn rhand to y-axis <-32> speed <150>;
- turn rhand to z-axis <14> speed <150>;
- bullets = 40;
- }
- ReloadGun()
- {
- while (buzy != 0 )
- {
- //wait for not buzy
- sleep 1000;
- }
- if (dead == 0 && buzy == 0)
- {
- call-script Reloading();
- }
- }
- Refill()
- {
- if (ammunition <= 3) //3 mags left
- {
- ammunition = 9; //1 extra for the reloading
- set 1025 to 100;
- call-script Reloading();
- }
- }
- tosword()
- {
- if (sready == 1)
- {
- sout = 1; //0on back 1getting 2ready 3swung 4reseting
- while (buzy != 0) //wait for un buzy
- {
- sleep 1000;
- }
- if ((pistol == 0) && (dead == 0))
- {
- turn head to x-axis <0> speed <150>;
- turn torso to y-axis <0> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lloarm to x-axis <0> speed <150>;
- turn lloarm to y-axis <0> speed <150>;
- turn lloarm to z-axis <0> speed <150>;
- turn lshol to x-axis <0> speed <150>;
- turn lshol to y-axis <0> speed <150>;
- turn rshol to z-axis <0> speed <150>;
- turn rshol to x-axis <0> speed <150>;
- turn rshol to y-axis <0> speed <150>;
- turn rhand to x-axis <0> speed <150>;
- turn rhand to y-axis <0> speed <150>;
- turn rhand to z-axis <0> speed <150>;
- turn rpad to x-axis <0> speed <150>;
- turn lpad to x-axis <0> speed <150>;
- //set up
- turn turret to y-axis <0> speed <150>;
- turn armpivot to x-axis <-15> speed <150>;
- turn lelb to x-axis <40> speed <150>;
- turn lelb to y-axis <-31> speed <150>;
- turn lelb to z-axis <64> speed <150>;
- turn lhand to x-axis <13> speed <150>;
- turn lhand to y-axis <-21> speed <150>;
- turn lhand to z-axis <-2> speed <150>;
- turn relb to x-axis <20> speed <150>;
- turn relb to y-axis <58> speed <150>;
- turn relb to z-axis <-22> speed <150>;
- sleep 500;
- turn lhand to x-axis <44> speed <150>;
- turn lhand to z-axis <-37> speed <150>;
- turn lshol to x-axis <26> speed <150>;
- sleep 200;
- hide gun1;
- hide mag1;
- hide mag2;
- show gunx;
- show magx; //end drop rifle
- }
- if (pistol != 0 && dead == 0)
- {
- turn armpivot to x-axis <-10> speed <150>;
- turn head to x-axis <0> speed <150>;
- turn torso to y-axis <0> speed <150>;
- turn head to z-axis <0> speed <150>;
- turn lloarm to x-axis <0> speed <150>;
- turn lloarm to y-axis <0> speed <150>;
- turn lloarm to z-axis <0> speed <150>;
- turn rpad to x-axis <0> speed <150>;
- turn lpad to x-axis <0> speed <150>;
- turn lshol to x-axis <-29> speed <250>;
- turn lshol to y-axis <-19> speed <250>;
- turn lshol to z-axis <7> speed <250>;
- turn lelb to x-axis <57> speed <250>;
- turn lelb to y-axis <-7> speed <250>;
- turn lelb to z-axis <0> speed <250>;
- turn lhand to x-axis <-8> speed <250>;
- turn lhand to y-axis <5> speed <250>;
- turn lhand to z-axis <-4> speed <250>;
- turn rshol to x-axis <-40> speed <250>;
- turn rshol to y-axis <0> speed <250>;
- turn rshol to z-axis <-37> speed <250>;
- turn relb to x-axis <75> speed <250>;
- turn relb to y-axis <0> speed <250>;
- turn relb to z-axis <0> speed <250>;
- turn rhand to x-axis <0> speed <250>;
- turn rhand to y-axis <-20> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- sleep 500;
- turn lshol to x-axis <24> speed <250>;
- turn lshol to z-axis <-7> speed <250>;
- turn rshol to x-axis <-2> speed <250>;
- turn rshol to z-axis <-14> speed <250>;
- turn relb to x-axis <20> speed <150>;
- turn rhand to x-axis <23> speed <250>;
- turn rhand to z-axis <5> speed <250>;
- sleep 200;
- turn rshol to x-axis <56> speed <250>;
- turn relb to x-axis <-9> speed <150>;
- turn relb to y-axis <33> speed <250>;
- turn relb to z-axis <-1> speed <150>;
- turn lshol to x-axis <24> speed <250>;
- turn lshol to y-axis <-21> speed <250>;
- turn lshol to z-axis <-7> speed <250>;
- sleep 200;
- hide pistol1;
- show pistolx;
- }
- //go to sword
- sleep 100;
- turn armpivot to x-axis <0> speed <400>;
- turn lshol to x-axis <0> speed <400>;
- turn lshol to y-axis <0> speed <400>;
- turn lshol to z-axis <-34> speed <400>;
- turn lelb to x-axis <65> speed <400>;
- turn lelb to y-axis <0> speed <400>;
- turn lelb to z-axis <0> speed <400>;
- turn rpad to x-axis <-17> speed <400>;
- turn rpad to y-axis <-117> speed <400>;
- turn rshol to x-axis <-131> speed <400>;
- turn rshol to y-axis <0> speed <400>;
- turn rshol to z-axis <0> speed <400>;
- turn relb to x-axis <-10> speed <400>;
- turn relb to y-axis <-8> speed <400>;
- turn relb to z-axis <0> speed <400>;
- turn lhand to x-axis <0> speed <400>;
- turn lhand to y-axis <0> speed <400>;
- turn lhand to z-axis <0> speed <400>;
- sleep 600;
- hide swordx;
- show sword1;
- sleep 300;
- turn lshol to x-axis <-25> speed <400>;
- turn lshol to y-axis <-57> speed <400>;
- turn lshol to z-axis <0> speed <400>;
- turn lelb to x-axis <37> speed <400>;
- turn lelb to y-axis <10> speed <400>;
- turn lelb to z-axis <0> speed <400>;
- turn lhand to x-axis <-38> speed <400>;
- turn lhand to y-axis <17> speed <400>;
- turn lhand to z-axis <0> speed <400>;
- turn rshol to x-axis <-26> speed <400>;
- turn rshol to y-axis <0> speed <400>;
- turn rshol to z-axis <0> speed <400>;
- turn relb to x-axis <32> speed <400>;
- turn relb to y-axis <33> speed <400>;
- turn relb to z-axis <0> speed <400>;
- turn rhand to x-axis <-30> speed <400>;
- turn rhand to y-axis <-19> speed <400>;
- turn rhand to z-axis <0> speed <400>;
- sleep 600;
- sout = 2;
- }
- }
- swordaway()
- {
- turn turret to y-axis <0> speed <300>;
- sleep 300;
- turn armpivot to x-axis <0> now;
- turn lshol to x-axis <0> now;
- turn lshol to y-axis <0> now;
- turn lshol to z-axis <-34> now;
- turn lelb to x-axis <65> now;
- turn lelb to y-axis <0> now;
- turn lelb to z-axis <0> now;
- turn rpad to x-axis <-17> now;
- turn rpad to y-axis <-117> now;
- turn rshol to x-axis <-131> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn relb to x-axis <-10> now;
- turn relb to y-axis <-8> now;
- turn relb to z-axis <0> now;
- turn lhand to x-axis <0> now;
- turn lhand to y-axis <0> now;
- turn lhand to z-axis <0> now;
- sleep 600;
- hide sword1;
- show swordx;
- sleep 200;
- turn lshol to x-axis <0> now; //now clean up the mess
- turn lshol to y-axis <0> now;
- turn lshol to z-axis <0> now;
- turn lelb to x-axis <0> now;
- turn lelb to y-axis <0> now;
- turn lelb to z-axis <0> now;
- turn lhand to x-axis <0> now;
- turn lhand to y-axis <0> now;
- turn lhand to z-axis <0> now;
- turn rshol to x-axis <0> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn relb to x-axis <0> now;
- turn relb to y-axis <0> now;
- turn relb to z-axis <0> now;
- turn rhand to x-axis <0> now;
- turn rhand to y-axis <0> now;
- turn rhand to z-axis <0> now;
- sleep 500;
- sout = 0;
- }
- resetsword()
- {
- sout = 8; //stop asking
- while (buzy != 0)
- {
- sleep 1000;
- }
- if (sready == 1)
- {
- sout = 4; ///stop askign to reset;
- sleep (rand (3,8) * 100); //now unswing
- turn torso to y-axis <0> speed <900>;
- turn head to y-axis <0> speed <900>;
- turn lshol to x-axis <-25> now;
- turn lshol to y-axis <-57> now;
- turn lshol to z-axis <0> now;
- turn lelb to x-axis <37> now;
- turn lelb to y-axis <10> now;
- turn lelb to z-axis <0> now;
- turn lhand to x-axis <-38> now;
- turn lhand to y-axis <17> now;
- turn lhand to z-axis <0> now;
- turn rshol to x-axis <-26> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <0> now;
- turn relb to x-axis <32> now;
- turn relb to y-axis <33> now;
- turn relb to z-axis <0> now;
- turn rhand to x-axis <-30> now;
- turn rhand to y-axis <-19> now;
- turn rhand to z-axis <0> now;
- sleep 600;
- sout = 2; //ready
- }
- }
- RestoreAfterSwing()
- {
- sleep restore_delay;
- if (sready ==1 && dead == 0)
- {
- turn turret to y-axis <0> speed <300>;
- call-script resetsword();
- }
- }
- Toggle(t,value)
- {
- if(t==1)
- {
- if(value==0)
- {
- aimtype = 1;
- }
- if(value==1)
- {
- aimtype = 2;
- }
- if(value==2)
- {
- aimtype = 3;
- }
- }
- if(t==2)
- {
- if(value==0)
- {
- runtype = 2; ;
- set 76 to 0;
- }
- if(value==1)
- {
- runtype = 1;
- set 76 to 1;
- if (bmoving ==0)
- {
- call-script kneel();
- }
- }
- if(value==2)
- {
- runtype = 4;
- set 76 to 0;
- }
- }
- if(t==3)
- {
- if(value==0 )
- {
- if (sready==1)
- {
- sready = 0;
- call-script swordaway();
- }
- while (sout != 0)
- {
- sleep 800;
- }
- if (pistol == 0)
- {
- call-script torifle();
- return 0;
- }
- if (pistol != 0)
- {
- call-script topistol();
- return 0;
- }
- }
- if(value==1 )
- {
- sready = 1;
- if (pistol == 0)
- { //setup
- turn turret to y-axis <0> now;
- turn armpivot to x-axis <-15> now;
- turn lelb to x-axis <40> now;
- turn lelb to y-axis <-31> now;
- turn lelb to z-axis <64> now;
- turn lhand to x-axis <13> now;
- turn lhand to y-axis <-21> now;
- turn lhand to z-axis <-2> now;
- turn relb to x-axis <20> now;
- turn relb to y-axis <58> now;
- turn relb to z-axis <-22> now;
- sleep 200;
- }
- if (pistol != 0)
- {
- turn turret to y-axis <0> now;
- turn armpivot to x-axis <-15> now;
- turn lshol to x-axis <-29> now;
- turn lshol to y-axis <-19> now;
- turn lshol to z-axis <7> now;
- turn lelb to x-axis <57> now;
- turn lelb to y-axis <-7> now;
- turn lelb to z-axis <0> now;
- turn lhand to x-axis <-8> now;
- turn lhand to y-axis <5> now;
- turn lhand to z-axis <-4> now;
- turn rshol to x-axis <-40> now;
- turn rshol to y-axis <0> now;
- turn rshol to z-axis <-37> now;
- turn relb to x-axis <75> now;
- turn relb to y-axis <0> now;
- turn relb to z-axis <0> now;
- turn rhand to x-axis <0> now;
- turn rhand to y-axis <-20> now;
- turn rhand to z-axis <5> now;
- sleep 200;
- }
- if (sout == 0)
- {
- call-script tosword();
- }
- return 0;
- }
- }
- }
- AimFromweapon3(piecenum)
- {
- piecenum = armpivot;
- }
- Queryweapon3(piecenum)
- {
- piecenum = flare;
- }
- AimFromWeapon4(piecenum)
- {
- piecenum = armpivot;
- }
- QueryWeapon4(piecenum)
- {
- piecenum = flare;
- }
- AimFromWeapon5(piecenum)
- {
- piecenum = armpivot;
- }
- QueryWeapon5(piecenum)
- {
- piecenum = flare;
- }
- AimFromWeapon2(piecenum)
- {
- piecenum = armpivot;
- }
- QueryWeapon2(piecenum)
- {
- piecenum = pflare;
- }
- AimFromweapon1(piecenum)
- {
- piecenum = armpivot;
- }
- QueryWeapon1(piecenum)
- {
- piecenum = cut;
- }
- Shot3()
- {
- bullets = bullets - 1;
- emit-sfx 1025 from flare;
- emit-sfx 1024 from shell;
- turn relb to x-axis <11> speed <800>;
- turn lelb to x-axis <64> speed <800>;
- sleep 100;
- turn relb to x-axis <14> speed <300>;
- turn lelb to x-axis <67> speed <300>;
- if (bullets < 1)
- {
- bullets = 0; //need reload
- if (ammunition > 0)
- {
- start-script ReloadGun();
- }
- }
- return (1);
- }
- Shot4()
- {
- bullets = bullets - 1;
- emit-sfx 1025 from flare;
- emit-sfx 1024 from shell;
- turn relb to x-axis <11> speed <800>;
- turn lelb to x-axis <64> speed <800>;
- sleep 100;
- turn relb to x-axis <14> speed <300>;
- turn lelb to x-axis <67> speed <300>;
- if (bullets < 1)
- {
- bullets = 0; //need reload
- if (ammunition > 0)
- {
- start-script ReloadGun();
- }
- }
- return (1);
- }
- Shot5()
- {
- bullets = bullets - 1;
- emit-sfx 1025 from flare;
- emit-sfx 1024 from shell;
- turn relb to x-axis <11> speed <800>;
- turn lelb to x-axis <64> speed <800>;
- sleep 100;
- turn relb to x-axis <14> speed <300>;
- turn lelb to x-axis <67> speed <300>;
- if (bullets < 1)
- {
- bullets = 0; //need reload
- if (ammunition > 0)
- {
- start-script ReloadGun();
- }
- }
- return (1);
- }
- FireWeapon2()
- {
- emit-sfx 1026 from pflare;
- sleep 50;
- turn relb to x-axis <72> speed <800>;
- turn lelb to x-axis <54> speed <800>;
- sleep 100;
- turn relb to x-axis <75> speed <400>;
- turn lelb to x-axis <57> speed <400>;
- return (1);
- }
- Fireweapon1()
- {
- sout = 3; //is out but not ready
- turn torso to y-axis <66> now;
- turn head to y-axis <-30> now;
- turn rhand to x-axis <-30> now;
- turn rhand to y-axis <-19> now;
- turn rhand to z-axis <-71> now;
- turn lelb to x-axis <48> now;
- turn lelb to y-axis <-9> now;
- turn lelb to z-axis <0> now;
- sleep 50;
- call-script resetsword();
- return (1);
- }
- Aimweapon3(Func_Var_1, Func_Var_2)
- {
- if( runtype == 4 && bMoving == 1 )
- {
- return (0);
- }
- if((aimtype != 1) or (pistol != 0) or (dead == 1) or (buzy != 0) or (sready ==1))
- {
- return (0);
- }
- else
- if (ammunition <= 0 && pistol == 0)
- {
- pistol = 1;
- call-script ToPistol();
- return 0;
- }
- if ( aimtype == 1 && buzy == 0)
- {
- signal SIG_AIM;
- set-signal-mask SIG_AIM;
- bAiming = TRUE;
- while( !Static_Var_3 )
- {
- sleep 5;
- }
- if (runtype == 4)
- {
- turn head to x-axis <8> speed <650>;
- turn head to z-axis <-12> speed <650>;
- turn torso to x-axis <0> speed <650>;
- }
- if (runtype == 2)
- {
- turn head to x-axis <-20> speed <650>;
- turn head to z-axis <-6> speed <650>;
- turn torso to x-axis <20> speed <650>;
- }
- if (runtype == 1)
- {
- turn head to x-axis <-45> speed <650>;
- turn head to z-axis <-2> speed <650>;
- turn torso to x-axis <45> speed <650>;
- }
- turn rpad to x-axis <-15> speed <650>;
- turn lpad to x-axis <-15> speed <650>;
- turn torso to y-axis <-30> speed <650>;
- turn lshol to x-axis <-66> speed <650>;
- turn lshol to y-axis <-25> speed <650>;
- turn lelb to x-axis <67> speed <650>;
- turn lelb to y-axis <47> speed <650>;
- turn lelb to z-axis <105> speed <650>;
- turn lloarm to x-axis <21> speed <650>;
- turn lloarm to y-axis <-4> speed <650>;
- turn lloarm to z-axis <-2> speed <650>;
- turn lhand to x-axis <-14> speed <650>;
- turn lhand to y-axis <-9> speed <650>;
- turn lhand to z-axis <-25> speed <650>;
- turn rshol to x-axis <-44> speed <650>;
- turn rshol to y-axis <28> speed <650>;
- turn relb to x-axis <14> speed <650>;
- turn relb to y-axis <29> speed <650>;
- turn relb to z-axis <-22> speed <650>;
- turn rhand to x-axis <21> speed <650>;
- turn rhand to y-axis <-32> speed <650>;
- turn rhand to z-axis <14> speed <650>;
- if (runtype == 4)
- {
- if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <0> - Func_Var_2 speed <350>;
- }
- if (runtype == 2)
- {
- if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
- }
- if (runtype == 1)
- {
- if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
- }
- wait-for-turn turret around y-axis;
- start-script RestoreAfterDelay();
- if(bullets < 1)
- {
- return (0);
- }
- else
- return (1);
- }
- }
- AimWeapon4(Func_Var_1, Func_Var_2)
- {
- if( runtype == 4 && bMoving == 1 )
- {
- return (0);
- }
- if((aimtype != 2) or (pistol != 0) or (dead == 1) or (buzy != 0) or (sready ==1))
- {
- return (0);
- }
- else
- if (ammunition <= 0 && pistol == 0)
- {
- pistol = 1;
- call-script ToPistol();
- return 0;
- }
- if ( aimtype == 2 && buzy == 0)
- {
- signal SIG_AIM;
- set-signal-mask SIG_AIM;
- bAiming = TRUE;
- while( !Static_Var_3 )
- {
- sleep 5;
- }
- if (runtype == 4)
- {
- turn head to x-axis <8> speed <650>;
- turn head to z-axis <-12> speed <650>;
- turn torso to x-axis <0> speed <650>;
- }
- if (runtype == 2)
- {
- turn head to x-axis <-20> speed <650>;
- turn head to z-axis <-6> speed <650>;
- turn torso to x-axis <20> speed <650>;
- }
- if (runtype == 1)
- {
- turn head to x-axis <-45> speed <650>;
- turn head to z-axis <-2> speed <650>;
- turn torso to x-axis <45> speed <650>;
- }
- turn rpad to x-axis <-15> speed <650>;
- turn lpad to x-axis <-15> speed <650>;
- turn torso to y-axis <-30> speed <650>;
- turn lshol to x-axis <-66> speed <650>;
- turn lshol to y-axis <-25> speed <650>;
- turn lelb to x-axis <67> speed <650>;
- turn lelb to y-axis <47> speed <650>;
- turn lelb to z-axis <105> speed <650>;
- turn lloarm to x-axis <21> speed <650>;
- turn lloarm to y-axis <-4> speed <650>;
- turn lloarm to z-axis <-2> speed <650>;
- turn lhand to x-axis <-14> speed <650>;
- turn lhand to y-axis <-9> speed <650>;
- turn lhand to z-axis <-25> speed <650>;
- turn rshol to x-axis <-44> speed <650>;
- turn rshol to y-axis <28> speed <650>;
- turn relb to x-axis <14> speed <650>;
- turn relb to y-axis <29> speed <650>;
- turn relb to z-axis <-22> speed <650>;
- turn rhand to x-axis <21> speed <650>;
- turn rhand to y-axis <-32> speed <650>;
- turn rhand to z-axis <14> speed <650>;
- if (runtype == 4)
- {
- if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <0> - Func_Var_2 speed <350>;
- }
- if (runtype == 2)
- {
- if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
- }
- if (runtype == 1)
- {
- if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
- }
- wait-for-turn turret around y-axis;
- start-script RestoreAfterDelay();
- if(bullets < 1)
- {
- return (0);
- }
- else
- return (1);
- }
- }
- AimWeapon5(Func_Var_1, Func_Var_2)
- {
- if( runtype == 4 && bMoving == 1 )
- {
- return (0);
- }
- if((aimtype != 3) or (pistol != 0) or (dead == 1) or (buzy != 0) or (sready ==1))
- {
- return (0);
- }
- else
- if (ammunition <= 0 && pistol == 0)
- {
- pistol = 1;
- call-script ToPistol();
- return 0;
- }
- if ( aimtype == 3 && buzy == 0)
- {
- signal SIG_AIM;
- set-signal-mask SIG_AIM;
- bAiming = TRUE;
- while( !Static_Var_3 )
- {
- sleep 5;
- }
- if (runtype == 4)
- {
- turn head to x-axis <8> speed <650>;
- turn head to z-axis <-12> speed <650>;
- turn torso to x-axis <0> speed <650>;
- }
- if (runtype == 2)
- {
- turn head to x-axis <-20> speed <650>;
- turn head to z-axis <-6> speed <650>;
- turn torso to x-axis <20> speed <650>;
- }
- if (runtype == 1)
- {
- turn head to x-axis <-45> speed <650>;
- turn head to z-axis <-2> speed <650>;
- turn torso to x-axis <45> speed <650>;
- }
- turn rpad to x-axis <-15> speed <650>;
- turn lpad to x-axis <-15> speed <650>;
- turn torso to y-axis <-30> speed <650>;
- turn lshol to x-axis <-66> speed <650>;
- turn lshol to y-axis <-25> speed <650>;
- turn lelb to x-axis <67> speed <650>;
- turn lelb to y-axis <47> speed <650>;
- turn lelb to z-axis <105> speed <650>;
- turn lloarm to x-axis <21> speed <650>;
- turn lloarm to y-axis <-4> speed <650>;
- turn lloarm to z-axis <-2> speed <650>;
- turn lhand to x-axis <-14> speed <650>;
- turn lhand to y-axis <-9> speed <650>;
- turn lhand to z-axis <-25> speed <650>;
- turn rshol to x-axis <-44> speed <650>;
- turn rshol to y-axis <28> speed <650>;
- turn relb to x-axis <14> speed <650>;
- turn relb to y-axis <29> speed <650>;
- turn relb to z-axis <-22> speed <650>;
- turn rhand to x-axis <21> speed <650>;
- turn rhand to y-axis <-32> speed <650>;
- turn rhand to z-axis <14> speed <650>;
- if (runtype == 4)
- {
- if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <0> - Func_Var_2 speed <350>;
- }
- if (runtype == 2)
- {
- if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
- }
- if (runtype == 1)
- {
- if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
- }
- wait-for-turn turret around y-axis;
- start-script RestoreAfterDelay();
- if(bullets < 1)
- {
- return (0);
- }
- else
- return (1);
- }
- }
- AimWeapon2(Func_Var_1, Func_Var_2)
- {
- if( runtype == 4 && bMoving == 1 )
- {
- return (0);
- }
- if ((dead == 1 ) or ( pistol != 2 ))
- {
- return (0);
- }
- if (pistol == 2 && buzy == 0)
- {
- if ( ammunition >= 1)
- {
- pistol = 3; //transitiion to rifle
- call-script ToRifle();
- sleep 800;
- }
- signal SIG_AIM_2;
- set-signal-mask SIG_AIM_2;
- bAiming = TRUE;
- while( !Static_Var_3 )
- {
- sleep 5;
- }
- if (runtype == 4)
- {
- turn head to x-axis <8> speed <650>;
- turn head to z-axis <-12> speed <650>;
- turn torso to x-axis <0> speed <650>;
- }
- if (runtype == 2)
- {
- turn head to x-axis <-20> speed <650>;
- turn head to z-axis <-6> speed <650>;
- turn torso to x-axis <20> speed <650>;
- }
- if (runtype == 1)
- {
- turn head to x-axis <-45> speed <650>;
- turn head to z-axis <-2> speed <650>;
- turn torso to x-axis <45> speed <650>;
- }
- turn torso to y-axis <0> speed <650>;
- turn lloarm to x-axis <0> speed <650>;
- turn lloarm to y-axis <0> speed <650>;
- turn lloarm to z-axis <0> speed <650>;
- turn rpad to x-axis <0> speed <650>;
- turn lpad to x-axis <0> speed <650>;
- turn rshol to x-axis <-78> speed <250>;
- turn rshol to y-axis <0> speed <250>;
- turn rshol to z-axis <-37> speed <250>;
- turn relb to x-axis <75> speed <250>;
- turn relb to y-axis <0> speed <250>;
- turn relb to z-axis <0> speed <250>;
- turn rhand to x-axis <3> speed <250>;
- turn rhand to y-axis <-21> speed <250>;
- turn rhand to z-axis <0> speed <250>;
- turn lshol to x-axis <-64> speed <250>;
- turn lshol to y-axis <-19> speed <250>;
- turn lshol to z-axis <7> speed <250>;
- turn lelb to x-axis <57> speed <250>;
- turn lelb to y-axis <-2> speed <250>;
- turn lelb to z-axis <0> speed <250>;
- turn lhand to x-axis <-8> speed <250>;
- turn lhand to y-axis <5> speed <250>;
- turn lhand to z-axis <-4> speed <250>;
- if (runtype == 4)
- {
- if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <0> - Func_Var_2 speed <350>;
- }
- if (runtype == 2)
- {
- if (( Func_Var_1 > <50>) && ( Func_Var_1 < <310>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-20> - Func_Var_2 speed <350>;
- }
- if (runtype == 1)
- {
- if (( Func_Var_1 > <30>) && ( Func_Var_1 < <330>))
- {
- return 0;
- }
- else
- turn turret to y-axis Func_Var_1 speed <600>;
- turn armpivot to x-axis <-45> - Func_Var_2 speed <350>;
- }
- wait-for-turn armpivot around x-axis;
- wait-for-turn turret around y-axis;
- start-script RestoreAfterDelay();
- return (1);
- }
- }
- Aimweapon1(Func_Var_1, Func_Var_2 )
- {
- if(dead == 1)
- {
- return (0);
- }
- if (sready == 1 && sout == 0)
- {
- call-script tosword();
- }
- if (sready == 1 && sout == 3)
- {
- call-script resetsword();
- }
- if (sready == 1 && buzy == 0)
- {
- signal SIG_AIM_3;
- set-signal-mask SIG_AIM_3;
- bAiming = 1;
- //set up gun
- if (runtype == 4)
- {
- turn head to x-axis <8> speed <650>;
- turn torso to x-axis <0> speed <650>;
- }
- if (runtype == 2)
- {
- turn head to x-axis <-20> speed <650>;
- turn torso to x-axis <20> speed <650>;
- }
- if (runtype == 1)
- {
- turn head to x-axis <-45> speed <650>;
- turn torso to x-axis <45> speed <650>;
- }
- //if (( Func_Var_1 > <100>) && ( Func_Var_1 < <260>))
- //{
- //return 0;
- //}
- turn turret to y-axis Func_Var_1 speed <600>;
- turn torso to y-axis <-66> speed <500>;
- turn head to y-axis <58> speed <500>;
- turn rhand to x-axis <-30> speed <500>;
- turn rhand to y-axis <-19> speed <500>;
- turn rhand to z-axis <-71> speed <500>;
- wait-for-turn torso around y-axis;
- wait-for-turn turret around y-axis;
- start-script RestoreAfterSwing();
- return (1);
- }
- }
- StartBuilding(Func_Var_1, Func_Var_2)
- {
- while( !Static_Var_3 )
- {
- sleep 100;
- }
- while (buzy !=0)
- {
- sleep 800;
- }
- if (buzy == 0)
- {
- if (( Func_Var_1 > <80>) && ( Func_Var_1 < <280>))
- {
- return 0;
- }
- turn turret to y-axis Func_Var_1 speed <300.071429>;
- wait-for-turn turret around y-axis;
- set INBUILDSTANCE to 1;
- }
- }
- TargetCleared(Func_Var_1)
- {
- signal 2;
- set-signal-mask 2;
- call-script RestoreAfterDelay();
- }
- StopBuilding()
- {
- set INBUILDSTANCE to 0;
- signal 2;
- set-signal-mask 2;
- call-script RestoreAfterDelay();
- }
- SweetSpot(piecenum)
- {
- piecenum = torso;
- }
- HitByWeaponId(var1posZ,var2posX,id,shot_power)
- {
- var rando;
- if (buzy == 0 && stance != 0)
- {
- if (id == 48) //sword
- {
- ohnoes = rand (0,32);
- if (sready == 1 ) { ohnoes = ohnoes - 16; }
- if (ohnoes >= 8)
- {
- buzy = 1; //dont shoot
- turn torso to x-axis <45> speed <600>;
- turn armpivot to x-axis <-30> speed <600>;
- sleep (50 * ohnoes);
- turn torso to x-axis <0> speed <300>;
- turn armpivot to x-axis <0> speed <300>;
- sleep 200;
- buzy = 0;
- }
- }
- if (id == 100) //light suppression
- {
- ohnoes = rand (0,60);
- }
- if (id == 101) //med supprsion
- {
- ohnoes = rand (0,80);
- }
- if (id == 102) //heavy suppression
- {
- ohnoes = rand (0,100);
- }
- if (down == 1 ) { ohnoes = ohnoes - 10; }
- if ( ohnoes >= 40 )
- {
- buzy = 1;
- start-script cover();
- }
- }
- if (runtype == 4)
- {
- rando = rand(1,10);
- if (rando == 10) {return 0;}
- else
- rando = rand(50,150);
- return rando;
- }
- if (runtype == 2)
- {
- rando = rand(1,5);
- if (rando == 5) {return 0;}
- else
- rando = rand(80,120);
- return rando;
- }
- if (runtype == 1)
- {
- ohnoes = ohnoes - 10; //lower fear
- rando = rand(1,2);
- if (rando == 2) {return 0;}
- else
- rando = rand(60,100);
- return rando;
- }
- }
- Killed(severity, corpsetype)
- {
- dead = 1;
- set MAX_SPEED to 1;
- if( severity <= 500 )
- {
- if (down != 1 && buzy == 0)
- {
- move pelvis to y-axis [0] speed [12];
- move base to z-axis [0] speed [12];
- }
- turn turret to x-axis <0> speed <250>;
- //fall part 1
- turn gun1 to x-axis <10> speed <300>;
- move gun1 to z-axis [3] speed [5];
- move gun1 to y-axis [0.2] speed [5];
- turn base to x-axis <29> speed <300>;
- turn base to z-axis <26> speed <300>;
- turn turret to y-axis <30> speed <300>;
- turn torso to y-axis <0> speed <300>;
- turn torso to x-axis <10> speed <300>;
- turn head to x-axis <21> speed <300>;
- turn lpad to x-axis <10> speed <300>;
- turn rpad to x-axis <10> speed <300>;
- turn armpivot to x-axis <0> speed <300>;
- turn lshol to y-axis <36> speed <300>;
- turn rshol to y-axis <-30> speed <300>;
- turn relb to x-axis <33> speed <300>;
- turn rupleg to x-axis <15> speed <300>;
- wait-for-turn base around x-axis;
- sleep 100;
- //fall part 2
- turn gun1 to x-axis <30> speed <500>;
- move gun1 to y-axis [3] speed [9];
- turn base to x-axis <65> speed <500>;
- turn base to y-axis <8> speed <500>;
- turn base to z-axis <26> speed <500>;
- turn pelvis to x-axis <16> speed <500>;
- turn armpivot to x-axis <21> speed <500>;
- turn relb to y-axis <-40> speed <500>;
- wait-for-turn base around x-axis;
- //fall part 3
- turn gun1 to x-axis <-65> speed <500>;
- turn gun1 to y-axis <-11> speed <500>;
- turn gun1 to z-axis <22> speed <500>;
- move gun1 to x-axis [0.2] speed [6];
- move gun1 to y-axis [5.3] speed [6];
- move gun1 to z-axis [3.5] speed [6];
- turn base to x-axis <90> speed <500>;
- turn torso to x-axis <-15> speed <500>;
- turn torso to y-axis <-23> speed <500>;
- turn torso to z-axis <-3> speed <500>;
- turn armpivot to x-axis <-6> speed <500>;
- turn lelb to x-axis <33> speed <500>;
- turn lelb to y-axis <-54> speed <500>;
- turn lelb to z-axis <-1> speed <500>;
- turn rupleg to x-axis <0> speed <500>;
- turn lloleg to x-axis <-15> speed <500>;
- turn lupfoot to x-axis <10> speed <500>;
- turn lupfoot to y-axis <45> speed <500>;
- turn lupfoot to z-axis <-20> speed <500>;
- turn rloleg to x-axis <-20> speed <500>;
- turn rupfoot to x-axis <-30> speed <500>;
- wait-for-turn lupfoot around y-axis;
- corpsetype = 1;
- return (0);
- }
- if( severity > 300 )
- {
- corpsetype = 3;
- return (0);
- }
- corpsetype = 1;
- return (0);
- }