Dayz_HardCore/BotMissions/Original/BotGroupMissionTisy.c

415 lines
16 KiB
C
Raw Normal View History

2021-11-28 19:59:34 +00:00
class BotGroupMissionTisy: MissionBase
{
void BotGroupMissionTisy() { StartMissionAI(); }
AIWorld world = GetGame().GetWorld().GetAIWorld();
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
vector BotSpawnPoint = "1664.315552 453.742462 14263.407227"; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
int m_botAcuracy = 10; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
int BotSolderCountMin = 2; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
int BotSolderCountMax = 4; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
int botLootCountMin = 5; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
int botLootCountMax = 15; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
float Zone_Radius = 1100; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
bool isUseCheckPoints = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> true - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, fslse - <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bool isBotKaratist = false; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> true
bool onRespawnBot = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (true - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, fslse - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
bool canUseTrigger = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (true - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, fslse - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>), <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bool useKilFeed = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
bool m_Frendly = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
bool onVoice = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
int m_spawnBotRadius = 100; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> BotSpawnPoint
int m_SpeedPatrol = 3; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (min = 1 max = 3)
int m_TargetDist = 100; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
bool canBotSpawned = true; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!!!!!!
// ------------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ------------------------------------------ //
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---> TStringArray OtherEquip = {""};
ref TStringArray Shirt = {"GorkaEJacket_Autumn", "GorkaEJacket_Flat", "GorkaEJacket_PautRev", "GorkaEJacket_Summer"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ref TStringArray Jeans = {"GorkaPants_Autumn", "GorkaPants_Flat", "GorkaPants_PautRev", "GorkaPants_Summer"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
ref TStringArray Shoes = {"TTSKOBoots", "WorkingBoots_Beige", "CombatBoots_Beige", "CombatBoots_Black", "CombatBoots_Brown"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ref TStringArray BackPack = {"CoyoteBag_Brown", "CoyoteBag_Green", "HuntingBag", "TortillaBag", "WaterproofBag_Green"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ref TStringArray Vest = {"HighCapacityVest_Black", "HighCapacityVest_Olive", "HuntingVest", "PlateCarrierVest", "UKAssVest_Camo"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ref TStringArray Helm = {"GorkaHelmet", "Mich2001Helmet", "MotoHelmet_Black", "PumpkinHelmet", "SkateHelmet_Black"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
ref TStringArray Gloves = {"WorkingGloves_Beige", "WorkingGloves_Black", "NBCGlovesGray", "OMNOGloves_Brown", "SurgicalGloves_Blue"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ref TStringArray OtherEquip = {"CivilianBelt", "MilitaryBelt"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :)
ref TStringArray RandomLoot = {"SardinesCan", "SodaCan_Cola", "SodaCan_Kvass", "Rice", "Rope", "Screwdriver", "AmmoBox_545x39_20Rnd"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ref TStringArray MeleeWeap = {"WoodAxe", "FirefighterAxe", "Shovel", "Pickaxe"}; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// -------------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> -------------------------------------------------------//
EntityAI itemEnt; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!!!
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>)
void AddCeckPoint(SurvivorBotBase m_BotSolder)
{
m_BotSolder.SetUseCheckpoint(); // <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!
m_BotSolder.AddCheckpoint("1724.632080 451.730408 14298.412109");
m_BotSolder.AddCheckpoint("1681.035522 451.784302 14278.791016");
m_BotSolder.AddCheckpoint("1668.385742 451.730408 14268.739258");
m_BotSolder.AddCheckpoint("1653.012695 451.784302 14245.443359");
m_BotSolder.AddCheckpoint("1662.009521 451.784302 14220.044922");
m_BotSolder.AddCheckpoint("1668.885010 451.730408 14177.100586");
m_BotSolder.AddCheckpoint("1678.905029 451.784302 14134.460938");
m_BotSolder.AddCheckpoint("1687.656250 451.784302 14097.293945");
m_BotSolder.AddCheckpoint("1691.055054 451.728760 14072.710938");
m_BotSolder.AddCheckpoint("1697.563721 450.094635 14019.088867");
m_BotSolder.AddCheckpoint("1701.266235 448.636108 13981.079102");
m_BotSolder.AddCheckpoint("1709.151733 448.368225 13969.950195");
m_BotSolder.AddCheckpoint("1726.191772 447.882568 13954.740234");
m_BotSolder.AddCheckpoint("1734.303101 447.342072 13945.562500");
m_BotSolder.AddCheckpoint("1736.849487 447.158569 13939.061523");
m_BotSolder.AddCheckpoint("1803.257568 436.318970 13812.399414");
m_BotSolder.AddCheckpoint("1802.478149 435.682281 13794.238281");
m_BotSolder.AddCheckpoint("1764.742676 434.271759 13667.715820");
m_BotSolder.AddCheckpoint("1753.983521 434.111572 13660.847656");
m_BotSolder.AddCheckpoint("1697.765381 433.031982 13621.431641");
m_BotSolder.AddCheckpoint("1625.751953 437.192169 13583.775391");
m_BotSolder.AddCheckpoint("1615.443726 437.193420 13582.367188");
m_BotSolder.AddCheckpoint("1586.155762 439.010864 13609.286133");
m_BotSolder.AddCheckpoint("1566.816040 441.081787 13643.261719");
m_BotSolder.AddCheckpoint("1554.550049 441.587372 13645.919922");
m_BotSolder.AddCheckpoint("1533.254028 440.683624 13646.856445");
m_BotSolder.AddCheckpoint("1470.583130 444.685120 13679.353516");
m_BotSolder.AddCheckpoint("1448.422729 446.229736 13681.502930");
m_BotSolder.AddCheckpoint("1397.534424 448.255707 13663.409180");
m_BotSolder.AddCheckpoint("1377.747681 448.799530 13661.333984");
m_BotSolder.AddCheckpoint("1356.402222 451.658264 13669.961914");
m_BotSolder.AddCheckpoint("1339.632813 454.855988 13690.362305");
m_BotSolder.AddCheckpoint("1311.232178 457.548615 13730.733398");
m_BotSolder.AddCheckpoint("1368.332275 455.560181 13762.721680");
m_BotSolder.AddCheckpoint("1389.098022 453.795563 13785.572266");
m_BotSolder.AddCheckpoint("1394.411499 451.237183 13801.572266");
m_BotSolder.AddCheckpoint("1398.934204 451.644989 13828.162109");
m_BotSolder.AddCheckpoint("1419.962524 456.061951 13891.482422");
m_BotSolder.AddCheckpoint("1409.579224 458.430359 13947.408203");
m_BotSolder.AddCheckpoint("1421.006104 459.254517 13993.981445");
m_BotSolder.AddCheckpoint("1422.121094 459.807831 14022.114258");
m_BotSolder.AddCheckpoint("1388.509277 462.222443 14044.217773");
m_BotSolder.AddCheckpoint("1388.548340 462.354797 14044.183594");
m_BotSolder.AddCheckpoint("1333.772217 463.948151 14062.096680");
m_BotSolder.AddCheckpoint("1350.346069 465.658081 14107.701172");
m_BotSolder.AddCheckpoint("1461.509521 459.874268 14133.793945");
m_BotSolder.AddCheckpoint("1503.123291 455.995056 14137.425781");
m_BotSolder.AddCheckpoint("1554.196045 452.867004 14107.243164");
m_BotSolder.AddCheckpoint("1574.911743 452.540283 14100.198242");
m_BotSolder.AddCheckpoint("1629.664673 451.792175 14197.793945");
m_BotSolder.AddCheckpoint("1636.238647 451.792175 14221.260742");
m_BotSolder.AddCheckpoint("1671.278564 451.792175 14275.020508");
m_BotSolder.AddCheckpoint("1645.910522 451.807617 14315.247070");
m_BotSolder.AddCheckpoint("1669.397339 451.792175 14331.668945");
m_BotSolder.AddCheckpoint("1685.370361 451.792175 14341.243164");
}
// ---------------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -------------------------------------- /
ref array<SurvivorBotBase> m_BotMass = new array<SurvivorBotBase>;
ref array<SurvivorBotBase> m_PlaersZoneArray = new array<SurvivorBotBase>;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 7 <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
void createWeapFromBot(SurvivorBotBase m_BotSolder)
{
int randomWeapon = Math.RandomInt(1, 7);
switch( randomWeapon )
{
case 1:
{
m_BotSolder.AddWeapon("M4A1"); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
m_BotSolder.AddWeaponAtt("M4_RISHndgrd"); //<2F><><EFBFBD><EFBFBD><EFBFBD>1
m_BotSolder.AddWeaponAtt("M4_MPBttstck"); //<2F><><EFBFBD><EFBFBD><EFBFBD>2
m_BotSolder.AddWeaponAtt("ACOGOptic"); //<2F><><EFBFBD><EFBFBD><EFBFBD>3
m_BotSolder.AddMagazine("Mag_STANAG_30Rnd"); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
case 2:
{
m_BotSolder.AddWeapon("AKM");
m_BotSolder.AddWeaponAtt("AK_WoodBttstck");
m_BotSolder.AddWeaponAtt("AK_WoodHndgrd");
m_BotSolder.AddMagazine("Mag_AKM_Drum75Rnd");
break;
}
case 3:
{
m_BotSolder.AddWeapon("AKM");
m_BotSolder.AddWeaponAtt("AK_WoodBttstck");
m_BotSolder.AddWeaponAtt("AK_WoodHndgrd");
m_BotSolder.AddMagazine("Mag_AKM_Drum75Rnd");
break;
}
case 4:
{
m_BotSolder.AddWeapon("SVD");
m_BotSolder.AddMagazine("Mag_SVD_10Rnd");
break;
}
case 5:
{
m_BotSolder.AddWeapon("M4A1");
m_BotSolder.AddWeaponAtt("M4_RISHndgrd");
m_BotSolder.AddWeaponAtt("M4_MPBttstck");
m_BotSolder.AddWeaponAtt("ACOGOptic");
m_BotSolder.AddMagazine("Mag_STANAG_30Rnd");
break;
}
case 6:
{
m_BotSolder.AddWeapon("AKM");
m_BotSolder.AddWeaponAtt("AK_WoodBttstck");
m_BotSolder.AddWeaponAtt("AK_WoodHndgrd");
m_BotSolder.AddMagazine("Mag_AKM_Drum75Rnd");
break;
}
case 7:
{
m_BotSolder.AddWeapon("AKM");
m_BotSolder.AddWeaponAtt("AK_WoodBttstck");
m_BotSolder.AddWeaponAtt("AK_WoodHndgrd");
m_BotSolder.AddMagazine("Mag_AKM_Drum75Rnd");
break;
}
}
}
// ----------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ------------------------------------- //
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!!)
void createBotUnit()
{
vector Navmesh;
vector botSpPos;
private SurvivorBotBase m_BotSolder;
ref TStringArray m_BotBody = { "BotM_Mirek", "BotM_Rolf", "BotM_Quinn", "BotM_Peter", "BotM_Oliver" };
PGFilter m_pgFilterNav = new PGFilter();
m_pgFilterNav.SetFlags(PGPolyFlags.WALK, PGPolyFlags.INSIDE, 0);
float bspX = BotSpawnPoint[0];
float bspY = BotSpawnPoint[2];
if (isUseCheckPoints)
botSpPos = Vector(bspX + Math.RandomInt(-7, 7), BotSpawnPoint[1], bspY + Math.RandomInt(-7, 7));
else
botSpPos = Vector(bspX + Math.RandomInt(-m_spawnBotRadius, m_spawnBotRadius), BotSpawnPoint[1], bspY + Math.RandomInt(-m_spawnBotRadius, m_spawnBotRadius));
bool IsNavmesh = world.SampleNavmeshPosition( botSpPos, 2, m_pgFilterNav, Navmesh );
if (IsNavmesh)
m_BotSolder = SurvivorBotBase.Cast(GetGame().CreatePlayer(null, m_BotBody.GetRandomElement(), Navmesh, 0, "NONE"));
else
m_BotSolder = SurvivorBotBase.Cast(GetGame().CreatePlayer(null, m_BotBody.GetRandomElement(), botSpPos, 0, "NONE"));
m_BotSolder.GetInventory().CreateInInventory(Shirt.GetRandomElement());
m_BotSolder.GetInventory().CreateInInventory(Jeans.GetRandomElement());
m_BotSolder.GetInventory().CreateInInventory(Shoes.GetRandomElement());
m_BotSolder.GetInventory().CreateInInventory(BackPack.GetRandomElement());
m_BotSolder.GetInventory().CreateInInventory(Vest.GetRandomElement());
m_BotSolder.GetInventory().CreateInInventory(Helm.GetRandomElement());
m_BotSolder.GetInventory().CreateInInventory(Gloves.GetRandomElement());
m_BotSolder.GetInventory().CreateInInventory(OtherEquip.GetRandomElement());
if (isBotKaratist)
m_BotSolder.GetHumanInventory().CreateInHands(MeleeWeap.GetRandomElement());
else
createWeapFromBot(m_BotSolder);
int rndLootCnt = Math.RandomInt(botLootCountMin, botLootCountMax);
for (int i = 0; i < rndLootCnt; i++)
{
itemEnt = m_BotSolder.GetInventory().CreateInInventory(RandomLoot.GetRandomElement());
if (itemEnt)
{
int rndHlt = Math.RandomInt(55,100);
itemEnt.SetHealth("","",rndHlt);
}
}
m_BotSolder.SetAcuracy(m_botAcuracy);
m_BotSolder.SetDistance(m_TargetDist);
m_BotSolder.SetUseVoice(onVoice);
m_BotSolder.SetUseKillFeed(useKilFeed);
m_BotSolder.SetFrendly(m_Frendly);
m_BotSolder.SetSpeedPatrol(m_SpeedPatrol);
if (isUseCheckPoints)
AddCeckPoint(m_BotSolder);
m_BotMass.Insert(m_BotSolder);
}
// ----------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ------------------------------------- //
// ----------------------------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------//
private void respawnBotUnit()
{
ref array<Man> players = new array<Man>;
GetGame().GetPlayers( players );
SurvivorBotBase Bot_Ar;
vector posB;
bool m_botRemoved = false;
float distB;
int m_countBot = m_BotMass.Count();
int plaersZoneCount = -1;
m_PlaersZoneArray.Clear();
if (canBotSpawned)
{
for ( int u = 0; u < players.Count(); u++ )
{
PlayerBase player;
Class.CastTo(player, players.Get(u));
vector pos = player.GetPosition();
float dist = vector.Distance( pos, BotSpawnPoint );
if ( dist < Zone_Radius && player.IsAlive() )
{
m_PlaersZoneArray.Insert(player);
// return;
}
}
Print("Players count in zone bots Tisy = " + m_PlaersZoneArray.Count());
if (m_PlaersZoneArray.Count() == 0)
{
for ( int a = 0; a < m_countBot; a++ )
{
Bot_Ar = m_BotMass.Get(a);
if (Bot_Ar)
{
if (!Bot_Ar.IsAlive())
{
posB = Bot_Ar.GetPosition();
distB = vector.Distance( posB, BotSpawnPoint );
if (distB < Zone_Radius)
{
m_BotMass.Remove( a );
}
if (m_BotMass.Count() == 0)
m_botRemoved = true;
}
else
{
if (distB < Zone_Radius)
{
m_BotMass.Remove( a );
GetGame().ObjectDelete( Bot_Ar );
}
if (m_BotMass.Count() == 0)
m_botRemoved = true;
}
}
}
if (m_botRemoved && m_PlaersZoneArray.Count() == 0)
{
StartMissionAI();
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Remove(respawnBotUnit);
m_botRemoved = false;
}
}
}
}
// ----------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------//
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
int delaySpawn = 0;
void spawnBotGroup()
{
int rndBotGrpCnt = Math.RandomInt(BotSolderCountMin, BotSolderCountMax);
Print("Bots spawned! Count " + rndBotGrpCnt);
for (int a = 0; a < rndBotGrpCnt; a++)
{
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(createBotUnit, 500 + delaySpawn);
delaySpawn +=1000;
}
}
// --------------------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --------------------------------------- //
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void TriggerPlayers()
{
ref array<Man> players = new array<Man>;
GetGame().GetPlayers( players );
delaySpawn = 0;
if (canBotSpawned && IsGoodSrvFps())
{
for ( int u = 0; u < players.Count(); u++ )
{
PlayerBase player;
Class.CastTo(player, players.Get(u));
vector pos = player.GetPosition();
float dist = vector.Distance( pos, BotSpawnPoint );
if ( dist < Zone_Radius && !player.IsBot() )
{
spawnBotGroup();
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Remove(TriggerPlayers);
if (onRespawnBot)
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(respawnBotUnit, 60000, true);
}
}
}
}
// --------------------------------------- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --------------------------------------- //
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> initBotMissions.c
void StartMissionAI()
{
Print("Start mission bot");
if (canUseTrigger)
{
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TriggerPlayers, 5000, true);
}
else if (IsGoodSrvFps())
{
spawnBotGroup();
}
}
bool IsGoodSrvFps()
{
float TestFpsSrv = GetGame().GetFps();
if (TestFpsSrv < 2)
{
return true;
}
else
{
Print("Server FPS low! FPS = " + TestFpsSrv + " Bots not respawned!");
return false;
}
}
}