예제 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            SerpentNest nest = (SerpentNest)this;

            from.Animate(32, 5, 1, true, false, 0);
            if (Utility.RandomDouble() < 0.20)                //% may be off, just a rough guess
            {
                switch (Utility.Random(4))
                {
                case 0:
                {
                    RareSerpentEgg4 RSEB = new RareSerpentEgg4();
                    RSEB.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112581);                       // You reach in and find a rare serpent egg!!
                    nest.Delete();
                } break;

                case 1:
                {
                    RareSerpentEgg3 RSEW = new RareSerpentEgg3();
                    RSEW.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112581);                       // You reach in and find a rare serpent egg!!
                    nest.Delete();
                } break;

                case 2:
                {
                    RareSerpentEgg2 RSER = new RareSerpentEgg2();
                    RSER.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112581);                       // You reach in and find a rare serpent egg!!
                    nest.Delete();
                } break;

                case 3:
                {
                    RareSerpentEgg1 RSEY = new RareSerpentEgg1();
                    RSEY.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112581);                       // You reach in and find a rare serpent egg!!
                    nest.Delete();
                } break;
                }
            }
            else if (Utility.RandomDouble() >= 0.20)
            {
                switch (Utility.Random(4))
                {
                case 0:
                {
                    from.SendLocalizedMessage(1112578);                       // You try to reach the eggs, but the hole is too deep.
                } break;

                case 1:
                {
                    CoralSnake S1 = new CoralSnake();                      //Not sure of what type or how many snakes it spawns
                    CoralSnake S3 = new CoralSnake();                      //Not sure of what type or how many snakes it spawns
                    S1.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    S3.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112577);                       // A swarm of snakes springs forth from the nest and attacks you!!!
                } break;

                case 2:
                {
                    LavaSnake S2 = new LavaSnake();                      //Not sure of what type or how many snakes it spawns
                    LavaSnake S4 = new LavaSnake();                      //Not sure of what type or how many snakes it spawns
                    S2.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    S4.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112577);                       // A swarm of snakes springs forth from the nest and attacks you!!!
                } break;

                case 3:
                {
                    from.SendLocalizedMessage(1112579);                       // You reach in but clumsily destroy the eggs inside the nest.
                    nest.Delete();
                } break;
                }
            }
        }
예제 #2
0
		public override void OnDoubleClick( Mobile from )
		{
			SerpentNest nest = (SerpentNest)this;
			from.Animate( 32, 5, 1, true, false, 0 );
			if ( Utility.RandomDouble() < 0.20 )  //% may be off, just a rough guess
			switch (Utility.Random(4))
			{
				case 0: 
				{
					RareSerpentEgg4 RSEB = new RareSerpentEgg4();
					RSEB.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					from.SendLocalizedMessage( 1112581 ); // You reach in and find a rare serpent egg!!
					nest.Delete();	
				} break;
				case 1: 
				{
					RareSerpentEgg3 RSEW = new RareSerpentEgg3();
					RSEW.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					from.SendLocalizedMessage( 1112581 ); // You reach in and find a rare serpent egg!!	
					nest.Delete();	
				} break;
				case 2: 
				{
					RareSerpentEgg2 RSER = new RareSerpentEgg2();
					RSER.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					from.SendLocalizedMessage( 1112581 ); // You reach in and find a rare serpent egg!!	
					nest.Delete();	
				} break;
				case 3: 
				{
					RareSerpentEgg1 RSEY = new RareSerpentEgg1();
					RSEY.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					from.SendLocalizedMessage( 1112581 ); // You reach in and find a rare serpent egg!!		
					nest.Delete();	
				} break;
			}
			else if ( Utility.RandomDouble() >= 0.20 )
			switch (Utility.Random(4))
			{
				case 0: 
				{
					from.SendLocalizedMessage( 1112578 ); // You try to reach the eggs, but the hole is too deep.
				} break;
				case 1: 
				{
					CoralSnake S1 = new CoralSnake();  //Not sure of what type or how many snakes it spawns
					CoralSnake S3 = new CoralSnake();  //Not sure of what type or how many snakes it spawns
					S1.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					S3.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					from.SendLocalizedMessage( 1112577 ); // A swarm of snakes springs forth from the nest and attacks you!!!							
				} break;
				case 2: 
				{
					LavaSnake S2 = new LavaSnake();  //Not sure of what type or how many snakes it spawns
					LavaSnake S4 = new LavaSnake();  //Not sure of what type or how many snakes it spawns
					S2.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					S4.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
					from.SendLocalizedMessage( 1112577 ); // A swarm of snakes springs forth from the nest and attacks you!!!								
				} break;
				case 3: 
				{
					from.SendLocalizedMessage( 1112579 ); // You reach in but clumsily destroy the eggs inside the nest.		
					nest.Delete();							
				} break;
			}			
		}
예제 #3
0
			protected override void OnTarget( Mobile from, object targeted )
			{
                if ( targeted is SerpentNest )
                {
				
					SerpentNest nest = (SerpentNest)targeted;
					
                    from.SendLocalizedMessage( 502479 ); //The animal walks where it was instructed to.
                    ((BaseCreature)m_Snake).ActiveSpeed = 0.1;
                    ((BaseCreature)m_Snake).PassiveSpeed = 0.2;
                    ((BaseCreature)m_Snake).ControlOrder = OrderType.Follow;
                    ((BaseCreature)m_Snake).CurrentSpeed = 0.1;
                    ((BaseCreature)m_Snake).MoveToWorld( new Point3D( ((SerpentNest)targeted).X,((SerpentNest)targeted).Y,((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map );
                    ((BaseCreature)m_Snake).Frozen = true;
                    ((BaseCreature)m_Snake).Say( 1112588 ); // The snake begins searching for rare eggs.

					if ( Utility.RandomDouble() < 0.25 )  //% may be off, just a rough guess
					switch (Utility.Random(4))
					{
						case 0: 
						{
							RareSerpentEgg4 RSEB = new RareSerpentEgg4();
							RSEB.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							((BaseCreature)m_Snake).Say( 1112586 ); // The snake finds a rare egg and drags it out of the nest!		
							nest.Delete();	
						} break;
						case 1: 
						{
							RareSerpentEgg3 RSEW = new RareSerpentEgg3();
							RSEW.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							((BaseCreature)m_Snake).Say( 1112586 ); // The snake finds a rare egg and drags it out of the nest!	
							nest.Delete();	
						} break;
						case 2: 
						{
							RareSerpentEgg2 RSER = new RareSerpentEgg2();
							RSER.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							((BaseCreature)m_Snake).Say( 1112586 ); // The snake finds a rare egg and drags it out of the nest!	
							nest.Delete();	
						} break;
						case 3: 
						{
							RareSerpentEgg1 RSEY = new RareSerpentEgg1();
							RSEY.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							((BaseCreature)m_Snake).Say( 1112586 ); // The snake finds a rare egg and drags it out of the nest!		
							nest.Delete();	
						} break;
					}
					else if ( Utility.RandomDouble() >= 0.25 )
					switch (Utility.Random(4))
					{
						case 0: 
						{
							((BaseCreature)m_Snake).Say( 1112584 ); // The snake searches the nest and finds nothing.	
						} break;
						case 1: 
						{
							CoralSnake S1 = new CoralSnake();  //Not sure of what type or how many snakes it spawns
							CoralSnake S3 = new CoralSnake();  //Not sure of what type or how many snakes it spawns
							S1.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							S3.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							((BaseCreature)m_Snake).Say( 1112585 ); // Beware! The snake has hatched some of the eggs!!							
						} break;
						case 2: 
						{
							LavaSnake S2 = new LavaSnake();  //Not sure of what type or how many snakes it spawns
							LavaSnake S4 = new LavaSnake();  //Not sure of what type or how many snakes it spawns
							S2.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							S4.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
							((BaseCreature)m_Snake).Say( 1112585 ); // Beware! The snake has hatched some of the eggs!!									
						} break;
						case 3: 
						{
							((BaseCreature)m_Snake).Say( 1112583 ); // The nest collapses.		
							nest.Delete();							
						} break;
					}                    

                    ((BaseCreature)m_Snake).Frozen = false;
					((BaseCreature)m_Snake).Say( 1112181 ); // The charm seems to wear off.

                }
                else
                    return;
                    //from.SendLocalizedMessage( 1112176 ); // That is not a snake or serpent.
            }
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is SerpentNest)
                {
                    SerpentNest nest = (SerpentNest)targeted;

                    from.SendLocalizedMessage(502479);   //The animal walks where it was instructed to.
                    ((BaseCreature)m_Snake).ActiveSpeed  = 0.1;
                    ((BaseCreature)m_Snake).PassiveSpeed = 0.2;
                    ((BaseCreature)m_Snake).ControlOrder = OrderType.Follow;
                    ((BaseCreature)m_Snake).CurrentSpeed = 0.1;
                    ((BaseCreature)m_Snake).MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                    ((BaseCreature)m_Snake).Frozen = true;
                    ((BaseCreature)m_Snake).Say(1112588);   // The snake begins searching for rare eggs.

                    if (Utility.RandomDouble() < 0.25)      //% may be off, just a rough guess
                    {
                        switch (Utility.Random(4))
                        {
                        case 0:
                        {
                            RareSerpentEgg4 RSEB = new RareSerpentEgg4();
                            RSEB.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;

                        case 1:
                        {
                            RareSerpentEgg3 RSEW = new RareSerpentEgg3();
                            RSEW.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;

                        case 2:
                        {
                            RareSerpentEgg2 RSER = new RareSerpentEgg2();
                            RSER.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;

                        case 3:
                        {
                            RareSerpentEgg1 RSEY = new RareSerpentEgg1();
                            RSEY.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;
                        }
                    }
                    else if (Utility.RandomDouble() >= 0.25)
                    {
                        switch (Utility.Random(4))
                        {
                        case 0:
                        {
                            ((BaseCreature)m_Snake).Say(1112584);                               // The snake searches the nest and finds nothing.
                        } break;

                        case 1:
                        {
                            CoralSnake S1 = new CoralSnake();                              //Not sure of what type or how many snakes it spawns
                            CoralSnake S3 = new CoralSnake();                              //Not sure of what type or how many snakes it spawns
                            S1.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            S3.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112585);                               // Beware! The snake has hatched some of the eggs!!
                        } break;

                        case 2:
                        {
                            LavaSnake S2 = new LavaSnake();                              //Not sure of what type or how many snakes it spawns
                            LavaSnake S4 = new LavaSnake();                              //Not sure of what type or how many snakes it spawns
                            S2.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            S4.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112585);                               // Beware! The snake has hatched some of the eggs!!
                        } break;

                        case 3:
                        {
                            ((BaseCreature)m_Snake).Say(1112583);                               // The nest collapses.
                            nest.Delete();
                        } break;
                        }
                    }

                    ((BaseCreature)m_Snake).Frozen = false;
                    ((BaseCreature)m_Snake).Say(1112181);                       // The charm seems to wear off.
                }
                else
                {
                    return;
                }
                //from.SendLocalizedMessage( 1112176 ); // That is not a snake or serpent.
            }