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


C# Mobile.PrivateOverheadMessage方法代码示例

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


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

示例1: OnDoubleClick

		public override void OnDoubleClick( Mobile m )
		{
			if ( m.InRange( this, 3 ) ) 
			{
				switch ( ItemID ) 
				{ 
					//do swap or animation here 
					case 10857: //1
					 m.PrivateOverheadMessage( MessageType.Regular, 0x3b2, false, "Hello?", m.NetState );
						ItemID=10858; 
						break;
					case 10858: //2
					m.PrivateOverheadMessage( MessageType.Regular, 0x3b2, false, "What was that?", m.NetState );
						ItemID=10859; 
						break;
					case 10859: //3
					m.PrivateOverheadMessage( MessageType.Regular, 0x3b2, false, "I must be seeing things?", m.NetState );	
						ItemID=10860; 
						break;
					case 10860: //4
						ItemID=10857; 
//						new InternalTimer( this, m ).Start();
						break; 
					default: break; 
				}
			}
			else
			{
				m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:31,代码来源:CreepyPortrait.cs

示例2: OnDoubleClick

		public override void OnDoubleClick( Mobile m )
		{
			if ( m.InRange( this, 3 ) ) 
			{
				switch ( ItemID ) 
				{ 
					//do swap or animation here 
					case 10845: //1
						ItemID=10846;
						m.PrivateOverheadMessage( MessageType.Regular, 0x3b2, false, "What was that?", m.NetState ); 
						break;
					case 10846: //2
						ItemID=10847; 
						break;
					case 10847: //3
						ItemID=10848; 
						break;
					case 10848: //4
						ItemID=10845; 
						break;
					default: break; 
				}
			}
			else
			{
				m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:28,代码来源:DisturbingPortrait.cs

示例3: OnEquip

        public override bool OnEquip(Mobile from)
        {
            if (from.Karma > -5000)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3b2, true, "Your karma is too high to equip this", from.NetState);
                return false;
            }

            if (from.Skills[SkillName.Swords].Base < 100.0)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3b2, true, "You don't know enough about swordfighting to equip this", from.NetState);
                return false;
            }

            return base.OnEquip(from);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:16,代码来源:SoV.cs

示例4: OnDoubleClick

		public override void OnDoubleClick( Mobile m )
		{
			if ( m.InRange( this, 3 ) ) 
			{
				switch ( ItemID ) 
				{ 
					//do swap or animation here 
					case 10861: //1
						ItemID=10862;
						m.PrivateOverheadMessage( MessageType.Regular, 1153, false, "What was that?  It's watching me.", m.NetState ); 
						break;
					case 10862: //2
						ItemID=10863; 
						break;
					case 10863: //3
						ItemID=10864; 
						break;
					case 10864: //4
						ItemID=10861; 
						break;
					default: break; 
				}
			}
			else
			{
				m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:28,代码来源:CreepyPortraitW.cs

示例5: ChangelingDropTarget

        public void ChangelingDropTarget(Mobile from, object obj)
        {
            if (!(obj is HairStrand))
            {
                from.SendMessage("Cela ne servirait à rien de verser le liquide ici");
                return;
            }

            HairStrand targ = (HairStrand)obj;

            if (from.Skills[SkillName.Alchemy].Value < 60)
            {
                from.SendMessage("Vos maigres talents d'alchimistes ne permettraient pas une pareille mixture...");
                return;
            }

            if (!from.CheckTargetSkill(SkillName.Alchemy, targ, 55, 95))
            {
                from.SendMessage("Vous mettez trop de cheveux à l'intérieur, ce qui gâche le mélange...");
                targ.Delete();
                return;
            }

            from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous mélangez doucement le tout et terminez le mélange...", from.NetState);
            GenderPotion potion = new GenderPotion();
            potion.Female = targ.HairOwner.Female;
            from.AddToBackpack(potion);
            this.Delete();
            targ.Delete();
            return;
        }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:31,代码来源:MorphBase.cs

示例6: OnEquip

        public override bool OnEquip(Mobile from)
        {
            if (from.Skills[SkillName.Tactics].Base < 100.0)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3b2, true, "You don't know enough about tactics to equip this", from.NetState);
                return false;
            }

            if (from.Skills[SkillName.Archery].Base < 100.0)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3b2, true, "You don't know enough about archery to equip this", from.NetState);
                return false;
            }

            return base.OnEquip(from);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:16,代码来源:BlackWidow.cs

示例7: OnDoubleClick

		public override void OnDoubleClick( Mobile m )
		{
			if ( m.InRange( this, 3 ) ) 
			{
				switch ( ItemID ) 
				{ 
					//do swap or animation here 
					case 10877: //blank
						ItemID=10878;
						m.PrivateOverheadMessage( MessageType.Regular, 0x3B2, false, "The mirror went blank", m.NetState ); 
						break;
					case 10878: //green
						ItemID=10877; 
						break;
					default: break; 
				}
			}
			else
			{
				m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:22,代码来源:HauntedMirrorW.cs

示例8: DoEffect

        public void DoEffect(Mobile from)
        {
            int effect = Utility.Random(30);

            if (effect <= 30 && effect >= 25)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous terminez la sucette... enfin!", from.NetState);
                from.Say("Sa langue est toute jaune!");
                this.Consume();
                return;
            }

            if (effect <= 23 && effect >= 20)
            {
                from.Say("*Grimace*");
                return;
            }

            if (effect <= 18 && effect >= 15)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*L'acidité du bonbon vous fait frémir*",from.NetState);
                return;
            }

            if (effect <= 13 && effect >= 10)
            {
                from.Say("*Fait cogner le bonbon contre ses dents*");
                return;
            }

            if (effect <= 5 && effect >= 0)
            {
                from.Say("*Slurp!*");
                return;
            }
            return;
        }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:37,代码来源:YellowLollipop.cs

示例9: DoEffect

        public void DoEffect(Mobile from)
        {
            int effect = Utility.Random(30);

            if (effect <= 30 && effect >= 25)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous terminez la sucette...", from.NetState);
                from.Say("Sa langue est toute rouge!");
                this.Consume();
                return;
            }

            if (effect <= 23 && effect >= 20)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*Le goût sucré de la pomme chatouille vos papilles", from.NetState);
                return;
            }

            if (effect <= 18 && effect >= 15)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*Vous salivez abondamment*",from.NetState);
                return;
            }

            if (effect <= 13 && effect >= 10)
            {
                from.Say("*Croque le bonbon, produisant un bruit sourd*");
                return;
            }

            if (effect <= 5 && effect >= 0)
            {
                from.Say("*Lèche bruyamment la sucette*");
                return;
            }
            return;
        }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:37,代码来源:RedLollipop.cs

示例10: DoEffect

        public void DoEffect(Mobile from)
        {
            int effect = Utility.Random(30);

            if (effect <= 30 && effect >= 25)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous terminez la sucette...", from.NetState);
                from.Say("Sa langue est toute verte!");
                this.Consume();
                return;
            }

            if (effect <= 23 && effect >= 20)
            {
                from.Say("*Affiche un large sourire*");
                return;
            }

            if (effect <= 18 && effect >= 15)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*Le goût du melon vous appaise*",from.NetState);
                return;
            }

            if (effect <= 13 && effect >= 10)
            {
                from.Say("*Lèche bruyamment la sucette*");
                return;
            }

            if (effect <= 5 && effect >= 0)
            {
                from.Say("*Joue avec le bâton de la sucette*");
                return;
            }
            return;
        }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:37,代码来源:GreenLollipop.cs

示例11: OnTarget

			protected override void OnTarget(Mobile m, object o)
			{
				IPoint3D p = o as IPoint3D;

				if ( p == null )
					return;

				IPoint3D orig = p;
				Point3D to = new Point3D( p );
				Map map = m_Mobile.Map;

				SpellHelper.GetSurfaceTop(ref p);

				CustomRegion customregion = m.Region as CustomRegion;
				CustomRegion tregion = CustomRegion.Find( to, map ) as CustomRegion;

				if ( m_Owner.AbilityCharges <= 0 )
					m_Mobile.SendMessage( "This is out of charges." );
                else if (o is Item && ((Item)o).Parent != null)
                {
                    GeneralLogging.WriteLine("TeleportRingBuguse",
                        "{0} ({1}/{2} hits, criminal: {3}) tried to teleport target an item inside container {4} using item {5}.",
                        m, m.Hits, m.HitsMax, m.Criminal, ((Item)o).Parent, m_Owner);
                    m.PrivateOverheadMessage(MessageType.Regular, 0x26, false, "This incident has been logged.", m.NetState);
                    m_Owner.Delete();
                    return;
                }
                else if (customregion != null && customregion.Controller != null && customregion.Controller.IsRestrictedSpell(typeof(TeleportSpell)))
					m_Mobile.SendMessage( "You cannot teleport here." );
				else if ( tregion != null && tregion.Controller != null && tregion.Controller.IsRestrictedSpell( typeof( TeleportSpell ) ) )
					m_Mobile.SendMessage( "You cannot teleport there." );
				else if ( PokerDealer.IsPokerPlayer(m_Mobile) >= 0 )
					m_Mobile.SendMessage( "You cannot travel while playing poker." );
				else if ( m_Mobile is PlayerMobile && (((PlayerMobile)m_Mobile).LastTeleTime + TimeSpan.FromSeconds( 3.0 )) > DateTime.Now )
					m_Mobile.SendMessage( "You must wait 3 seconds before using this item again." );
				else if ( Server.Factions.Sigil.ExistsOn(m_Mobile) )
					m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
				else if ( Server.Misc.WeightOverloading.IsOverloaded(m_Mobile) )
					m_Mobile.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
				else if ( !SpellHelper.CheckTravel(m_Mobile, TravelCheckType.TeleportFrom) )
				{
				}
				else if ( !SpellHelper.CheckTravel(m_Mobile, map, to, TravelCheckType.TeleportTo) )
				{
				}
				//Al: Fix for Teleport on SnowPile. Has to be done here because
				//      CanSpawnMobile is a core function.
				else if ( o is SnowPile || o is SnowEventPile )
					m_Mobile.SendLocalizedMessage(501942); // That location is blocked.
				else if ( map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z) )
					m_Mobile.SendLocalizedMessage(501942); // That location is blocked.
				else if ( SpellHelper.CheckMulti(new Point3D(p), map) )
					m_Mobile.SendLocalizedMessage(501942); // That location is blocked.
				else if ( m_Mobile.Alive && m_Mobile.Items.Contains(m_Owner) )
				{
					Server.Spells.SpellHelper.Turn(m_Mobile, orig);

					Point3D from = m.Location;

					m.Location = to;
					m.ProcessDelta();

					if ( m.Player )
					{
						Effects.SendLocationParticles(EffectItem.Create(from, m.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
						Effects.SendLocationParticles(EffectItem.Create(to, m.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
					}
					else
						m.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);

					m.PlaySound(0x1FE);

					if( m is PlayerMobile )
					   ((PlayerMobile)m).LastTeleTime = DateTime.Now;

					m_Owner.AbilityCharges--;
				}
			}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:78,代码来源:BaseJewel.cs

示例12: MOBCLICKMSG

			public static void MOBCLICKMSG(TriggerObject trigObject, Mobile from, Mobile clickedMob, string message)
			{
				if (from != null && clickedMob != null && message != null && from.NetState != null)
				{
					clickedMob.PrivateOverheadMessage(
						MessageType.Label,
						clickedMob.NameHue != -1 ? clickedMob.NameHue : Notoriety.GetHue(Notoriety.Compute(from, clickedMob)),
						Mobile.AsciiClickMessage,
						message,
						from.NetState);
				}
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:12,代码来源:UberScriptFunctions.cs

示例13: OnTarget

            protected override void OnTarget( Mobile from, object targeted )
            {
                if ( targeted is Mobile )
                {
                    from.SendLocalizedMessage( 502816 ); // You feel that such an action would be inappropriate
                }
                else if ( targeted is TrapableContainer )
                {
                    TrapableContainer targ = (TrapableContainer) targeted;

                    from.Direction = from.GetDirectionTo( targ );

                    if ( targ.TrapType == TrapType.None )
                    {
                        from.SendLocalizedMessage( 502373 ); // That doesn't appear to be trapped
                        return;
                    }

                    from.PlaySound( 0x241 );

                    if ( from.CheckTargetSkill( SkillName.RemoveTrap, targ, targ.TrapPower, targ.TrapPower + 30 ) )
                    {
                        switch ( targ.TrapType )
                        {
                            case TrapType.ExplosionTrap:
                                from.LocalOverheadMessage( Network.MessageType.Regular, 0x78, 502374 ); // You carefully remove the trigger for the purple potion.
                                break;
                            case TrapType.DartTrap:
                                from.LocalOverheadMessage( Network.MessageType.Regular, 0x62, 502375 ); // You carefully remove the dart from the firing mechanism.
                                break;
                            case TrapType.PoisonTrap:
                                from.LocalOverheadMessage( Network.MessageType.Regular, 0x44, 502376 ); // The poison leaks harmlessly away due to your deft touch.
                                break;
                            default:
                                from.LocalOverheadMessage( Network.MessageType.Regular, 0x53, 502377 ); // You successfully render the trap harmless
                                break;
                        }

                        targ.TrapEnabled = false;
                        targ.TrapPower = 0;
                        targ.TrapLevel = 0;
                        targ.TrapType = TrapType.None;
                    }
                    else
                    {
                        if ( Utility.RandomDouble() <= 0.2 )
                        {
                            from.SendLocalizedMessage( 502370 ); // Oops.

                            targ.ExecuteTrap( from );
                        }
                        else
                        {
                            from.SendLocalizedMessage( 502371 ); // You breathe a sigh of relief, as you fail to disarm the trap, but don't set it off.
                        }
                    }
                }
                else if ( targeted is BaseFactionTrap )
                {
                    BaseFactionTrap trap = (BaseFactionTrap) targeted;
                    Faction faction = Faction.Find( from );

                    FactionTrapRemovalKit kit = ( from.Backpack == null ? null : from.Backpack.FindItemByType( typeof( FactionTrapRemovalKit ) ) as FactionTrapRemovalKit );

                    bool isOwner = ( trap.Placer == from || ( trap.Faction != null && trap.Faction.IsCommander( from ) ) );

                    if ( faction == null )
                    {
                        from.SendLocalizedMessage( 1010538 ); // You may not disarm faction traps unless you are in an opposing faction
                    }
                    else if ( faction == trap.Faction && trap.Faction != null && !isOwner )
                    {
                        from.SendLocalizedMessage( 1010537 ); // You may not disarm traps set by your own faction!
                    }
                    else if ( !isOwner && kit == null )
                    {
                        from.SendLocalizedMessage( 1042530 ); // You must have a trap removal kit at the base level of your pack to disarm a faction trap.
                    }
                    else
                    {
                        if ( isOwner || ( from.CheckTargetSkill( SkillName.RemoveTrap, trap, 80.0, 100.0 ) && from.CheckTargetSkill( SkillName.Tinkering, trap, 80.0, 100.0 ) ) )
                        {
                            from.PrivateOverheadMessage( MessageType.Regular, trap.MessageHue, trap.DisarmMessage, from.Client );

                            if ( !isOwner )
                            {
                                int silver = faction.AwardSilver( from, trap.SilverFromDisarm );

                                if ( silver > 0 )
                                    from.SendLocalizedMessage( 1008113, true, silver.ToString( "N0" ) ); // You have been granted faction silver for removing the enemy trap :
                            }

                            trap.Delete();
                        }
                        else
                        {
                            from.SendLocalizedMessage( 502372 ); // You fail to disarm the trap... but you don't set it off
                        }

                        if ( !isOwner && kit != null )
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:RemoveTrap.cs

示例14: OnDoubleClick

		public override void OnDoubleClick(Mobile m)
		{
			if (!this.CheckDoubleClick(m, true, false, 2, true) || !(m is PlayerMobile))
			{
				return;
			}

			if (TitleHue == null)
			{
				m.SendMessage(0x22, "This ancient scroll has lost whatever power it once had.");
				m.PrivateOverheadMessage(MessageType.Label, 1287, true, "*The scroll disintegrates in your hands*", m.NetState);

				LoggingCustom.Log("HueScrollsInvalid.txt", String.Format("{0} -> {1} ({2})", m, this, TitleHue));

				Delete();

				return;
			}

			if (!CanConsume((PlayerMobile)m, true))
			{
				return;
			}

			var pm = (PlayerMobile)m;

			TitleProfile p = CustomTitles.EnsureProfile(pm);

			if (p == null)
			{
				return;
			}

			if (_Gump != null)
			{
				_Gump.Close(true);
				_Gump = null;
			}

			_Gump = SuperGump.Send(
				new ScrollConfirmGump(
					pm,
					null,
					TitleHue,
					b => GrantHue(pm, p),
					b =>
					{
						pm.SendMessage(0x55, "You choose to not use the title hue scroll.");
						_Gump = null;
					}));
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:51,代码来源:HueScroll.cs

示例15: AbortAction

            public void AbortAction(Mobile from)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3b2, true, "You fail to produce any wool.", from.NetState);

                if (from is PlayerMobile)
                    ((PlayerMobile)from).EndPlayerAction();

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


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