當前位置: 首頁>>代碼示例>>C#>>正文


C# Mobile.PrivateOverheadMessage方法代碼示例

本文整理匯總了C#中Server.Mobile.PrivateOverheadMessage方法的典型用法代碼示例。如果您正苦於以下問題:C# Mobile.PrivateOverheadMessage方法的具體用法?C# Mobile.PrivateOverheadMessage怎麽用?C# Mobile.PrivateOverheadMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobile的用法示例。


在下文中一共展示了Mobile.PrivateOverheadMessage方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnTarget

		protected override void OnTarget( Mobile from, object o )
		{
			if(o is Container)
			{
				Container xx = o as Container;

//				if (xx is QuestHolder)
//				{
//					from.LocalOverheadMessage( MessageType.Regular, 0x22, true, "Trying to dump into a Questbook is an exploit. Your Account has been flagged."); 
//	                  ((Account)from.Account).SetTag( "QuestExploit", "true"); 
//					return;
//				}

				// Container that is either in a pack or a child thereof
				if ( xx.IsChildOf( from.Backpack) || xx == from.Backpack)
				{
//					from.PublicOverheadMessage( MessageType.Regular, 0x33, true, "Select the container you want to dump items INTO.");
					from.PrivateOverheadMessage( MessageType.Regular, 0x34, true, "Select the container you want to dump items INTO.", from.NetState);
					from.Target = new PackToTarget( from, xx );
				}
				else
				{
//					from.PublicOverheadMessage( MessageType.Regular, 0x22, true, "The container to dump FROM must be in your main backpack or BE your main backpack.");
					from.PrivateOverheadMessage( MessageType.Regular, 0x22, true, "The container to dump FROM must be in your main backpack or BE your main backpack.", from.NetState);
				}
			}
			else
			{
//				from.PublicOverheadMessage( MessageType.Regular, 0x22, true, "That is not a container!");
				from.PrivateOverheadMessage( MessageType.Regular, 0x22, true, "That is not a container!", from.NetState);
			}
		}
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:32,代碼來源:Dump.cs

示例2: OnTarget

            protected override void OnTarget( Mobile from, object o )
            {
                if ( o is Mobile )
                {
                    // It appears to be:
                    from.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1041349, ( (Mobile) o ).Name, from.Client );
                }
                else if ( !from.CheckTargetSkill( SkillName.ItemID, o, 0, 100 ) )
                {
                    // You have no idea how much it might be worth.
                    from.SendLocalizedMessage( 1041352 );
                }
                else if ( o is Item )
                {
                    Item item = o as Item;

                    // TODO (SA): Display the value of the item
                    // TODO (SA): When should we show this message? "You conclude that item cannot be magically unraveled. The magic in that item has been weakened due to either low durability or the imbuing process." (1111877)

                    if ( item is IImbuable )
                    {
                        UnravelInfo info = Unraveling.GetUnravelInfo( from, item );

                        if ( info == null )
                        {
                            // You conclude that item cannot be magically unraveled. It appears to possess little to no magic.
                            from.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1111876, from.Client );
                        }
                        else
                        {
                            if ( from.Skills[SkillName.Imbuing].Value >= info.MinSkill )
                            {
                                // You conclude that item will magically unravel into: ~1_ingredient~
                                from.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1111874, String.Format( "#{0}", info.Name.ToString() ), from.Client );
                            }
                            else
                            {
                                // Your Imbuing skill is not high enough to identify the imbuing ingredient.
                                from.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1111875, from.Client );
                            }
                        }
                    }
                    else
                    {
                        // You conclude that item cannot be magically unraveled.
                        from.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1111878, from.Client );
                    }
                }
                else
                {
                    // You have no idea how much it might be worth.
                    from.SendLocalizedMessage( 1041352 );
                }
            }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:54,代碼來源:ItemIdentification.cs

示例3: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {
            if (!from.InRange(this, 1))
            {
                SendLocalizedMessageTo(from, 1076766); // That is too far away.
                return;
            }

            from.RevealingAction();

            if (0.025 > Utility.RandomDouble())
            {
                from.AddToBackpack(new RareSerpentEgg());
                from.SendLocalizedMessage(1112581); // You reach in and find a rare serpent egg!!
            }
            else
            {
                switch (Utility.Random(3))
                {
                    case 0:
                        {
                            from.SendLocalizedMessage(1112578); // You try to reach the eggs, but the hole is too deep.

                            break;
                        }
                    case 1:
                        {
                            from.SendLocalizedMessage(1112579); // You reach in but clumsily destroy the eggs inside the nest.
                            this.Collapse(from);

                            break;
                        }
                    case 2:
                        {
                            from.SendLocalizedMessage(1112580); // Beware! You've hatched the eggs!!
                            this.HatchEggs(from);

                            from.PrivateOverheadMessage(MessageType.Regular, 33, 1112940, from.NetState); // Your hand remains stuck!!!
                            from.Frozen = true;

                            Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerCallback(
                                delegate
                                {
                                    from.Frozen = false;
                                    from.PrivateOverheadMessage(MessageType.Regular, 65, 1112941, from.NetState); // You manage to free your hand!
                                }));

                            break;
                        }
                }
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:52,代碼來源:SerpentNest.cs

示例4: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( m is BaseCreature && ((BaseCreature)m).IsAnimatedDead )
			{
				Caster.SendLocalizedMessage( 1061654 ); // You cannot heal that which is not alive.
			}
			else if ( m.IsDeadBondedPet )
			{
				Caster.SendLocalizedMessage( 1060177 ); // You cannot heal a creature that is already dead!
			}
            else if (m is Golem || (m is BaseCreature &&
                (((BaseCreature)m).Pseu_CanBeHealed == false || ((BaseCreature)m).ChampSpawn != null)))
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500951 ); // You cannot heal that.
			}
			else if ( m.Poisoned && !m.IsT2A|| Server.Items.MortalStrike.IsWounded( m ) )
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 );
			}
			else if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				// Algorithm: (40% of magery) + (1-10)

				int toHeal = Utility.Random( 1, 10 ) + (int)(Caster.Skills[SkillName.Magery].Value * 0.4);

				int healmessage = Math.Min( m.HitsMax - m.Hits, toHeal );

				if ( healmessage > 0 )
				{
					m.PrivateOverheadMessage( MessageType.Regular, 0x42, false, healmessage.ToString(), m.NetState );
					if ( Caster != m )
						m.PrivateOverheadMessage( MessageType.Regular, 0x42, false, healmessage.ToString(), Caster.NetState );
				}

				Caster.DoBeneficial( m );
				SpellHelper.Heal( toHeal, m, Caster );

				m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
				m.PlaySound( 0x202 );
			}

			FinishSequence();
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:49,代碼來源:GreaterHeal.cs

示例5: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            if ( !from.InRange( this.GetWorldLocation(), 1 ) )
            {
                from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500446 ); //That is too far away
                return;
            }

            if ( from.Hidden )
            {
                from.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "You can not use that while hidden", from.Client );
                return;
            }

            if ( m_Controller != null && m_Controller.CanActive )
            {
                if ( m_Controller.Code.Length < 4 )
                {
                    m_Controller.Code += m_Code;

                    if ( ItemID == 0x108E )
                        ItemID = 0x108C;
                    else if ( ItemID == 0x108C )
                        ItemID = 0x108E;

                    Effects.PlaySound( Location, Map, 0x3E8 );
                }
            }
            else
            {
                from.SendLocalizedMessage( 1060001 ); // You throw the switch, but the mechanism cannot be engaged again so soon.
            }
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:33,代碼來源:PuzzleLever.cs

示例6: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            if ( Empty )
            {
                // A foggy memory is recalled and you have to ask yourself, "Why is the Pungent Brew always gone?"
                from.PrivateOverheadMessage( Network.MessageType.Regular, 0x3B2, 1113610, from.Client );
            }
            else
            {
                from.PlaySound( Utility.RandomList( 0x30, 0x2D6 ) );

                from.BAC = 60;
                BaseBeverage.CheckHeaveTimer( from );

                if ( !m_Table.ContainsKey( from ) )
                {
                    from.SendLocalizedMessage( 1095139 ); // Flint wasn't kidding. This brew is strong!

                    InternalTimer t = m_Table[from] = new InternalTimer( from );
                    t.Start();
                }
                else
                {
                    InternalTimer t = m_Table[from];
                    t.Counter = 20;
                }

                Empty = true;
            }
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:30,代碼來源:BottleOfPungentBrew.cs

示例7: Run

        public static bool Run(Mobile Attacker, Mobile Defender, BaseWeapon Weapon, ref int BaseDamage)
        {
            Effects.SendLocationParticles(EffectItem.Create(Defender.Location, Defender.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042);
            Effects.PlaySound(Defender, Defender.Map, 0x201);

            bool Summoned = false;

            if (Defender is BaseCreature)
            {
                BaseCreature Creature = Defender as BaseCreature;
                Summoned = Creature.Summoned;
                if (Summoned)
                {
                    if(Attacker.NetState != null)
                        Attacker.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x03B2, true,
                            "Your weapon causes the creature to dissipate on impact!", Attacker.NetState);

                    Creature.Delete();
                    return true;
                }
            }

            ZuluUtil.WipeMods(Defender);

            Defender.Mana = 0;

            if (Weapon.DamageLevel == WeaponDamageLevel.Regular)
                BaseDamage += ZuluCombat.GetDamageLevel(WeaponDamageLevel.Devastation);

            return true;
        }
開發者ID:notsentient,項目名稱:RunZHA,代碼行數:31,代碼來源:BlackrockHitscript.cs

示例8: OnSkillUse

 public override bool OnSkillUse(Mobile m, int Skill)
 {
     switch (Skill)
     {
         case (int)SkillName.Peacemaking:
             m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, m_sCantUseSkillMsg, m.NetState);
             return false;
         case (int)SkillName.Provocation:
             m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, m_sCantUseSkillMsg, m.NetState);
             return false;
         case (int)SkillName.Discordance:
             m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, m_sCantUseSkillMsg, m.NetState);
             return false;
     }
     return true;
 }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:16,代碼來源:CursedCaveRegion.cs

示例9: FizzleStrangely

 public void FizzleStrangely(Mobile m)
 {
     m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "The spell fizzles strangely.", m.NetState);
     m.FixedParticles(0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist);
     m.FixedEffect(0x3735, 6, 30);
     m.PlaySound(0x5C);
 }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:7,代碼來源:CursedCaveRegion.cs

示例10: OnDoubleClick

		public override void OnDoubleClick(Mobile from)
        {
			Item n = from.Backpack.FindItemByType(typeof(Curd));
            if (n != null)
            {
				from.AddToBackpack(new BowlofWhey());
                n.Delete();
                Delete();
                from.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Finally I have the bowl of curds and whey for the child! Now I must quickly return to her.", from.NetState);
            
            }
            else
            {
                from.PrivateOverheadMessage(MessageType.Regular, 1153, false, "You must have a curd", from.NetState);
            }
		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:16,代碼來源:EmptyCurdBowl.cs

示例11: Carve

        public void Carve(Mobile from, Item item)
        {
            if (from.IsHallucinated || from.Poisoned)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, true, "Vous ne pouvez cueillir convenablement dans cet état", from.NetState);
                return;
            }
            if (DateTime.Now < m_NextHarvestTime)
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, true, "Il n'y a pas assez de spores à récolter", from.NetState);
                return;
            }
            
            from.SendMessage("Vous cueillez le champignon"); 
            from.AddToBackpack(new HallucinogenMushroom());

            HarvestTime = DateTime.Now + TimeSpan.FromHours(Utility.RandomMinMax(2,10)); // TODO: Proper time delay
        }
開發者ID:greeduomacro,項目名稱:vivre-uo,代碼行數:18,代碼來源:HallucinogenTrap.cs

示例12: OnDoubleClick

		public override void OnDoubleClick(Mobile from)
		{
			if ( !IsChildOf( from.Backpack ) )
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			else
			{
				from.PrivateOverheadMessage( 0, 1154, false,  "Choose the beeswax you wish to melt or target the pot to empty it.", from.NetState );
				BeginAdd( from );
			}
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:10,代碼來源:LargeWaxPot.cs

示例13: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( m is Golem )
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500951 ); // You cannot heal that.
			}
			else if ( m.Poisoned || Server.Items.MortalStrike.IsWounded( m ) )
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 );
			}
			else if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				// Algorithm: (10% of magery) + (1-5)

				int toHeal = (int)(Caster.Skills[SkillName.Magery].Value * 0.1);
				toHeal += Utility.Random( 1, 5 );

				int healmessage = Math.Min( m.HitsMax - m.Hits, toHeal );

				m.Heal( toHeal );

				if ( healmessage > 0 )
				{
					m.PrivateOverheadMessage( MessageType.Regular, 0x42, false, healmessage.ToString(), m.NetState );
					if ( Caster != m )
						m.PrivateOverheadMessage( MessageType.Regular, 0x42, false, healmessage.ToString(), Caster.NetState );
				}

				m.FixedParticles( 0x376A, 9, 32, 5005, EffectLayer.Waist );
				m.PlaySound( 0x1F2 );
			}

			FinishSequence();
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:40,代碼來源:Heal.cs

示例14: DoHeal

		public void DoHeal( Mobile from )
		{
			int min = Scale( from, MinHeal );
			int max = Scale( from, MaxHeal );

			int toHeal = Utility.RandomMinMax( min, max );

			int healmessage = Math.Min( from.HitsMax - from.Hits, toHeal );

			from.Heal( toHeal );

			if ( healmessage > 0 )
				from.PrivateOverheadMessage( MessageType.Regular, 0x42, false, healmessage.ToString(), from.NetState );
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:14,代碼來源:BaseHealPotion.cs

示例15: OnDoubleClick

 public override void OnDoubleClick(Mobile from)
 {
     Item nm = from.Backpack.FindItemByType(typeof(AncientScroll1));
     if (nm != null)
     {
         from.AddToBackpack(new AncientScroll3());
         nm.Delete();
         Delete();
     }
     else
     {
         from.PrivateOverheadMessage(MessageType.Regular, 1153, false, "You lack the other peice to combine with this", from.NetState);
     }
 }
開發者ID:greeduomacro,項目名稱:unknown-shard-1,代碼行數:14,代碼來源:AncientScroll2.cs


注:本文中的Server.Mobile.PrivateOverheadMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。