本文整理汇总了C#中Server.Mobile.NonlocalOverheadMessage方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.NonlocalOverheadMessage方法的具体用法?C# Mobile.NonlocalOverheadMessage怎么用?C# Mobile.NonlocalOverheadMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.NonlocalOverheadMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1040019 ); // The bola must be in your pack to use it.
}
else if ( !from.CanBeginAction( typeof( Bola ) ) )
{
from.SendLocalizedMessage( 1049624 ); // You have to wait a few moments before you can use another bola!
}
else if ( from.Target is BolaTarget )
{
from.SendLocalizedMessage( 1049631 ); // This bola is already being used.
}
else if ( !BasePotion.HasFreeHand( from ) )
{
from.SendMessage( "You need a free hand to throw this." );
}
else if ( from.Mounted )
{
from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
}
else
{
EtherealMount.StopMounting( from );
from.Target = new BolaTarget( this );
from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
}
}
示例2: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1040019 ); // The bola must be in your pack to use it.
}
else if ( !from.CanBeginAction( typeof( Bola ) ) )
{
from.SendLocalizedMessage( 1049624 ); // You have to wait a few moments before you can use another bola!
}
else if ( from.Target is BolaTarget )
{
from.SendLocalizedMessage( 1049631 ); // This bola is already being used.
}
else if ( !HasFreeHands( from ) )
{
from.SendLocalizedMessage( 1040015 ); // Your hands must be free to use this
}
else if ( from.Mounted )
{
from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
}
else if ( Server.Spells.Ninjitsu.AnimalForm.UnderTransformation( from ) )
{
from.SendLocalizedMessage( 1070902 ); // You can't use this while in an animal form!
}
else
{
EtherealMount.StopMounting( from );
from.Target = new BolaTarget( this );
from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
}
}
示例3: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1040019 ); // The bola must be in your pack to use it.
}
else if ( !from.CanBeginAction( typeof( Bola ) ) )
{
from.SendLocalizedMessage( 1049624 ); // You have to wait a few moments before you can use another bola!
}
else if ( from.Target is BolaTarget )
{
from.SendLocalizedMessage( 1049631 ); // This bola is already being used.
}
else if ( from.FindItemOnLayer( Layer.OneHanded ) != null || from.FindItemOnLayer( Layer.TwoHanded ) != null )
{
from.SendLocalizedMessage( 1040015 ); // Your hands must be free to use this
}
else if ( from.Mounted )
{
from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
}
else
{
from.Target = new BolaTarget( this );
from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
}
}
示例4: TossBola
public static void TossBola(Mobile from)
{
if (from == null)
return;
var target = from.Combatant;
if (target == null)
return;
if (!target.Mounted)
return;
from.NonlocalOverheadMessage(MessageType.Emote, 0x3B2, 1049633, from.Name);
// ~1_NAME~ begins to menacingly swing a bola...
from.Direction = from.GetDirectionTo(target);
from.Animate(11, 5, 1, true, false, 0);
from.MovingEffect(target, 0x26AC, 10, 0, false, false);
var mt = target.Mount;
if (mt != null)
{
mt.Rider = null;
target.SendLocalizedMessage(1040023); // You have been knocked off of your mount!
BaseMount.SetMountPrevention(target, BlockMountType.Dazed, TimeSpan.FromSeconds(3.0));
}
}
示例5: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
from.RevealingAction();
if ( targeted is Mobile )
{
if ( targeted is BaseCreature )
{
BaseCreature creature = (BaseCreature)targeted;
if ( !creature.Tamable )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1049655, from.NetState ); // That creature cannot be tamed.
}
else if ( creature.Controlled )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 502804, from.NetState ); // That animal looks tame already.
}
else if ( from.Female && !creature.AllowFemaleTamer )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1049653, from.NetState ); // That creature can only be tamed by males.
}
else if ( !from.Female && !creature.AllowMaleTamer )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1049652, from.NetState ); // That creature can only be tamed by females.
}
else if ( creature is CuSidhe && from.Race != Race.Elf )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 502801, from.NetState ); // You can't tame that!
}
else if ( from.Followers + creature.ControlSlots > from.FollowersMax )
{
from.SendLocalizedMessage( 1049611 ); // You have too many followers to tame that creature.
}
else if ( creature.Owners.Count >= BaseCreature.MaxOwners && !creature.Owners.Contains( from ) )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1005615, from.NetState ); // This animal has had too many owners and is too upset for you to tame.
}
else if ( MustBeSubdued( creature ) )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1054025, from.NetState ); // You must subdue this creature before you can tame it!
}
else if ( CheckMastery( from, creature ) || from.Skills[SkillName.AnimalTaming].Value >= creature.MinTameSkill )
{
FactionWarHorse warHorse = creature as FactionWarHorse;
if ( warHorse != null )
{
Faction faction = Faction.Find( from );
if ( faction == null || faction != warHorse.Faction )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1042590, from.NetState ); // You cannot tame this creature.
return;
}
}
if ( m_BeingTamed.Contains( targeted ) )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 502802, from.NetState ); // Someone else is already taming this.
}
else if ( creature.CanAngerOnTame && 0.95 >= Utility.RandomDouble() )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 502805, from.NetState ); // You seem to anger the beast!
creature.PlaySound( creature.GetAngerSound() );
creature.Direction = creature.GetDirectionTo( from );
if( creature.BardPacified && Utility.RandomDouble() > .24)
{
Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerStateCallback( ResetPacify ), creature );
}
else
{
creature.BardEndTime = DateTime.Now;
}
creature.BardPacified = false;
creature.Move( creature.Direction );
if ( from is PlayerMobile && !(( (PlayerMobile)from ).HonorActive ))
creature.Combatant = from;
}
else
{
m_BeingTamed[targeted] = from;
from.LocalOverheadMessage( MessageType.Emote, 0x59, 1010597 ); // You start to tame the creature.
from.NonlocalOverheadMessage( MessageType.Emote, 0x59, 1010598 ); // *begins taming a creature.*
new InternalTimer( from, creature, Utility.Random( 3, 2 ) ).Start();
m_SetSkillTime = false;
}
}
else
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 502806, from.NetState ); // You have no chance of taming this creature.
}
}
//.........这里部分代码省略.........
示例6: OnDeath
public void OnDeath( Mobile mob, Container corpse )
{
if ( !m_Registered || !m_Started )
return;
DuelPlayer pl = Find( mob );
if ( pl != null && !pl.Eliminated )
{
if ( m_EventGame != null && !m_EventGame.OnDeath( mob, corpse ) )
return;
pl.Eliminated = true;
if ( mob.Poison != null )
mob.Poison = null;
Requip( mob, corpse );
DelayBounce( TimeSpan.FromSeconds( 4.0 ), mob, corpse );
Participant winner = CheckCompletion();
if ( winner != null )
{
Finish( winner );
}
else if ( !m_Yielding )
{
mob.LocalOverheadMessage( MessageType.Regular, 0x22, false, "You have been defeated." );
mob.NonlocalOverheadMessage( MessageType.Regular, 0x22, false, String.Format( "{0} has been defeated.", mob.Name ) );
}
}
}
示例7: OnLocationChanged
public void OnLocationChanged( Mobile mob )
{
if ( !m_Registered || !m_StartedBeginCountdown || m_Finished )
return;
Arena arena = m_Arena;
if ( arena == null )
return;
if ( mob.Map == arena.Facet && arena.Bounds.Contains( mob.Location ) )
return;
DuelPlayer pl = Find( mob );
if ( pl == null || pl.Eliminated )
return;
if ( mob.Map == Map.Internal ) {
// they've logged out
if ( mob.LogoutMap == arena.Facet && arena.Bounds.Contains( mob.LogoutLocation ) ) {
// they logged out inside the arena.. set them to eject on login
mob.LogoutLocation = arena.Outside;
}
}
pl.Eliminated = true;
mob.LocalOverheadMessage( MessageType.Regular, 0x22, false, "You have forfeited your position in the duel." );
mob.NonlocalOverheadMessage( MessageType.Regular, 0x22, false, String.Format( "{0} has forfeited by leaving the dueling arena.", mob.Name ) );
Participant winner = CheckCompletion();
if ( winner != null )
Finish( winner );
}
示例8: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Thorn.Deleted )
return;
if ( !m_Thorn.IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it.
return;
}
if ( !from.CanBeginAction( typeof( GreenThorns ) ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061908 ); // * You must wait a while before planting another thorn. *
return;
}
if ( from.Map != Map.Trammel && from.Map != Map.Felucca )
{
from.LocalOverheadMessage( MessageType.Regular, 0x2B2, true, "No solen lairs exist on this facet. Try again in Trammel or Felucca." );
return;
}
LandTarget land = targeted as LandTarget;
if ( land == null )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061912 ); // * You cannot plant a green thorn there! *
}
else
{
GreenThornsEffect effect = GreenThornsEffect.Create( from, land );
if ( effect == null )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061913 ); // * You sense it would be useless to plant a green thorn there. *
}
else
{
m_Thorn.Consume();
from.LocalOverheadMessage( MessageType.Emote, 0x961, 1061914 ); // * You push the strange green thorn into the ground *
from.NonlocalOverheadMessage( MessageType.Emote, 0x961, 1061915, from.Name ); // * ~1_PLAYER_NAME~ pushes a strange green thorn into the ground. *
from.BeginAction( typeof( GreenThorns ) );
new GreenThorns.EndActionTimer( from ).Start();
effect.Start();
}
}
}
示例9: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
from.RevealingAction();
if ( !Movable )
return;
if ( from.InRange( this.GetWorldLocation(), 1 ) )
{
from.Target = new ThrowTarget( this );
if ( m_Timer == null )
{
from.LocalOverheadMessage( Network.MessageType.Emote, from.SpeechHue, true, "You begin to prepare the Holy Hand Grenade..." );
from.NonlocalOverheadMessage(Network.MessageType.Emote, from.SpeechHue, true, String.Format("{0} begins to prepare a Holy Hand Grenade...", from.Name));
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 5, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 4 } );
}
}
else
{
from.SendLocalizedMessage( 502138 );
}
}
示例10: DoDestroyEquipment
private void DoDestroyEquipment( Mobile target )
{
if ( target.AccessLevel == AccessLevel.Player && InRange( target, 1 ) && 0.25 > Utility.RandomDouble() ) //15% chance
{
List<Item> items = new List<Item>();
for ( int i = 0; i < target.Items.Count; i++ )
{
Item item = target.Items[i];
if ( item is IDurability && !item.Deleted && ((IDurability)item).MaxHitPoints > 0 && item.LootType != LootType.Blessed && item.BlessedFor == null && !(Mobile.InsuranceEnabled && item.Insured) )
items.Add( item );
}
if ( items.Count > 0 )
{
Item toDestroy = items[Utility.Random( items.Count )];
string name = toDestroy.Name;
if ( String.IsNullOrEmpty( name ) )
name = toDestroy.ItemData.Name;
toDestroy.Delete();
target.NonlocalOverheadMessage( MessageType.Regular, 0x3B2, 1080034, name ); // Their ~1_NAME~ is destroyed by the attack.
target.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1080035, name ); // Your ~1_NAME~ is destroyed by the attack.
}
}
}
示例11: OnSingleClick
public override void OnSingleClick( Mobile from )
{
if ( IsLockedDown && Utility.InRange( from.Location, this.Location, 1 ))
{
if ( 25 > Utility.Random( 100 ) )
{
Effects.PlaySound( this.Location, this.Map, 221 );
from.LocalOverheadMessage( Network.MessageType.Emote, from.SpeechHue, true, "*You are bitten by the worm!*" );
from.NonlocalOverheadMessage( Network.MessageType.Emote, from.SpeechHue, true, String.Format( "*{0} is bitten by the worm!*", from.Name ) );
from.Poison = Poison.Deadly;
}
}
base.OnSingleClick(from);
}
示例12: ApplyShock
public void ApplyShock(Mobile m, int tick)
{
if (m == null || !m.Alive || this.Deleted)
{
if (m_DamageTimer != null)
m_DamageTimer.Stop();
}
else
{
int damage = (int)(75 / Math.Max(1, tick - 1)) + Utility.RandomMinMax(1, 9);
AOS.Damage(m, damage, 0, 0, 0, 0, 100);
m.BoltEffect(0);
m.FixedParticles(0x3818, 1, 11, 0x13A8, 0, 0, EffectLayer.CenterFeet);
m.FixedParticles(0x3818, 1, 11, 0x13A8, 0, 0, EffectLayer.Waist);
m.FixedParticles(0x3818, 1, 11, 0x13A8, 0, 0, EffectLayer.Head);
m.PlaySound(0x1DC);
m.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x21, 1114443); // * Your body convulses from electric shock *
m.NonlocalOverheadMessage(Server.Network.MessageType.Regular, 0x21, 1114443, m.Name); // * ~1_NAME~ spasms from electric shock *
}
}
示例13: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendAsciiMessage( "The bola must be in your pack to use it." );
}
else if ( !from.CanBeginAction( typeof( Bola ) ) )
{
from.SendAsciiMessage( "You have to wait a few moments before you can use another bola!" );
}
else if ( from.Target is BolaTarget )
{
from.SendAsciiMessage( "This bola is already being used." );
}
else if ( !Core.AOS && (from.FindItemOnLayer( Layer.OneHanded ) != null || from.FindItemOnLayer( Layer.TwoHanded ) != null) )
{
from.SendAsciiMessage( "Your hands must be free to use this" );
}
else if ( from.Mounted )
{
from.SendAsciiMessage( "You cannot use this while riding a mount." );
}
else
{
EtherealMount.StopMounting( from );
Item one = from.FindItemOnLayer( Layer.OneHanded );
Item two = from.FindItemOnLayer( Layer.TwoHanded );
if ( one != null )
from.AddToBackpack( one );
if ( two != null )
from.AddToBackpack( two );
from.Target = new BolaTarget( this );
from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
}
}
示例14: OnHit
public override void OnHit( Mobile attacker, Mobile defender )
{
if ( !( attacker.Weapon is BaseSword || attacker.Weapon is BaseKnife || attacker.Weapon is BaseAxe || attacker.Weapon is BasePoleArm || attacker.Weapon is BaseSpear ) )
attacker.SendMessage( "This attack cannot be used with that weapon." );
if ( (defender is BaseCreature && ((BaseCreature)defender).BleedImmune) )
{
attacker.SendLocalizedMessage( 1062052 ); // Your target is not affected by the bleed attack!
return;
}
attacker.SendLocalizedMessage( 1060159 ); // Your target is bleeding!
defender.SendLocalizedMessage( 1060160 ); // You are bleeding!
if ( defender is PlayerMobile )
{
defender.LocalOverheadMessage( MessageType.Regular, 0x21, 1060757 ); // You are bleeding profusely
defender.NonlocalOverheadMessage( MessageType.Regular, 0x21, 1060758, defender.Name ); // ~1_NAME~ is bleeding profusely
}
defender.PlaySound( 0x133 );
defender.FixedParticles( 0x377A, 244, 25, 9950, 31, 0, EffectLayer.Waist );
BeginBleed( defender, attacker );
}
示例15: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
from.RevealingAction();
if ( targeted is Mobile )
{
if ( targeted is BaseCreature )
{
BaseCreature creature = (BaseCreature)targeted;
if ( !creature.Tamable )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "That creature cannot be tamed.", from.NetState ); // That creature cannot be tamed.
}
else if ( creature.Controlled )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "That animal looks tame already.", from.NetState ); // That animal looks tame already.
}
else if ( from.Female && !creature.AllowFemaleTamer )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1049653, from.NetState ); // That creature can only be tamed by males.
}
else if ( !from.Female && !creature.AllowMaleTamer )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1049652, from.NetState ); // That creature can only be tamed by females.
}
else if ( from.Followers + creature.ControlSlots > from.FollowersMax )
{
from.SendLocalizedMessage( 1049611 ); // You have too many followers to tame that creature.
}
else if ( creature.Owners.Count >= BaseCreature.MaxOwners && !creature.Owners.Contains( from ) )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "This animal has had too many owners and is too upset for you to tame.", from.NetState ); // This animal has had too many owners and is too upset for you to tame.
}
else if ( MustBeSubdued( creature ) )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "You must subdue this creature before you can tame it!", from.NetState ); // You must subdue this creature before you can tame it!
}
else if (CheckMastery(from, creature) || from.Skills[SkillName.AnimalTaming].Value >= creature.MinTameSkill)
{
FactionWarHorse warHorse = creature as FactionWarHorse;
if ( warHorse != null )
{
Faction faction = Faction.Find( from );
if ( faction == null || faction != warHorse.Faction )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "You cannot tame this creature.", from.NetState ); // You cannot tame this creature.
return;
}
}
if ( m_BeingTamed.Contains( targeted ) )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "Someone else is already taming this.", from.NetState ); // Someone else is already taming this.
}
else if ( creature.CanAngerOnTame && 0.95 >= Utility.RandomDouble() )
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "You seem to anger the beast!", from.NetState ); // You seem to anger the beast!
creature.PlaySound( creature.GetAngerSound() );
creature.Direction = creature.GetDirectionTo( from );
creature.Combatant = from;
}
else
{
m_BeingTamed[targeted] = from;
from.LocalOverheadMessage( MessageType.Emote, 0x59, true, String.Format("*You start to tame {0}.*", creature.Name) ); // You start to tame the creature.
from.NonlocalOverheadMessage(MessageType.Emote, 0x59, true, String.Format("*{0} starts to tame {1}*", from.Name, creature.Name)); // *begins taming a creature.*
new InternalTimer( from, creature, 3 ).Start();
m_SetSkillTime = false;
}
}
else
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "You have no chance of taming this creature.", from.NetState ); // You have no chance of taming this creature.
}
}
else
{
((Mobile)targeted).PrivateOverheadMessage( MessageType.Regular, 0x3B2, true, "That being cannot be tamed.", from.NetState ); // That being cannot be tamed.
}
}
else
{
from.SendAsciiMessage( "You can't tame that!" ); // You can't tame that!
}
}