示例#1
0
        bool SpawnBots(Vector3 zoneLocation, string zoneProfile, string zoneGroupID)
        {
            if (!String.IsNullOrEmpty(zoneProfile))
            {
                string[] result = (string[])BotSpawn?.CallHook("AddGroupSpawn", zoneLocation, zoneProfile, zoneGroupID);

                if (result == null || result.Length < 2)
                {
                    DebugPrint("AddGroupSpawn returned invalid response.", false);
                    return(false);
                }

                switch (result[0])
                {
                case "true":
                    return(true);

                case "false":
                    return(false);

                case "error":
                    DebugPrint($"ERROR: AddGroupSpawn failed: {result[1]}", true);
                    return(false);

                default:
                    return(false);
                }
            }
            return(false);
        }
示例#2
0
        private void BotSpawnProfileCreate()
        {
            string[] result = (string[])BotSpawn?.CallHook("ProfileExists", "DynamicPVP");

            if (true)
            //if (result[0] == "false")
            {
                //DebugPrint("BotsSpawn Does not contain custom profile `DynamicPVP`.", true);

                var _profile = JsonConvert.SerializeObject(new DataProfile());

                result = (string[])BotSpawn?.CallHook("CreateNewProfile", BotSpawnProfileName, _profile);
                if (result[0] == "false")
                {
                    DebugPrint($"BotsSpawn failed to add/update `DynamicPVP`.\n{result[1]}", true);
                }
                else
                {
                    result = (string[])BotSpawn?.CallHook("ProfileExists", "DynamicPVP");

                    if (result[0] == "false")
                    {
                        DebugPrint($"Added but failed show `DynamicPVP`.\n{result[1]}", true);
                    }
                    else
                    {
                        DebugPrint("Succesfully updated custom profile `DynamicPVP`.", true);
                    }
                }
            }
            else
            {
                DebugPrint("Custom profile `DynamicPVP` already exists.", true);
            }
        }
示例#3
0
        bool RemoveBots(string zoneGroupID)
        {
            string[] result = (string[])BotSpawn?.CallHook("RemoveGroupSpawn", zoneGroupID);

            if (result == null || result.Length < 2)
            {
                DebugPrint("RemoveGroupSpawn returned invalid response.", false);
                return(false);
            }
            else if (result[0] == "error")
            {
                DebugPrint($"ERROR: RemoveGroupSpawn failed: {result[1]}", true);
                return(false);
            }
            else
            {
                return(true);
            }
        }
示例#4
0
 string[] AddProfile(DataProfile profile) => (string[])BotSpawn?.CallHook("CreateNewProfile", "DynamicPVP", profile);
示例#5
0
 string[] CheckProfile(string profile) => (string[])BotSpawn?.CallHook("ProfileExists", profile);
示例#6
0
 string[] RemoveBots(string zoneGroupID) => (String[])BotSpawn?.CallHook("RemoveGroupSpawn", zoneGroupID);
示例#7
0
 // BotSpawn API
 string[] SpawnBots(Vector3 zoneLocation, string zoneProfile, string zoneGroupID) => (String[])BotSpawn?.CallHook("AddGroupSpawn", zoneLocation, zoneProfile, zoneGroupID);