Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Default ET Bot Profile
- // FieldOfView is the angle(in degrees) that the bot can 'see' in front of them.
- this.FieldOfView = 90.0;
- // ReactionTime is the time delay(in seconds) from when a bot first see's a target, to when
- // the bot will begin to react and target them.
- this.ReactionTime = 1.0;
- // MemorySpan is how long it takes(in seconds) for a bot to consider his memory of someone or something
- // 'out of date' and not considered for targeting and such
- this.MemorySpan = 2.0;
- // AimPersistance is how long the bot will aim in the direction of a target after the target has gone out of view.
- // This is useful for keeping the bot aiming toward the target in the event of brief obstructions of their view.
- this.AimPersistance = 2.0;
- // MaxViewDistance is the maximum distance(in game units) the bot is capable of seeing something.
- // This could be tweaked lower for maps with fog or for a closer to human view distance
- // Typically this value is best set in the map script in the OnBotJoin callback.
- this.MaxViewDistance = 4000.0;
- // These 3 values are aim properties. Care must be taken when tweaking aim properties, since
- // improper values can produce aim oscillations and hurt the bots combat abilities.
- this.MaxTurnSpeed = 720.0; // degree's / second
- this.AimStiffness = 75.0;
- this.AimDamping = 10.0;
- // optionally set a fixed skill level for this bot
- // this will ensure that any global difficulty changes will not effect it
- // default difficulty levels are between 1 and 6 with 1 being the easiest
- // this.ProfileSkill = 3;
- // optionally set a moveskill for the bot. this will effect how they react when in combat (i.e. strafing and crouching)
- // setting this will over-ride and value set in goal_combatmovement
- // 0 - off, 1 - easy, 2 - medium, 3 - hard, 4 - random
- // this.moveskill = 3;
- //////////////////////////////////////////////////////////////////////////
- // Utility Callbacks
- this.SelectTeam = function()
- {
- return null;
- };
- this.SelectClass = function()
- {
- return null;
- };
- if(PrimaryWeaponChoices==null)
- {
- global PrimaryWeaponChoices = {};
- PrimaryWeaponChoices.ETmain_Weapons = {};
- PrimaryWeaponChoices.ETmain_Weapons[CLASS.SOLDIER] =
- {
- WEAPON.PANZERFAUST,
- WEAPON.MOBILE_MG42,
- WEAPON.FLAMETHROWER,
- WEAPON.MORTAR,
- };
- PrimaryWeaponChoices.Jaymod_Weapons = {};
- PrimaryWeaponChoices.Jaymod_WeaponsAxis[CLASS.SOLDIER] =
- {
- WEAPON.MP40,
- };
- PrimaryWeaponChoices.Jaymod_WeaponsAllies[CLASS.SOLDIER] =
- {
- WEAPON.THOMPSON,
- };
- PrimaryWeaponChoices.NQ_WeaponsAxis = {};
- PrimaryWeaponChoices.NQ_WeaponsAxis[CLASS.SOLDIER] =
- {
- WEAPON.PANZERFAUST,
- WEAPON.MOBILE_MG42,
- WEAPON.FLAMETHROWER,
- WEAPON.MORTAR, // mortar2 is the same id now
- };
- PrimaryWeaponChoices.NQ_WeaponsAllies = {};
- PrimaryWeaponChoices.NQ_WeaponsAllies[CLASS.SOLDIER] =
- {
- WEAPON.BAZOOKA,
- WEAPON.MOBILE_MG42, // browning is the same id now
- WEAPON.FLAMETHROWER,
- WEAPON.MORTAR,
- };
- // if allowed, add venom to the list
- if ( GetModName() == "noquarter" && (GetCvar("jp_insanity") & 256) ) {
- PrimaryWeaponChoices.NQ_WeaponsAllies[CLASS.SOLDIER][ tableCount(PrimaryWeaponChoices.NQ_WeaponsAllies[CLASS.SOLDIER]) ] = WEAPON.VENOM;
- PrimaryWeaponChoices.NQ_WeaponsAxis[CLASS.SOLDIER][ tableCount(PrimaryWeaponChoices.NQ_WeaponsAxis[CLASS.SOLDIER]) ] = WEAPON.VENOM;
- }
- }
- //////////////////////////////////////////////////////////////////////////
- global ClassPrimaryWeaponChoice = function(bot, excludeweapons)
- {
- myteam = bot.GetTeam();
- myclass = bot.GetClass();
- weaponChoice = 0;
- ModName = GetModName();
- switch(ModName)
- {
- case "noquarter":
- {
- if ( myteam == TEAM.ALLIES ) {
- wpns = PrimaryWeaponChoices.NQ_WeaponsAllies[myclass];
- }
- else {
- wpns = PrimaryWeaponChoices.NQ_WeaponsAxis[myclass];
- }
- }
- case "jaymod":
- {
- if ( myteam == TEAM.ALLIES ) {
- wpns = PrimaryWeaponChoices.Jaymod_WeaponsAllies[myclass];
- }
- else {
- wpns = PrimaryWeaponChoices.Jaymod_WeaponsAxis[myclass];
- }
- }
- default: // etmain
- {
- wpns = PrimaryWeaponChoices.ETmain_Weapons[myclass];
- }
- }
- if ( wpns )
- {
- // loop until we get an acceptable weapon
- while(1)
- {
- weaponChoice = wpns[ RandInt( 0, tableCount(wpns)-1 ) ];
- if(!excludeweapons || !excludeweapons[weaponChoice]) {
- break;
- }
- yield();
- }
- }
- return ToInt(weaponChoice);
- };
- global ClassSecondaryWeaponChoice = function(bot, excludeweapons)
- {
- return null;
- };
- this.SelectWeapons = function()
- {
- myteam = this.GetTeam();
- myclass = this.GetClass();
- weaponSelection = {};
- weaponSelection.Primary = ClassPrimaryWeaponChoice(this);
- weaponSelection.Secondary = ClassSecondaryWeaponChoice(this);
- if ( weaponSelection.Primary )
- { this.ChangePrimaryWeapon( weaponSelection.Primary ); }
- if ( weaponSelection.Secondary )
- { this.ChangeSecondaryWeapon( weaponSelection.Secondary ); }
- };
- //////////////////////////////////////////////////////////////////////////
- global saySkills = function()
- {
- this.mySkills = table();
- if(this.GetSkills(this.mySkills))
- {
- this.Say("Battle Sense: ", this.mySkills[SKILL.BATTLE_SENSE]);
- this.Say("Engineering: ", this.mySkills[SKILL.ENGINEERING]);
- this.Say("First Aid: ", this.mySkills[SKILL.FIRST_AID]);
- this.Say("Signals: ", this.mySkills[SKILL.SIGNALS]);
- this.Say("Lght Wpns: ", this.mySkills[SKILL.LIGHT_WEAPONS]);
- this.Say("Hvy Wpns: ", this.mySkills[SKILL.HEAVY_WEAPONS]);
- this.Say("Cov Ops: ", this.mySkills[SKILL.COVERTOPS]);
- }
- else
- {
- this.Say("Don't know my skills!");
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement