[ET:Server] omnibot et_autoexec.gm for nitmod

If you have any problems, regarding to gameservers. You can create a topic. We will find out a solution.
Source Engine games, Quake Engine games, or any others. Request something, like scripts serverside. Or post your own made stuff.

[ET:Server] omnibot et_autoexec.gm for nitmod

Postby ETc|#.Jay.# » 02 Sep 2017, 11:05

- soldiers disabled/ less fieldops



et_autoexec.gm

Code: Select all
// Load any other scripts that we will need.
ExecScript("et_navconfig.gm");
ExecScript("commands.gm");
ExecScript("et_commands.gm");
ExecScript("server_manager.gm");
ExecScript("et_weapontables.gm");
//ExecScript("autowaypoint.gm");

// New module format
global Util = import("utilities");
global ETUtil = import("et_utilities");
global RegionTrigger = import("et_regiontriggers");
global ClassManager = import("et_classmanager");

// cs: only load one of the following botname scripts at a time
ExecScript("et_botnames_ext.gm"); // note: must be loaded after et_classmanager
//ExecScript("et_botnames.gm"); // 0.81 script

// global debug flags
global DEBUG_MAP_SCRIPTS = false;
global DEBUG_GOAL_AVAILABILITY = false;

global DEBUG_SCRIPT_GOALS = false;
global DEBUG_SCRIPT_GOALS_FILTER = {};
DEBUG_SCRIPT_GOALS_FILTER["pathfailed"] = 1;
DEBUG_SCRIPT_GOALS_FILTER["timedout"] = 1;
DEBUG_SCRIPT_GOALS_FILTER["disabled"] = 1;
DEBUG_SCRIPT_GOALS_FILTER["regiontrigger"] = 1;
DEBUG_SCRIPT_GOALS_FILTER["initialized"] = 1;


// global flag to turn off bot chat in supported maps
global MAP_TALK = true;

// enable / disable the class manager
global DisableClassManager = 0;

global PostMapLoad = function()
{
   ETUtil.MapStartTime = GetTime() - 1.75; // seems to be a bit of a delay
   Util.ProcessMovers();

   // set up the minimum class counts for the game
   if ( !Util.ClassTablesInitialized )
   {
      Util.InitializeClassTables();
   }

   if ( Map && Map.SnipeMap
      || GetModName()=="Jaymod" && GetCvar("g_sniperwar")==1
      || GetModName()=="nitmod" && GetCvar("g_war")==2 )
   {
      Util.SnipeMap();
   }
   else if ( Map && Map.PanzerMap
      || GetModName()=="Jaymod" && GetCvar("g_panzerwar")==1
      || GetModName()=="nitmod" && GetCvar("g_war")==1 )
   {
      ETUtil.PanzerMap();
   }
   else if ( Map && Map.Classes )
   {
      Map.Classes();
   }
   else
   {
      if ( Server.MaxBots < 10 && Server.MaxBots > 0 )
      {
         Server.MinClassCount[TEAM.AXIS][CLASS.SOLDIER] = 0;
         Server.MinClassCount[TEAM.AXIS][CLASS.MEDIC] = 2;
         Server.MinClassCount[TEAM.AXIS][CLASS.ENGINEER] = 2;
         Server.MinClassCount[TEAM.AXIS][CLASS.COVERTOPS] = 1;
         Server.MinClassCount[TEAM.AXIS][CLASS.FIELDOPS] = 0;

         Server.MinClassCount[TEAM.ALLIES][CLASS.SOLDIER] = 0;
         Server.MinClassCount[TEAM.ALLIES][CLASS.MEDIC] = 2;
         Server.MinClassCount[TEAM.ALLIES][CLASS.ENGINEER] = 2;
         Server.MinClassCount[TEAM.ALLIES][CLASS.COVERTOPS] = 1;
         Server.MinClassCount[TEAM.ALLIES][CLASS.FIELDOPS] = 0;
      }
      else
      {
         Server.MinClassCount[TEAM.AXIS][CLASS.SOLDIER] = 0;
         Server.MinClassCount[TEAM.AXIS][CLASS.MEDIC] = 2;
         Server.MinClassCount[TEAM.AXIS][CLASS.ENGINEER] = 2;
         Server.MinClassCount[TEAM.AXIS][CLASS.COVERTOPS] = 1;
         Server.MinClassCount[TEAM.AXIS][CLASS.FIELDOPS] = 1;

         Server.MinClassCount[TEAM.ALLIES][CLASS.SOLDIER] = 0;
         Server.MinClassCount[TEAM.ALLIES][CLASS.MEDIC] = 2;
         Server.MinClassCount[TEAM.ALLIES][CLASS.ENGINEER] = 2;
         Server.MinClassCount[TEAM.ALLIES][CLASS.COVERTOPS] = 1;
         Server.MinClassCount[TEAM.ALLIES][CLASS.FIELDOPS] = 1;

         if (CLASS.SCIENTIST)
         {
            Server.MinClassCount[TEAM.AXIS][CLASS.SCIENTIST] = 1;
            Server.MinClassCount[TEAM.ALLIES][CLASS.SCIENTIST] = 1;
         }
         if (CLASS.SUPER_SOLDIER)
         {
            Server.MinClassCount[TEAM.AXIS][CLASS.SUPER_SOLDIER] = 1;
            Server.MinClassCount[TEAM.ALLIES][CLASS.SUPER_SOLDIER] = 1;
         }
      }
   }

   if ( GetGameType() == 5 ) // last man standing
   {
      SetAvailableMapGoals( TEAM.ALLIES, false, ".*" );
      SetAvailableMapGoals( TEAM.ALLIES, true, "HEALTHCAB_.*" );
      SetAvailableMapGoals( TEAM.ALLIES, true, "AMMOCAB_.*" );
      SetAvailableMapGoals( TEAM.AXIS, false, ".*" );
      SetAvailableMapGoals( TEAM.AXIS, true, "HEALTHCAB_.*" );
      SetAvailableMapGoals( TEAM.AXIS, true, "AMMOCAB_.*" );
      Util.MapDebugPrint( "Running " + GetMapName() + " in LMS mode." );
   }

};

print("ET autoexec script executed.");
Image
User avatar
ETc|#.Jay.#
ETc| Member
 
Posts: 1758
{ IMAGES }: 553
Joined: 25 May 2008, 22:01
Location: Germany

Return to Game Server Support

Who is online

Users browsing this forum: No registered users and 8 guests

cron