private int _lastHQReward; //The tick at which we last checked for HQ rewards /////////////////////////////////////////////////// // Member Functions /////////////////////////////////////////////////// /// <summary> /// Performs script initialization /// </summary> public bool init(IEventObject invoker) { //Populate our variables _arena = invoker as Arena; _config = _arena._server._zoneConfig; //Headquarters stuff! _hqlevels = new int[] { 500, 1000, 2500, 5000, 10000, 15000, 20000, 25000, 30000, 35000 }; _hqVehId = 463; _baseXPReward = 25; _baseCashReward = 150; _basePointReward = 10; _rewardInterval = 90 * 1000; // 90 seconds _hqs = new Headquarters(_hqlevels); _hqs.LevelModify += onHQLevelModify; return(true); }
/////////////////////////////////////////////////// // Member Functions /////////////////////////////////////////////////// /// <summary> /// Performs script initialization /// </summary> public bool init(IEventObject invoker) { //Populate our variables _arena = invoker as Arena; _config = _arena._server._zoneConfig; //Headquarters stuff! _hqlevels = new int[] { 500, 1000, 2500, 5000, 10000, 15000, 20000, 25000, 30000, 35000 }; _hqVehId = 463; _baseXPReward = 25; _baseCashReward = 150; _basePointReward = 10; _rewardInterval = 90 * 1000; // 90 seconds _hqs = new Headquarters(_hqlevels); _hqs.LevelModify += onHQLevelModify; //Handle bots captainBots = new Dictionary <Team, int>(); //Keeps track of captain bots botCount = new Dictionary <Team, int>(); //Counts of all defense bots and their teams engineerBots = new List <Team>(); _currentEngineers = 0; //The number of engineers currently alive //Handle the bot team using the engineer botTeam1 = new Team(_arena, _arena._server); botTeam1._name = botTeamName1; botTeam1._id = (short)_arena.Teams.Count(); botTeam1._password = "******"; botTeam1._owner = null; botTeam1._isPrivate = true; botTeam2 = new Team(_arena, _arena._server); botTeam2._name = botTeamName2; botTeam2._id = (short)_arena.Teams.Count(); botTeam2._password = "******"; botTeam2._owner = null; botTeam2._isPrivate = true; botTeam3 = new Team(_arena, _arena._server); botTeam3._name = botTeamName3; botTeam3._id = (short)_arena.Teams.Count(); botTeam3._password = "******"; botTeam3._owner = null; botTeam3._isPrivate = true; _rand = new Random(System.Environment.TickCount); _lastPylon = null; _arena.createTeam(botTeam1); _arena.createTeam(botTeam2); _arena.createTeam(botTeam3); //Handle pylons _pylons = new Dictionary <int, pylonObject>(); _pylons.Add(0, new pylonObject(338, 8500)); _pylons.Add(1, new pylonObject(5488, 6476)); _pylons.Add(2, new pylonObject(8375, 6628)); _pylons.Add(3, new pylonObject(779, 460)); _pylons.Add(4, new pylonObject(8976, 1225)); //_pylons.Add(5, new pylonObject(1855, 267)); // bad one _pylons.Add(6, new pylonObject(4222, 4049)); _pylons.Add(7, new pylonObject(8944, 5040)); _pylons.Add(8, new pylonObject(831, 7066)); // _pylons.Add(9, new pylonObject(8940, 7542)); // bad one //Find out if we will be running KOTH games and if we have enough players _minPlayers = _config.king.minimumPlayers; if (_minPlayers > 0) { _playerCrownStatus = new Dictionary <Player, PlayerCrownStatus>(); _crownTeams = new List <Team>(); } return(true); }