本文整理汇总了C#中Server.Mobile.LocalOverheadMessage方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.LocalOverheadMessage方法的具体用法?C# Mobile.LocalOverheadMessage怎么用?C# Mobile.LocalOverheadMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.LocalOverheadMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.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 = this.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!" );
Spells.SpellHelper.Damage( TimeSpan.FromSeconds( 0.5 ), from, Utility.Dice( 2, 10, 5 ) );
}
Effects.PlaySound( this.GetWorldLocation(), this.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 );
}
}
示例2: Drink
public override void Drink( Mobile from )
{
if ( from.Hits < from.HitsMax )
{
if ( from.Poisoned || MortalStrike.IsWounded( from ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x22, 1005000 ); // You can not heal yourself in your current state.
}
else
{
if ( from.BeginAction( typeof( BaseHealPotion ) ) )
{
DoHeal( from );
PlayDrinkEffect( from );
this.Consume();
Timer.DelayCall( TimeSpan.FromSeconds( Delay ), new TimerStateCallback( ReleaseHealLock ), from );
}
else
{
from.LocalOverheadMessage( MessageType.Regular, 0x22, 500235 ); // You must wait 10 seconds before using another healing potion.
}
}
}
else
{
from.SendLocalizedMessage( 1049547 ); // You decide against drinking this potion, as you are already at full health.
}
}
示例3: Abrir
public override void Abrir( Mobile from )
{
PlagueBeastLord m = RootParent as PlagueBeastLord;
if ( m == null ) return;
from.Direction = from.GetDirectionTo( m );
if ( Abierto )
{
from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[21] );
}
else
{
from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[22] );
from.PlaySound( 0x248 );
from.PlaySound( 0x2AC );
Agujero.Visible = true;
base.Abrir( from );
//Si no hay cerebro, la herida empieza a sangrar directamente
if ( HoldBrain == BrainTypes.Brain_None )
{
PlagueBrain pb = Mybrain as PlagueBrain;
pb.Sangrar( from );
}
}
}
示例4: OnDoubleClick
public override void OnDoubleClick( Mobile m )
{
if ( !m.InRange( this, 2 ) )
{
m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
return;
}
if ( RaisableItem != null && RaisableItem.Deleted )
RaisableItem = null;
Flip();
if ( RaisableItem != null )
{
if ( RaisableItem.IsRaisable )
{
RaisableItem.Raise();
m.LocalOverheadMessage( MessageType.Regular, 0x5A, true, "You hear a grinding noise echoing in the distance." );
}
else
{
m.LocalOverheadMessage( MessageType.Regular, 0x5A, true, "You flip the switch again, but nothing happens." );
}
}
}
示例5: CambiaGland
public void CambiaGland( Mobile from, Item glandula )
{
if ( Glandula.RootParent.Equals( RootParent ) )
from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[18] );
if ( Gland_Colocada )
from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[19] );
if ( ( !Gland_Colocada ) && ( !Glandula.RootParent.Equals( RootParent ) ) ) //Si la glandula mala se sacó del bicho...
{
Suborgano.Hue = Hue;
Patas1.Hue = Hue;
Patas2.Hue = Hue;
Patas3.Hue = Hue;
Gland_Colocada = true;
glandula.Movable = false;
Agujero.Visible = true;
base.Abrir( from );
from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[20] );
//Si no hay cerebro, la herida empieza a sangrar directamente
if ( HoldBrain == BrainTypes.Brain_None )
{
PlagueBrain pb = Mybrain as PlagueBrain;
pb.Sangrar( from );
}
}
}
示例6: 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.LocalOverheadMessage( MessageType.Regular, 0x33, true, "Select the container you want to dump items INTO.");
from.Target = new PackToTarget( from, xx );
}
else
{
from.LocalOverheadMessage( MessageType.Regular, 0x22, true, "The container to dump FROM must be in your main backpack or BE your main backpack.");
}
}
else
{
from.LocalOverheadMessage( MessageType.Regular, 0x22, true, "That is not a container!");
}
}
示例7: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (from.InRange(this.GetWorldLocation(), 2))
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1071159); // Select the hitching post you want to supply hitching rope.
from.Target = new InternalTarget(this);
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
}
示例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 )
{
if ( !from.InRange( Location, 2 ) )
{
// I can't reach that.
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 );
}
else if ( from is PlayerMobile && ( (PlayerMobile) from ).SacredQuest )
{
// You cannot think of any reason to want to do this.
from.SendLocalizedMessage( 1080538 );
}
else if ( from.Backpack != null )
{
from.DropHolding();
Item key = from.Backpack.FindItemByType( KeyType );
if ( key != null )
{
// You are already carrying a copy of this key fragment.
from.SendLocalizedMessage( 1111653 );
}
else
{
from.PlaceInBackpack( (Item) Activator.CreateInstance( KeyType ) );
// You reach for the key and receive a glowing copy that you place in your bag.
from.SendLocalizedMessage( 1111652 );
}
}
}
示例10: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
if ( from == targeted )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500910 ); // Hmm, that person looks really silly.
}
else if ( targeted is TownCrier )
{
((TownCrier)targeted).PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500907, from.NetState ); // He looks smart enough to remember the news. Ask him about it.
}
else if ( targeted is BaseVendor && ((BaseVendor)targeted).IsInvulnerable )
{
((BaseVendor)targeted).PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500909, from.NetState ); // That person could probably calculate the cost of what you buy from them.
}
else if ( targeted is Mobile )
{
Mobile targ = (Mobile)targeted;
int marginOfError = Math.Max( 0, 20 - (int)(from.Skills[SkillName.EvalInt].Value / 5) );
int intel = targ.Int + Utility.RandomMinMax( -marginOfError, +marginOfError );
int curmana = targ.Mana;
if ( targ.ManaMax == 0 ) //Mongbats
curmana = 1;
int mana = ((curmana * 100) / Math.Max( targ.ManaMax, 1 )) + Utility.RandomMinMax( -marginOfError, +marginOfError );
int intMod = intel / 10;
int mnMod = mana / 10;
if ( intMod > 10 ) intMod = 10;
else if ( intMod < 0 ) intMod = 0;
if ( mnMod > 10 ) mnMod = 10;
else if ( mnMod < 0 ) mnMod = 0;
int body;
if ( targ.Body.IsHuman )
body = targ.Female ? 11 : 0;
else
body = 22;
if ( from.CheckTargetSkill( SkillName.EvalInt, targ, 0.0, 120.0 ) )
{
targ.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1038169 + intMod + body, from.NetState ); // He/She/It looks [slighly less intelligent than a rock.] [Of Average intellect] [etc...]
if ( from.Skills[SkillName.EvalInt].Base >= 76.0 )
targ.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1038202 + mnMod, from.NetState ); // That being is at [10,20,...] percent mental strength.
}
else
{
targ.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1038166 + (body / 11), from.NetState ); // You cannot judge his/her/its mental abilities.
}
}
else if ( targeted is Item )
{
((Item)targeted).SendLocalizedMessageTo( from, 500908, "" ); // It looks smarter than a rock, but dumber than a piece of wood.
}
}
示例11: Use
public override bool Use( Mobile from ) {
Faction ourFaction = Faction.Find( from );
bool used = false;
foreach ( Mobile mob in from.GetMobilesInRange( 8 ) ) {
if ( mob.Player && !mob.Alive && from.InLOS( mob ) ) {
if ( Faction.Find( mob ) != ourFaction ) {
continue;
}
BaseHouse house = BaseHouse.FindHouseAt( mob );
if ( house == null || ( house.IsFriend( from ) || house.IsFriend( mob ) ) ) {
Faction.ClearSkillLoss( mob );
mob.SendGump( new ResurrectGump( mob, from, ResurrectMessage.Generic ) );
used = true;
}
}
}
if ( used ) {
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2219, false, "The urn shatters as you invoke its power." );
from.PlaySound( 64 );
Effects.PlaySound( from.Location, from.Map, 1481 );
}
return used;
}
示例12: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( this.Parent != null || !this.VerifyMove( from ) )
return;
if ( !from.InRange( this, 2 ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, true, "I can't reach that." ); // I can't reach that.
return;
}
if ( this.ItemID == 0xA57 ) // rolled
{
Direction dir = PlayerMobile.GetDirection4( from.Location, this.Location );
if ( dir == Direction.North || dir == Direction.South )
this.ItemID = 0xA55;
else
this.ItemID = 0xA56;
}
else // unrolled
{
this.ItemID = 0xA57;
if ( !from.HasGump( typeof( LogoutGump ) ) )
{
CampfireEntry entry = Campfire.GetEntry( from );
if ( entry != null && entry.Safe )
from.SendGump( new LogoutGump( entry, this ) );
}
}
}
示例13: OnComponentUsed
public override void OnComponentUsed( AddonComponent c, Mobile from )
{
if ( from.InRange( Location, 2 ) )
{
if ( Utility.RandomBool() )
{
from.Location = Location;
Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( Activate ), new object[] { c, from } );
}
else
from.LocalOverheadMessage( MessageType.Regular, 0, 501777 ); // Hmm... you suspect that if you used this again, it might hurt.
}
else
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
}
示例14: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
Direction dir;
if ( from.Location != this.Location )
dir = from.GetDirectionTo( this );
else if ( this.East )
dir = Direction.West;
else
dir = Direction.North;
from.Direction = dir;
bool canThrow = true;
if ( !from.InRange( this, 4 ) || !from.InLOS( this ) )
canThrow = false;
else if ( this.East )
canThrow = ( dir == Direction.Left || dir == Direction.West || dir == Direction.Up );
else
canThrow = ( dir == Direction.Up || dir == Direction.North || dir == Direction.Right );
if ( canThrow )
Throw( from );
else
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
}
示例15: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( Utility.InRange( Location, from.Location, 2 ) )
Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x562, 0x564 ) );
else
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
}