当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.PublicOverheadMessage方法代码示例

本文整理汇总了C#中Mobile.PublicOverheadMessage方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.PublicOverheadMessage方法的具体用法?C# Mobile.PublicOverheadMessage怎么用?C# Mobile.PublicOverheadMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.PublicOverheadMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( !from.InRange( GetWorldLocation(), 2 ) || !from.InLOS( this ) )
			{
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
			}
			else if ( Visible && ( ItemID == 4656 || ItemID == 4702 ) && DateTime.Now >= m_NextUse )
			{
				Point3D p = GetWorldLocation();

				if ( 1 > Utility.Random( Math.Max( Math.Abs( from.X - p.X ), Math.Abs( from.Y - p.Y ) ) ) )
				{
					Effects.PlaySound( from.Location, from.Map, from.GetHurtSound() );
					from.PublicOverheadMessage( MessageType.Regular, from.SpeechHue, true, "Ouch!" );
					SpellHelper.Damage( TimeSpan.FromSeconds( 0.5 ), from, Utility.Dice( 2, 10, 5 ) );
				}

				Effects.PlaySound( GetWorldLocation(), Map, 0x387 );

				Timer.DelayCall( TimeSpan.FromSeconds( 0.25 ), new TimerCallback( Down1 ) );
				Timer.DelayCall( TimeSpan.FromSeconds( 0.50 ), new TimerCallback( Down2 ) );

				Timer.DelayCall( TimeSpan.FromSeconds( 5.00 ), new TimerCallback( BackUp ) );

				m_NextUse = DateTime.Now + TimeSpan.FromSeconds( 10.0 );
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:27,代码来源:Guillotine.cs

示例2: PokerMessage

		public void PokerMessage( Mobile from, string message )
		{
			from.PublicOverheadMessage( Server.Network.MessageType.Regular, 0x9A, true, message );

			for ( int i = 0; i < m_Players.Count; ++i )
				if ( m_Players[i].Mobile != null )
					m_Players[i].Mobile.SendMessage( 0x9A, "[{0}]: {1}", from.Name, message );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:8,代码来源:PokerGame.cs

示例3: OnDoubleClick

 public override void OnDoubleClick(Mobile from)
 {
     if (from.EquipItem(this) || IsChildOf(from))
     {
         from.PlaySound(0x166);
         from.PublicOverheadMessage(MessageType.Emote, 33, true, "*The Daemon claws demand a soul*");
         from.BeginTarget(-1, true, TargetFlags.None, OnTarget);
     }
     else
         from.SendAsciiMessage("You must equip the claws to use them");
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:11,代码来源:DaemonClaws.cs

示例4: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if( from.InRange( this, 2 ) && m_Tent != null )
			{
				if( from == m_Owner || IsFriend( from ) || m_Tent.Bounds.Contains( from ) || from.AccessLevel >= AccessLevel.GameMaster )
				{
					if( ItemID == 0x1F7 )
					{
						ItemID = 0x1F6;
						X += 1;
						Y -= 1;

						FlapTimer timer = new FlapTimer( this );
						timer.Start();

						from.PublicOverheadMessage( MessageType.Regular, from.EmoteHue, false, "*unclasps the tent flap*" );
					}
					else if( ItemID == 0x1F6 )
					{
						ItemID = 0x1F7;
						X -= 1;
						Y += 1;

						from.PublicOverheadMessage( MessageType.Regular, from.EmoteHue, false, "*closes the flap*" );
					}
				}
				else
				{
					from.SendMessage( "This is not your tent." );
				}
			}
			else
			{
				from.SendMessage( "That is too far away." );
			}
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:36,代码来源:TentFlap.cs

示例5: OnDoubleClick

		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 ) );
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:15,代码来源:LeverPuzzleItems.cs

示例6: OnHit

        public override void OnHit(Mobile attacker, Mobile defender)
        {
            CustomRegion cR = defender.Region as CustomRegion;

            if (cR == null || cR.Controller.AllowSpecialAttacks)
            {
                if (Utility.Random(20) <= 2) // 10% chance of scoring a critical hit
                {
                    attacker.SendAsciiMessage("You poison your target!");
                    defender.PublicOverheadMessage(MessageType.Emote, 34, false, string.Format("*{0} suddenly feels very ill*", defender.Name));
                    defender.ApplyPoison(attacker, Poison.GetPoison(0));
                    new InternalTimer(defender).Start();
                }
            }

            base.OnHit(attacker, defender);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:17,代码来源:BlackWidow.cs

示例7: OnDoubleClick

	    public override void OnDoubleClick( Mobile from )
		{
			// Fill the Mobile with FillFactor
			if( Food.FillHunger( from, 4 ) )
			{
				// Play a random "eat" sound
				from.PlaySound( Utility.Random( 0x3A, 3 ) );

				if( from.Body.IsHuman && !from.Mounted )
					from.Animate( 34, 5, 1, true, false, 0 );

				if( Owner != null )
					from.PublicOverheadMessage( MessageType.Emote, 0x22, true, string.Format( "*You see {0} eat some {1}*", from.Name, Name ) );

				Consume();
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:17,代码来源:Heart.cs

示例8: OnHit

        public override void OnHit(Mobile attacker, Mobile defender)
        {
            CustomRegion cR = defender.Region as CustomRegion;

            if (cR == null || cR.Controller.AllowSpecialAttacks)
            {
                if (Utility.Random(20) <= 2) // 10% chance of scoring a critical hit
                {
                    attacker.SendAsciiMessage("You score a critical hit!");
                    defender.PublicOverheadMessage(MessageType.Emote, 34, false, string.Format("*Critical hit!*"));
                    defender.BoltEffect(0);
                    defender.Hits -= 10;
                }
            }

            base.OnHit(attacker, defender);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:17,代码来源:JudgementHammer.cs

示例9: OnDoubleClick

	    public override void OnDoubleClick(Mobile from)
	    {
            if (ParentEntity != null && ParentEntity == from)
	        {
                from.PublicOverheadMessage(MessageType.Label, 54, true, "*You see " + from.Name + " rubbing his bracelet furiously*");
	            int range = Utility.RandomMinMax(5, 7);
	            int zOffset = from.Mounted ? 20 : 10;

	            Point3D src = from.Location.Clone3D(0, 0, zOffset);
	            var points = src.GetAllPointsInRange(from.Map, 0, range);

	            Effects.PlaySound(from.Location, from.Map, 0x19C);

	            Timer.DelayCall(
	                TimeSpan.FromMilliseconds(100),
	                () =>
	                {
	                    foreach (Point3D trg in points)
	                    {
	                        int bloodID = Utility.RandomMinMax(4650, 4655);

                            new MovingEffectInfo(src, trg.Clone3D(0, 0, 2), from.Map, bloodID, 1152).MovingImpact(
	                            info =>
	                            {
	                                var blood = new Blood
	                                {
	                                    ItemID = bloodID,
                                        Hue = 1153
	                                };
	                                blood.MoveToWorld(info.Target.Location, info.Map);

	                                Effects.PlaySound(info.Target, info.Map, 0x028);
	                            });
	                    }
	                });
	        }
            else if (ParentEntity == null || from != ParentEntity)
            {
                from.SendMessage(54, "You must be wearing this to use it.");
                return;
            }
	        base.OnDoubleClick(from);
	    }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:43,代码来源:BindingofPleasure.cs

示例10: OnMoveOver

		public override bool OnMoveOver( Mobile m )
		{
			if( Active )
			{
				if( !Creatures && !m.Player )
					return true;

				double totalSkills = m.Skills[SkillName.Swords].Base + m.Skills[SkillName.Fencing].Base + m.Skills[SkillName.Parry].Base + m.Skills[SkillName.Tactics].Base + m.Skills[SkillName.Macing].Base + m.Skills[SkillName.Wrestling].Base + m.Skills[SkillName.Healing].Base + m.Skills[SkillName.Archery].Base + m.Skills[SkillName.Anatomy].Base + m.Skills[SkillName.Magery].Base;

				if( ( totalSkills <= 500.0 ) || ( m.AccessLevel > AccessLevel.Player ) )
				{
					StartTeleport( m );
					return false;
				}
				else
                    m.PublicOverheadMessage(MessageType.Regular, 906, true, string.Format("Your skill exceeds the level acceptable to enter this area."));
			}
			return true;
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:19,代码来源:NewbieDungeonTeleporter.cs

示例11: OnHit

        public override void OnHit(Mobile attacker, Mobile defender)
        {
            CustomRegion cR = defender.Region as CustomRegion;

            if (cR == null || cR.Controller.AllowSpecialAttacks)
            {
                if (Utility.Random(28) <= 2) // 7% chance of scoring a critical hit
                {
                    attacker.SendAsciiMessage("You score a critical hit!");
                    defender.PublicOverheadMessage(MessageType.Emote, 34, false, string.Format("*Critical hit!*"));
                    defender.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                    defender.PlaySound(283);

                    int damage = 15;

                    #region Damage based on AR
                    if (defender is PlayerMobile)
                    {
                        int basedamage = damage;
                        damage = (damage * 4) - (int)defender.ArmorRating - 5;

                        //Minimum damage 15
                        if (damage < basedamage)
                            damage = basedamage;

                        //Maximum damage 30
                        if (damage > 30)
                            damage = 30;
                    }
                    else //Always deal maxdamage when fighting monsters
                        damage = 30;
                    #endregion

                    defender.Hits -= damage;
                }
            }
            
            base.OnHit(attacker, defender);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:39,代码来源:HellsHalberd.cs

示例12: OnDoubleClickDead

        public override void OnDoubleClickDead(Mobile from)
        {
            if (!from.Alive && from is PlayerMobile)
            {
                ((PlayerMobile)from).ForceResurrect();
                CommandLogging.WriteLine(from, "Refreshing and resurrecting " + from.Name);
            }
            else if (!from.Alive)
            {
                from.Resurrect();
                CommandLogging.WriteLine(from, "Refreshing and resurrecting " + from.Name);
            }

            CommandLogging.WriteLine(from, "Refreshing but not resurrecting " + from.Name);

            from.PublicOverheadMessage(MessageType.Regular, from.SpeechHue, true, "I've been refreshed.");

            from.Hits = from.HitsMax;
            from.Stam = from.StamMax;
            from.Mana = from.ManaMax;
            from.CurePoison(from);
        }
开发者ID:rberiot,项目名称:imaginenation,代码行数:22,代码来源:RefreshStone.cs

示例13: Eat

		public virtual bool Eat( Mobile from )
		{
			// Fill the Mobile with FillFactor
			if ( FillHunger( from, m_FillFactor ) )
			{
				// Play a random "eat" sound
				from.PlaySound( Utility.Random( 0x3A, 3 ) );

                from.PublicOverheadMessage(MessageType.Emote, 0x22, true, string.Format("*You see {0} eating some {1}*", from.Name, Name==null ? CliLoc.LocToString(LabelNumber) : Name));

				if ( from.Body.IsHuman && !from.Mounted )
					from.Animate( 34, 5, 1, true, false, 0 );

				if ( m_Poison != null )
					from.ApplyPoison( m_Poisoner, m_Poison );

				Consume();

				return true;
			}

			return false;
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:23,代码来源:Food.cs

示例14: CheckLift

		public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
		{
			if (item.GetSavedFlag(0x01)) //Not lootable
			{
				reject = LRReason.CannotLift;
				from.PublicOverheadMessage(MessageType.Regular, 33, false, "[Looting] Attempted to loot sticky item!");
				return false;
			}

			if (!base.CheckLift(from, item, ref reject))
			{
				return false;
			}

			return CanLoot(from, item);
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:16,代码来源:Corpse.cs

示例15: InternalTimer

                public InternalTimer(Mobile tamer, BaseCreature creature, int count)
                    : base(TimeSpan.FromSeconds(3.0), TimeSpan.FromSeconds(3.0), count)
                {
                    m_Tamer = tamer;
                    m_Creature = creature;
                    m_MaxCount = count;
                    m_Paralyzed = creature.Paralyzed;
                    m_StartTime = DateTime.Now;
                    Priority = TimerPriority.TwoFiftyMS;

                    if (tamer is PlayerMobile)
                        ((PlayerMobile)tamer).ResetPlayerAction(this);

                    m_Tamer.RevealingAction();
                    string msg = "";

                    switch (Utility.Random(3))
                    {
                        case 0:
                            if (!string.IsNullOrEmpty(m_Creature.Name))
                                msg = string.Format("I always wanted {0} like you.", m_Creature.Name);
                            else
                                msg = CliLoc.LocToString(502790);
                            break;

                        case 1:
                            if (!string.IsNullOrEmpty(m_Creature.Name))
                                msg = string.Format("Good {0}.", m_Creature.Name);
                            else
                                msg = CliLoc.LocToString(1005608);
                            break;

                        case 2:
                            if (!string.IsNullOrEmpty(m_Creature.Name))
                                msg = string.Format("Here {0}.", m_Creature.Name);
                            else
                                msg = CliLoc.LocToString(1010593);
                            break;

                        case 3:
                            if (!string.IsNullOrEmpty(m_Creature.Name))
                                msg = string.Format("I won't hurt you");
                            else
                                msg = CliLoc.LocToString(1010593);
                            break;
                    }

                    SpellHelper.Turn(m_Tamer, m_Creature);
                    m_Tamer.PublicOverheadMessage(MessageType.Regular, 906, true, msg);

                }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:51,代码来源:AnimalTaming.cs


注:本文中的Mobile.PublicOverheadMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。