Exemplo n.º 1
0
        protected void RestoreBarrier()
        {
            for (var index = 0; index < m_Barriers.Count; index++)
            {
                EnergyBarrier barrier = m_Barriers[index];
                barrier.Active = true;
            }

            for (var index = 0; index < m_BarrierLocations.Length; index++)
            {
                Point3D loc = m_BarrierLocations[index];

                Blocker blocker = new Blocker();

                blocker.MoveToWorld(loc, Map);
                m_Blockers.Add(blocker);

                LOSBlocker losblocker = new LOSBlocker();

                losblocker.MoveToWorld(loc, Map);
                m_LOSBlockers.Add(losblocker);
            }

            Visible = true;
        }
Exemplo n.º 2
0
        public FlameOfOrder(Point3D location, Map map)
            : base(0x19AB)
        {
            Movable = false;
            Light   = LightType.Circle225;

            MoveToWorld(location, map);

            m_Barriers    = new List <EnergyBarrier>(m_BarrierLocations.Length);
            m_Blockers    = new List <Blocker>(m_BarrierLocations.Length);
            m_LOSBlockers = new List <LOSBlocker>(m_BarrierLocations.Length);
            m_MsgTriggers = new List <SBMessageTrigger>(m_MsgTriggerLocations.Length);

            foreach (Point3D loc in m_BarrierLocations)
            {
                m_Barriers.Add(new EnergyBarrier(loc, map));

                Blocker blocker = new Blocker();
                blocker.MoveToWorld(loc, map);
                m_Blockers.Add(blocker);

                LOSBlocker losblocker = new LOSBlocker();
                losblocker.MoveToWorld(loc, map);
                m_LOSBlockers.Add(losblocker);
            }

            foreach (Point3D loc in m_MsgTriggerLocations)
            {
                SBMessageTrigger trigger = new SBMessageTrigger(this);
                trigger.MoveToWorld(loc, map);
                m_MsgTriggers.Add(trigger);
            }
        }
Exemplo n.º 3
0
        public FlameOfOrder( Point3D location, Map map )
            : base(0x19AB)
        {
            Movable = false;
            Light = LightType.Circle225;

            MoveToWorld( location, map );

            m_Barriers = new List<EnergyBarrier>( m_BarrierLocations.Length );
            m_Blockers = new List<Blocker>( m_BarrierLocations.Length );
            m_MsgTriggers = new List<SBMessageTrigger>( m_MsgTriggerLocations.Length );

            foreach ( Point3D loc in m_BarrierLocations )
            {
                m_Barriers.Add( new EnergyBarrier( loc, map ) );

                Blocker blocker = new Blocker();
                blocker.MoveToWorld( loc, map );
                m_Blockers.Add( blocker );
            }

            foreach ( Point3D loc in m_MsgTriggerLocations )
            {
                SBMessageTrigger trigger = new SBMessageTrigger( this );
                trigger.MoveToWorld( loc, map );
                m_MsgTriggers.Add( trigger );
            }
        }
Exemplo n.º 4
0
        protected void RestoreBarrier()
        {
            foreach (EnergyBarrier barrier in m_Barriers)
            {
                barrier.Active = true;
            }

            foreach (Point3D loc in m_BarrierLocations)
            {
                Blocker blocker = new Blocker();
                blocker.MoveToWorld(loc, Map);
                m_Blockers.Add(blocker);
            }

            Visible = true;
        }
Exemplo n.º 5
0
        private void CTF_Callback()
        {
            if (m_Stone != null)
            {
                if (m_Stone.Validate())
                {
                    m_Stone.JoinStone.RandomTeam = true;
                    m_Stone.JoinStone.Game       = m_Stone.Game;
                    m_Stone.Game.OpenJoin        = true;

                    if (m_Stone.Doors != null)
                    {
                        m_Blocker = new Blocker();
                        m_Blocker.MoveToWorld(m_Stone.Doors.Location, m_Stone.Doors.Map);

                        List <BaseDoor> list = m_Stone.Doors.GetChain();

                        for (int i = 0; i < list.Count; ++i)
                        {
                            ((BaseDoor)list[i]).Open = true;
                        }
                    }
                    else
                    {
                        m_Blocker = null;
                    }

                    m_Stone.JoinStone.Visible = true;

                    new AutoCTFFinTimer(m_Stone, m_Blocker).Start();

                    SetDate();
                }
                else
                {
                    m_Stone.Activate(false);
                }
            }
            else
            {
                Stop();
            }
        }
Exemplo n.º 6
0
        private static void GenerateCoral_OnCommand(CommandEventArgs e)
        {
            e.Mobile.SendMessage("Generating Corals...");

            int count = 0;
            for(int i = 0; i < limits.Length; i++)
            {
                Point2D actual = limits[i];
                Point2D next = (i == limits.Length - 1 ? limits[0] : limits[i + 1]);

                for (int x = actual.X, y = actual.Y; x != next.X || y != next.Y;)
                {
                    if (x != next.X)
                    {
                        if (x < next.X) x++;
                        else x--;
                    }
                    if (y != next.Y)
                    {
                        if (y < next.Y) y++;
                        else y--;
                    }
                    
                    Static rock = new Static(rocks[Utility.Random(0, rocks.Count)]);
                    Item blocker = new Blocker();
                    Item losBlocker = new LOSBlocker();

                    int z = map.GetAverageZ(x, y);  // on récupère la hauteur du sol à cet endroit
                    rock.MoveToWorld(new Point3D(x, y, z), map);    // le rocher pour la forme
                    blocker.MoveToWorld(new Point3D(x, y, z), map); // un blocker pour empêcher de passer même avec un sea horse par exemple
                    losBlocker.MoveToWorld(new Point3D(x, y, z), map);  // pour empêcher tout sort de téléport de fonctionner

                    count++;
                }
            }
            e.Mobile.SendMessage(String.Format("{0} Corals have been generated !", count));
        }
		private void CTF_Callback()
		{
			if ( m_Stone != null )
			{
				if ( m_Stone.Validate() )
				{
					m_Stone.JoinStone.RandomTeam = true;
					m_Stone.JoinStone.Game = m_Stone.Game;
					m_Stone.Game.OpenJoin = true;

					if ( m_Stone.Doors != null )
					{
						m_Blocker = new Blocker();
						m_Blocker.MoveToWorld( m_Stone.Doors.Location, m_Stone.Doors.Map );

						ArrayList list = m_Stone.Doors.GetChain();

						for ( int i = 0; i < list.Count; ++i )
							((BaseDoor)list[i]).Open = true;
					}
					else
						m_Blocker = null;

					m_Stone.JoinStone.Visible = true;

					new AutoCTFFinTimer( m_Stone, m_Blocker ).Start();

					SetDate();
				}
				else
					m_Stone.Activate( false );
			}
			else
				Stop();
		}
Exemplo n.º 8
0
        protected void RestoreBarrier()
        {
            foreach ( EnergyBarrier barrier in m_Barriers )
                barrier.Active = true;

            foreach ( Point3D loc in m_BarrierLocations )
            {
                Blocker blocker = new Blocker();
                blocker.MoveToWorld( loc, Map );
                m_Blockers.Add( blocker );
            }

            Visible = true;
        }
Exemplo n.º 9
0
        private static void GenQuest_Command( CommandEventArgs e )
        {
            e.Mobile.SendMessage( "Creating KR Starting Quest..." );

            // var declarations
            KRStartingQuestTrigger trigger;
            KRStartingQuestContainer container;
            KRStartingQuestGate gate;
            KRWaypointRemover remover;
            KRStartingQuestTeleporter teleporter;
            CreatureSpawner spawner;

            trigger = new KRStartingQuestTrigger( 3 );
            trigger.MoveToWorld( new Point3D( 3646, 2674, -1 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 3 );
            trigger.MoveToWorld( new Point3D( 3647, 2674, -2 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 3 );
            trigger.MoveToWorld( new Point3D( 3648, 2674, -2 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 3 );
            trigger.MoveToWorld( new Point3D( 3649, 2674, -2 ), Map.Trammel );

            trigger = new KRStartingQuestTrigger( 4 );
            trigger.MoveToWorld( new Point3D( 3647, 2666, -3 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 4 );
            trigger.MoveToWorld( new Point3D( 3648, 2666, -3 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 4 );
            trigger.MoveToWorld( new Point3D( 3649, 2666, -2 ), Map.Trammel );

            trigger = new KRStartingQuestTrigger( 5 );
            trigger.MoveToWorld( new Point3D( 3646, 2656, -2 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 5 );
            trigger.MoveToWorld( new Point3D( 3647, 2656, -4 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 5 );
            trigger.MoveToWorld( new Point3D( 3648, 2656, -3 ), Map.Trammel );

            for ( int i = 0; i < 12; i++ )
            {
                trigger = new KRStartingQuestTrigger( 5 );
                trigger.MoveToWorld( new Point3D( 3649 + i, 2656, -2 ), Map.Trammel );
            }

            container = new KRStartingQuestContainer( 0x9A9 );
            container.MoveToWorld( new Point3D( 3646, 2652, -3 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3E );
            container.MoveToWorld( new Point3D( 3649, 2650, 2 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3650, 2650, 2 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3651, 2650, 2 ), Map.Trammel );

            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3643, 2649, 0 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3644, 2648, 3 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3645, 2647, 2 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3645, 2648, -1 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3648, 2644, 0 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3650, 2642, 2 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3648, 2642, 0 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3648, 2641, 2 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3652, 2642, 3 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3653, 2642, 6 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3653, 2643, 0 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3657, 2641, 3 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3657, 2642, 0 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3657, 2643, 0 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3659, 2644, 7 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3660, 2644, 8 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3659, 2645, 7 ), Map.Trammel );
            container = new KRStartingQuestContainer( 0xE3D );
            container.MoveToWorld( new Point3D( 3660, 2645, 7 ), Map.Trammel );

            for ( int i = 0; i < 6; i++ )
            {
                trigger = new KRStartingQuestTrigger( 9 );
                trigger.MoveToWorld( new Point3D( 3672, 2654 - i, 0 ), Map.Trammel );
            }

            spawner = new CreatureSpawner( "HogarthTheKeeperOfOldHaven", 1, 300, 600, 0, 0 );
            spawner.MoveToWorld( new Point3D( 3672, 2653, 0 ), Map.Trammel );
            spawner.Active = true;

            Static sta;

            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3668, 2647, 0 ), Map.Trammel );
            sta = new Static( 0xB8C );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3668, 2648, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3669, 2647, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3669, 2648, 0 ), Map.Trammel );
            sta = new Static( 0xB8A );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3670, 2647, 0 ), Map.Trammel );
            sta = new Static( 0xB8B );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3670, 2648, 0 ), Map.Trammel );

            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3673, 2652, 0 ), Map.Trammel );
            sta = new Static( 0xB8C );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3673, 2653, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3674, 2652, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3674, 2653, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3675, 2652, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3675, 2653, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3676, 2652, 0 ), Map.Trammel );
            sta = new Static( 0xB8D );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3676, 2653, 0 ), Map.Trammel );
            sta = new Static( 0xB8A );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3677, 2652, 0 ), Map.Trammel );
            sta = new Static( 0xB8B );
            sta.Movable = false;
            sta.MoveToWorld( new Point3D( 3677, 2653, 0 ), Map.Trammel );

            remover = new KRWaypointRemover( 15 );
            remover.MoveToWorld( new Point3D( 3665, 2631, 0 ), Map.Trammel );
            remover = new KRWaypointRemover( 15 );
            remover.MoveToWorld( new Point3D( 3665, 2630, 0 ), Map.Trammel );
            remover = new KRWaypointRemover( 15 );
            remover.MoveToWorld( new Point3D( 3665, 2629, 0 ), Map.Trammel );
            remover = new KRWaypointRemover( 15 );
            remover.MoveToWorld( new Point3D( 3665, 2628, 0 ), Map.Trammel );

            gate = new KRStartingQuestGate( 16, new Point3D( 3663, 2629, 0 ) );
            gate.ItemID = 0x830;
            gate.MoveToWorld( new Point3D( 3664, 2630, 0 ), Map.Trammel );
            gate = new KRStartingQuestGate( 16, new Point3D( 3663, 2629, 0 ) );
            gate.ItemID = 0x832;
            gate.MoveToWorld( new Point3D( 3664, 2629, 0 ), Map.Trammel );

            spawner = new CreatureSpawner( "WeakSkeleton", 10, 300, 600, 20, 10 );
            spawner.MoveToWorld( new Point3D( 3649, 2623, 0 ), Map.Trammel );
            spawner.Active = true;

            remover = new KRWaypointRemover( 23 );
            remover.MoveToWorld( new Point3D( 3653, 2604, 0 ), Map.Trammel );
            remover = new KRWaypointRemover( 23 );
            remover.MoveToWorld( new Point3D( 3654, 2604, 0 ), Map.Trammel );
            remover = new KRWaypointRemover( 23 );
            remover.MoveToWorld( new Point3D( 3655, 2604, 0 ), Map.Trammel );
            remover = new KRWaypointRemover( 23 );
            remover.MoveToWorld( new Point3D( 3656, 2604, 0 ), Map.Trammel );

            gate = new KRStartingQuestGate( 24, new Point3D( 3654, 2602, 0 ) );
            gate.ItemID = 0x82F;
            gate.MoveToWorld( new Point3D( 3654, 2603, 0 ), Map.Trammel );
            gate = new KRStartingQuestGate( 24, new Point3D( 3654, 2602, 0 ) );
            gate.ItemID = 0x833;
            gate.MoveToWorld( new Point3D( 3655, 2603, 0 ), Map.Trammel );

            spawner = new CreatureSpawner( "Zombie", 20, 300, 600, 20, 10 );
            spawner.MoveToWorld( new Point3D( 3648, 2589, 0 ), Map.Trammel );
            spawner.Active = true;

            remover = new KRWaypointRemover( 25 );
            remover.MoveToWorld( new Point3D( 3623, 2611, 0 ), Map.Trammel );
            remover = new KRWaypointRemover( 25 );
            remover.MoveToWorld( new Point3D( 3623, 2612, 0 ), Map.Trammel );

            spawner = new CreatureSpawner( "Healer", 1, 300, 600, 5, 1 );
            spawner.MoveToWorld( new Point3D( 3619, 2618, 0 ), Map.Trammel );
            spawner.Active = true;

            for ( int i = 0; i < 7; i++ )
            {
                remover = new KRWaypointRemover( 27 );
                remover.MoveToWorld( new Point3D( 3629 + i, 2578, 0 ), Map.Trammel );
            }

            teleporter = new KRStartingQuestTeleporter( 28, new Point3D( 3631, 2573, 0 ) );
            teleporter.AdvanceLevel = true;
            teleporter.MoveToWorld( new Point3D( 3631, 2577, 0 ), Map.Trammel );
            teleporter = new KRStartingQuestTeleporter( 28, new Point3D( 3631, 2573, 0 ) );
            teleporter.AdvanceLevel = true;
            teleporter.MoveToWorld( new Point3D( 3632, 2577, 0 ), Map.Trammel );

            DarkKnight dk = new DarkKnight();
            dk.MoveToWorld( new Point3D( 3631, 2568, 0 ), Map.Trammel );
            dk.Direction = Direction.South;

            Blocker b = new Blocker();
            b.MoveToWorld( new Point3D( 3631, 2576, 0 ), Map.Trammel );
            b = new Blocker();
            b.MoveToWorld( new Point3D( 3632, 2576, 0 ), Map.Trammel );

            Static st = new Static( 0x3946 );
            st.MoveToWorld( new Point3D( 3631, 2576, 0 ), Map.Trammel );
            st = new Static( 0x3946 );
            st.MoveToWorld( new Point3D( 3632, 2576, 0 ), Map.Trammel );

            st = new Static( 0x3946 );
            st.MoveToWorld( new Point3D( 3631, 2565, 0 ), Map.Trammel );
            st = new Static( 0x3946 );
            st.MoveToWorld( new Point3D( 3632, 2565, 0 ), Map.Trammel );

            trigger = new KRStartingQuestTrigger( 31 );
            trigger.MoveToWorld( new Point3D( 3540, 2570, -1 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 31 );
            trigger.MoveToWorld( new Point3D( 3540, 2569, 0 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 31 );
            trigger.MoveToWorld( new Point3D( 3540, 2568, 0 ), Map.Trammel );
            trigger = new KRStartingQuestTrigger( 31 );
            trigger.MoveToWorld( new Point3D( 3540, 2567, 0 ), Map.Trammel );

            teleporter = new KRStartingQuestTeleporter( 31, new Point3D( 3631, 2561, 0 ) );
            teleporter.MoveToWorld( new Point3D( 3631, 2566, 0 ), Map.Trammel );
            teleporter = new KRStartingQuestTeleporter( 31, new Point3D( 3631, 2561, 0 ) );
            teleporter.MoveToWorld( new Point3D( 3632, 2566, 0 ), Map.Trammel );

            e.Mobile.SendMessage( "Generation completed!" );
        }