Exemple #1
0
        public void SpawnEncounter()
        {
            //Lets start spawning the encounter mobs!
            //First we spawn the 30 Wall of Fire mobs around the perimeter of the island.
            for (int i = 0; i < 30; i++)
            {
                SpawnAfire(FirePosition[i, 0], FirePosition[i, 1], FirePosition[i, 2]);
            }
            //Next we spawn the two sets of stair guards
            for (int i = 0; i < 4; i++)
            {
                SpawnAGuard(GuardPosition[i, 0], GuardPosition[i, 1], GuardPosition[i, 2], 3720);
            }
            for (int i = 4; i < 8; i++)
            {
                SpawnAGuard(GuardPosition[i, 0], GuardPosition[i, 1], GuardPosition[i, 2], 1735);
            }
            //Next we spawn Sunkaio

            GameSunkaio sunkaio = new GameSunkaio();

            sunkaio.Model           = 1349;
            sunkaio.Size            = 100;
            sunkaio.Level           = 68;   //level 65 on live
            sunkaio.Name            = "Sunkaio";
            sunkaio.CurrentRegionID = (ushort)Ianetor.playerregion;
            sunkaio.Heading         = 1690;
            sunkaio.Realm           = 0;
            sunkaio.CurrentSpeed    = 0;
            sunkaio.MaxSpeedBase    = 191;
            sunkaio.GuildName       = "";
            sunkaio.X               = 431865;
            sunkaio.Y               = 544121;
            sunkaio.Z               = 8311;
            sunkaio.RoamingRange    = 0;
            sunkaio.RespawnInterval = 0;
            sunkaio.BodyType        = 0;

            SunBrain brain = new SunBrain();

            brain.AggroLevel = 100;
            brain.AggroRange = 350;
            sunkaio.SetOwnBrain(brain);

            sunkaio.AddToWorld();
            BossList.Add(sunkaio);
            Sun = sunkaio;
            GameEventMgr.AddHandler(sunkaio, GameNPCEvent.Dying, new DOLEventHandler(Ianetor.SunHasDied));

            //Next we spawn Zopureo

            GameZopureo zopureo = new GameZopureo();

            zopureo.Model           = 1349;
            zopureo.Size            = 100;
            zopureo.Level           = 70;
            zopureo.Name            = "Zopureo";
            zopureo.CurrentRegionID = (ushort)Ianetor.playerregion;
            zopureo.Heading         = 1690;
            zopureo.Realm           = 0;
            zopureo.CurrentSpeed    = 0;
            zopureo.MaxSpeedBase    = 0;
            zopureo.GuildName       = "";
            zopureo.X               = 432767;
            zopureo.Y               = 543483;
            zopureo.Z               = 8291;
            zopureo.RoamingRange    = 0;
            zopureo.RespawnInterval = 0;
            zopureo.BodyType        = 0;

            ZopureoBrain zbrain = new ZopureoBrain();

            zbrain.AggroLevel = 100;
            zbrain.AggroRange = 0;
            zopureo.SetOwnBrain(zbrain);

            zopureo.AddToWorld();
            BossList.Add(zopureo);
            Zop = zopureo;
            GameEventMgr.AddHandler(zopureo, GameNPCEvent.Dying, new DOLEventHandler(Ianetor.ZopHasDied));

            //Next we spawn Aithos

            GameAithos aithos = new GameAithos();

            aithos.Model           = 1349;
            aithos.Size            = 100;
            aithos.Level           = 68;   //level 65 on live
            aithos.Name            = "Aithos";
            aithos.CurrentRegionID = (ushort)Ianetor.playerregion;
            aithos.Heading         = 1690;
            aithos.Realm           = 0;
            aithos.CurrentSpeed    = 0;
            aithos.MaxSpeedBase    = 191;
            aithos.GuildName       = "";
            aithos.X               = 432377;
            aithos.Y               = 543728;
            aithos.Z               = 8334;
            aithos.RoamingRange    = 0;
            aithos.RespawnInterval = 0;
            aithos.BodyType        = 0;

            AithosBrain abrain = new AithosBrain();

            abrain.AggroLevel = 100;
            abrain.AggroRange = 350;
            aithos.SetOwnBrain(abrain);

            aithos.AddToWorld();
            BossList.Add(aithos);
            Aith = aithos;
            GameEventMgr.AddHandler(aithos, GameNPCEvent.Dying, new DOLEventHandler(Ianetor.AithosHasDied));
            //Make sure there are not too many players on the island when the encounter starts, if there is too many players
            //sick the stairgards on them.
            List <GamePlayer> islandplayers = new List <GamePlayer>();

            foreach (GamePlayer foundplayer in (Aith.GetPlayersInRadius((ushort)2300)))
            {
                islandplayers.Add(foundplayer);
            }
            if (islandplayers.Count > 8)
            {
                EncounterMgr.BroadcastMsg(Aith, "You can not have more then one full group of players on the island, you must all die for your mistake!", 2300, true);
                EncounterMgr.BroadcastMsg(Aith, "Guards!!!!!!!!!!!", 2300, true);
                foreach (GameNPC stairgard in StairGuardList)
                {
                    IOldAggressiveBrain aggroBrain = stairgard.Brain as IOldAggressiveBrain;
                    foreach (GamePlayer foundplayer in islandplayers)
                    {
                        if (aggroBrain != null && (GameServer.ServerRules.IsAllowedToAttack(stairgard, foundplayer, true)))
                        {
                            aggroBrain.AddToAggroList(foundplayer, Util.Random(50, 100));
                        }
                    }
                }
            }
            return;
        }
Exemple #2
0
		public void SpawnEncounter()
		{
			//Lets start spawning the encounter mobs!
			//First we spawn the 30 Wall of Fire mobs around the perimeter of the island.
			for (int i = 0; i < 30; i++)
			{
				SpawnAfire(FirePosition[i, 0], FirePosition[i, 1], FirePosition[i, 2]);
			}
			//Next we spawn the two sets of stair guards
			for (int i = 0; i < 4; i++)
			{
				SpawnAGuard(GuardPosition[i, 0], GuardPosition[i, 1], GuardPosition[i, 2], 3720);
			}
			for (int i = 4; i < 8; i++)
			{
				SpawnAGuard(GuardPosition[i, 0], GuardPosition[i, 1], GuardPosition[i, 2], 1735);
			}
			//Next we spawn Sunkaio

			GameSunkaio sunkaio = new GameSunkaio();
			sunkaio.Model = 1349;
			sunkaio.Size = 100;
			sunkaio.Level = 68; //level 65 on live
			sunkaio.Name = "Sunkaio";
			sunkaio.CurrentRegionID = (ushort)Ianetor.playerregion;
			sunkaio.Heading = 1690;
			sunkaio.Realm = 0;
			sunkaio.CurrentSpeed = 0;
			sunkaio.MaxSpeedBase = 191;
			sunkaio.GuildName = "";
			sunkaio.X = 431865;
			sunkaio.Y = 544121;
			sunkaio.Z = 8311;
			sunkaio.RoamingRange = 0;
			sunkaio.RespawnInterval = 0;
			sunkaio.BodyType = 0;

			SunBrain brain = new SunBrain();
			brain.AggroLevel = 100;
			brain.AggroRange = 350;
			sunkaio.SetOwnBrain(brain);

			sunkaio.AddToWorld();
			BossList.Add(sunkaio);
			Sun = sunkaio;
			GameEventMgr.AddHandler(sunkaio, GameNPCEvent.Dying, new DOLEventHandler(Ianetor.SunHasDied));

			//Next we spawn Zopureo

			GameZopureo zopureo = new GameZopureo();
			zopureo.Model = 1349;
			zopureo.Size = 100;
			zopureo.Level = 70;
			zopureo.Name = "Zopureo";
			zopureo.CurrentRegionID = (ushort)Ianetor.playerregion;
			zopureo.Heading = 1690;
			zopureo.Realm = 0;
			zopureo.CurrentSpeed = 0;
			zopureo.MaxSpeedBase = 0;
			zopureo.GuildName = "";
			zopureo.X = 432767;
			zopureo.Y = 543483;
			zopureo.Z = 8291;
			zopureo.RoamingRange = 0;
			zopureo.RespawnInterval = 0;
			zopureo.BodyType = 0;

			ZopureoBrain zbrain = new ZopureoBrain();
			zbrain.AggroLevel = 100;
			zbrain.AggroRange = 0;
			zopureo.SetOwnBrain(zbrain);

			zopureo.AddToWorld();
			BossList.Add(zopureo);
			Zop = zopureo;
			GameEventMgr.AddHandler(zopureo, GameNPCEvent.Dying, new DOLEventHandler(Ianetor.ZopHasDied));

			//Next we spawn Aithos

			GameAithos aithos = new GameAithos();
			aithos.Model = 1349;
			aithos.Size = 100;
			aithos.Level = 68; //level 65 on live
			aithos.Name = "Aithos";
			aithos.CurrentRegionID = (ushort)Ianetor.playerregion;
			aithos.Heading = 1690;
			aithos.Realm = 0;
			aithos.CurrentSpeed = 0;
			aithos.MaxSpeedBase = 191;
			aithos.GuildName = "";
			aithos.X = 432377;
			aithos.Y = 543728;
			aithos.Z = 8334;
			aithos.RoamingRange = 0;
			aithos.RespawnInterval = 0;
			aithos.BodyType = 0;

			AithosBrain abrain = new AithosBrain();
			abrain.AggroLevel = 100;
			abrain.AggroRange = 350;
			aithos.SetOwnBrain(abrain);

			aithos.AddToWorld();
			BossList.Add(aithos);
			Aith = aithos;
			GameEventMgr.AddHandler(aithos, GameNPCEvent.Dying, new DOLEventHandler(Ianetor.AithosHasDied));
			//Make sure there are not too many players on the island when the encounter starts, if there is too many players
			//sick the stairgards on them.
			List<GamePlayer> islandplayers = new List<GamePlayer>();
			foreach (GamePlayer foundplayer in (Aith.GetPlayersInRadius((ushort) 2300)))
			{
				islandplayers.Add(foundplayer);
			}
			if (islandplayers.Count > 8)
			{
				EncounterMgr.BroadcastMsg(Aith, "You can not have more then one full group of players on the island, you must all die for your mistake!", 2300, true);
				EncounterMgr.BroadcastMsg(Aith, "Guards!!!!!!!!!!!", 2300, true);
				foreach (GameNPC stairgard in StairGuardList)
				{
					IOldAggressiveBrain aggroBrain = stairgard.Brain as IOldAggressiveBrain;
					foreach (GamePlayer foundplayer in islandplayers)
					{
						if (aggroBrain != null && (GameServer.ServerRules.IsAllowedToAttack(stairgard, foundplayer, true)))
							aggroBrain.AddToAggroList(foundplayer, Util.Random(50, 100));
					}
				}
			}
			return;
		}