예제 #1
0
        private static void MakeSpawner(string[] types, string[] fakespawnsA, string[] fakespawnsB, string[] fakespawnsC, string[] fakespawnsD, string[] fakespawnsE, int x, int y, int z, Map map, TimeSpan mintime, TimeSpan maxtime, int walkingrange, int homerange, int spawnid, int npccount, int fakecountA, int fakecountB, int fakecountC, int fakecountD, int fakecountE)
        {
            if (types.Length == 0)
            {
                return;
            }

            List <string> tipos = new List <string>(types);
            List <string> noneA = new List <string>();
            List <string> noneB = new List <string>();
            List <string> noneC = new List <string>();
            List <string> noneD = new List <string>();
            List <string> noneE = new List <string>();

            if (fakespawnsA[0] != "")
            {
                noneA = new List <string>(fakespawnsA);
            }

            if (fakespawnsB[0] != "")
            {
                noneB = new List <string>(fakespawnsB);
            }

            if (fakespawnsC[0] != "")
            {
                noneC = new List <string>(fakespawnsC);
            }

            if (fakespawnsD[0] != "")
            {
                noneD = new List <string>(fakespawnsD);
            }

            if (fakespawnsE[0] != "")
            {
                noneE = new List <string>(fakespawnsE);
            }

            PremiumSpawner spawner = new PremiumSpawner(npccount, fakecountA, fakecountB, fakecountC, fakecountD, fakecountE, spawnid, mintime, maxtime, Team, walkingrange, homerange, tipos, noneA, noneB, noneC, noneD, noneE);

            spawner.MoveToWorld(new Point3D(x, y, z), map);

            if (TotalRespawn)
            {
                spawner.Respawn();

                if (((PremiumSpawner)spawner).SpawnID == 132)                   // if is ChampionSpawn
                {
                    spawner.BringToHome();
                }
            }

            m_Count++;
        }
예제 #2
0
        private static void MakeSpawner(string[] types, int x, int y, int z, Map map, TimeSpan mintime, TimeSpan maxtime, int homerange, int spawnrange, int spawnid, int npccount)
        {
            if (types.Length == 0)
            {
                return;
            }

            PremiumSpawner spawner = new PremiumSpawner(npccount, mintime, maxtime, Team, homerange, spawnrange, spawnid, new ArrayList(types));

            spawner.MoveToWorld(new Point3D(x, y, z), map);

            if (TotalRespawn)
            {
                spawner.Respawn();

                if (((PremiumSpawner)spawner).SpawnID == 132)                   // if is ChampionSpawn
                {
                    spawner.BringToHome();
                }
            }

            m_Count++;
        }
예제 #3
0
        private static void MakeSpawner(string[] types, string[] fakespawnsA, string[] fakespawnsB, string[] fakespawnsC, string[] fakespawnsD, string[] fakespawnsE, int x, int y, int z, Map map, TimeSpan mintime, TimeSpan maxtime, int walkingrange, int homerange, int spawnid, int npccount, int fakecountA, int fakecountB, int fakecountC, int fakecountD, int fakecountE)
        {
            if (types.Length == 0)
            {
                return;
            }

            List <string> tipos = new List <string>(types);
            List <string> noneA = new List <string>();
            List <string> noneB = new List <string>();
            List <string> noneC = new List <string>();
            List <string> noneD = new List <string>();
            List <string> noneE = new List <string>();

            if (fakespawnsA[0] != "")
            {
                noneA = new List <string>(fakespawnsA);
            }

            if (fakespawnsB[0] != "")
            {
                noneB = new List <string>(fakespawnsB);
            }

            if (fakespawnsC[0] != "")
            {
                noneC = new List <string>(fakespawnsC);
            }

            if (fakespawnsD[0] != "")
            {
                noneD = new List <string>(fakespawnsD);
            }

            if (fakespawnsE[0] != "")
            {
                noneE = new List <string>(fakespawnsE);
            }

            PremiumSpawner spawner = new PremiumSpawner(npccount, fakecountA, fakecountB, fakecountC, fakecountD, fakecountE, spawnid, mintime, maxtime, Team, walkingrange, homerange, tipos, noneA, noneB, noneC, noneD, noneE);

            spawner.MoveToWorld(new Point3D(x, y, z), map);

            if (spawner.SpawnID == 9999)
            {
                spawner.MinDelay  = TimeSpan.FromSeconds(1.0);
                spawner.MaxDelay  = TimeSpan.FromSeconds(1.0);
                spawner.NextSpawn = TimeSpan.FromSeconds(1.0);
                spawner.Respawn();
            }
            else if (spawner.SpawnID == 8888)
            {
                spawner.MinDelay  = TimeSpan.FromMinutes(10.0);
                spawner.MaxDelay  = TimeSpan.FromMinutes(15.0);
                spawner.NextSpawn = TimeSpan.FromSeconds(1.0);
                Server.Mobiles.PremiumSpawner.Reconfigure(spawner, true);
            }
            else if (TotalRespawn && spawner.Running == true)
            {
                spawner.Respawn();
            }

            m_Count++;
        }