home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 2 (DVD) / XENIADVD2.iso / Fragzone / Files / mw4mercseditor.exe / content / ABLScripts / miscfuncs.abl < prev    next >
Encoding:
Text File  |  2002-10-11  |  64.8 KB  |  2,445 lines

  1. library mwfunc;
  2.  
  3. const
  4.  
  5. #include_ "mwconst.abi"
  6.  
  7. type
  8. #include_ "mwtype.abi"
  9.  
  10. var
  11.     static ObjectID last_sound_played;
  12.     static Boolean any_sounds_played;
  13.     
  14. //------------------------------------------------------------------------------------
  15.  
  16. function init;
  17.     code
  18.     any_sounds_played = FALSE;
  19.  
  20.         
  21. endfunction;
  22.  
  23.  
  24. function getRelativeAlignment (ObjectID p1,ObjectID p2) : integer;
  25.  
  26.     var
  27.  
  28.         integer align1;
  29.         integer align2;
  30.  
  31.     code
  32.         align1 = getAlignment (p1);
  33.         align2 = getAlignment (p2);
  34.         
  35.         if align2 == NEUTRAL_ALIGNMENT then
  36.             return (NEUTRAL);
  37.         endif;
  38.         if align1 <> align2 then
  39.             return (ENEMY);
  40.         endif;
  41.         return (FRIENDLY);
  42.         
  43. endfunction;
  44.  
  45. function SnapToGround(ObjectID obj);
  46.     var
  47.         LocPoint l;
  48.         
  49.     code
  50.         getLocation(obj,l);
  51.         l[1] = -1;
  52.         teleport(obj,l);
  53. endfunction;
  54.       
  55. function ProtectAGroup(integer group_num) : integer;
  56.     // This one may or may not work. Needs testing.
  57.     var
  58.         
  59.     code
  60.     
  61.     if (isShot (GroupObjectId(group_num))) then
  62.           if (getRelativeAlignment(me,WhoShot(GroupObjectId(group_num))) == ENEMY) then
  63.                 setTarget(me,WhoShot(GroupObjectId(group_num)));
  64.                 return (1);
  65.             endif;
  66.         endif;
  67.         
  68.         return (0);
  69. endfunction;
  70.  
  71.  
  72. function GeneralPlayChatter(ObjectId sound,
  73.  integer which_timer, integer what_delay, integer what_chance);
  74. // if Timer which_timer is over what_delay, there is a chance what_chance
  75. // that the sound sound is played. After this, the timer is reset.    
  76. // use this function for easy handling of radio chatter.
  77. // what_chance is a number from 0 to 1000. The percentage chance of the sound playing is
  78. // what_chance / 10     
  79.     var
  80.     
  81.     code
  82.         if (any_sounds_played == TRUE) then
  83.             if (last_sound_played == sound) then
  84.                 what_chance = -1;
  85.             endif;
  86.         endif;
  87.         
  88.         if (TimeGreater(which_timer,what_delay)) then
  89.             if (Rand(0,1000) <= what_chance) then
  90.                 PlaySound(sound);
  91.                 last_sound_played = sound;
  92.                 any_sounds_played = TRUE;
  93.                 ResetTimer(which_timer);        
  94.             endif;
  95.             
  96.         endif;
  97. endfunction;
  98.  
  99. function SetMyTarget(integer searchrange) : boolean;
  100.     
  101.     var
  102.     
  103.  integer    foe;
  104.       
  105.     code
  106.         foe = FindObject(ME,FA_ENEMY,FT_DEFAULT,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER,searchrange);
  107.         
  108.         if (foe <> no_unit) then
  109.             SetTarget (me,foe);
  110.             return (true);
  111.         endif;
  112.  
  113.         return (false);
  114.                 
  115. endfunction;
  116.  
  117. function TurretSetMyTarget(integer searchrange) : boolean;
  118.     
  119.     var
  120.     
  121.  integer    foe;
  122.       
  123.     code
  124.         foe = FindObject(ME,FA_ENEMY,FT_DEFAULT,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER + FF_TARGETLOS,searchrange);
  125.         
  126.         if (foe <> no_unit) then
  127.             SetTarget (me,foe);
  128.             return (true);
  129.         endif;
  130.  
  131.         return (false);
  132.                 
  133. endfunction;
  134.  
  135. function FindEnemy(integer searchrange, integer flags) : boolean;
  136.     
  137.     var
  138.         integer foe;
  139.       
  140.     code
  141.         foe = FindObject(ME,FA_ENEMY,flags,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER,searchrange);
  142.         
  143.         if (foe <> no_unit) then
  144.             SetTarget (me,foe);
  145.             return (true);
  146.         endif;
  147.  
  148.         return (false);
  149.                 
  150. endfunction;
  151.  
  152. function Bot_FindEnemy(integer searchrange) : boolean;
  153.     
  154.     var
  155.         integer foe;
  156.       
  157.     code
  158.         foe = FindObject(ME,FA_ENEMY,FT_DEFAULT,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER + FF_LOOK_EVERYWHERE,searchrange);
  159.         
  160.         if (foe <> no_unit) then
  161.             SetTarget (me,foe);
  162.             return (true);
  163.         endif;
  164.  
  165.         return (false);
  166.                 
  167. endfunction;
  168.  
  169. function LeaveAttackState(integer withdrawrange) : boolean;
  170.     
  171.     var
  172.     
  173.      integer    target;
  174.       
  175.     code
  176.  
  177.          target = gettarget(me);
  178.  
  179.          //1.  I somehow got here without a legitimate target
  180.         if (target < 0) then
  181.                 return(true);
  182.             else
  183.         //2.  My target is dead            
  184.             if (isDead (target) == TRUE) then
  185.                 return(true);
  186.             else
  187.                 //3.  My target has gotten too far from me
  188.                 if ((isWithin(target,me,withdrawrange)) == FALSE) then
  189.                     if (WhoShot(me) <> target) then
  190.                         return(true);
  191.                     endif;
  192.                 endif;
  193.             endif;
  194.         endif;
  195.  
  196.  
  197.         return (false);
  198.                 
  199. endfunction;
  200.  
  201. function TurretLeaveAttackState(integer withdrawrange) : boolean;
  202.     
  203.     var
  204.     
  205.      integer    target;
  206.       
  207.     code
  208.  
  209.          target = gettarget(me);
  210.  
  211.          //1.  I somehow got here without a legitimate target
  212.         if (target < 0) then
  213.                 return(true);
  214.             else
  215.         //2.  My target is dead            
  216.             if (isDead (target) == TRUE) then
  217.                 return(true);
  218.             else
  219.                 //3.  My target has gotten too far from me
  220.                 if ((isWithin(target,me,withdrawrange)) == FALSE) then
  221.                     if (WhoShot(me) <> target) then
  222.                         return(true);
  223.                     endif;
  224.                 endif;
  225.  
  226.                 //4.  My target has gotten out of LOS from me
  227.                 if ((CanSee(me,target)) == FALSE) then
  228.                     if (WhoShot(me) <> target) then
  229.                         return(true);
  230.                     endif;
  231.                 endif;
  232.             endif;
  233.         endif;
  234.  
  235.  
  236.         return (false);
  237.                 
  238. endfunction;
  239.  
  240.  
  241.  
  242. function PlayChatter(ObjectID who_speaks, ObjectId sound,
  243.  integer which_timer, integer what_delay, integer what_chance, Boolean check_combat);
  244. // if Timer which_timer is over what_delay and unit who_speaks is
  245. // alive, there is a chance what_chance
  246. // that the sound sound is played. After this, the timer is reset.    
  247. // If check_combat is TRUE, the sound is only played if who_speaks is involved in a fight.
  248. // use this function for easy handling of radio chatter.     
  249. // what_chance is a number from 0 to 1000. The percentage chance of the sound playing is
  250. // what_chance / 10     
  251.     var
  252.     
  253.     code
  254.         if (any_sounds_played == TRUE) then
  255.             if (last_sound_played == sound) then
  256.                 what_chance = -1;
  257.             endif;
  258.         endif;
  259.         
  260.         
  261.         if ((IsDead(who_speaks) == FALSE) and (TimeGreater(which_timer,what_delay))) then
  262.             if  (Rand(0,1000) <= what_chance) then
  263.                 if ((check_combat == FALSE) or
  264.                 ((check_combat == TRUE) and (IsShot(who_speaks)))) then
  265.                     PlaySound(sound);
  266.                  last_sound_played = sound;
  267.                     any_sounds_played = TRUE;
  268.                     ResetTimer(which_timer);        
  269.                 endif;
  270.             endif;
  271.         endif;
  272. endfunction;
  273.  
  274.  
  275. function GroupPlayChatter(integer group_who_speaks, ObjectId sound,
  276.  integer which_timer, integer what_delay, integer what_chance, Boolean check_combat);
  277.     // if Timer which_timer is over what_delay and group group_who_speaks is
  278. // alive, there is a chance what_chance
  279. // that the sound sound is played. After this, the timer is reset.    
  280. // If check_combat is TRUE, the sound is only played if the group is involved in a fight.
  281. // use this function for easy handling of radio chatter.     
  282. // what_chance is a number from 0 to 1000. The percentage chance of the sound playing is
  283. // what_chance / 10     
  284.     var
  285.     
  286.     code
  287.         if (any_sounds_played == TRUE) then
  288.             if (last_sound_played == sound) then
  289.                 what_chance = -1;
  290.             endif;
  291.         endif;
  292.         
  293.         
  294.         if ((GroupAllDead(GroupObjectId(group_who_speaks)) == FALSE) and (TimeGreater(which_timer,what_delay))
  295.          and (Rand(0,1000) <= what_chance)) then
  296.             if ((check_combat == FALSE) or
  297.             ((check_combat == TRUE) and (IsShot(GroupObjectId(group_who_speaks))))) then
  298.                 PlaySound(sound);
  299.                 last_sound_played = sound;
  300.                 any_sounds_played = TRUE;
  301.                 ResetTimer(which_timer);        
  302.             endif;
  303.         endif;
  304.         
  305. endfunction;
  306.  
  307.  
  308. // Cinema_ZoomOut():
  309. // Does a generic zoom-out camera animation suitable for mission victory or failure cut scenes.
  310. // "who" is the unit to zoom out from; it must be a single unit (typically the player's 'Mech).
  311. // "unique_timer_id" is the ID of a timer that the function can use that's not used for anything
  312. // else in any of the ABL scripts related to this mission.
  313. // "duration" is how long the zoom-out sequence will last.  10 to 20 seconds is generally
  314. // recommended, though this may be anything above 0.  Since the distance to zoom out
  315. // is fixed, a longer duration will mean a slower zoom-out.
  316.  
  317. function Cinema_ZoomOut(ObjectID who, integer unique_timer_id, real duration) : Boolean;
  318.     var
  319.         real time_remaining;
  320.  
  321.     code
  322.         if (Not TimeGreater(unique_timer_id,0)) then
  323.             StartTimer(unique_timer_id);
  324.  
  325.             Targetfollowobject(who);
  326.             camerafollowobject(who);
  327.             SetCameraFootShake(who,100);
  328.  
  329.             TargetOffset(0.0,5.0,0.0,0.0,true);
  330.             CameraOffset(0.0,5.0,30.0,0.0,true);
  331.  
  332.             return (false);
  333.         endif;
  334.  
  335.         if (TimeGreater(unique_timer_id,duration)) then
  336.             return (true);
  337.         endif;
  338.  
  339.         if (duration > 2.0) then
  340.             if (TimeGreater(unique_timer_id,2.0)) then
  341.                 time_remaining = duration - 2.0;
  342.                 TargetOffset(0.0,9.0,-20.0,time_remaining,true);
  343.                 CameraOffset(0.0,40.0,150.0,time_remaining,true);
  344.             endif;
  345.         endif;
  346.  
  347.         return (false);
  348. endfunction;
  349.  
  350.  
  351. // IsShotOrDead():
  352. // Returns true if the unit was shot recently or is destroyed.
  353.  
  354. function IsShotOrDead(ObjectID who) : Boolean;
  355.     var
  356.  
  357.     code
  358.         if (IsDead(who)) then
  359.             return (true);
  360.         endif;
  361.  
  362.         return (IsShot(who));
  363. endfunction;
  364.  
  365.  
  366. // WhoShotOrKilled():
  367. // Indicates who shot or destroyed a given unit
  368.  
  369. function WhoShotOrKilled(ObjectID who) : ObjectID;
  370.     var
  371.     
  372.     code
  373.         if (IsDead(who)) then
  374.             return (WhoDestroyed(who));
  375.         endif;
  376.  
  377.         if (IsShot(who) == false) then
  378.             return (WhoShot(who));
  379.         endif;
  380.  
  381.         return (NO_UNIT);
  382. endfunction;
  383.  
  384.  
  385. // ReachedNav():
  386. // Indicates whether a unit (or group or team) IsWithin() a nav point
  387.  
  388. function ReachedNav(ObjectID who, ObjectID nav) : Boolean;
  389.     var
  390.  
  391.     code
  392.         return (IsWithin(who,nav,150));
  393.  
  394. endfunction;
  395.  
  396. function WakeNearMe(Integer MyGroup, Integer HowClose) : Boolean;
  397.     var
  398.     
  399.     code
  400.     
  401.         if (MyGroup<>0) then
  402.             if (IsShot(GroupObjectID(MyGroup))) then
  403.                 return (TRUE);
  404.             else
  405.                 if (IsWithin(ME,epl_player0,HowClose)) then
  406.                     return (TRUE);
  407.                 else
  408.                     return (FALSE);
  409.                 endif;
  410.             endif;
  411.         else
  412.             if (IsShot(ME)) then
  413.                 return (TRUE);
  414.             else
  415.                 if (IsWithin(ME,epl_player0,HowClose)) then
  416.                     return (TRUE);
  417.                 else
  418.                     return (FALSE);
  419.                 endif;
  420.             endif;
  421.         endif;
  422.         
  423. endfunction;
  424.  
  425. function AssignSkill(Integer SkillLevel);
  426.     var
  427.  
  428.     code
  429.  
  430.         switch (SkillLevel)
  431.             
  432.             case 1:        // Falling down cadet
  433.                 SetFiringDelay            (ME,2.5,5.0);
  434.                 SetIgnoreFriendlyFire    (ME,true);
  435.                 SetIsShotRadius            (ME,80);
  436.                 SetEntropyMood            (ME,NEUTRAL_START);
  437.                 SetCurMood                (ME,NEUTRAL_START);
  438.                 SetSkillLevel            (ME,10,20,5);
  439.                 SetAttackThrottle        (ME,50);
  440.             endcase;
  441.             
  442.             case 2:        // Second time in his daddy's 'Mech
  443.                 SetFiringDelay            (ME,2.0,4.0);
  444.                 SetIgnoreFriendlyFire    (ME,true);
  445.                 SetIsShotRadius            (ME,90);
  446.                 SetEntropyMood            (ME,NEUTRAL_START);
  447.                 SetCurMood                (ME,NEUTRAL_START);
  448.                 SetSkillLevel            (ME,30,25,20);
  449.                 SetAttackThrottle        (ME,65);
  450.             endcase;
  451.             
  452.             case 3:        // Low level flunky
  453.                 SetFiringDelay            (ME,1.5,3.0);
  454.                 SetIgnoreFriendlyFire    (ME,true);
  455.                 SetIsShotRadius            (ME,120);
  456.                 SetEntropyMood            (ME,NEUTRAL_START);
  457.                 SetCurMood                (ME,NEUTRAL_START);
  458.                 SetSkillLevel            (ME,50,30,30);
  459.                 SetAttackThrottle        (ME,80);
  460.             endcase;
  461.  
  462.             case 4:        // Green
  463.                 SetFiringDelay            (ME,1.1,2.2);
  464.                 SetIgnoreFriendlyFire    (ME,true);
  465.                 SetIsShotRadius            (ME,120);
  466.                 SetEntropyMood            (ME,NEUTRAL_START);
  467.                 SetCurMood                (ME,NEUTRAL_START);
  468.                 SetSkillLevel            (ME,60,30,40);
  469.                 SetAttackThrottle        (ME,80);
  470.             endcase;
  471.  
  472.             case 5:        // Regular pilot
  473.                 SetFiringDelay            (ME,0.8,1.6);
  474.                 SetIgnoreFriendlyFire    (ME,true);
  475.                 SetIsShotRadius            (ME,120);
  476.                 SetEntropyMood            (ME,NEUTRAL_START);
  477.                 SetCurMood                (ME,NEUTRAL_START);
  478.                 SetSkillLevel            (ME,70,45,45);        // Was Elite 50
  479.                 SetAttackThrottle        (ME,90);
  480.             endcase;
  481.  
  482.             case 6:        // Skilled pilot
  483.                 SetFiringDelay            (ME,0.5,1.0);
  484.                 SetIgnoreFriendlyFire    (ME,true);
  485.                 SetIsShotRadius            (ME,120);
  486.                 SetEntropyMood            (ME,NEUTRAL_START);
  487.                 SetCurMood                (ME,NEUTRAL_START);
  488.                 SetSkillLevel            (ME,80,60,50);        // Was Elite 60
  489.                 SetAttackThrottle        (ME,100);
  490.             endcase;
  491.  
  492.             case 7:        // Veteran pilot
  493.                 SetFiringDelay            (ME,0.3,0.6);
  494.                 SetIgnoreFriendlyFire    (ME,true);
  495.                 SetIsShotRadius            (ME,150);
  496.                 SetEntropyMood            (ME,NEUTRAL_START);
  497.                 SetCurMood                (ME,NEUTRAL_START);
  498.                 SetSkillLevel            (ME,90,75,55);        // Was Elite 70
  499.                 SetAttackThrottle        (ME,100);
  500.             endcase;
  501.  
  502.             case 8:        // Elite pilot
  503.                 SetFiringDelay            (ME,0.2,0.4);
  504.                 SetIgnoreFriendlyFire    (ME,true);
  505.                 SetIsShotRadius            (ME,180);
  506.                 SetEntropyMood            (ME,NEUTRAL_START);
  507.                 SetCurMood                (ME,NEUTRAL_START);
  508.                 SetSkillLevel            (ME,100,90,60);        // Was Elite 80
  509.                 SetAttackThrottle        (ME,100);
  510.             endcase;
  511.  
  512.             case 9:        // Very Elite MechWarrior
  513.                 SetFiringDelay            (ME,0.1,0.3);
  514.                 SetIgnoreFriendlyFire    (ME,true);
  515.                 SetIsShotRadius            (ME,210);
  516.                 SetEntropyMood            (ME,NEUTRAL_START);
  517.                 SetCurMood                (ME,NEUTRAL_START);
  518.                 SetSkillLevel            (ME,100,110,70);        // Was Elite 85
  519.                 SetAttackThrottle        (ME,100);
  520.             endcase;
  521.  
  522.             case 10:    // Almost a Boss
  523.                 SetFiringDelay            (ME,0.0,0.3);
  524.                 SetIgnoreFriendlyFire    (ME,true);
  525.                 SetIsShotRadius            (ME,240);
  526.                 SetEntropyMood            (ME,NEUTRAL_START);
  527.                 SetCurMood                (ME,NEUTRAL_START);
  528.                 SetSkillLevel            (ME,100,130,75);        // Was Elite 90
  529.                 SetAttackThrottle        (ME,100);
  530.             endcase;
  531.             
  532.             
  533.                 /*SetFiringDelay            (ME,minDelay,maxDelay);
  534.                 SetIgnoreFriendlyFire    (ME,true);
  535.                 SetIsShotRadius            (ME,isShotRadius);
  536.                 SetEntropyMood            (ME,mood);
  537.                 SetCurMood                (ME,mood);
  538.                 SetSkillLevel            (ME,piloting,gunnery,eliteLevel);
  539.                 SetAttackThrottle        (ME,attackThrottle);*/
  540.             
  541.         endswitch;
  542.         
  543. endfunction;
  544.  
  545. function SpinCamera1(ObjectID Targz, ObjectID Camz,  Real Heightz, Real Timez, Boolean Shakez);
  546.     var
  547.     
  548.     code
  549.         playerai(epl_player0,true);
  550.         SetCompositingEnabled(False);
  551.         
  552.         CinemaStart;
  553.         
  554.         starttimer(21);            // This is the cineractive counter.
  555.         resettimer(21);
  556.         
  557.         if (Shakez) then
  558.             SetCameraFootShake(Targz,25);
  559.         endif;
  560.         
  561.         FadeToBlack(0.0);
  562.         FadeFromBlack(1.0);
  563.  
  564.         Targetfollowobject(Targz);
  565.         Camerafollowobject(Camz);
  566.         TargetOffset(0.0,0.0,0.0,0.0,false);
  567.         TargetOffset(0.0,8.0,0.0,4.0,false);
  568.         CameraOffset(-60.0,25.0,3.0,0.0,true);
  569.         CameraOffset(0.0,8.0,-35.0,4.0,true);
  570.         
  571. endfunction;
  572.  
  573. function SpinCamera2(ObjectID Targz, ObjectID Camz,  Real Heightz, Real Timez, Boolean Shakez);
  574.     var
  575.     
  576.     code
  577.         
  578.         starttimer(21);            // This is the cineractive counter.
  579.         resettimer(21);
  580.         
  581.         Targetfollowobject(Targz);
  582.         Camerafollowobject(Camz);
  583.         TargetOffset(0.0,8.0,0.0,0.0,false);
  584.         TargetOffset(0.0,8.0,0.0,2.0,false);
  585.         CameraOffset(0.0,8.0,-35.0,0.0,true);
  586.         CameraOffset(0.0,8.0,0.0,2.0,true);
  587.         
  588. endfunction;
  589.  
  590. function HeadonCamera(ObjectID Targz, ObjectID Camz,  Real Heightz, Real Timez, Boolean Shakez);
  591.     var
  592.     
  593.     code
  594.         playerai(epl_player0,true);
  595.         SetCompositingEnabled(False);
  596.         
  597.         CinemaStart;
  598.         
  599.         starttimer(21);            // This is the cineractive counter.
  600.         resettimer(21);
  601.         
  602.         if (Shakez) then
  603.             SetCameraFootShake(Targz,25);
  604.         endif;
  605.         
  606.         FadeToBlack(0.0);
  607.         FadeFromBlack(5.0);
  608.  
  609.         Targetfollowobject(Targz);
  610.         Camerafollowobject(Camz);
  611.         Targetoffset(0.0,5.0,0.0,0.0,true);
  612.         Targetoffset(0.0,5.0,0.0,0.0,true);
  613.         Cameraoffset(0.0,Heightz,90.0,0.0,true);
  614.         Cameraoffset(0.0,Heightz,35.0,Timez,true);
  615.         
  616. endfunction;
  617.  
  618. function ChaseCamera(ObjectID Targz, ObjectID Camz,  Real Heightz, Real Timez, Boolean Shakez);
  619.     var
  620.     
  621.     code
  622.         playerai(epl_player0,true);
  623.         SetCompositingEnabled(False);
  624.         
  625.         CinemaStart;
  626.         
  627.         starttimer(21);            // This is the cineractive counter.
  628.         resettimer(21);
  629.         
  630.         if (Shakez) then
  631.             SetCameraFootShake(Targz,25);
  632.         endif;
  633.         
  634.         FadeToBlack(0.0);
  635.         FadeFromBlack(5.0);
  636.  
  637.         Targetfollowobject(Targz);
  638.         Camerafollowobject(Camz);
  639.         Targetoffset(0.0,5.0,0.0,0.0,true);
  640.         Targetoffset(0.0,5.0,0.0,0.0,true);
  641.         Cameraoffset(0.0,Heightz,-80.0,0.0,true);
  642.         Cameraoffset(0.0,Heightz,-35.0,Timez,true);
  643.         
  644. endfunction;
  645.  
  646. function SpinOverCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
  647.     var
  648.  
  649.     code
  650.  
  651.         playerai(epl_player0,true);
  652.         SetCompositingEnabled(False);
  653.         
  654.         CinemaStart;
  655.         
  656.         starttimer(21);            // This is the cineractive counter.
  657.         resettimer(21);
  658.         
  659.         if (Shakez) then
  660.             SetCameraFootShake(Targz,25);
  661.         endif;
  662.         
  663.         FadeToBlack(0.0);
  664.         Fadefromblack(2.0);
  665.  
  666.         Targetfollowobject(Targz);
  667.         camerafollowobject(Camz);
  668.         targetoffset(0.0,8.0,0.0,0.0,false);
  669.         Cameraoffset(-100.0, Heightz+14.0, 35.0, 0.0,   true);// Base Height - 35, Base Time - 17
  670.         Cameraoffset(  90.0, Heightz     , 15.0, Timez, true);
  671.     
  672. endfunction;
  673.  
  674. function SpinUnderCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
  675.     var
  676.  
  677.     code
  678.  
  679.         playerai(epl_player0,true);
  680.         SetCompositingEnabled(False);
  681.         
  682.         CinemaStart;
  683.         
  684.         starttimer(21);            // This is the cineractive counter.
  685.         resettimer(21);
  686.  
  687.         if (Shakez) then
  688.             SetCameraFootShake(Targz,25);
  689.         endif;
  690.         
  691.         FadeToBlack(0.0);
  692.         Fadefromblack(8.0);
  693.  
  694.         Targetfollowobject(Targz);
  695.         camerafollowobject(Camz);
  696.         targetoffset(0.0,5.0,0.0,0.0,false);
  697.         
  698.         Cameraoffset(100.0, Heightz        , -4.0, 0.0     , true);        // Base Height - 16, Base Time - 17
  699.         Cameraoffset(  0.0, Heightz-15.0, 35.0, Timez, true);
  700.     
  701. endfunction;
  702.  
  703. function SpinUnderCameraB(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
  704.     var
  705.  
  706.     code
  707.  
  708.         playerai(epl_player0,true);
  709.         SetCompositingEnabled(False);
  710.         
  711.         CinemaStart;
  712.         
  713.         starttimer(21);            // This is the cineractive counter.
  714.         resettimer(21);
  715.  
  716.         if (Shakez) then
  717.             SetCameraFootShake(Targz,25);
  718.         endif;
  719.         
  720.         FadeToBlack(0.0);
  721.         Fadefromblack(4.0);
  722.  
  723.         Targetfollowobject(Targz);
  724.         camerafollowobject(Camz);
  725.         targetoffset(0.0,8.0,0.0,0.0,false);
  726.         
  727.         Cameraoffset(-100.0, Heightz        , -4.0, 0.0     , true);        // Base Height - 16, Base Time - 17
  728.         Cameraoffset(  0.0, Heightz-15.0, 30.0, Timez, true);
  729.     
  730. endfunction;
  731.  
  732. function StaticCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
  733.     var
  734.  
  735.     code
  736.  
  737.         playerai(epl_player0,true);
  738.         SetCompositingEnabled(False);
  739.         
  740.         CinemaStart;
  741.         
  742.         starttimer(21);            // This is the cineractive counter.
  743.         resettimer(21);
  744.         
  745.         if (Shakez) then
  746.             SetCameraFootShake(Targz,25);
  747.         endif;
  748.         
  749.         FadeToBlack(0.0);
  750.         Fadefromblack(3.0);
  751.  
  752.         Targetfollowobject(Targz);
  753.         camerafollowobject(Camz);
  754.         targetoffset(0.0,2.0,0.0,0.0,false);
  755.         Cameraoffset(0.0,Heightz,0.0,0.0,true);        // Base Height - 2, Base Time - 0
  756.         Cameraoffset(0.0,Heightz,0.0,Timez,true);
  757.     
  758. endfunction;
  759.  
  760. function JumpCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
  761.     var
  762.  
  763.     code
  764.  
  765.         playerai(epl_player0,true);
  766.         SetCompositingEnabled(False);
  767.         
  768.         CinemaStart;
  769.         
  770.         starttimer(21);            // This is the cineractive counter.
  771.         resettimer(21);
  772.         
  773.         if (Shakez) then
  774.             SetCameraFootShake(Targz,25);
  775.         endif;
  776.         
  777.         SetCameraFOV(55.0,Timez);        // Base Time - 0.5
  778.     
  779. endfunction;
  780.  
  781. function PullOutCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
  782. // Pulls away from the target by Heightz amount in Timez time.    
  783.     var
  784.  
  785.     code
  786.  
  787.         playerai(epl_player0,true);
  788.         SetCompositingEnabled(False);
  789.         
  790.         CinemaStart;
  791.         
  792.         starttimer(21);            // This is the cineractive counter.
  793.         resettimer(21);
  794.  
  795.         if (Shakez) then
  796.             SetCameraFootShake(Targz,25);
  797.         endif;
  798.         
  799.         FadeToBlack(0.0);
  800.         Fadefromblack(8.0);
  801.  
  802.         Targetfollowobject(Targz);
  803.         camerafollowobject(Camz);
  804.         targetoffset(0.0,5.0,0.0,0.0,false);
  805.         
  806.         Cameraoffset(0.0, 15.0,               25.0,           0.0,   true);
  807.         Cameraoffset(0.0, 15.0 + (Heightz/3), 25.0 + heightz, Timez, true);
  808.     
  809. endfunction;
  810.  
  811. function RandIntroCamera(ObjectID PlayerMech, ObjectID Arena);        // Pick a camera per arena
  812.     var
  813.  
  814.     code
  815.  
  816.         switch (Arena)
  817.             case 1:        // Coliseum
  818.                 SpinOverCamera(PlayerMech,PlayerMech,17.0,17.0,true);
  819.             endcase;
  820.             case 2:        // Coliseum Night
  821.                 SpinUnderCameraB(PlayerMech,PlayerMech,17.0,17.0,true);
  822.             endcase;
  823.             case 3:        // Factory
  824.                 playerai(epl_player0,true);
  825.                 SetCompositingEnabled(False);
  826.                 
  827.                 CinemaStart;
  828.                 
  829.                 starttimer(21);            // This is the cineractive counter.
  830.                 resettimer(21);
  831.         
  832.                 FadeToBlack(0.0);
  833.                 Fadefromblack(8.0);
  834.         
  835.                 Targetfollowobject(PlayerMech);
  836.                 camerafollowobject(PlayerMech);
  837.                 targetoffset(0.0,4.0,0.0,0.0,false);
  838.                 
  839.                 Cameraoffset(0.0,20.0,300.0,0.0,true);
  840.                 Cameraoffset(0.0,20.0,50.0,17.0,true);
  841.             endcase;
  842.             case 4:        // Factory Night
  843.                 ChaseCamera(PlayerMech,PlayerMech,17.0,17.0,true);
  844.             endcase;
  845.             case 5:        //Jungle
  846.                 playerai(epl_player0,true);
  847.                 SetCompositingEnabled(False);
  848.                 
  849.                 CinemaStart;
  850.                 
  851.                 starttimer(21);            // This is the cineractive counter.
  852.                 resettimer(21);
  853.         
  854.                 FadeToBlack(0.0);
  855.                 Fadefromblack(8.0);
  856.         
  857.                 Targetfollowobject(PlayerMech);
  858.                 camerafollowobject(PlayerMech);
  859.                 targetoffset(0.0,4.0,0.0,0.0,false);
  860.                 
  861.                 Cameraoffset(-100.0,50.0,250.0,0.0,true);
  862.                 Cameraoffset(50.0,50.0,50.0,17.0,true);
  863.             endcase;
  864.             case 6:        //Jungle Night
  865.                 HeadOnCamera(PlayerMech,PlayerMech,17.0,17.0,true);
  866.             endcase;
  867.         endswitch;
  868.         
  869. endfunction;
  870.  
  871. function RandClosingCamera(ObjectID PlayerMech);        // TBD later
  872.     var
  873.  
  874.     code
  875.     
  876.         Targetfollowobject(playermech);
  877.         Camerafollowobject(playermech);
  878.         Targetoffset(0.0,4.0,0.0,0.0,false);
  879.         Cameraoffset(-30.0,125.0,75.0,0.0,false);
  880.         Cameraoffset(60.0,20.0,25.0,14.0,false);
  881.  
  882. endfunction;
  883.  
  884. // SOLARIS VII - Adding new functions for Solaris
  885. function SolGenericIntro;        // When you run out of arena and class specific intro messages
  886.     var
  887.  
  888.     code
  889.     
  890.         if (not GetEventFlag("SolGrand")) then
  891.             switch (GetEventInteger("SolGenericIntro"))
  892.                 case 0:
  893.                     PlayVoiceOverOnce("VO\Solaris\IntroGeneric1",TALKER_FIS);
  894.                 endcase;
  895.                 case 1:
  896.                     PlayVoiceOverOnce("VO\Solaris\IntroGeneric2",TALKER_FIS);
  897.                 endcase;
  898.                 case 2:
  899.                     PlayVoiceOverOnce("VO\Solaris\IntroGeneric3",TALKER_FIS);
  900.                 endcase;
  901.                 case 3:
  902.                     PlayVoiceOverOnce("VO\Solaris\IntroGeneric4",TALKER_FIS);
  903.                 endcase;
  904.                 case 4:
  905.                     PlayVoiceOverOnce("VO\Solaris\IntroGeneric5",TALKER_FIS);
  906.                 endcase;
  907.                 case 5:
  908.                     PlayVoiceOverOnce("VO\Solaris\IntroGeneric6",TALKER_FIS);
  909.                 endcase;
  910.                 case 6:
  911.                     PlayVoiceOverOnce("VO\Solaris\IntroGeneric7",TALKER_FIS);
  912.                 endcase;
  913.             endswitch;
  914.  
  915.             if (GetEventInteger("SolGenericIntro")==6) then
  916.                 SetEventInteger("SolGenericIntro",0);
  917.             else
  918.                 SetEventInteger("SolGenericIntro",GetEventInteger("SolGenericIntro") + 1);
  919.             endif;
  920.             
  921.         else    // This is in PostSeason
  922.             switch (GetEventInteger("SolPostIntro"))
  923.                 case 0:
  924.                     PlayVoiceOverOnce("VO\Solaris\PostIntro1",TALKER_FIS);
  925.                 endcase;
  926.                 case 1:
  927.                     PlayVoiceOverOnce("VO\Solaris\PostIntro2",TALKER_FIS);
  928.                 endcase;
  929.                 case 2:
  930.                     PlayVoiceOverOnce("VO\Solaris\PostIntro3",TALKER_FIS);
  931.                 endcase;
  932.             endswitch;
  933.             
  934.             if (GetEventInteger("SolPostIntro")==2) then
  935.                 SetEventInteger("SolPostIntro",0);
  936.             else
  937.                 SetEventInteger("SolPostIntro",GetEventInteger("SolPostIntro") + 1);
  938.             endif;
  939.             
  940.         endif;
  941.     
  942. endfunction;
  943.  
  944. function SolCycleCheck (integer PlayerMech) : integer;        // Each round check this - Generic Solaris stuff
  945.     var
  946.  
  947.     code
  948.         
  949.         // NERF CHECK - Are you hiding from everyone?
  950.         if (timegreater(20,1)) then
  951.             if (not timegreater(1,1)) then
  952.                 StartTimer(20);        // This is the Coward timer
  953.             endif;
  954.         endif;
  955.         
  956.         if (IsShot(PlayerMech)) then    // If the player is shot, they're ok
  957.             ResetTimer(20);
  958.             ResetTimer(19);
  959.         endif;
  960.         
  961.         if (timegreater(1,300)) then    // If the time is greater than 5 minutes, you are OK
  962.             ResetTimer(20);
  963.             ResetTimer(19);
  964.         endif;
  965.         
  966.         if (timegreater(18,1)) then
  967.             if (timegreater(19,60)) then    // After some time you are disqualified - 90sec
  968.                 KillVoiceOvers;    
  969.                 PlayVoiceOver("VO\Solaris\Disqualified",TALKER_FIS);
  970.                 StartTimer(2);        // You are a loser
  971.                 ResetTimer(18);
  972.                 ResetTimer(19);
  973.                 ResetTimer(20);
  974.                 Return (1);
  975.             endif;
  976.         endif;
  977.         
  978.         if (timegreater(20,120)) then    // 120sec
  979.             KillVoiceOvers;
  980.             switch (GetEventInteger("SolCoward"))
  981.                 case 0:
  982.                     PlayVoiceOver("VO\Solaris\NotFighting2",TALKER_FIS);
  983.                 endcase;
  984.                 case 1:
  985.                     PlayVoiceOver("VO\Solaris\NotFighting3",TALKER_FIS);
  986.                 endcase;
  987.             endswitch;
  988.             
  989.             if (GetEventInteger("SolCoward")==1) then
  990.                 SetEventInteger("SolCoward",0);
  991.             else
  992.                 SetEventInteger("SolCoward",GetEventInteger("SolCoward") + 1);
  993.             endif;
  994.             ResetTimer(20);
  995.             StartTimer(18);
  996.             StartTimer(19);
  997.         endif;
  998.         
  999.         //
  1000.         
  1001. endfunction;
  1002.  
  1003. function SolOpening;        // Duncan's fast opening comments
  1004.     var
  1005.  
  1006.     code
  1007.     
  1008.         switch (GetEventInteger("SolOpening"))
  1009.             case 0:
  1010.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening1",TALKER_FIS);
  1011.             endcase;
  1012.             case 1:
  1013.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening2",TALKER_FIS);
  1014.             endcase;
  1015.             case 2:
  1016.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening3",TALKER_FIS);
  1017.             endcase;
  1018.             case 3:
  1019.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening4",TALKER_FIS);
  1020.             endcase;
  1021.             case 4:
  1022.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening5",TALKER_FIS);
  1023.             endcase;
  1024.             case 5:
  1025.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening6",TALKER_FIS);
  1026.             endcase;
  1027.             case 6:
  1028.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening7",TALKER_FIS);
  1029.             endcase;
  1030.             case 7:
  1031.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening8",TALKER_FIS);
  1032.             endcase;
  1033.             case 8:
  1034.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening9",TALKER_FIS);
  1035.             endcase;
  1036.             case 9:
  1037.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening10",TALKER_FIS);
  1038.             endcase;
  1039.             case 10:
  1040.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening11",TALKER_FIS);
  1041.             endcase;
  1042.             case 11:
  1043.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening12",TALKER_FIS);
  1044.             endcase;
  1045.             case 12:
  1046.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening13",TALKER_FIS);
  1047.             endcase;
  1048.             case 13:
  1049.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening14",TALKER_FIS);
  1050.             endcase;
  1051.             case 14:
  1052.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening15",TALKER_FIS);
  1053.             endcase;
  1054.             case 15:
  1055.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening16",TALKER_FIS);
  1056.             endcase;
  1057.             case 16:
  1058.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening17",TALKER_FIS);
  1059.             endcase;
  1060.             case 17:
  1061.                 PlayVoiceOverOnce("VO\Solaris\GenericOpening18",TALKER_FIS);
  1062.             endcase;
  1063.         endswitch;
  1064.  
  1065.         if (GetEventInteger("SolOpening")==17) then
  1066.             SetEventInteger("SolOpening",0);
  1067.         else
  1068.             SetEventInteger("SolOpening",GetEventInteger("SolOpening") + 1);
  1069.         endif;
  1070.     
  1071. endfunction;
  1072.  
  1073. function SolClosing;        // Duncan's fast Closing comments
  1074.     var
  1075.  
  1076.     code
  1077.     
  1078.         switch (GetEventInteger("SolClosing"))
  1079.             case 0:
  1080.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing1",TALKER_FIS);
  1081.             endcase;
  1082.             case 1:
  1083.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing2",TALKER_FIS);
  1084.             endcase;
  1085.             case 2:
  1086.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing3",TALKER_FIS);
  1087.             endcase;
  1088.             case 3:
  1089.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing4",TALKER_FIS);
  1090.             endcase;
  1091.             case 4:
  1092.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing5",TALKER_FIS);
  1093.             endcase;
  1094.             case 5:
  1095.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing6",TALKER_FIS);
  1096.             endcase;
  1097.             case 6:
  1098.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing7",TALKER_FIS);
  1099.             endcase;
  1100.             case 7:
  1101.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing8",TALKER_FIS);
  1102.             endcase;
  1103.             case 8:
  1104.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing9",TALKER_FIS);
  1105.             endcase;
  1106.             case 9:
  1107.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing10",TALKER_FIS);
  1108.             endcase;
  1109.             case 10:
  1110.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing11",TALKER_FIS);
  1111.             endcase;
  1112.             case 11:
  1113.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing12",TALKER_FIS);
  1114.             endcase;
  1115.             case 12:
  1116.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing13",TALKER_FIS);
  1117.             endcase;
  1118.             case 13:
  1119.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing14",TALKER_FIS);
  1120.             endcase;
  1121.             case 14:
  1122.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing15",TALKER_FIS);
  1123.             endcase;
  1124.             case 15:
  1125.                 PlayVoiceOverOnce("VO\Solaris\GenericClosing16",TALKER_FIS);
  1126.             endcase;
  1127.         endswitch;
  1128.  
  1129.         if (GetEventInteger("SolClosing")==15) then
  1130.             SetEventInteger("SolClosing",0);
  1131.         else
  1132.             SetEventInteger("SolClosing",GetEventInteger("SolClosing") + 1);
  1133.         endif;
  1134.     
  1135. endfunction;
  1136.  
  1137. function SolFinalThree(integer Fame);        // Last Three fighters
  1138.     var
  1139.  
  1140.     code
  1141.         
  1142.         KillVoiceOvers;
  1143.         switch (GetEventInteger("SolFinalThree"))
  1144.             case 0:
  1145.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeft3",TALKER_FIS);
  1146.             endcase;
  1147.             case 1:
  1148.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort7",TALKER_FIS);
  1149.             endcase;
  1150.             case 2:
  1151.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort4",TALKER_FIS);
  1152.             endcase;
  1153.             case 3:
  1154.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeft1",TALKER_FIS);
  1155.             endcase;
  1156.             case 4:
  1157.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort1",TALKER_FIS);
  1158.             endcase;
  1159.             case 5:
  1160.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort2",TALKER_FIS);
  1161.             endcase;
  1162.             case 6:
  1163.                 if (fame>0) then
  1164.                     PlayVoiceOverOnce("VO\Solaris\FinalThree1",TALKER_FIS);
  1165.                 endif;
  1166.             endcase;
  1167.             case 7:
  1168.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort9",TALKER_FIS);
  1169.             endcase;
  1170.             case 8:
  1171.                 if (fame>0) then
  1172.                     PlayVoiceOverOnce("VO\Solaris\FinalThree2",TALKER_FIS);
  1173.                 endif;
  1174.             endcase;
  1175.             case 9:
  1176.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftFastMatch",TALKER_FIS);
  1177.             endcase;
  1178.             case 10:
  1179.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeft5",TALKER_FIS);
  1180.             endcase;
  1181.             case 11:
  1182.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeft4",TALKER_FIS);
  1183.             endcase;
  1184.             case 12:
  1185.                 if (fame>1) then
  1186.                     PlayVoiceOverOnce("VO\Solaris\FinalThree4",TALKER_FIS);
  1187.                 endif;
  1188.             endcase;
  1189.             case 13:
  1190.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort8",TALKER_FIS);
  1191.             endcase;
  1192.             case 14:
  1193.                 if (fame>1) then
  1194.                     PlayVoiceOverOnce("VO\Solaris\FinalThree3",TALKER_FIS);
  1195.                 endif;
  1196.             endcase;
  1197.             case 15:
  1198.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort3",TALKER_FIS);
  1199.             endcase;
  1200.             case 16:
  1201.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeft7",TALKER_FIS);
  1202.             endcase;
  1203.             case 17:
  1204.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeft2",TALKER_FIS);
  1205.             endcase;
  1206.             case 18:
  1207.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeft6",TALKER_FIS);
  1208.             endcase;
  1209.             case 19:
  1210.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort6",TALKER_FIS);
  1211.             endcase;
  1212.             case 20:
  1213.                 PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort5",TALKER_FIS);
  1214.             endcase;
  1215.         endswitch;
  1216.  
  1217.         if (GetEventInteger("SolFinalThree")==20) then
  1218.             SetEventInteger("SolFinalThree",0);
  1219.         else
  1220.             SetEventInteger("SolFinalThree",GetEventInteger("SolFinalThree") + 1);
  1221.         endif;
  1222.         
  1223. endfunction;
  1224.  
  1225. function SolFinalTwo(integer Fame);        // Last two fighters
  1226.     var
  1227.  
  1228.     code
  1229.         
  1230.         KillVoiceOvers;
  1231.         switch (GetEventInteger("SolFinalTwo") + 1)
  1232.             /*case 0:        - Removed to fix bug (in IA always refers to light fights)
  1233.                 PlayVoiceOverOnce("VO\Solaris\FinalDuelLight",TALKER_FIS);
  1234.             endcase;*/
  1235.             case 1:
  1236.                 PlayVoiceOverOnce("VO\Solaris\FinalDuel1",TALKER_FIS);
  1237.             endcase;
  1238.             case 2:
  1239.                 PlayVoiceOverOnce("VO\Solaris\FinalDuel2",TALKER_FIS);
  1240.             endcase;
  1241.             case 4:
  1242.                 PlayVoiceOverOnce("VO\Solaris\FinalDuel3",TALKER_FIS);
  1243.             endcase;
  1244.             case 5:
  1245.                 PlayVoiceOverOnce("VO\Solaris\FinalDuel4",TALKER_FIS);
  1246.             endcase;
  1247.             case 6:
  1248.                 if (fame>0) then
  1249.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelModFame1",TALKER_FIS);
  1250.                 endif;
  1251.             endcase;
  1252.             case 7:
  1253.                 if (fame>0) then
  1254.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelModFame2",TALKER_FIS);
  1255.                 endif;
  1256.             endcase;
  1257.             case 9:
  1258.                 if (fame>0) then
  1259.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelModFame3",TALKER_FIS);
  1260.                 endif;
  1261.             endcase;
  1262.             case 10:
  1263.                 if (fame>1) then
  1264.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame1",TALKER_FIS);
  1265.                 endif;
  1266.             endcase;
  1267.             case 11:
  1268.                 if (fame>1) then
  1269.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame2",TALKER_FIS);
  1270.                 endif;
  1271.             endcase;
  1272.             case 12:
  1273.                 if (fame>1) then
  1274.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame3",TALKER_FIS);
  1275.                 endif;
  1276.             endcase;
  1277.             case 13:
  1278.                 if (fame>1) then
  1279.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame4",TALKER_FIS);
  1280.                 endif;
  1281.             endcase;
  1282.             case 14:
  1283.                 if (fame>2) then
  1284.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelTitle1",TALKER_FIS);
  1285.                 endif;
  1286.             endcase;
  1287.             case 15:
  1288.                 if (fame>2) then
  1289.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelTitle2",TALKER_FIS);
  1290.                 endif;
  1291.             endcase;
  1292.             case 16:
  1293.                 if (fame>2) then
  1294.                     PlayVoiceOverOnce("VO\Solaris\FinalDuelTitle3",TALKER_FIS);
  1295.                 endif;
  1296.             endcase;
  1297.         endswitch;
  1298.  
  1299.         if (GetEventInteger("SolFinalTwo")==20) then
  1300.             SetEventInteger("SolFinalTwo",1);
  1301.         else
  1302.             SetEventInteger("SolFinalTwo",GetEventInteger("SolFinalTwo") + 1);
  1303.         endif;
  1304.         
  1305. endfunction;
  1306.  
  1307. function SolStreak;        // Are you on a winning Streak?
  1308.     var
  1309.  
  1310.     code
  1311.         
  1312.         switch (GetEventInteger("SolStreak"))
  1313.             case 2:
  1314.                 PlayVoiceOverOnce("VO\Solaris\SpectreBionWinningStreak2",TALKER_FIS);
  1315.             endcase;
  1316.             case 4:
  1317.                 PlayVoiceOverOnce("VO\Solaris\SpectreBionWinningStreak4",TALKER_FIS);
  1318.             endcase;
  1319.             case 7:
  1320.                 PlayVoiceOverOnce("VO\Solaris\SpectreBionWinningStreak7",TALKER_FIS);
  1321.             endcase;
  1322.         endswitch;
  1323.         
  1324. endfunction;
  1325.  
  1326. function SolKillTwo(integer Fame);        // You've killed two
  1327.     var
  1328.  
  1329.     code
  1330.         
  1331.         KillVoiceOvers;
  1332.         switch (GetEventInteger("SolKillTwo"))
  1333.             case 0:
  1334.                 PlayVoiceOverOnce("VO\Solaris\TwoKills1",TALKER_FIS);
  1335.             endcase;
  1336.             case 1:
  1337.                 PlayVoiceOverOnce("VO\Solaris\TwoKills10",TALKER_FIS);
  1338.             endcase;
  1339.             case 2:
  1340.                 PlayVoiceOverOnce("VO\Solaris\TwoKills2",TALKER_FIS);
  1341.             endcase;
  1342.             case 3:
  1343.                 PlayVoiceOverOnce("VO\Solaris\TwoKills3",TALKER_FIS);
  1344.             endcase;
  1345.             case 4:
  1346.                 PlayVoiceOverOnce("VO\Solaris\TwoKills4",TALKER_FIS);
  1347.             endcase;
  1348.             case 5:
  1349.                 PlayVoiceOverOnce("VO\Solaris\TwoKills5",TALKER_FIS);
  1350.             endcase;
  1351.             case 6:
  1352.                 PlayVoiceOverOnce("VO\Solaris\TwoKills6",TALKER_FIS);
  1353.             endcase;
  1354.             case 7:
  1355.                 if (fame>0) then
  1356.                     PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous",TALKER_FIS);
  1357.                 endif;
  1358.             endcase;
  1359.             case 8:
  1360.                 PlayVoiceOverOnce("VO\Solaris\TwoKills7",TALKER_FIS);
  1361.             endcase;
  1362.             case 9:
  1363.                 if (fame>0) then
  1364.                     PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous2",TALKER_FIS);
  1365.                 endif;
  1366.             endcase;
  1367.             case 10:
  1368.                 PlayVoiceOverOnce("VO\Solaris\TwoKills8",TALKER_FIS);
  1369.             endcase;
  1370.             case 11:
  1371.                 if (fame>0) then
  1372.                     PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous3",TALKER_FIS);
  1373.                 endif;
  1374.             endcase;
  1375.             case 12:
  1376.                 PlayVoiceOverOnce("VO\Solaris\TwoKills9",TALKER_FIS);
  1377.             endcase;
  1378.             case 13:
  1379.                 if (fame>0) then
  1380.                     PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous4",TALKER_FIS);
  1381.                 endif;
  1382.             endcase;
  1383.         endswitch;
  1384.  
  1385.         if (GetEventInteger("SolKillTwo")==13) then
  1386.             SetEventInteger("SolKillTwo",0);
  1387.         else
  1388.             SetEventInteger("SolKillTwo",GetEventInteger("SolKillTwo") + 1);
  1389.         endif;
  1390.         
  1391. endfunction;
  1392.  
  1393. function SolKillThree(integer Fame);        // You've killed Three
  1394.     var
  1395.  
  1396.     code
  1397.         
  1398.         KillVoiceOvers;
  1399.         switch (GetEventInteger("SolKillThree"))
  1400.             case 0:
  1401.                 PlayVoiceOverOnce("VO\Solaris\ThreeKills1",TALKER_FIS);
  1402.             endcase;
  1403.             case 1:
  1404.                 PlayVoiceOverOnce("VO\Solaris\ThreeKills2",TALKER_FIS);
  1405.             endcase;
  1406.             case 2:
  1407.                 PlayVoiceOverOnce("VO\Solaris\ThreeKills3",TALKER_FIS);
  1408.             endcase;
  1409.             case 3:
  1410.                 PlayVoiceOverOnce("VO\Solaris\ThreeKills4",TALKER_FIS);
  1411.             endcase;
  1412.             case 4:
  1413.                 if (fame>0) then
  1414.                     PlayVoiceOverOnce("VO\Solaris\ThreeKillsFamous",TALKER_FIS);
  1415.                 endif;
  1416.             endcase;
  1417.             case 5:
  1418.                 PlayVoiceOverOnce("VO\Solaris\ThreeKills5",TALKER_FIS);
  1419.             endcase;
  1420.             case 6:
  1421.                 if (fame>0) then
  1422.                     PlayVoiceOverOnce("VO\Solaris\ThreeKillsFamous2",TALKER_FIS);
  1423.                 endif;
  1424.             endcase;
  1425.             case 7:
  1426.                 PlayVoiceOverOnce("VO\Solaris\ThreeKills6",TALKER_FIS);
  1427.             endcase;
  1428.             case 8:
  1429.                 PlayVoiceOverOnce("VO\Solaris\ThreeKills7",TALKER_FIS);
  1430.             endcase;
  1431.         endswitch;
  1432.  
  1433.         if (GetEventInteger("SolKillThree")==8) then
  1434.             SetEventInteger("SolKillThree",1);
  1435.         else
  1436.             SetEventInteger("SolKillThree",GetEventInteger("SolKillThree") + 1);
  1437.         endif;
  1438.         
  1439. endfunction;
  1440.  
  1441. function SolKillFour(integer Fame);        // You've killed Four
  1442.     var
  1443.  
  1444.     code
  1445.         
  1446.         KillVoiceOvers;
  1447.         switch (GetEventInteger("SolKillFour"))
  1448.             case 0:
  1449.                 PlayVoiceOverOnce("VO\Solaris\FourKills1",TALKER_FIS);
  1450.             endcase;
  1451.             case 1:
  1452.                 PlayVoiceOverOnce("VO\Solaris\FourKills2",TALKER_FIS);
  1453.             endcase;
  1454.             case 2:
  1455.                 PlayVoiceOverOnce("VO\Solaris\FourKills3",TALKER_FIS);
  1456.             endcase;
  1457.             case 3:
  1458.                 PlayVoiceOverOnce("VO\Solaris\FourKills4",TALKER_FIS);
  1459.             endcase;
  1460.             case 4:
  1461.                 PlayVoiceOverOnce("VO\Solaris\FourKills5",TALKER_FIS);
  1462.             endcase;
  1463.             case 5:
  1464.                 PlayVoiceOverOnce("VO\Solaris\FourKills6",TALKER_FIS);
  1465.             endcase;
  1466.             case 6:
  1467.                 PlayVoiceOverOnce("VO\Solaris\FourKills7",TALKER_FIS);
  1468.             endcase;
  1469.             case 7:
  1470.                 PlayVoiceOverOnce("VO\Solaris\FourKills8",TALKER_FIS);
  1471.             endcase;
  1472.             case 8:
  1473.                 PlayVoiceOverOnce("VO\Solaris\FourKills9",TALKER_FIS);
  1474.             endcase;
  1475.             case 9:
  1476.                 PlayVoiceOverOnce("VO\Solaris\FourKills10",TALKER_FIS);
  1477.             endcase;
  1478.         endswitch;
  1479.  
  1480.         if (GetEventInteger("SolKillFour")==9) then
  1481.             SetEventInteger("SolKillFour",0);
  1482.         else
  1483.             SetEventInteger("SolKillFour",GetEventInteger("SolKillFour") + 1);
  1484.         endif;
  1485.         
  1486. endfunction;
  1487.  
  1488. function SolLull;        // Lull messages in Solaris
  1489.     var
  1490.  
  1491.     code
  1492.     
  1493.         PlayVoiceOver("VO\ThreeSecond",TALKER_SPE);
  1494.         switch (GetEventInteger("SolLull"))
  1495.             case 0:
  1496.                 PlayVoiceOverOnce("VO\Solaris\LullInFight1",TALKER_FIS);
  1497.             endcase;
  1498.             case 1:
  1499.                 PlayVoiceOverOnce("VO\Solaris\LullInFight2",TALKER_FIS);
  1500.             endcase;
  1501.             case 2:
  1502.                 PlayVoiceOverOnce("VO\Solaris\LullInFight3",TALKER_FIS);
  1503.             endcase;
  1504.             case 3:
  1505.                 PlayVoiceOverOnce("VO\Solaris\LullInFight4",TALKER_FIS);
  1506.             endcase;
  1507.             case 4:
  1508.                 PlayVoiceOverOnce("VO\Solaris\LullInFight5",TALKER_FIS);
  1509.             endcase;
  1510.             case 5:
  1511.                 PlayVoiceOverOnce("VO\Solaris\LullInFight6",TALKER_FIS);
  1512.             endcase;
  1513.             case 6:
  1514.                 PlayVoiceOverOnce("VO\Solaris\LullInFight7",TALKER_FIS);
  1515.             endcase;
  1516.             case 7:
  1517.                 PlayVoiceOverOnce("VO\Solaris\LullInFight8",TALKER_FIS);
  1518.             endcase;
  1519.             case 8:
  1520.                 PlayVoiceOverOnce("VO\Solaris\LullInFight9",TALKER_FIS);
  1521.             endcase;
  1522.             case 9:
  1523.                 PlayVoiceOverOnce("VO\Solaris\LullInFight10",TALKER_FIS);
  1524.             endcase;
  1525.             case 10:
  1526.                 PlayVoiceOverOnce("VO\Solaris\LullInFight11",TALKER_FIS);
  1527.             endcase;
  1528.             case 11:
  1529.                 PlayVoiceOverOnce("VO\Solaris\LullInFight12",TALKER_FIS);
  1530.             endcase;
  1531.             case 12:
  1532.                 PlayVoiceOverOnce("VO\Solaris\LullInFight13",TALKER_FIS);
  1533.             endcase;
  1534.             case 13:
  1535.                 PlayVoiceOverOnce("VO\Solaris\LullInFight14",TALKER_FIS);
  1536.             endcase;
  1537.             case 14:
  1538.                 PlayVoiceOverOnce("VO\Solaris\LullInFight15",TALKER_FIS);
  1539.             endcase;
  1540.         endswitch;
  1541.  
  1542.         if (GetEventInteger("SolLull")==16) then
  1543.             SetEventInteger("SolLull",0);
  1544.         else
  1545.             SetEventInteger("SolLull",GetEventInteger("SolLull") + 1);
  1546.         endif;
  1547.         
  1548. endfunction;
  1549.  
  1550. function SolGenericColor;        // This is the color commentary for the second half of the game
  1551.     var
  1552.  
  1553.     code
  1554.     
  1555.         PlayVoiceOver("VO\ThreeSecond",TALKER_SPE);
  1556.         if (not GetEventFlag("SolGrand")) then        // Not in Post Season
  1557.             switch (GetEventInteger("SolGenericColor"))
  1558.                 case 0:
  1559.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor1",TALKER_FIS);
  1560.                 endcase;
  1561.                 case 1:
  1562.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor2",TALKER_FIS);
  1563.                 endcase;
  1564.                 case 2:
  1565.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor3",TALKER_FIS);
  1566.                 endcase;
  1567.                 case 3:
  1568.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor4",TALKER_FIS);
  1569.                 endcase;
  1570.                 case 4:
  1571.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor5",TALKER_FIS);
  1572.                 endcase;
  1573.                 case 5:
  1574.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor6",TALKER_FIS);
  1575.                 endcase;
  1576.                 case 6:
  1577.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor7",TALKER_FIS);
  1578.                 endcase;
  1579.                 case 7:
  1580.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor8",TALKER_FIS);
  1581.                 endcase;
  1582.                 case 8:
  1583.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor9",TALKER_FIS);
  1584.                 endcase;
  1585.                 case 9:
  1586.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor10",TALKER_FIS);
  1587.                 endcase;
  1588.                 case 10:
  1589.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor11",TALKER_FIS);
  1590.                 endcase;
  1591.                 case 11:
  1592.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor12",TALKER_FIS);
  1593.                 endcase;
  1594.                 case 12:
  1595.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor13",TALKER_FIS);
  1596.                 endcase;
  1597.                 case 13:
  1598.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor14",TALKER_FIS);
  1599.                 endcase;
  1600.                 case 14:
  1601.                     PlayVoiceOverOnce("VO\Solaris\SecondGenericColor15",TALKER_FIS);
  1602.                 endcase;
  1603.             endswitch;
  1604.     
  1605.             if (GetEventInteger("SolGenericColor")==14) then
  1606.                 SetEventInteger("SolGenericColor",0);
  1607.             else
  1608.                 SetEventInteger("SolGenericColor",GetEventInteger("SolGenericColor") + 1);
  1609.             endif;
  1610.         else        // In Post-Season
  1611.             switch (GetEventInteger("SolPostColor"))
  1612.                 case 0:
  1613.                     PlayVoiceOverOnce("VO\Solaris\PostColorCommentary1",TALKER_FIS);
  1614.                 endcase;
  1615.                 case 1:
  1616.                     PlayVoiceOverOnce("VO\Solaris\SecondPostColor1",TALKER_FIS);
  1617.                 endcase;
  1618.                 case 2:
  1619.                     PlayVoiceOverOnce("VO\Solaris\PostColorCommentary2",TALKER_FIS);
  1620.                 endcase;
  1621.                 case 3:
  1622.                     PlayVoiceOverOnce("VO\Solaris\SecondPostColor2",TALKER_FIS);
  1623.                 endcase;
  1624.                 case 4:
  1625.                     PlayVoiceOverOnce("VO\Solaris\PostColorCommentary3",TALKER_FIS);
  1626.                 endcase;
  1627.                 case 5:
  1628.                     PlayVoiceOverOnce("VO\Solaris\SecondPostColor3",TALKER_FIS);
  1629.                 endcase;
  1630.             endswitch;
  1631.                 
  1632.             if (GetEventInteger("SolPostColor")==5) then
  1633.                 SetEventInteger("SolPostColor",0);
  1634.             else
  1635.                 SetEventInteger("SolPostColor",GetEventInteger("SolPostColor") + 1);
  1636.             endif;
  1637.         endif;
  1638.     
  1639. endfunction;
  1640.  
  1641.  
  1642. function SolDeath(integer Times);        // Generic someone died messages
  1643.     var
  1644.  
  1645.     code
  1646.         
  1647.         KillVoiceOvers;
  1648.         switch (GetEventInteger("SolDeath") + Times)
  1649.             case 0:
  1650.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath1",TALKER_FIS);
  1651.             endcase;
  1652.             case 1:
  1653.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong1",TALKER_FIS);
  1654.             endcase;
  1655.             case 2:
  1656.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath2",TALKER_FIS);
  1657.             endcase;
  1658.             case 3:
  1659.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong2",TALKER_FIS);
  1660.             endcase;
  1661.             case 4:
  1662.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath3",TALKER_FIS);
  1663.             endcase;
  1664.             case 5:
  1665.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath4",TALKER_FIS);
  1666.             endcase;
  1667.             case 6:
  1668.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong3",TALKER_FIS);
  1669.             endcase;
  1670.             case 7:
  1671.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath5",TALKER_FIS);
  1672.             endcase;
  1673.             case 8:
  1674.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong4",TALKER_FIS);
  1675.             endcase;
  1676.             case 9:
  1677.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong5",TALKER_FIS);
  1678.             endcase;
  1679.             case 10:
  1680.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath6",TALKER_FIS);
  1681.             endcase;
  1682.             case 11:
  1683.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong6",TALKER_FIS);
  1684.             endcase;
  1685.             case 12:
  1686.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath7",TALKER_FIS);
  1687.             endcase;
  1688.             case 13:
  1689.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong7",TALKER_FIS);
  1690.             endcase;
  1691.             case 14:
  1692.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong8",TALKER_FIS);
  1693.             endcase;
  1694.             case 15:
  1695.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath8",TALKER_FIS);
  1696.             endcase;
  1697.             case 16:
  1698.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong9",TALKER_FIS);
  1699.             endcase;
  1700.             case 17:
  1701.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath9",TALKER_FIS);
  1702.             endcase;
  1703.             case 18:
  1704.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath10",TALKER_FIS);
  1705.             endcase;
  1706.             case 19:
  1707.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong10",TALKER_FIS);
  1708.             endcase;
  1709.             case 20:
  1710.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath11",TALKER_FIS);
  1711.             endcase;
  1712.             case 21:
  1713.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong11",TALKER_FIS);
  1714.             endcase;
  1715.             case 22:
  1716.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath12",TALKER_FIS);
  1717.             endcase;
  1718.             case 23:
  1719.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong12",TALKER_FIS);
  1720.             endcase;
  1721.             case 24:
  1722.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath13",TALKER_FIS);
  1723.             endcase;
  1724.             case 25:
  1725.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong13",TALKER_FIS);
  1726.             endcase;
  1727.             case 26:
  1728.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath14",TALKER_FIS);
  1729.             endcase;
  1730.             case 27:
  1731.                 PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong14",TALKER_FIS);
  1732.             endcase;
  1733.             case 28:
  1734.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath15",TALKER_FIS);
  1735.             endcase;
  1736.             case 29:
  1737.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath16",TALKER_FIS);
  1738.             endcase;
  1739.             case 30:
  1740.                 PlayVoiceOverOnce("VO\Solaris\GenericDeath17",TALKER_FIS);
  1741.             endcase;
  1742.         endswitch;
  1743.  
  1744.         if (GetEventInteger("SolDeath")==30) then
  1745.             SetEventInteger("SolDeath",0);
  1746.         else
  1747.             SetEventInteger("SolDeath",GetEventInteger("SolDeath") + 1 + Times);
  1748.         endif;
  1749.         
  1750. endfunction;
  1751.  
  1752. function SolAlliance(integer Alliance);        // This is the random alliances message
  1753.     var
  1754.  
  1755.     code
  1756.  
  1757.         /*switch (Alliance)
  1758.             case 0:
  1759.                 PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_COC);
  1760.             endcase;
  1761.             case 1:
  1762.                 PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_COC);
  1763.             endcase;
  1764.             case 2:
  1765.                 PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_COC);
  1766.             endcase;
  1767.         endswitch;*/
  1768.         PlayVoiceOver("VO\OneSecond",TALKER_SPE);
  1769.                 
  1770.         switch (GetEventInteger("SolAlliance"))
  1771.             case 0:
  1772.                 switch (Alliance)
  1773.                     case 0:
  1774.                         PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_COC);
  1775.                     endcase;
  1776.                     case 1:
  1777.                         PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_COC);
  1778.                     endcase;
  1779.                     case 2:
  1780.                         PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_COC);
  1781.                     endcase;
  1782.                 endswitch;
  1783.                 SetEventInteger("SolAlliance",1);
  1784.             endcase;
  1785.             case 1:
  1786.                 switch (Alliance)
  1787.                     case 0:
  1788.                         PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_TER);
  1789.                     endcase;
  1790.                     case 1:
  1791.                         PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_TER);
  1792.                     endcase;
  1793.                     case 2:
  1794.                         PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_TER);
  1795.                     endcase;
  1796.                 endswitch;
  1797.                 SetEventInteger("SolAlliance",2);
  1798.             endcase;
  1799.             case 2:
  1800.                 switch (Alliance)
  1801.                     case 0:
  1802.                         PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_ACE);
  1803.                     endcase;
  1804.                     case 1:
  1805.                         PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_ACE);
  1806.                     endcase;
  1807.                     case 2:
  1808.                         PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_ACE);
  1809.                     endcase;
  1810.                 endswitch;
  1811.                 SetEventInteger("SolAlliance",3);
  1812.             endcase;
  1813.             case 3:
  1814.                 switch (Alliance)
  1815.                     case 0:
  1816.                         PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_FAN);
  1817.                     endcase;
  1818.                     case 1:
  1819.                         PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_FAN);
  1820.                     endcase;
  1821.                     case 2:
  1822.                         PlayVoiceOverOnce("VO\Solaris\AllianceBroken",TALKER_FAN);
  1823.                     endcase;
  1824.                 endswitch;
  1825.                 SetEventInteger("SolAlliance",4);
  1826.             endcase;
  1827.             case 4:
  1828.                 switch (Alliance)
  1829.                     case 0:
  1830.                         PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_GRU);
  1831.                     endcase;
  1832.                     case 1:
  1833.                         PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_GRU);
  1834.                     endcase;
  1835.                     case 2:
  1836.                         PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_GRU);
  1837.                     endcase;
  1838.                 endswitch;
  1839.                 SetEventInteger("SolAlliance",5);
  1840.             endcase;
  1841.             case 5:
  1842.                 switch (Alliance)
  1843.                     case 0:
  1844.                         PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_PRO);
  1845.                     endcase;
  1846.                     case 1:
  1847.                         PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_PRO);
  1848.                     endcase;
  1849.                     case 2:
  1850.                         PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_PRO);
  1851.                     endcase;
  1852.                 endswitch;
  1853.                 SetEventInteger("SolAlliance",6);
  1854.             endcase;
  1855.         endswitch;
  1856.         
  1857. endfunction;
  1858.  
  1859. function SolSecondPlace;    // This is when you come in second place
  1860.     var
  1861.  
  1862.     code
  1863.  
  1864.         KillVoiceOvers;
  1865.         switch (GetEventInteger("SolSecondPlace"))
  1866.             case 0:
  1867.                 PlayVoiceOverOnce("VO\Solaris\FinishSecond1",TALKER_FIS);
  1868.             endcase;
  1869.             case 1:
  1870.                 PlayVoiceOverOnce("VO\Solaris\FinishSecond2",TALKER_FIS);
  1871.             endcase;
  1872.             case 2:
  1873.                 PlayVoiceOverOnce("VO\Solaris\FinishSecond3",TALKER_FIS);
  1874.             endcase;
  1875.         endswitch;
  1876.  
  1877.         if (GetEventInteger("SolSecondPlace")==2) then
  1878.             SetEventInteger("SolSecondPlace",0);
  1879.         else
  1880.             SetEventInteger("SolSecondPlace",GetEventInteger("SolSecondPlace") + 1);
  1881.         endif;
  1882.         
  1883. endfunction;
  1884.  
  1885. function SolThirdPlace;    // This is when you come in third place
  1886.     var
  1887.  
  1888.     code
  1889.  
  1890.         KillVoiceOvers;
  1891.         switch (GetEventInteger("SolThirdPlace"))
  1892.             case 0:
  1893.                 PlayVoiceOverOnce("VO\Solaris\FinishThird1",TALKER_FIS);
  1894.             endcase;
  1895.             case 1:
  1896.                 PlayVoiceOverOnce("VO\Solaris\FinishThird2",TALKER_FIS);
  1897.             endcase;
  1898.             case 2:
  1899.                 PlayVoiceOverOnce("VO\Solaris\FinishThird3",TALKER_FIS);
  1900.             endcase;
  1901.         endswitch;
  1902.  
  1903.         if (GetEventInteger("SolThirdPlace")==2) then
  1904.             SetEventInteger("SolThirdPlace",0);
  1905.         else
  1906.             SetEventInteger("SolThirdPlace",GetEventInteger("SolThirdPlace") + 1);
  1907.         endif;
  1908.         
  1909. endfunction;
  1910.  
  1911. function SolGenericVictory;        // Random you've won messages
  1912.     var
  1913.  
  1914.     code
  1915.  
  1916.         KillVoiceOvers;
  1917.         
  1918.         if (not GetEventFlag("SolGrand")) then
  1919.             switch (GetEventInteger("SolGenericVictory"))
  1920.                 case 0:
  1921.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory1",TALKER_FIS);
  1922.                 endcase;
  1923.                 case 1:
  1924.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory2",TALKER_FIS);
  1925.                 endcase;
  1926.                 case 2:
  1927.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory3",TALKER_FIS);
  1928.                 endcase;
  1929.                 case 3:
  1930.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory4",TALKER_FIS);
  1931.                 endcase;
  1932.                 case 4:
  1933.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory5",TALKER_FIS);
  1934.                 endcase;
  1935.                 case 5:
  1936.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory6",TALKER_FIS);
  1937.                 endcase;
  1938.                 case 6:
  1939.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory7",TALKER_FIS);
  1940.                 endcase;
  1941.                 case 7:
  1942.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory8",TALKER_FIS);
  1943.                 endcase;
  1944.                 case 8:
  1945.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory9",TALKER_FIS);
  1946.                 endcase;
  1947.                 case 9:
  1948.                     PlayVoiceOverOnce("VO\Solaris\GenericVictory10",TALKER_FIS);
  1949.                 endcase;
  1950.             endswitch;
  1951.     
  1952.             if (GetEventInteger("SolGenericVictory")==9) then
  1953.                 SetEventInteger("SolGenericVictory",0);
  1954.             else
  1955.                 SetEventInteger("SolGenericVictory",GetEventInteger("SolGenericVictory") + 1);
  1956.             endif;
  1957.             
  1958.         else        // Post-Season
  1959.             switch (GetEventInteger("SolPostVictory"))
  1960.                 case 0:
  1961.                     PlayVoiceOverOnce("VO\Solaris\PostVictory1",TALKER_FIS);
  1962.                 endcase;
  1963.                 case 1:
  1964.                     PlayVoiceOverOnce("VO\Solaris\PostVictory2",TALKER_FIS);
  1965.                 endcase;
  1966.                 case 2:
  1967.                     PlayVoiceOverOnce("VO\Solaris\PostVictory3",TALKER_FIS);
  1968.                 endcase;
  1969.             endswitch;
  1970.  
  1971.             if (GetEventInteger("SolPostVictory")==2) then
  1972.                 SetEventInteger("SolPostVictory",0);
  1973.             else
  1974.                 SetEventInteger("SolPostVictory",GetEventInteger("SolPostVictory") + 1);
  1975.             endif;
  1976.         endif;
  1977.         
  1978. endfunction;
  1979.  
  1980. function SolEnding (integer Arena, integer WeightClass, integer PlayerKiller, integer Placing);        // This is called at the end of the mission
  1981.     var
  1982.  
  1983.     code
  1984.  
  1985.         AddSolarisBonusMoney(200000 * PlayerKiller);
  1986.         
  1987.     // Ranking system
  1988.         if (WeightClass < 5) then
  1989.             switch (GetEventInteger("SolRank"))
  1990.                 
  1991.                 case 0:        // Rookie check
  1992.                     SetEventInteger("SolRank",1);
  1993.                     SetSolarisTitle(SolTitleOne);
  1994.                 endcase;
  1995.                 
  1996.                 case 1:        // Regular check
  1997.                     if (GetEventInteger("SolTotalWins") > 2) then
  1998.                         SetEventInteger("SolRank",2);
  1999.                         SetSolarisTitle(SolTitleTwo);
  2000.                     endif;
  2001.                 endcase;
  2002.                 
  2003.                 case 2:        // Veteran check
  2004.                     if (GetEventInteger("SolMediumWins") + GetEventInteger("SolHeavyWins") + GetEventInteger("SolAssaultWins") > 6) then
  2005.                         if (GetEventInteger("SolHeavyWins") > 0) or (WeightClass > 2) then
  2006.                             SetEventInteger("SolRank",3);
  2007.                             SetSolarisTitle(SolTitleThree);
  2008.                         endif;
  2009.                     endif;
  2010.                 endcase;
  2011.                 
  2012.                 case 3:        // Ace Check
  2013.                     if (GetEventInteger("SolMediumWins") + GetEventInteger("SolHeavyWins") + GetEventInteger("SolAssaultWins") > 14) then
  2014.                         if (WeightClass > 2) then
  2015.                             if (GetEventInteger("SolHeavyWins") > 2) then
  2016.                                 SetEventInteger("SolRank",4);
  2017.                                 SetSolarisTitle(SolTitleFour);
  2018.                             endif;
  2019.                         else
  2020.                             if (GetEventInteger("SolHeavyWins") > 3) then
  2021.                                 SetEventInteger("SolRank",4);
  2022.                                 SetSolarisTitle(SolTitleFour);
  2023.                             endif;
  2024.                         endif;
  2025.                     endif;
  2026.                 endcase;
  2027.                 
  2028.                 case 4:        // Elite Check
  2029.                     if (GetEventInteger("SolTotalWins") > 35) then
  2030.                         SetEventInteger("SolRank",5);
  2031.                         SetSolarisTitle(SolTitleFive);
  2032.                     endif;
  2033.                 endcase;
  2034.                 
  2035.             endswitch;
  2036.         endif;
  2037.  
  2038.         if (WeightClass == 5) then
  2039.             if (GetEventInteger("SolRank") <> 10) then
  2040.                 if (Placing == 1) then    // First Place
  2041.                     if (GetEventInteger("SolRank") < 6) then
  2042.                         if (Arena == 1) then    // Jungle
  2043.                             SetEventInteger("SolRank",6);
  2044.                             SetSolarisTitle(SolTitleSix);
  2045.                         endif;
  2046.                         if (Arena == 2) then    // Factory
  2047.                             SetEventInteger("SolRank",7);
  2048.                             SetSolarisTitle(SolTitleSeven);
  2049.                         endif;
  2050.                         if (Arena == 3) then    // Coliseum
  2051.                             SetEventInteger("SolRank",8);
  2052.                             SetSolarisTitle(SolTitleEight);
  2053.                         endif;
  2054.                     else
  2055.                         SetEventInteger("SolRank",9);
  2056.                         SetSolarisTitle(SolTitleNine);
  2057.                     endif;
  2058.                 endif;
  2059.             endif;
  2060.         endif;
  2061.         
  2062.         if (WeightClass == 6) then
  2063.             if (Placing == 1) then
  2064.                 SetEventInteger("SolRank",10);
  2065.                 SetSolarisTitle(SolTitleTen);
  2066.             endif;
  2067.         endif;
  2068.     
  2069.         switch (WeightClass)
  2070.             case 1:        // Light
  2071.                 SetEventInteger("SolLightWins",GetEventInteger("SolLightWins") + 1);
  2072.             endcase;
  2073.             case 2:        // Medium
  2074.                 SetEventInteger("SolMediumWins",GetEventInteger("SolMediumWins") + 1);
  2075.             endcase;
  2076.             case 3:        // Heavy
  2077.                 SetEventInteger("SolHeavyWins",GetEventInteger("SolHeavyWins") + 1);
  2078.             endcase;
  2079.             case 4:        // Assault
  2080.                 SetEventInteger("SolAssaultWins",GetEventInteger("SolAssaultWins") + 1);
  2081.             endcase;
  2082.             case 5:        // Champ
  2083.                 SetEventInteger("SolChampWins",GetEventInteger("SolChampWins") + 1);
  2084.             endcase;
  2085.         endswitch;
  2086.         
  2087.         SetEventInteger("SolTotalWins",GetEventInteger("SolTotalWins") + 1);
  2088.     //
  2089.         
  2090. endfunction;
  2091.  
  2092.  
  2093. function AddStandardBuckets;
  2094.     var
  2095.  
  2096.     code
  2097.         TrackBucket(Bucket_KILLS,0,true);
  2098.         TrackBucket(Bucket_DEATHS,0,true);
  2099.  
  2100.         TrackBucket(Bucket_CUSTOM,0,true);
  2101. endfunction;
  2102.  
  2103.  
  2104. function AddTeamGameBuckets;
  2105.     var
  2106.  
  2107.     code
  2108.         TrackBucket(Bucket_TEAM_WINS,0,true);
  2109. endfunction;
  2110.  
  2111. function SetupScoring_Attrition;
  2112.     var
  2113.  
  2114.     code
  2115.         SetFlagsEnabled(FLAGS_HIDE);
  2116.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because attrition is no longer in Mercs
  2117.         AddStandardBuckets;
  2118.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT,1);
  2119.         AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
  2120.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,500);
  2121.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
  2122.         AddCustomBucketParameter(Bucket_SUICIDES,-500);
  2123.         AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_TONNAGE,5);
  2124.         AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
  2125.         AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
  2126. endfunction;
  2127.  
  2128. function SetupScoring_TeamAttrition;
  2129.     var
  2130.     
  2131.     code
  2132.         SetFlagsEnabled(FLAGS_HIDE);
  2133.         SetCustomBucketNameIndex(904);  // note, this uses "mission play" because attrition is no longer in Mercs
  2134.         AddStandardBuckets;
  2135.         AddTeamGameBuckets;
  2136.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT,1);
  2137.         AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
  2138.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,500);
  2139.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
  2140.         AddCustomBucketParameter(Bucket_SUICIDES,-500);
  2141.         AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_TONNAGE,5);
  2142.         AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
  2143.         AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
  2144. endfunction;
  2145.  
  2146. function SetupScoring_Destruction;
  2147.     var
  2148.  
  2149.     code
  2150.         SetFlagsEnabled(FLAGS_HIDE);
  2151.         SetCustomBucketNameIndex(902);
  2152.         AddStandardBuckets;
  2153.         AddCustomBucketParameter(Bucket_KILLS,1);
  2154.         AddCustomBucketParameter(Bucket_SUICIDES,-1);
  2155. endfunction;
  2156.  
  2157. function SetupScoring_TeamDestruction;
  2158.     var
  2159.  
  2160.     code
  2161.         SetFlagsEnabled(FLAGS_HIDE);
  2162.         SetCustomBucketNameIndex(903);
  2163.         AddStandardBuckets;
  2164.         AddTeamGameBuckets;
  2165.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,1);
  2166.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-1);
  2167.         AddCustomBucketParameter(Bucket_SUICIDES,-1);
  2168.         AddCustomBucketParameter(Bucket_FRIENDLY_DEATHS,0);
  2169. endfunction;
  2170.  
  2171. function SetupScoring_STB;
  2172.     var
  2173.  
  2174.     code
  2175.         SetFlagsEnabled(FLAGS_UNIVERSAL_ONLY);
  2176.         SetFlagCaptureEnabled(false);
  2177.         ShowFlagsAsNavPoints(TRUE);
  2178.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because steal the beacon is no longer in Mercs
  2179.         AddStandardBuckets;
  2180.         AddCustomBucketParameter(Bucket_FLAG_HOLD_TIME,1);
  2181. endfunction;
  2182.  
  2183. function SetupScoring_KOTH(ObjectID hill, integer radius);
  2184.     var
  2185.  
  2186.     code
  2187.         SetFlagsEnabled(FLAGS_HIDE);
  2188.         if (hill <> -1) then
  2189.             TrackObjectBucket(Bucket_OBJECTIVE_CONTESTED,hill,radius,false);
  2190.             TrackObjectBucket(Bucket_OBJECTIVE_UNCONTESTED,hill,radius,false);
  2191.         endif;
  2192.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because king of the hill is no longer in Mercs
  2193.         AddStandardBuckets;
  2194.         AddCustomBucketParameter(Bucket_OBJECTIVE_CONTESTED,1);
  2195.         AddCustomBucketParameter(Bucket_OBJECTIVE_UNCONTESTED,5);
  2196. endfunction;
  2197.  
  2198. function SetupScoring_TKOTH(ObjectID hill, integer radius);
  2199.     var
  2200.  
  2201.     code
  2202.         SetFlagsEnabled(FLAGS_HIDE);
  2203.         if (hill <> -1) then
  2204.             TrackObjectBucket(Bucket_OBJECTIVE_CONTESTED,hill,radius,false);
  2205.             TrackObjectBucket(Bucket_OBJECTIVE_UNCONTESTED,hill,radius,false);
  2206.         endif;
  2207.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because king of the hill is no longer in Mercs
  2208.         AddStandardBuckets;
  2209.         AddTeamGameBuckets;
  2210.         AddCustomBucketParameter(Bucket_OBJECTIVE_CONTESTED,1);
  2211.         AddCustomBucketParameter(Bucket_OBJECTIVE_UNCONTESTED,5);
  2212. endfunction;
  2213.  
  2214. function SetupScoring_CTF;
  2215.     var
  2216.  
  2217.     code
  2218.         SetFlagsEnabled(FLAGS_TEAM_ONLY);
  2219.         ShowFlagsAsNavPoints(TRUE);
  2220.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because capture the flag is no longer in Mercs
  2221.         AddStandardBuckets;
  2222.         AddCustomBucketParameter(Bucket_FLAGS_CAPTURED,1000);
  2223.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
  2224.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-50);
  2225. endfunction;
  2226.  
  2227. function SetupScoring_Territories(ObjectID hill, integer radius);
  2228.     var
  2229.  
  2230.     code
  2231.         SetFlagsEnabled(FLAGS_HIDE);
  2232.         if (hill <> -1) then
  2233.             TrackObjectBucket(Bucket_OBJECTIVE_UNCONTESTED,hill,radius,false);
  2234.         endif;
  2235.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because territories is no longer in Mercs
  2236.         AddStandardBuckets;
  2237.         AddCustomBucketParameter(Bucket_OBJECTIVE_UNCONTESTED,1);
  2238. endfunction;
  2239.  
  2240. function SetupScoring_CaptureBase;
  2241.     var
  2242.  
  2243.     code
  2244.         SetFlagsEnabled(FLAGS_HIDE);
  2245.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because capture base is no longer in Mercs
  2246.         AddStandardBuckets;
  2247.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
  2248.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-50);
  2249. endfunction;
  2250.  
  2251. function SetupScoring_DestroyObjective;
  2252.     var
  2253.  
  2254.     code
  2255.         SetFlagsEnabled(FLAGS_HIDE);
  2256.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because destroy objective is no longer in Mercs
  2257.         AddStandardBuckets;
  2258.         // TODO: add scoring for objective destruction
  2259.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
  2260.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-50);
  2261. endfunction;
  2262.  
  2263. function SetupScoring_Escort;
  2264.     var
  2265.  
  2266.     code
  2267.         SetFlagsEnabled(FLAGS_HIDE);
  2268.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because escort is no longer in Mercs
  2269.         AddStandardBuckets;
  2270.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,500);
  2271.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
  2272. endfunction;
  2273.  
  2274. //expansion scoring
  2275.  
  2276. function SetupScoring_AbsoluteAttrition;
  2277.     var
  2278.  
  2279.     code
  2280.         SetFlagsEnabled(FLAGS_HIDE);
  2281.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because absolute attrition is no longer in Mercs
  2282.         AddStandardBuckets;
  2283.         
  2284.         AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_RATIO, 4);            //multiplies by the tonnage ratio 100 is even tonnage
  2285.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT_BY_RATIO,2);  //
  2286.         AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
  2287.  
  2288.         AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
  2289.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
  2290.         AddCustomBucketParameter(Bucket_SUICIDES,-500);
  2291.         AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
  2292. endfunction;
  2293.  
  2294. function SetupScoring_TeamAbsoluteAttrition;
  2295.     var
  2296.  
  2297.     code
  2298.         SetFlagsEnabled(FLAGS_HIDE);
  2299.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because absolute attrition is no longer in Mercs
  2300.         AddStandardBuckets;
  2301.         AddTeamGameBuckets;
  2302.         
  2303.         AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_RATIO, 4);            //multiplies by the tonnage ratio 100 is even tonnage
  2304.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT_BY_RATIO,2);  //
  2305.         AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
  2306.  
  2307.         AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
  2308.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
  2309.         AddCustomBucketParameter(Bucket_SUICIDES,-500);
  2310.         AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
  2311. endfunction;
  2312.  
  2313. function SetupScoring_Strongholds;
  2314.     var
  2315.  
  2316.     code
  2317.         SetFlagsEnabled(FLAGS_HIDE);
  2318.         SetCustomBucketNameIndex(904); // note, this uses "mission play" because strongholds is no longer in Mercs
  2319.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
  2320.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-25);
  2321.         AddCustomBucketParameter(Bucket_SUICIDES,-50);
  2322.         AddCustomBucketParameter(Bucket_ENEMY_TURRET_KILLS, 10);
  2323.         AddCustomBucketParameter(Bucket_FRIENDLY_TURRET_KILLS, -10);
  2324.         AddCustomBucketParameter(Bucket_ENEMY_BUILDING_KILLS, 150);
  2325.         AddCustomBucketParameter(Bucket_FRIENDLY_BUILDING_KILLS, - 150);
  2326.         AddStandardBuckets;
  2327.         AddTeamGameBuckets;
  2328. endfunction;
  2329.  
  2330.  
  2331. function SetupScoring_SiegeAssault;
  2332.     var
  2333.  
  2334.     code
  2335.         SetFlagsEnabled (FLAGS_HIDE);
  2336.         SetCustomBucketNameIndex (904); // note, this uses "mission play" because siege is no longer in Mercs
  2337.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
  2338.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-25);
  2339.         AddCustomBucketParameter(Bucket_SUICIDES,-50);
  2340.         AddCustomBucketParameter(Bucket_ENEMY_TURRET_KILLS, 10);
  2341.         AddCustomBucketParameter(Bucket_FRIENDLY_TURRET_KILLS, -10);
  2342.         AddCustomBucketParameter(Bucket_ENEMY_BUILDING_KILLS, 150);
  2343.         AddCustomBucketParameter(Bucket_FRIENDLY_BUILDING_KILLS, - 150);
  2344.         AddStandardBuckets;
  2345.         AddTeamGameBuckets;
  2346. endfunction;
  2347.  
  2348.  
  2349.  
  2350. function SetupScoring_GiantKillers;
  2351.     var
  2352.  
  2353.     code
  2354.         SetFlagsEnabled (FLAGS_HIDE);
  2355.         SetCustomBucketNameIndex (904); // note, this uses "mission play" because giant killers is no longer in Mercs
  2356.         AddStandardBuckets;
  2357.         AddTeamGameBuckets;
  2358.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT,1);
  2359.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,75);
  2360.         AddCustomBucketParameter(Bucket_SUICIDES,-125);
  2361. endfunction;
  2362.  
  2363. function SetupScoring_ClanVsInnerSphere;
  2364.     var
  2365.  
  2366.     code 
  2367.         SetFlagsEnabled (FLAGS_HIDE);
  2368.         SetCustomBucketNameIndex (904); // note, this uses "mission play" because clan versus inner sphere is no longer in Mercs
  2369.         AddStandardBuckets;
  2370.         AddTeamGameBuckets;
  2371.  
  2372.         AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_RATIO, 4);            //multiplies by the tonnage ratio 100 is even tonnage
  2373.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT_BY_RATIO,2);  //
  2374.         AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
  2375.  
  2376.         AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
  2377.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-200);
  2378.         AddCustomBucketParameter(Bucket_SUICIDES,-500);
  2379.         AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
  2380. endfunction;
  2381.  
  2382. function SetupScoring_Battle;
  2383.     var
  2384.  
  2385.     code
  2386.         SetFlagsEnabled(FLAGS_HIDE);
  2387.         SetCustomBucketNameIndex(900);
  2388.         AddStandardBuckets;
  2389.         
  2390.         AddCustomBucketParameter(Bucket_ENEMY_KILLS_BATTLE_RATIO, 1);            //multiplies the 'Mech-specific kill value
  2391.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_BATTLE_RATIO,1);           //multiplies the 'Mech-specific battle ratio
  2392.         AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,25);
  2393.  
  2394.         AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
  2395.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-200);
  2396.         AddCustomBucketParameter(Bucket_SUICIDES,-500);
  2397.         AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-5);
  2398. endfunction;
  2399.  
  2400. function SetupScoring_TeamBattle;
  2401.     var
  2402.  
  2403.     code
  2404.         SetFlagsEnabled(FLAGS_HIDE);
  2405.         SetCustomBucketNameIndex(901);
  2406.         AddStandardBuckets;
  2407.         AddTeamGameBuckets;
  2408.         
  2409.         AddCustomBucketParameter(Bucket_ENEMY_KILLS_BATTLE_RATIO, 1);            //multiplies the 'Mech-specific kill value
  2410.         AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_BATTLE_RATIO,1);           //multiplies the 'Mech-specific battle ratio
  2411.         AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,25);
  2412.  
  2413.         AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
  2414.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-150);
  2415.         AddCustomBucketParameter(Bucket_SUICIDES,-500);
  2416.         AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-5);
  2417.         AddCustomBucketParameter(Bucket_FRIENDLY_DEATHS,0);
  2418. endfunction;
  2419.  
  2420. // for now, this is like destruction
  2421. function SetupScoring_GenericMissionPlay;
  2422.     var
  2423.  
  2424.     code
  2425.         SetFlagsEnabled(FLAGS_HIDE);
  2426.         SetCustomBucketNameIndex(904);
  2427.         AddStandardBuckets;
  2428.         AddTeamGameBuckets;
  2429.         
  2430.         AddCustomBucketParameter(Bucket_ENEMY_KILLS,21);
  2431.         AddCustomBucketParameter(Bucket_ENEMY_BUILDING_KILLS,40);
  2432.         AddCustomBucketParameter(Bucket_ENEMY_TURRET_KILLS,6);
  2433.         AddCustomBucketParameter(Bucket_FRIENDLY_BUILDING_KILLS,0);
  2434.         AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,0);
  2435.         AddCustomBucketParameter(Bucket_SUICIDES,-20);
  2436.         AddCustomBucketParameter(Bucket_FRIENDLY_DEATHS,0);
  2437. endfunction;
  2438.  
  2439.  
  2440. code
  2441.  
  2442.     print("mwfunc");
  2443.  
  2444. endlibrary.
  2445.