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;
				
			

		}
示例#2
0
        public static void SimpleFlame(Mobile from, Mobile target, int damage, bool skip)
        {
            if (!CanUse(from, target))
                return;

            if (!skip)
            {
                from.Say("*Ul Flam*");

                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X - 1, from.Y - 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X - 1, from.Y + 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X + 1, from.Y - 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X + 1, from.Y + 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
            }

            new SimpleFlameTimer(from, target).Start();
        }
		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;
		}
示例#4
0
		public override void Abrir( Mobile from )
		{
			if ( RootParent.Equals( from ) )
			{
				Agujero.Visible = true;
				Mybrain.Visible = true;
				from.Say( false, Plague_Texts.Line[14] );
			}
		}
示例#5
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.
			}
		}
示例#6
0
 public override void OnComponentUsed(AddonComponent ac, Mobile from)
  {
      if (!from.InRange(GetWorldLocation(), 2))  
          from.SendMessage("You are too far away.");
      else
      {
          from.Emote("*stirs the brew*");
          from.Say("hihihihiiii!");
          from.PlaySound(32);
          if (!from.Mounted)
              from.Animate(33, 5, 1, true, false, 0);
      }
  }
示例#7
0
        public override bool OnDroppedToMobile( Mobile from, Mobile target )
        {
            if ( !base.OnDroppedToMobile( from, target ) )
                return false;

            if ( target is Parrot )
            {
                int msg = Utility.RandomMinMax( 1072599, 1072607 );

                if ( msg != 1072602 )
                    target.Say( msg );
                else
                    target.Say( msg, m_Towns[Utility.RandomMinMax( 0, m_Towns.Length - 1 )] ); // I just flew in from ~1_CITYNAME~ and boy are my wings tired!

                target.PlaySound( Utility.RandomMinMax( 0xBF, 0xC3 ) );
                Spells.SpellHelper.Turn( target, from );

                Delete();

                return false;
            }

            return true;
        }
示例#8
0
		public override void Drink( Mobile from )
		{
            from.FixedParticles(0x376A, 9, 32, 5007, EffectLayer.Waist);
            from.PlaySound(0x1E3);

            BasePotion.PlayDrinkEffect(from);
           
            from.BodyValue = 0x51;
            if(from.Female)
                from.SendMessage("Trouvez-vous un Prince");
            else
                from.SendMessage("Trouvez-vous une Princesse");
            
            from.Say("*Lâche la potion, une grimace de douleur défigurant son visage*");
            this.Delete();
		}
示例#9
0
		public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
		{
			if ( this.Charges >= 1 && Utility.RandomDouble() <= .25 )
			{
				Map map = this.Map;
				if ( map == null || map == Map.Internal ) return;
				TimeSpan duration = TimeSpan.FromMinutes( 5 );
				EnslavedEntrappedSoul minion = new EnslavedEntrappedSoul( attacker, defender, duration );
				minion.MoveToWorld( defender.Location, defender.Map );
				attacker.Say( "Those I kill become my slaves!" );
				minion.Combatant = defender;
				this.Charges -= 1;
				attacker.Karma -= 25;
			}
			base.OnHit( attacker, defender, damageBonus );
		}
示例#10
0
            protected override void OnTarget(Mobile from, object o)
            {
                if (o is PlayerMobile)
                {
                    Mobile mobile = (Mobile)o;

                    if (from.InRange(mobile, 8))
                    {
                        from.Say("*Murmure à l'oreille de " + mobile.Name + " *");
                        mobile.SendMessage(from.Name + " vous murmure: " + m_text);
                    }
                    else from.SendMessage("Il est trop loin pour vous entendre...");
                }
                else
                    from.SendMessage("Il ne comprend rien à ce que vous lui murmurez!");
            }
示例#11
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( Location, 2 ) )
			{
				BaseHouse house = BaseHouse.FindHouseAt( this );  
				
				if ( house != null && house.IsOwner( from ) )
				{
					from.CloseGump( typeof( RewardDemolitionGump ) );
					from.SendGump( new RewardDemolitionGump( this, 1018329 ) ); // Do you wish to re-deed this skull?
				}
				else
					from.SendLocalizedMessage( 1018328 ); // You can only re-deed a skull if you placed it or you are the owner of the house.
			}
			else
				from.Say( 1019045 ); // I can't reach that.
		}
示例#12
0
		public override void Drink( Mobile from )
		{
            from.FixedParticles(0x376A, 9, 32, 5007, EffectLayer.Waist);
            from.PlaySound(0x1E3);

            BasePotion.PlayDrinkEffect(from);
           
            if (from.Female == this.Female)
            {
                from.SendMessage("Vous buvez le tout et attendez... vous pourriez attendre très longtemps...");
                this.Delete();
                from.AddToBackpack(new AlchemyVial());
                return;
            }
            
            from.Female = this.Female;
            
            from.Say("*Lâche la potion, une grimace de douleur défigurant son visage*");
            this.Delete();
		}
示例#13
0
 public void SayRandomTranslate( Mobile mob, params string[] sentancesInEnglish )
 {
     SaySentance( mob, Utility.RandomMinMax( 2, 3 ) );
     mob.Say( sentancesInEnglish[Utility.Random( sentancesInEnglish.Length )] );
 }
示例#14
0
 public static void Say( Mobile m, object message )
 {
     if ( message is int )
         m.Say( (int) message );
     else if ( message is string )
         m.Say( (string) message );
 }
示例#15
0
        public bool OnSpeech( Mobile mob, Mobile speaker, string text )
        {
            if ( ( m_Flags & IHSFlags.OnSpeech ) == 0 || m_Keywords == null || m_Responses == null || m_KeywordHash == null )
                return false; // not enabled

            if ( !speaker.Alive )
                return false;

            if ( !speaker.InRange( mob, 3 ) )
                return false;

            if ( ( speaker.Direction & Direction.Mask ) != speaker.GetDirectionTo( mob ) )
                return false;

            if ( ( mob.Direction & Direction.Mask ) != mob.GetDirectionTo( speaker ) )
                return false;

            string[] split = text.Split( ' ' );
            List<string> keywordsFound = new List<string>();

            for ( int i = 0; i < split.Length; ++i )
            {
                string keyword;
                m_KeywordHash.TryGetValue( split[i], out keyword );

                if ( keyword != null )
                    keywordsFound.Add( keyword );
            }

            if ( keywordsFound.Count > 0 )
            {
                string responseWord;

                if ( Utility.RandomBool() )
                    responseWord = GetRandomResponseWord( keywordsFound );
                else
                    responseWord = keywordsFound[Utility.Random( keywordsFound.Count )];

                string secondResponseWord = GetRandomResponseWord( keywordsFound );

                StringBuilder response = new StringBuilder();

                switch ( Utility.Random( 6 ) )
                {
                    default:
                    case 0:
                        {
                            response.Append( "Me " ).Append( responseWord ).Append( '?' );
                            break;
                        }
                    case 1:
                        {
                            response.Append( responseWord ).Append( " thee!" );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            break;
                        }
                    case 2:
                        {
                            response.Append( responseWord ).Append( '?' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            break;
                        }
                    case 3:
                        {
                            response.Append( responseWord ).Append( "! " ).Append( secondResponseWord ).Append( '.' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 );
                            break;
                        }
                    case 4:
                        {
                            response.Append( responseWord ).Append( '.' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            break;
                        }
                    case 5:
                        {
                            response.Append( responseWord ).Append( "? " ).Append( secondResponseWord ).Append( '.' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 );
                            break;
                        }
                }

                int maxWords = ( split.Length / 2 ) + 1;

                if ( maxWords < 2 )
                    maxWords = 2;
                else if ( maxWords > 6 )
                    maxWords = 6;

                SaySentance( mob, Utility.RandomMinMax( 2, maxWords ) );
                mob.Say( response.ToString() );

                return true;
            }

            return false;
        }
示例#16
0
			      private static void SayRandom( string[] say, Mobile m ) 
			      { 
			         m.Say( say[Utility.Random( say.Length )] ); 
			      } 
示例#17
0
		public void Libere( Mobile from )
		{
			m_Animal.Blessed = false; // Ajout #01

			/*
			//***Ajout #02 début
			if ( m_Animal.IsBondable && !m_Animal.IsBonded && ( m_Animal.BondingBegin != DateTime.MinValue ) )
			{
				TimeSpan inactive = (TimeSpan)( DateTime.Now - m_Animal.LastStable );
				m_Animal.BondingBegin += inactive;
			}
			m_Animal.LastStable = DateTime.MinValue;
			//***Ajout #02 fin
			 * */

			if ( from == null )
			{
				m_Animal.Tamable = true;
				m_Animal.Controlled = false;
				m_Animal.Loyalty = m_Loyaute;
				m_Animal.AI = m_AI;
				m_Animal.ControlOrder = OrderType.Release;
				m_Animal = null;
			}
			else
			{
				m_Animal.Tamable = true;
				m_Animal.Controlled = true;
				m_Animal.ControlMaster = m_Maitre;
				m_Animal.Loyalty = m_Loyaute;
				m_Animal.AI = m_AI;
				m_Animal.ControlTarget = m_Maitre;
				m_Animal.ControlOrder = OrderType.Follow;
				m_Animal = null;
				from.Say( "*détache sa monture*" );
			}
		}
示例#18
0
		public bool CheckFiringAngle( Point3D p, Mobile from )
		{
			if ( !from.InLOS(p) )
			{
				from.SendLocalizedMessage( 500237 ); // Target cannot be seen.
				return false;
			}
			bool los = false;
			int x = 0;
			int y = 0;
			// Shooting arc only +-45º
			if (m_cannon.Direction == Direction.North && p.Y < Location.Y)
			{
				x = Math.Abs(Location.X - p.X);
				y = Location.Y - p.Y;
				if ( (y - x) >= 0 )
					los = true;
			}
			if (m_cannon.Direction == Direction.South && p.Y > Location.Y)
			{
				x = Math.Abs(Location.X - p.X);
				y = p.Y - Location.Y;
				if ( (y - x) >= 0 )
					los = true;
			}
			if (m_cannon.Direction == Direction.East && p.X > Location.X)
			{
				x = p.X - Location.X;
				y =  Math.Abs(p.Y - Location.Y);
				if ( (x - y) >= 0 )
					los = true;
			}
			if (m_cannon.Direction == Direction.West && p.X < Location.X)
			{
				x = Location.X - p.X;
				Math.Abs(y = p.Y - Location.Y);
				if ( (x - y) >= 0 )
					los = true;
			}
			if ( los )
			{
				Point3D p2 = new Point3D( Location.X, Location.Y, Location.Z + 10);
				if ( from is BaseCannonGuard || (from.Backpack.GetAmount( typeof( CannonBall )) > 0 && from.Backpack.GetAmount( typeof( SulfurousAsh )) > 4 && from.InRange( m_cannon.Location, 3 ) && !from.Mounted) )
				{
					from.Backpack.ConsumeTotal( typeof( SulfurousAsh ), 5 );
					from.Backpack.ConsumeTotal( typeof( CannonBall ), 1 );
					IEntity to;
					to = new Entity( Serial.Zero, new Point3D(p.X, p.Y, p.Z + 5), from.Map );
					IEntity fro;
					fro = new Entity( Serial.Zero, p2, from.Map );
					Effects.SendMovingEffect( fro, to, 0xE73, 1, 0, false, true, 0, 0 );
					Effects.PlaySound(Location,from.Map,519);
					Explode( from, new Point3D(p), from.Map );
					NextShot = DateTime.Now + TimeSpan.FromSeconds(10);// 10 seconds to next time you can fire
					return true;
				}
			    if ( from.Backpack.GetAmount( typeof( CannonBall )) == 0)
			        from.Say("You don't have any cannon balls!");
			    else if ( from.Backpack.GetAmount( typeof( SulfurousAsh )) < 3)
			        from.SendLocalizedMessage( 1049617 ); // You do not have enough sulfurous ash.
			    else if ( from.Mounted )
			        from.SendLocalizedMessage( 1010097 ); // You cannot use this while mounted.
			    else
			        from.Say("You are too far from cannon!");
			}
			else
				from.SendLocalizedMessage( 500237 ); // Target cannot be seen.
			return false;
		}
示例#19
0
        public static void EtherealDrain(Mobile from, Mobile to, int type)
        {
            if (from == null || to == null)
                return;

            if (type == 1)
            {
                from.Say(1042156); //Your power is mine to use as I wish

                var amount = Utility.RandomMinMax(40, 80);
                to.Damage(amount, from);
                from.Hits += (amount/2); //Halved to account for 50% resistance the target may have.
            }
            else if (type == 2)
            {
                from.Say(1042156); //Your power is mine to use as I wish

                var amount = (to.Mana*(100 - Utility.RandomMinMax(50, 90)))/100;
                to.Mana -= amount;
                from.Mana += amount;
            }
            else
            {
                from.Say(1042157); //You shalt go nowhere unless I deem it be so

                var amount = (to.Stam*(100 - Utility.RandomMinMax(50, 100)))/100;
                to.Stam -= amount;
                from.Stam += amount;
            }
        }
示例#20
0
			protected override void OnTarget( Mobile from, object targ )
			{
				if ( !( m_Poteau.Deleted ) )
				{
                    // Scriptiz : on ajoute le fait qu'un double clic délock l'item si on le cible lui même
                    if (targ is PoteauArnachement)
                    {
                        if (targ != m_Poteau)
                        {
                            from.SendMessage("Vous devez cibler le même poteau pour le retirer du sol.");
                            return;
                        }

                        BaseHouse house = BaseHouse.FindHouseAt(m_Poteau.Location, m_Poteau.Map, 16);   // dans la maison

                        if (house == null) house = BaseHouse.FindHouseAt(new Point3D(m_Poteau.X, m_Poteau.Y - 1, m_Poteau.Z), m_Poteau.Map, 16);    // devant la maison
                        if (house == null) house = BaseHouse.FindHouseAt(new Point3D(m_Poteau.X - 1, m_Poteau.Y, m_Poteau.Z), m_Poteau.Map, 16);    // à droite de la maison

                        // pas propriétaire de la maison
                        if (house != null && (!house.IsOwner(from) || !house.IsCoOwner(from)))
                        {
                            from.SendMessage("Vous ne pouvez pas détacher un poteau d'une maison qui ne vous appartient pas.");
                            return;
                        }

                        // Pas de maison trouvée
                        if (house == null)
                            from.SendMessage("Le poteau n'est plus lié a une maison et vous pouvez donc le retirer du sol.");
                        else
                            from.SendMessage("Le poteau a été retiré du sol, vous pouvez désormais le ramasser.");

                        m_Poteau.Movable = true;

                        return;
                    }

					if ( targ is BaseMount || targ is PackHorse || targ is PackLlama )
					{
						BaseCreature creature = targ as BaseCreature;

						if ( ( creature.Controlled && creature.ControlMaster == from ) )
						{
							m_Poteau.Animal = creature;
							m_Poteau.Maitre = from;
							m_Poteau.Loyaute = creature.Loyalty;
							m_Poteau.AI = creature.AI;
                            creature.AI = AIType.AI_None;
							//creature.Controlled = false;
							creature.Tamable = false;
							creature.ControlMaster = null;
							creature.Blessed = true; // Ajout #01

							/*
							//***Ajout #02 début
							if ( creature.IsBondable && !creature.IsBonded && ( creature.BondingBegin != DateTime.MinValue ) )
							{
								creature.LastStable = DateTime.Now;
							}
							//***Ajout #02 fin
							 */

							if ( m_Poteau is PoteauDeVille )
								( (PoteauDeVille)m_Poteau ).TempsRestant = DateTime.Now;
							
							from.Say( "*attache sa monture au poteau*" );
						}
						else if ( creature.AI == AIType.AI_None )
						{
							from.SendMessage( "Cette creature est déjà attachée !" );
						}
						else
						{
							from.SendMessage( "Cette creature n'est pas sous votre controle !" );
						}
					}
					else if ( targ is PlayerMobile )
					{
						Mobile m = (Mobile)targ;

						if ( m == from )
						{
							from.Say( "*a essaye de s'attacher au poteau*" );
						}
						else
						{
							from.Say( "*a essaye d'attacher {0}, mais n'a pas reussi", m.Name );
						}
					}
					else
					{
						from.SendMessage( "Cette creature n'est pas une monture !" );
					}
				}
				return;
			}
		public virtual void Recharge( Mobile from, Mobile guildmaster )
		{			
			if ( from.Backpack != null )
			{
				Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );			
									
				if ( guildmaster != null )
				{
					if ( m_UsesRemaining <= 0 )
					{			
						if ( diamond != null && Banker.Withdraw( from, 100000 ) )
						{							
							diamond.Consume();
							UsesRemaining = 10;			
							guildmaster.Say( 1076165 ); // Your weapon engraver should be good as new!
						}
						else
							guildmaster.Say( 1076167 ); // You need a 100,000 gold and a blue diamond to recharge the weapon engraver.
					}
					else
						guildmaster.Say( 1076164 ); // I can only help with this if you are carrying an engraving tool that needs repair.
				}
				else
				{	
					if ( from.Skills.Tinkering.Value == 0 )
					{
						from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.					
					}
					else if ( from.Skills.Tinkering.Value < 75.0 )
					{		
						from.SendLocalizedMessage( 1076178 ); // Your tinkering skill is too low to fix this yourself.  An NPC tinkerer can help you repair this for a fee.
					}
					else if ( diamond != null )
					{
						diamond.Consume();
						
						if ( Utility.RandomDouble() < from.Skills.Tinkering.Value / 100 )
						{	
							UsesRemaining = 10;			
							from.SendLocalizedMessage( 1076165 ); // Your weapon engraver should be good as new! ?????
						}
						else
							from.SendLocalizedMessage( 1076175 ); // You cracked the diamond attempting to fix the weapon engraver.
					}
					else
						from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.	
				}	
			}		
		}
示例#22
0
 private void UserThere(Mobile m)
 {
     if (m == null)
         return;
     m.Say("I'm Here!");
     m.SendMessage(71, "Thank you for being here!");
     Account mAccount = m.Account as Account;
     if (mAccount != null)
     {
         CommandLogging.WriteLine(m, "{0} {1} {2} ", m.AccessLevel, CommandLogging.Format(m), "Passed AFK Check.");
         string text = String.Format("{0} AFK Check-{1}: Passed! Retries={2}/{3} Seconds={4}/{5}", DateTime.Now, m.Name,m_RetryCount, m_MaxRetries, m_TotalSeconds, m_MaxSeconds);
         mAccount.Comments.Add(new AccountComment("AFK Checker", text));
         if (m_Staff != null && !m_Staff.Deleted && m_Staff.Map != Map.Internal)
         {
             m_Staff.SendMessage(66, "*{0} Passed AFK Check*", m.Name);
             m_Staff.CloseGump(typeof(AFKCancelGump));
         }
     }
 }
示例#23
0
 private void UserAFK(Mobile m)
 {
     if (m == null)
         return;
     m.CloseGump(typeof(AFKCPassPhraseGump));
     m.Say("I'm AFK!");
     Account mAccount = m.Account as Account;
     if (mAccount != null)
     {
         CommandLogging.WriteLine(m, "{0} {1} {2} ", m.AccessLevel, CommandLogging.Format(m), "Failed AFK Check.");
         string text = String.Format("{0} AFK Check-{1}: **Failed** Retries={2}/{3} Seconds={4}/{5}", DateTime.Now, m.Name, m_RetryCount, m_MaxRetries, m_TotalSeconds, m_MaxSeconds);
         mAccount.Comments.Add(new AccountComment("AFK Checker", text));
         if (m_Jail)
             MoveToJail(m);
         else if (m_MoveToMap != null && m_MoveTo != Point3D.Zero)
         {
             m.MoveToWorld(m_MoveTo, m_MoveToMap);
             Effects.SendBoltEffect(m, true, 0);
             Effects.PlaySound(new Point3D(m.X, m.Y, m.Z), m.Map, 0x307);
         }
         if (m_Website != null)
         {
             try { m.LaunchBrowser(m_Website); }
             catch { }
         }
         if (m_Kick)
         {
             m_KickTimer = new KickTimer(m, TimeSpan.FromSeconds(5));
             m_KickTimer.Start();
         }
         if (m_Staff != null && !m_Staff.Deleted && m_Staff.Map != Map.Internal)
         {
             m_Staff.SendMessage(37, "*{0} FAILED AFK Check*", m.Name);
             m_Staff.CloseGump(typeof(AFKCancelGump));
         }
     }
 }
示例#24
0
        public ESound(Mobile pm, int SoundMade)
        {
            switch (SoundMade)
            {
                case 1:
                    pm.PlaySound(pm.Female ? 778 : 1049);
                    pm.Say("*ah!*");
                    break;
                case 2:
                    pm.PlaySound(pm.Female ? 779 : 1050);
                    pm.Say("*ah ha!*");
                    break;
                case 3:
                    pm.PlaySound(pm.Female ? 780 : 1051);
                    pm.Say("*applauds*");
                    break;
                case 4:
                    pm.PlaySound(pm.Female ? 781 : 1052);
                    pm.Say("*blows nose*");
                    if (!pm.Mounted)
                        pm.Animate(34, 5, 1, true, false, 0);
                    break;
                case 5:
                    pm.Say("*bows*");
                    if (!pm.Mounted)
                        pm.Animate(32, 5, 1, true, false, 0);
                    break;
                case 6:
                    pm.PlaySound(pm.Female ? 786 : 1057);
                    pm.Say("*bs cough*");
                    break;
                case 7:
                    pm.PlaySound(pm.Female ? 782 : 1053);
                    pm.Say("*burp!*");
                    if (!pm.Mounted)
                        pm.Animate(33, 5, 1, true, false, 0);
                    break;
                case 8:
                    pm.PlaySound(pm.Female ? 0x310 : 1055);
                    pm.Say("*clears throat*");
                    if (!pm.Mounted)
                        pm.Animate(33, 5, 1, true, false, 0);
                    break;
                case 9:
                    pm.PlaySound(pm.Female ? 785 : 1056);
                    pm.Say("*cough!*");
                    if (!pm.Mounted)
                        pm.Animate(33, 5, 1, true, false, 0);
                    break;
                case 10:
                    pm.PlaySound(pm.Female ? 787 : 1058);
                    pm.Say("*cries*");
                    break;
                case 11:
                    if (!pm.Mounted)
                        Faint(pm as PlayerMobile);
            else pm.Say("*faints*");
                    break;
                case 12:
                    pm.PlaySound(pm.Female ? 792 : 1064);
                    pm.Say("*farts*");
                    break;
                case 13:
                    pm.PlaySound(pm.Female ? 793 : 1065);
                    pm.Say("*gasp!*");
                    break;
                case 14:
                    pm.PlaySound(pm.Female ? 794 : 1066);
                    pm.Say("*giggles*");
                    break;
                case 15:
                    pm.PlaySound(pm.Female ? 795 : 1067);
                    pm.Say("*groans*");
                    break;
                case 16:
                    pm.PlaySound(pm.Female ? 796 : 1068);
                    pm.Say("*growls*");
                    break;
                case 17:
                    pm.PlaySound(pm.Female ? 797 : 1069);
                    pm.Say("*hey!*");
                    break;
                case 18:
                    pm.PlaySound(pm.Female ? 798 : 1070);
                    pm.Say("*hiccup!*");
                    break;
                case 19:
                    pm.PlaySound(pm.Female ? 799 : 1071);
                    pm.Say("*huh?*");
                    break;
                case 20:
                    pm.PlaySound(pm.Female ? 800 : 1072);
                    pm.Say("*kisses*");
                    break;
                case 21:
                    pm.PlaySound(pm.Female ? 801 : 1073);
                    pm.Say("*laughs*");
                    break;
                case 22:
                    pm.PlaySound(pm.Female ? 802 : 1074);
                    pm.Say("*no!*");
                    break;
                case 23:
                    pm.PlaySound(pm.Female ? 803 : 1075);
                    pm.Say("*oh!*");
                    break;
                case 24:
                    pm.PlaySound(pm.Female ? 811 : 1085);
                    pm.Say("*oooh*");
                    break;
                case 25:
                    pm.PlaySound(pm.Female ? 812 : 1086);
                    pm.Say("*oops*");
                    break;
                case 26:
                    pm.PlaySound(pm.Female ? 813 : 1087);
                    pm.Say("*pukes*");
                    if (!pm.Mounted)
                        pm.Animate(32, 5, 1, true, false, 0);
                    Point3D p = new Point3D(pm.Location);
                    switch (pm.Direction)
                    {
                        case Direction.North:
                            p.Y--; break;
                        case Direction.South:
                            p.Y++; break;
                        case Direction.East:
                            p.X++; break;
                        case Direction.West:
                            p.X--; break;
                        case Direction.Right:
                            p.X++; p.Y--; break;
                        case Direction.Down:
                            p.X++; p.Y++; break;
                        case Direction.Left:
                            p.X--; p.Y++; break;
                        case Direction.Up:
                            p.X--; p.Y--; break;
                        default:
                            break;
                    }
                    p.Z = pm.Map.GetAverageZ(p.X, p.Y);

                    bool canFit = Server.Spells.SpellHelper.AdjustField(ref p, pm.Map, 12, false);

                    if (canFit)
                    {
                        Puke puke = new Puke();
                        puke.Map = pm.Map;
                        puke.Location = p;
                    }
                    /*else
                        pm.SendMessage( "your puke won't fit!" ); /* Debug testing */
                    break;
                case 27:
                    pm.PlaySound(315);
                    pm.Say("*punches*");
                    if (!pm.Mounted)
                        pm.Animate(31, 5, 1, true, false, 0);
                    break;
                case 28:
                    pm.PlaySound(pm.Female ? 814 : 1088);
                    pm.Say("*ahhhh!*");
                    break;
                case 29:
                    pm.PlaySound(pm.Female ? 815 : 1089);
                    pm.Say("*shhh!*");
                    break;
                case 30:
                    pm.PlaySound(pm.Female ? 816 : 1090);
                    pm.Say("*sigh*");
                    break;
                case 31:
                    pm.PlaySound(948);
                    pm.Say("*slaps*");
                    if (!pm.Mounted)
                        pm.Animate(11, 5, 1, true, false, 0);
                    break;
                case 32:
                    pm.PlaySound(pm.Female ? 817 : 1091);
                    pm.Say("*ahh-choo!*");
                    if (!pm.Mounted)
                        pm.Animate(32, 5, 1, true, false, 0);
                    break;
                case 33:
                    pm.PlaySound(pm.Female ? 818 : 1092);
                    pm.Say("*sniff*");
                    if (!pm.Mounted)
                        pm.Animate(34, 5, 1, true, false, 0);
                    break;
                case 34:
                    pm.PlaySound(pm.Female ? 819 : 1093);
                    pm.Say("*snore*");
                    break;
                case 35:
                    pm.PlaySound(pm.Female ? 820 : 1094);
                    pm.Say("*spits*");
                    if (!pm.Mounted)
                        pm.Animate(6, 5, 1, true, false, 0);
                    break;
                case 36:
                    pm.PlaySound(792);
                    pm.Say("*sticks out tongue*");
                    break;
                case 37:
                    pm.PlaySound(874);
                    pm.Say("*taps foot*");
                    if (!pm.Mounted)
                        pm.Animate(38, 5, 1, true, false, 0);
                    break;
                case 38:
                    pm.PlaySound(pm.Female ? 821 : 1095);
                    pm.Say("*whistles*");
                    if (!pm.Mounted)
                        pm.Animate(5, 5, 1, true, false, 0);
                    break;
                case 39:
                    pm.PlaySound(pm.Female ? 783 : 1054);
                    pm.Say("*woohoo!*");
                    break;
                case 40:
                    pm.PlaySound(pm.Female ? 822 : 1096);
                    pm.Say("*yawns*");
                    if (!pm.Mounted)
                        pm.Animate(17, 5, 1, true, false, 0);
                    break;
                case 41:
                    pm.PlaySound(pm.Female ? 823 : 1097);
                    pm.Say("*yea!*");
                    break;
                case 42:
                    pm.PlaySound(pm.Female ? 0x338 : 1098);
                    pm.Say("*yells*");
                    break;
            }
        }
示例#25
0
 public void SaySentance( Mobile mob, int wordCount )
 {
     mob.Say( ConstructSentance( wordCount ) );
     mob.PlaySound( m_Sound );
 }
示例#26
0
        public static string FilterText( Mobile m, string s )
        {
            try{

            string filter = "";
            string subOne = "";
            string subTwo = "";
            string subThree = "";
            int index = 0;

            for( int i = 0; i < ChatInfo.Filters.Count; ++i )
            {
                filter = ChatInfo.Filters[i].ToString();

                if ( filter == "" )
                {
                    ChatInfo.Filters.Remove( filter );
                    continue;
                }

                index = s.ToLower().IndexOf( filter );

                if ( index >= 0 )
                {
                    if ( m.AccessLevel == AccessLevel.Player )
                    {
                        if ( !ChatInfo.NoFilterPenalty )
                            m.SendMessage( ChatInfo.GetInfo( m ).SystemColor, "Filter violation detected: " + filter );

                        if ( ChatInfo.FilterBan )
                            ChatInfo.GetInfo( m ).Ban( ChatInfo.FilterBanLength );
                        else if ( ChatInfo.FilterKick )
                        {
                            m.Say( "I've been kicked!" );
                            if ( m.NetState != null ) m.NetState.Dispose();
                        }
                        else if ( ChatInfo.FilterCriminal )
                            m.CriminalAction( false );

                        if ( !ChatInfo.NoFilterPenalty )
                            return "";
                    }

                    subOne = s.Substring( 0, index );
                    subTwo = "";

                    for( int ii = 0; ii < filter.Length; ++ii )
                        subTwo+="*";

                    subThree = s.Substring( index+filter.Length, s.Length-filter.Length-index );

                    s = subOne + subTwo + subThree;

                    i--;
                }
            }

            }catch{ Errors.Report( String.Format( "Filter-> FilterText-> |{0}|", m ) ); }

            return s;
        }
示例#27
0
		public override void OnComponentUsed( AddonComponent c, Mobile from )
			{
				if ( from.InRange( Location, 2 ) )
				{
				BaseHouse house = BaseHouse.FindHouseAt( this );  
				
						if ( house != null && house.IsOwner( from ) )
						{
						from.CloseGump( typeof( RewardDemolitionGump ) );
						from.SendGump( new RewardDemolitionGump( this, 1049783 ) ); // Do you wish to re-deed this decoration?
					}
					else
					from.SendLocalizedMessage( 1049784 ); // You can only re-deed this decoration if you are the house owner or originally placed the decoration.
				}
				else
				from.Say( 1019045 ); // I can't reach that.
			}
示例#28
0
		public ESound( Mobile pm, int SoundMade )
		{
            Timer t = (Timer)m_Table[pm];

            if (t != null)
                return;

            t = Timer.DelayCall(TimeSpan.FromSeconds(4.0), new TimerStateCallback(RemoveEmote), pm);
            m_Table[pm] = t;
//*** End edit ***\\

			switch( SoundMade )
			{
				case 1:
					pm.PlaySound( pm.Female ? 778 : 1049 );
					pm.Say( "*ah!*" );
					break;
				case 2:
					pm.PlaySound( pm.Female ? 779 : 1050 );
					pm.Say( "*ah ha!*" );
					break;
				case 3:
					pm.PlaySound( pm.Female ? 780 : 1051 );
					pm.Say( "*applauds*" );
					break;
				case 4:
					pm.PlaySound( pm.Female ? 781 : 1052 );
					pm.Say( "*blows nose*" );
					if ( !pm.Mounted )
						pm.Animate( 34, 5, 1, true, false, 0 );
					break;
				case 5:
					pm.Say( "*bows*" );
					if ( !pm.Mounted )
						pm.Animate( 32, 5, 1, true, false, 0 );
					break;
				case 6:
					pm.PlaySound( pm.Female ? 786 : 1057 );
					pm.Say( "*bs cough*" );
					break;
				case 7:
					pm.PlaySound( pm.Female ? 782 : 1053 );
					pm.Say( "*burp!*" );
					if ( !pm.Mounted )
						pm.Animate( 33, 5, 1, true, false, 0 );
					break;
				case 8:
					pm.PlaySound( pm.Female ? 748 : 1055 );
					pm.Say( "*clears throat*" );
					if ( !pm.Mounted )
						pm.Animate( 33, 5, 1, true, false, 0 );
					break;
				case 9:
					pm.PlaySound( pm.Female ? 785 : 1056 );
					pm.Say( "*cough!*" );
					if ( !pm.Mounted )
						pm.Animate( 33, 5, 1, true, false, 0 );
					break;
				case 10:
					pm.PlaySound( pm.Female ? 787 : 1058 );
					pm.Say( "*cries*" );
					break;
				case 11:
					pm.PlaySound( pm.Female ? 791 : 1063 );
					pm.Say( "*faints*" );
					if ( !pm.Mounted )
						pm.Animate( 22, 5, 1, true, false, 0 );
					break;
				case 12:
					pm.PlaySound( pm.Female ? 792 : 1064 );
					pm.Say( "*farts*" );
					break;
				case 13:
					pm.PlaySound( pm.Female ? 793 : 1065 );
					pm.Say( "*gasp!*" );
					break;
				case 14:
					pm.PlaySound( pm.Female ? 794 : 1066 );
					pm.Say( "*giggles*" );
					break;
				case 15:
					pm.PlaySound( pm.Female ? 795 : 1067 );
					pm.Say( "*groans*" );
					break;
				case 16:
					pm.PlaySound( pm.Female ? 796 : 1068 );
					pm.Say( "*growls*" );
					break;
				case 17:
					pm.PlaySound( pm.Female ? 797 : 1069 );
					pm.Say( "*hey!*" );
					break;
				case 18:
					pm.PlaySound( pm.Female ? 798 : 1070 );
					pm.Say( "*hiccup!*" );
					break;
				case 19:
					pm.PlaySound( pm.Female ? 799 : 1071 );
					pm.Say( "*huh?*" );
					break;
				case 20:
					pm.PlaySound( pm.Female ? 800 : 1072 );
					pm.Say( "*kisses*" );
					break;
				case 21:
					pm.PlaySound( pm.Female ? 801 : 1073 );
					pm.Say( "*laughs*" );
					break;
				case 22:
					pm.PlaySound( pm.Female ? 802 : 1074 );
					pm.Say( "*no!*" );
					break;
				case 23:
					pm.PlaySound( pm.Female ? 803 : 1075 );
					pm.Say( "*oh!*" );
					break;
				case 24:
					pm.PlaySound( pm.Female ? 811 : 1085 );
					pm.Say( "*oooh*" );
					break;
				case 25:
					pm.PlaySound( pm.Female ? 812 : 1086 );
					pm.Say( "*oops*" );
					break;
				case 26:
					pm.PlaySound( pm.Female ? 813 : 1087 );
					pm.Say( "*pukes*" );
		            		if ( !pm.Mounted )
              					pm.Animate( 32, 5, 1, true, false, 0 );
//*** Edit by Sunny ***\\
                        //    Point3D p = new Point3D( pm.Location );
                        //    switch (pm.Direction)
                        //    {
                        //        case Direction.North:
                        //            p.Y--; break;
                        //        case Direction.South:
                        //            p.Y++; break;
                        //        case Direction.East:
                        //            p.X++; break;
                        //        case Direction.West:
                        //            p.X--; break;
                        //        case Direction.Right:
                        //            p.X++; p.Y--; break;
                        //        case Direction.Down:
                        //            p.X++; p.Y++; break;
                        //        case Direction.Left:
                        //            p.X--; p.Y++; break;
                        //        case Direction.Up:
                        //            p.X--; p.Y--; break;
                        //        default:
                        //            break;
                        //    }
                        //p.Z = pm.Map.GetAverageZ( p.X, p.Y );

                        //    Puke puke = new Puke();
                        //    puke.Map = pm.Map;
                        //    puke.Location = p;
//*** End edit ***\\
					break;
				case 27:
					pm.PlaySound( 315 );
					pm.Say( "*punches*" );
					if ( !pm.Mounted )
						pm.Animate( 31, 5, 1, true, false, 0 );
					break;
				case 28:
					pm.PlaySound( pm.Female ? 814 : 1088 );
					pm.Say( "*ahhhh!*" );
					break;
				case 29:
					pm.PlaySound( pm.Female ? 815 : 1089 );
					pm.Say( "*shhh!*" );
					break;
				case 30:
					pm.PlaySound( pm.Female ? 816 : 1090 );
					pm.Say( "*sigh*" );
					break;
				case 31:
					pm.PlaySound( 948 );
					pm.Say( "*slaps*" );
					if ( !pm.Mounted )
						pm.Animate( 11, 5, 1, true, false, 0 );
					break;
				case 32:
					pm.PlaySound( pm.Female ? 817 : 1091 );
					pm.Say( "*ahh-choo!*" );
					if ( !pm.Mounted )
						pm.Animate( 32, 5, 1, true, false, 0 );
					break;
				case 33:
					pm.PlaySound( pm.Female ? 818 : 1092 );
					pm.Say( "*sniff*" );
					if( !pm.Mounted )
						pm.Animate( 34, 5, 1, true, false, 0 );
					break;
				case 34:
					pm.PlaySound( pm.Female ? 819 : 1093 );
					pm.Say( "*snore*" );
					break;
				case 35:
					pm.PlaySound( pm.Female ? 820 : 1094 );
					pm.Say( "*spits*" );
					if ( !pm.Mounted )
						pm.Animate( 6, 5, 1, true, false, 0 );
					break;
				case 36:
					pm.PlaySound( 792 );
					pm.Say( "*sticks out tongue*" );
					break;
				case 37:
					pm.PlaySound( 874 );
					pm.Say( "*taps foot*" );
					if ( !pm.Mounted )
						pm.Animate( 38, 5, 1, true, false, 0 );
					break;
				case 38:
					pm.PlaySound( pm.Female ? 821 : 1095 );
					pm.Say( "*whistles*" );
					if ( !pm.Mounted )
						pm.Animate( 5, 5, 1, true, false, 0 );
					break;
				case 39:
					pm.PlaySound( pm.Female ? 783 : 1054 );
					pm.Say( "*woohoo!*" );
					break;
				case 40:
					pm.PlaySound( pm.Female ? 822 : 1096 );
					pm.Say( "*yawns*" );
					if ( !pm.Mounted )
						pm.Animate( 17, 5, 1, true, false, 0 );
					break;
				case 41:
					pm.PlaySound( pm.Female ? 823 : 1097 );
					pm.Say( "*yea!*" );
					break;
				case 42:
					pm.PlaySound( pm.Female ? 823 : 1098 );
					pm.Say( "*yells*" );
					break;
			}
		}
示例#29
0
        public override void OnLocationChanged( Mobile m, Point3D oldLocation )
        {
            base.OnLocationChanged( m, oldLocation );

            if ( m.IsPlayer )
            {
                if ( m_Maze.HasTrap( m.Location ) )
                {
                    switch ( Utility.Random( 5 ) )
                    {
                        default:
                        case 0:
                            {
                                AOS.Damage( m, Utility.RandomMinMax( 70, 90 ), 0, 100, 0, 0, 0 );

                                Effects.SendPacket( m.Location, m.Map, new GraphicalEffect( EffectType.FixedXYZ, Serial.Zero, Serial.Zero, 0x3709, m.Location, m.Location, 10, 30, true, false ) );
                                Effects.PlaySound( m.Location, m.Map, 0x54 );

                                m.LocalOverheadMessage( MessageType.Regular, 238, 1010524, "" ); // Searing heat scorches thy skin.

                                break;
                            }
                        case 1:
                            {
                                AOS.Damage( m, Utility.RandomMinMax( 60, 80 ), 0, 0, 100, 0, 0 );

                                Effects.PlaySound( m.Location, m.Map, 0x223 );

                                m.LocalOverheadMessage( MessageType.Regular, 98, 1010525, "" ); // Pain lances through thee from a sharp metal blade.

                                break;
                            }
                        case 2:
                            {
                                AOS.Damage( m, Utility.RandomMinMax( 55, 75 ), 0, 0, 0, 0, 100 );

                                Effects.SendPacket( m.Location, m.Map, new GraphicalEffect( EffectType.Lightning, m.Serial, Serial.Zero, 0, m.Location, m.Location, 0, 0, false, false ) );
                                Effects.SendPacket( m.Location, m.Map, new ParticleEffect( EffectType.FixedFrom, m.Serial, Serial.Zero, 0, m.Location, m.Location, 0, 0, false, false, 0, 0, 0x13A7, 0, 0, m.Serial, (int) Layer.Shoes, 0 ) );
                                Effects.PlaySound( m.Location, m.Map, 0x29 );

                                m.LocalOverheadMessage( MessageType.Regular, 218, 1010526, "" ); // Lightning arcs through thy body.

                                break;
                            }
                        case 3:
                            {
                                m.ApplyPoison( m, Poison.Deadly );

                                Effects.SendPacket( m.Location, m.Map, new GraphicalEffect( EffectType.FixedXYZ, Serial.Zero, Serial.Zero, 0x113A, m.Location, m.Location, 10, 20, true, false ) );
                                Effects.PlaySound( m.Location, m.Map, 0x231 );

                                m.LocalOverheadMessage( MessageType.Regular, 68, 1010523, "" ); // A toxic vapor envelops thee.

                                break;
                            }
                        case 4:
                            {
                                Point3D location1 = m.Location;
                                location1.Z = 49;

                                Point3D location2 = m.Location;
                                location2.Z = -1;

                                Effects.SendPacket( m, m.Map, new HuedEffect( EffectType.Moving, Serial.Zero, m.Serial, 0x11B7, location1, location2, 20, 0, true, true, 0, 0 ) );
                                Effects.PlaySound( new Point3D( m.X, m.Y, -1 ), m.Map, m.Female ? 0x14B : 0x154 );
                                Effects.PlaySound( new Point3D( m.X, m.Y, -1 ), m.Map, 0x307 );

                                m.Send( new AsciiMessage( Serial.MinusOne, 0xFFFF, MessageType.Label, 0x66D, 3, "", "A speeding rock hits you in the head!" ) );

                                AOS.Damage( m, Utility.RandomMinMax( 60, 80 ), 100, 0, 0, 0, 0 );

                                m.SendLocalizedMessage( 502382 ); // You can move!

                                if ( Utility.RandomBool() )
                                {
                                    Effects.SendPacket( m, m.Map, new GraphicalEffect( EffectType.FixedXYZ, Serial.Zero, Serial.Zero, 0x36BD, new Point3D( m.X, m.Y, 0 ), new Point3D( m.X, m.Y, 0 ), 20, 10, true, false ) );
                                    Effects.SendPacket( m, m.Map, new GraphicalEffect( EffectType.FixedFrom, m.Serial, Serial.Zero, 0x36BD, new Point3D( m.X, m.Y, -1 ), new Point3D( m.X, m.Y, -1 ), 20, 10, true, false ) );

                                    for ( int k = 0; k < 5; k++ )
                                    {
                                        Effects.SendPacket( m, m.Map, new GraphicalEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0x1363 + Utility.Random( 0, 11 ), new Point3D( m.X, m.Y, 0 ), new Point3D( m.X, m.Y, 0 ), 5, 0, false, false ) );

                                        Effects.PlaySound( new Point3D( m.X, m.Y, -1 ), m.Map, 0x13F );
                                        Effects.PlaySound( new Point3D( m.X, m.Y, -1 ), m.Map, 0x154 );
                                    }

                                    AOS.Damage( m, Utility.RandomMinMax( 40, 60 ), 100, 0, 0, 0, 0 );

                                    m.Say( "OUCH!" );
                                    m.Send( new AsciiMessage( Serial.MinusOne, 0xFFFF, MessageType.Label, 0x66D, 3, "", "You are pinned down by the weight of the boulder!!!" ) );
                                }

                                break;
                            }
                    }
                }
                else if ( m.Backpack.FindItemByType<GoldenCompass>( false ) != null )
                {
                    m.CloseGump( typeof( CompassGump ) );
                    m.SendGump( new CompassGump( m_Maze.GetCompassDirection( m.Location ) ) );
                }
            }
        }
        public override void OnComponentUsed(AddonComponent ac, Mobile from)
        {
            if (!from.InRange(GetWorldLocation(), 2))
                from.SendMessage("You are too far away.");
            else
            {
                if (0.20 >= Utility.RandomDouble())
                {
                    from.SendMessage("As you raise the water bucket from the well you notice a fishing net!");
                    from.AddToBackpack(new SpecialFishingNet());
                }

                else
                {
                    switch (Utility.Random(5))
                    {
                        default:
                        case 0:
                            {
                                from.Say("You lower the bucket into the well and draw up some cool, fresh water.");
                                from.PlaySound(0x4E);
                                break;
                            }
                        case 1:
                            {
                                from.Say("I wouldnt worry about the frog SPIT, but you dont want to think about what else it does in here.");
                                from.PlaySound(0x4E);
                                break;
                            }

                        case 2:
                            {
                                from.Say("Hey... You ever gonna get this corpse out of here? Its smelling up the place..");
                                from.PlaySound(0x4E);
                                break;
                            }

                        case 3:
                            {
                                from.Say("Frog ate most of the flies, but.. what ate half the frog?");
                                from.PlaySound(0x4E);
                                break;
                            }
                        case 4:
                            {
                                from.Say("Best Artesian water around... yep.. those Artesians are always *watering* in here...");
                                from.PlaySound(0x4E);
                                break;
                            }
                    }
                }
            }
        }