public override bool OnMoveOver( Mobile m )
		{
			if( !m_AllowCreatures && !m.Player )
				return true;
			
			if( m.Alive)
					{
					m.SendMessage( "You must be dead to use this portal." );
					m.Say("Duh... I am not dead... Hello? Use a Rune book..");
					m.PlaySound( 0x440 );
					return true;
					}
			if( m_TelePets)
				{
				Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
				}
				
				m.Say("Have mercy on my soul.");
				World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as Dracula has consumed another victim. May {0} rest in peace.", m.Name );
				m.PlaySound(0x1F7);

				m.MoveToWorld( m_DestLoc, m_DestMap );

				return false;
				
			

		}
Example #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.Map == Map.Trammel)
            {
                //Now where am I at?
                //from.SendMessage(11, "You are at {0} {1} {2} in {3}.", from.X, from.Y, from.Z, from.Map);

                from.SendLocalizedMessage(1005680); //teleporting to Felucca
                from.MoveToWorld(from.Location, Map.Felucca);
            }
            else
                if (from.Map == Map.Felucca)
                {
                    from.SendLocalizedMessage(502353); //Strange, that did not seem to work.

                    //To switch from Trammel to Felucca, remove the above line and add the two lines below.
                    //from.SendLocalizedMessage(1005681); //teleporting to Trammel
                    //from.MoveToWorld(from.Location, Map.Trammel);
                    //502353); //Strange, that did not seem to work.
                    //502369); //You hesitate, and decide to start again.
                }
                else
                {
                    from.SendLocalizedMessage(1042766); //Waaaaaaah!  I am lost!
                    //1010217);	 //I'm lost!
                    //1042766);  //Waaaaaaah!  I am lost!
                    //10495430); //You decide against traveling to Felucca while you are still young.
                    //501816);	 //You are too far away to do that.
                }
        }
		public override bool OnMoveOver( Mobile m )
		{
			if( !m_AllowCreatures && !m.Player )
				return true;

			if( m.Backpack.ConsumeTotal( typeof( DracsKey ), 1 ) )
			{
				if( m_TelePets )
				{
					Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
				}

				m.Say("Have mercy on my soul");
				World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as {0} has Entered Draculas inner room.", m.Name );
				m.PlaySound(0x1F7);

				m.MoveToWorld( m_DestLoc, m_DestMap );
				

				return false;
			}

			m.SendMessage( " You must have the Key to Draculas chamber to use this gate." );
			return true;
		}
Example #4
0
		public override void OnDoubleClick( Mobile from )
		{
			if( HomeMap != Map.Internal && HomeMap != null && from.AccessLevel > AccessLevel.Player )
			{
				from.MoveToWorld( HomeLoc, HomeMap );
			}
		}
Example #5
0
        // When this object -- the bottle -- is double-clicked...
        public override void OnDoubleClick(Mobile m)
        {
            if (m.Followers >= m.FollowersMax) // If the player's followers is greater than or equal to his max followers...
            {
                m.SendMessage("You need at least one free follower slot to open the bottle.");
            }
            else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (!GetGooInBottle())) // If the bottle is in-range and the goo is not in its bottle...
            {
                m.SendMessage("The goo is out of its bottle!");
                m.SendLocalizedMessage(1010018); // What do you want to use this item on?

                m.Target = new BottleOfGooTarget(this, gooPet); // Creates a target from this mobile with the goo mobile thrown to the new class as a reference.
            }
            else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (GetGooInBottle())) // If the bottle is in-range and the goo IS in its bottle, this function creates a new goo mobile.
            {
                gooPet = new Goo(this);

                ((GenericWarrior)gooPet).Controlled = true;
                ((GenericWarrior)gooPet).ControlMaster = m;

                gooPet.MoveToWorld(m.Location, m.Map);
                gooPet.PlaySound(0x1CC);
                gooPet.Emote("*leaps out of " + m.Name + "'s bottle!*");

                SetGooInBottle(false);
            }
            else
            {
                m.SendLocalizedMessage(500446); //That is too far away.
            }
        }
Example #6
0
        public override void DoTeleport(Mobile m)
        {
            Map map = MapDest;

            if (map == null || map == Map.Internal)
                map = m.Map;

            Point3D p = PointDest;

            if (p == Point3D.Zero)
                p = m.Location;

            //Server.Mobiles.BaseCreature.TeleportPets(m, p, map);

            bool sendEffect = (!m.Hidden || m.AccessLevel == AccessLevel.Player);

            if (SourceEffect && sendEffect)
                Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);

            m.MoveToWorld(p, map);

            if (DestEffect && sendEffect)
                Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);

            if (SoundID > 0 && sendEffect)
                Effects.PlaySound(m.Location, m.Map, SoundID);
        }
Example #7
0
		public override void OnExit( Mobile m )
		{
			if ( m.IsPlayer && !m.Alive )
			{
				Rectangle2D rect = new Rectangle2D( 342, 168, 16, 16 );

				int x = Utility.Random( rect.X, rect.Width );
				int y = Utility.Random( rect.Y, rect.Height );

				if ( x >= 345 && x <= 352 && y >= 173 && y <= 179 )
				{
					x = 353;
					y = 172;
				}

				m.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas );

				if ( m.Corpse != null )
				{
					Region region = Region.Find( m.Corpse.Location, Map.Malas );

					if ( region.Name == "Doom Dark Guardians Room" )
					{
						m.Corpse.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas );
					}
				}
			}
		}
Example #8
0
        public override void OnDoubleClick(Mobile from)
        {
            if (m_Boat == null || from == null)
                return;

            BaseBoat boat = BaseBoat.FindBoatAt(from, from.Map);
            int range = boat != null && boat == this.Boat ? 3 : 8;
            bool canMove = false;

            if (m_Boat != null)
                m_Boat.Refresh();

            if (boat != null && m_Boat != boat)
                boat.Refresh();

            if (!from.InRange(this.Location, range))
                from.SendLocalizedMessage(500295); //You are too far away to do that.
            else if (!from.InLOS(this.Location))
                from.SendLocalizedMessage(500950); //You cannot see that.
            else if (m_Boat.IsMoving || m_Boat.IsTurning)
                from.SendLocalizedMessage(1116611); //You can't use that while the ship is moving!
            else if (BaseBoat.IsDriving(from))
                from.SendLocalizedMessage(1116610); //You can't do that while piloting a ship!
            else if (BaseHouse.FindHouseAt(from) != null)
                from.SendLocalizedMessage(1149795); //You may not dock a ship while on another ship or inside a house.
            else if (!m_Boat.IsClassicBoat)
            {
                if (boat == m_Boat && !MoveToNearestDockOrLand(from))
                    from.SendLocalizedMessage(1149796); //You can not dock a ship this far out to sea. You must be near land or shallow water.
                else if (boat == null)
                {
                    if (!from.Alive)
                        from.SendLocalizedMessage(1060190); //You cannot do that while dead!
                    else if ((m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from)) || (m_Boat is RowBoat && ((RowBoat)m_Boat).HasAccess(from)))
                        canMove = true;
                    else
                        from.SendLocalizedMessage(1116617); //You do not have permission to board this ship.
                }
                else if (boat != null && m_Boat != boat)
                {
                    if (!from.Alive)
                        from.SendLocalizedMessage(1060190); //You cannot do that while dead!
                    else if (boat is BaseGalleon && m_Boat is RowBoat && ((RowBoat)m_Boat).HasAccess(from))
                        canMove = true;
                    else if (boat is RowBoat && m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from))
                        canMove = true;
                    else if (boat is BaseGalleon && m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from))
                        canMove = true;
                    else
                        from.SendLocalizedMessage(1149795); //You may not dock a ship while on another ship or inside a house.
                }
            }

            if (canMove)
            {
                BaseCreature.TeleportPets(from, this.Location, this.Map);
                from.MoveToWorld(this.Location, this.Map);
            }
        }
 public static void VerificarComRestricoes(Mobile personagem)
 {
     if (Confirmar(personagem))
     {
         personagem.MoveToWorld(PosicionamentoNoMapa.BritainCentro(), Map.Felucca);
         personagem.SendMessage("VocĂȘ estava em um mundo restrito e fora movido para o ponto inicial.");
     }
 }
        public void KickOut( Mobile m )
        {
            if(m == null || EjectMap == null) return;

            m.SendMessage("Your {0} faction is too low to enter here", FactionType);
            m.MoveToWorld(EjectLocation, EjectMap);
            Effects.SendLocationParticles( Server.Items.EffectItem.Create( m.Location, m.Map, Server.Items.EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
        }
 public override void OnEnter(Mobile m)
 {
     m.SendMessage("Entering boardgame");
     if (_BoardGameControlItem.Players.IndexOf(m) == -1 && m.AccessLevel == AccessLevel.Player)
     {
         m.SendMessage("You are not allowed in there.");
         m.MoveToWorld(_BoardGameControlItem.Location, _BoardGameControlItem.Map);
     }
 }
Example #12
0
		public void Teleport(Mobile m, Point3D destLoc, Map destMap)
		{
			if (m == null || m.Deleted || destLoc == Point3D.Zero || destMap == Map.Internal)
			{
				return;
			}

			var oldLoc = m.Location;
			var oldMap = m.Map;

			var pm = m as PlayerMobile;

			if (pm != null && !IsOnline(pm))
			{
				pm.LogoutLocation = destLoc;
				pm.LogoutMap = destMap;

				if (!pm.Alive && pm.Corpse != null && !pm.Corpse.Deleted)
				{
					pm.Corpse.MoveToWorld(pm.LogoutLocation, pm.LogoutMap);
				}

				OnTeleported(pm, oldLoc, oldMap);
				return;
			}

			if (!m.Hidden)
			{
				Effects.SendLocationParticles(
					EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration),
					0x3728,
					10,
					10,
					5023);
			}

			m.MoveToWorld(destLoc, destMap);
			m.Send(VNScreenLightFlash.Instance);
			SendSound(Options.Sounds.Teleport);

			if (!m.Hidden)
			{
				Effects.SendLocationParticles(EffectItem.Create(destLoc, destMap, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
			}

			if (m.Location != destLoc || m.Map != destMap)
			{
				return;
			}

			if (!m.Alive && m.Corpse != null && !m.Corpse.Deleted)
			{
				m.Corpse.MoveToWorld(m.Location, m.Map);
			}

			OnTeleported(m, oldLoc, oldMap);
		}
 public static void VerificarComRestricoes(Mobile personagem)
 {
     if (personagem.Name.Equals(NomePadrao))
     {
         personagem.Frozen = true;
         personagem.MoveToWorld(PosicionamentoNoMapa.BritainCentro(), Map.Felucca);
         personagem.Hidden = true;                
     }
 }
Example #14
0
		public override void OnDoubleClick(Mobile from)
		{
			base.OnDoubleClick(from);

			if (ToLocation == Point3D.Zero ||
				ToMap == Map.Internal)
				return;

			from.MoveToWorld(ToLocation, ToMap);
		}
 public override void OnDoubleClick( Mobile m )
 {
     if ( ( m.Map == Map.Felucca || m.Map == Map.Trammel ) && m.X > 6435 && m.Y > 9 && m.X < 6631 && m.Y < 244 ) // Prism of Light
     {
         BaseCreature.TeleportPets( m, m_Dest, m.Map );
         m.MoveToWorld( m_Dest, m.Map );
     }
     else
         m.SendLocalizedMessage( 1074840 ); // This ticket can only be used while you are in the Prism of Light dungeon.
 }
        public static void GoEvent(Mobile caller, EnumEventBase.EnumEventType pEvent)
        {
            switch ((int)pEvent)
            {
                case 0:
                    caller.MoveToWorld(new Point3D(47, 836, -28), Map.Ilshenar);
                    break;

                default:
                    break;
            }
        }
Example #17
0
        public static void TeleportToFerry( Mobile from )
        {
            Point3D loc = new Point3D( 408, 251, 2 );
            Map map = Map.Malas;

            Effects.SendLocationParticles( EffectItem.Create( loc, map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
            Effects.PlaySound( loc, map, 0x1FE );

            BaseCreature.TeleportPets( from, loc, map );

            from.MoveToWorld( loc, map );
        }
        public static void Followers_OnTarget(Mobile from, object obj)
        {
            if (from == null || from.Deleted || !(obj is Mobile) )
                return;

            if (((Mobile)obj).Player)
            {

                Mobile m_from = from;
                Mobile master = null;
                ArrayList pets = new ArrayList();

                master = (Mobile)obj;

                foreach (Mobile m in World.Mobiles.Values)
                {
                    if (m is BaseCreature)
                    {
                        BaseCreature bc = (BaseCreature)m;

                        if ((bc.Controlled && bc.ControlMaster == master) || (bc.Summoned && bc.SummonMaster == master))
                            pets.Add(bc);
                    }
                }

                m_from.CloseGump(typeof(FollowersGump));
                m_from.SendGump(new FollowersGump(pets, master));
            }
            else if ((Mobile)obj is BaseCreature)
            {
                BaseCreature pet = (BaseCreature)obj;
                if (pet.Controlled && pet.ControlMaster != null)
                {
                    if (pet.ControlMaster == from)
                    {
                        from.SendMessage("Genius!");
                        return;
                    }
                    if (pet.ControlMaster.Map == Map.Internal)
                    {
                        from.SendMessage("The owner of this pet is currently not online.");
                        return;
                    }
                    from.MoveToWorld(pet.ControlMaster.Location , pet.ControlMaster.Map);
                    from.SendMessage("You have been moved to the creatures master: {0}.", pet.ControlMaster.Name);
                }
                else
                {
                    from.SendMessage("That creature is unowned.");
                }
            }
        }
Example #19
0
		public override bool OnMoveOver( Mobile m )
		{
			if ( m.Player )
			{
				if ( Utility.RandomBool() )
					m.MoveToWorld( new Point3D( 6523, 71, -10 ), m.Map );
				
				Delete();
				return false;
			}
			else
				return true;
		}		
Example #20
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( Location, 2 ) )
			{
				if ( !m_Locked && m_Active )
				{
					from.MoveToWorld( m_PointDest, m_MapDest );
					from.SendLocalizedMessage( 1072790 ); // The wall becomes transparent, and you push your way through it.
				}
				else
					from.Say( 502684 ); // This door appears to be locked.
			}
		}
 //public virtual bool AllowMaleWearer { get ;set; }
 public static bool GoEvent(Mobile caller)
 {
     if (SingletonEvent.Instance.IsEventRunning)
     {
         caller.MoveToWorld(SingletonEvent.Instance.CurrentEventLocation, SingletonEvent.Instance.CurrentEventMap);
         return true;
     }
     else
     {
         caller.SendMessage("Nao existe Evento em andamento.");
         return false;
     }
 }
Example #22
0
        public void Target(IPoint3D p, Mobile defender)
        {
            Map map = defender.Map;

            if (this.Parent == null || !(this.Parent is Mobile))
                return;

            Mobile attacker = (Mobile)this.Parent;

            if (p is RecallRune)
            {
                RecallRune rune = (RecallRune)p;

                if (rune.Marked)
                {
                    defender.PublicOverheadMessage(Server.Network.MessageType.Regular, defender.SpeechHue, true, "*the earth trembles and time slows, a small rift appearing and drawing you both into its depth*");
                    attacker.SendMessage("You and your combatant have been sent to the rune\'s location.");

                    defender.MoveToWorld(rune.Target, rune.TargetMap);
                    attacker.MoveToWorld(rune.Target, rune.TargetMap);

                    Effects.PlaySound(defender, map, 510);
                    Effects.SendLocationParticles(defender, 0x37C4, 10, 10, 2023);
                    Effects.PlaySound(attacker, map, 510);
                    Effects.SendLocationParticles(attacker, 0x37C4, 10, 10, 2023);
                }
                else
                    attacker.SendMessage("That is not a valid target.");
            }
            else if (map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z))
            {
                attacker.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (Server.Spells.SpellHelper.CheckMulti(new Point3D(p), map))
            {
                attacker.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (defender.BodyValue != 402 && defender.BodyValue != 403)
            {
                _lastUsed = DateTime.Now;

                Point3D to = new Point3D(p);

                defender.MoveToWorld(to, map);
                defender.ProcessDelta();

                Effects.PlaySound(defender, map, 510);
                Effects.SendLocationParticles(defender, 0x37C4, 10, 10, 2023);
                Effects.SendLocationParticles(EffectItem.Create(to, map, EffectItem.DefaultDuration), 0x37C4, 10, 10, 5023);
            }
        }
        public override void OnDoubleClick(Mobile from)
        {
            if (from != base.Owner || !base.IncludedEntities.Contains(from))
                from.SendMessage("You are not permitted to board this carpet.");

            if (!from.InRange(this.Location, 1))
                from.SendMessage("You must be closer if you wish to board this.");

            if ((from == base.Owner || base.IncludedEntities.Contains(from))
                && from.InRange(this.Location, 1))
            {
                from.MoveToWorld(this.Location, this.Map);
            }
        }
        public override void OnDoubleClick(Mobile from)
        {
            base.OnDoubleClick(from); 
          
            // if (IsChildOf(from.Backpack) && from.InRange(new Point3D(498, 2012, 2), Map.Trammel, 2))
            // if (IsChildOf(from.Backpack) && from (new Point3D(498, 2012, 2), Map.Trammel))
            // I was trying to make the ring only work from a certian location. Gave up and made it spawn where I wanted it to be used. :) 

                        if (from != null) 
            {
                from.MoveToWorld(new Point3D(5256, 1839, 0), Map.Trammel);   
                this.Delete(); 
            }
        }
Example #25
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( this, 2 ) )
			{
				Map map = Map;

				if ( map == Map.Trammel || map == Map.Felucca )
				{
					from.MoveToWorld( new Point3D( 5922, 2024, 0 ), map );
					PublicOverheadMessage( MessageType.Regular, 0x3B2, true, String.Format( "* {0} dives into the hole and disappears!*", from.Name ) ); 
				}
			}
			else
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
		}
        public override void OnDoubleClick( Mobile m )
        {
            if ( !m.InRange( this.GetWorldLocation(), 3 ) )
                return;
            if ( m_Controller.Enabled )
                return;

            if ( (m_Wanderer == null || !m_Wanderer.Alive) )
            {
                m_Wanderer = new WandererOfTheVoid();
                m_Wanderer.MoveToWorld( LeverPuzzleController.lr_Enter, Map.Malas );
                m_Wanderer.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1060002, "" ); // I am the guardian of...
                Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerCallback( CallBackMessage ) );
            }
        }
Example #27
0
		public override void OnDoubleClick( Mobile from )
		{
			if( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack to use it.
			}
			else if( Target == null || Target.Map == null || Target.Map == Map.Internal )
			{
				from.SendMessage( "The target map is unavailable." );
			}
			else
			{
				from.MoveToWorld( Target.Location, Target.Map );
			}
		}
		public override bool OnMoveInto( Mobile m, Direction d, Point3D newLocation, Point3D oldLocation )
		{
			if ( m is IUnjust && !Contains( oldLocation ) )
			{
				IUnjust uj = m as IUnjust;

				if ( uj.HomeMap == null || uj.HomeMap == Map.Internal )
					uj.HomeMap = Map.Felucca;

				m.MoveToWorld( uj.Home, uj.HomeMap );
				return false;
			}

			return true;
		}
		public MonsterNest() : base( 4962 )
		{
			m_NestSpawnType = null;
			Name = "Monster Nest";
			m_Spawn = new ArrayList();
			Weight = 0.1;
			Hue = 1818;
			HitsMax = 300;
			Hits = 300;
			RangeHome = 10;
			RespawnTime = TimeSpan.FromSeconds( 15.0 );
			new InternalTimer( this ).Start();
			new RegenTimer( this ).Start();
			Movable = false;
			m_Entity = new MonsterNestEntity( this );
			m_Entity.MoveToWorld( this.Location, this.Map );
		}
Example #30
0
        public override bool OnMoveOver( Mobile m )
        {
            if ( m.IsPlayer )
            {
                BaseCreature.TeleportPets( m, m_Dest, Map.TerMur );
                m.MoveToWorld( m_Dest, Map.TerMur );

                m.PlaySound( 0x1FE );
                Effects.SendLocationParticles( m, 0x3728, 10, 10, 0x139F );

                // You have been returned to the antechamber of the tomb, directly in front of the Serpent's Breath.
                m.SendLocalizedMessage( 1112182 );

                return false;
            }

            return base.OnMoveOver( m );
        }