本文整理汇总了C#中Server.Mobile.RevealingAction方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.RevealingAction方法的具体用法?C# Mobile.RevealingAction怎么用?C# Mobile.RevealingAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.RevealingAction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
from.RevealingAction();
if ( targeted is BaseCreature && from.CanBeHarmful( (Mobile) targeted, true ) )
{
BaseCreature creature = (BaseCreature) targeted;
if ( !m_Instrument.IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1062488 ); // The instrument you are trying to play is no longer in your backpack!
}
else if ( creature.Controlled )
{
from.SendLocalizedMessage( 501590 ); // They are too loyal to their master to be provoked.
}
else if ( creature.IsParagon && BaseInstrument.GetBaseDifficulty( creature ) >= 160.0 )
{
from.SendLocalizedMessage( 1049446 ); // You have no chance of provoking those creatures.
}
else
{
from.RevealingAction();
m_Instrument.PlayInstrumentWell( from );
from.SendLocalizedMessage( 1008085 ); // You play your music and your target becomes angered. Whom do you wish them to attack?
from.Target = new InternalSecondTarget( from, m_Instrument, creature );
}
}
else
{
from.SendLocalizedMessage( 501589 ); // You can't incite that!
}
}
示例2: OnUse
public static TimeSpan OnUse(Mobile m)
{
m.RevealingAction();
m.Target = new InternalTarget();
m.RevealingAction();
m.SendAsciiMessage("Select the map upon which to draw.");
return TimeSpan.FromSeconds(10.0);
}
示例3: OnUse
public static TimeSpan OnUse( Mobile m )
{
m.RevealingAction();
m.Target = new InternalTarget();
m.RevealingAction();
m.SendLocalizedMessage( 500397 ); // To whom do you wish to grovel?
return TimeSpan.FromHours( 6.0 );
}
示例4: OnUse
public static TimeSpan OnUse( Mobile m )
{
m.RevealingAction();
m.Target = new InternalTarget();
m.RevealingAction();
if ( !m_DisableMessage )
m.SendLocalizedMessage( 502789 ); // Tame which animal?
return TimeSpan.FromHours( 6.0 );
}
示例5: OnUse
public static TimeSpan OnUse( Mobile m )
{
if ( !m.Hidden )
{
m.SendLocalizedMessage( 502725 ); // You must hide first
}
else if ( m.Skills[SkillName.Hiding].Base < 30.0 )
{
m.SendLocalizedMessage( 502726 ); // You are not hidden well enough. Become better at hiding.
m.RevealingAction();
}
else if ( !m.CanBeginAction( typeof( Stealth ) ) )
{
m.SendLocalizedMessage( 1063086 ); // You cannot use this skill right now.
m.RevealingAction();
}
else if ( m.Flying )
{
m.SendLocalizedMessage( 1113415 ); // You cannot use this ability while flying.
m.RevealingAction();
}
else
{
int armorRating = GetArmorRating( m );
if ( armorRating >= 42 ) // I have a hunch '42' was chosen cause someone's a fan of DNA
{
m.SendLocalizedMessage( 502727 ); // You could not hope to move quietly wearing this much armor.
m.RevealingAction();
}
else if ( m.CheckSkill( SkillName.Stealth, -20.0 + ( armorRating * 2 ), 60.0 + ( armorRating * 2 ) ) )
{
int steps = (int) ( m.Skills[SkillName.Stealth].Value / 5.0 );
if ( steps < 1 )
steps = 1;
m.AllowedStealthSteps = steps;
m.IsStealthing = true;
m.SendLocalizedMessage( 502730 ); // You begin to move quietly.
return TimeSpan.FromSeconds( 10.0 );
}
else
{
m.SendLocalizedMessage( 502731 ); // You fail in your attempt to move unnoticed.
m.RevealingAction();
}
}
return TimeSpan.FromSeconds( 10.0 );
}
示例6: OnUse
public static TimeSpan OnUse( Mobile m )
{
m.RevealingAction();
m.Target = new InternalTarget();
m.RevealingAction();
if (!m_DisableMessage)
m.SendAsciiMessage("Tame which animal?");
return TimeSpan.FromHours( 6.0 );
}
示例7: Drink
public override void Drink( Mobile from )
{
if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
{
from.SendLocalizedMessage( 1062725 ); // You can not use that potion while paralyzed.
return;
}
int delay = GetDelay( from );
if ( delay > 0 )
{
from.SendLocalizedMessage( 1072529, String.Format( "{0}\t{1}", delay, delay > 1 ? "seconds." : "second." ) ); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
return;
}
ThrowTarget targ = from.Target as ThrowTarget;
if ( targ != null && targ.Potion == this )
return;
from.RevealingAction();
if ( !m_Users.Contains( from ) )
m_Users.Add( from );
from.Target = new ThrowTarget( this );
}
示例8: Drink
public override void Drink( Mobile from )
{
if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
{
from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed.
return;
}
ThrowTarget targ = from.Target as ThrowTarget;
this.Stackable = false; // Scavenged explosion potions won't stack with those ones in backpack, and still will explode.
if ( targ != null && targ.Potion == this )
return;
from.RevealingAction();
if ( m_Users == null )
m_Users = new ArrayList();
if ( !m_Users.Contains( from ) )
m_Users.Add( from );
from.Target = new ThrowTarget( this );
if ( m_Timer == null )
{
from.SendLocalizedMessage( 500236 ); // You should throw it now!
if( Core.ML )
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.25 ), 5, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); // 3.6 seconds explosion delay
else
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); // 2.6 seconds explosion delay
}
}
示例9: OnPickedInstrument
public static void OnPickedInstrument( Mobile from, BaseInstrument instrument )
{
from.RevealingAction();
from.SendLocalizedMessage( 1049525 ); // Whom do you wish to calm?
from.Target = new InternalTarget( from, instrument );
from.NextSkillTime = DateTime.Now + TimeSpan.FromHours( 6.0 );
}
示例10: OnUse
public static TimeSpan OnUse( Mobile m )
{
m.RevealingAction();
Timer t = m_Table[m] as Timer;
if ( t != null && t.Running )
t.Stop();
if ( m.CheckSkill( SkillName.SpiritSpeak, 0, 100 ) )
{
if ( t == null )
m_Table[m] = t = new SpiritSpeakTimer( m );
double secs = m.Skills[SkillName.SpiritSpeak].Base / 50;
secs *= 90;
if ( secs < 10 )
secs = 10;
t.Delay = TimeSpan.FromSeconds( secs );//15 seconds to 3 minutes
t.Start();
m.CanHearGhosts = true;
m.PlaySound( 0x24A );
m.SendLocalizedMessage( 502444 );//You contact the neitherworld.
}
else
{
m_Table.Remove( m );
m.SendLocalizedMessage( 502443 );//You fail to contact the neitherworld.
m.CanHearGhosts = false;
}
return TimeSpan.FromSeconds( 10.0 );
}
示例11: OnTarget
protected override void OnTarget( Mobile from, object o )
{
IPoint3D ip = o as IPoint3D;
if ( ip != null )
{
if ( ip is Item )
ip = ((Item)ip).GetWorldTop();
Point3D p = new Point3D( ip );
Region reg = Region.Find( new Point3D( p ), from.Map );
if ( from.AccessLevel >= AccessLevel.GameMaster || reg.AllowHousing( from, p ) )
m_Deed.OnPlacement( from, p );
else if ( reg.IsPartOf( typeof( TempNoHousingRegion ) ) )
from.SendLocalizedMessage( 501270 ); // Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
else if ( reg.IsPartOf( typeof( TreasureRegion ) ) || reg.IsPartOf( typeof( HouseRegion ) ) )
from.SendLocalizedMessage( 1043287 ); // The house could not be created here. Either something is blocking the house, or the house would not be on valid terrain.
else
from.SendLocalizedMessage( 501265 ); // Housing can not be created in this area.
if (HouseSystemController._MaxPlaceDelay > 0)
{
from.BeginAction(typeof(HouseDeed));
Timer.DelayCall<Mobile>(TimeSpan.FromSeconds(Utility.RandomMinMax(HouseSystemController._MinPlaceDelay, HouseSystemController._MaxPlaceDelay)), new TimerStateCallback<Mobile>(ReleasePlacementLock), from);
}
from.RevealingAction();
}
}
示例12: OnUse
public static TimeSpan OnUse(Mobile m)
{
if (!m.Hidden)
{
m.SendLocalizedMessage(502725); // You must hide first
}
else if (m.Skills[SkillName.Hiding].Base < 80.0)
{
m.SendLocalizedMessage(502726); // You are not hidden well enough. Become better at hiding.
}
else if (GetArmorOffset(m) >= 15)
{
m.SendLocalizedMessage(502727); // You could not hope to move quietly wearing this much armor.
}
else if (m.CheckSkill(SkillName.Stealth, 0.0, 100.0))
{
int steps = (int)(m.Skills[SkillName.Stealth].Value / (Core.AOS ? 5.0 : 10.0));
if (steps < 1)
steps = 1;
m.AllowedStealthSteps = steps;
m.SendLocalizedMessage(502730); // You begin to move quietly.
return TimeSpan.FromSeconds(10.0);
}
else
{
m.SendLocalizedMessage(502731); // You fail in your attempt to move unnoticed.
m.RevealingAction();
}
return TimeSpan.FromSeconds(10.0);
}
示例13: Drink
public override void Drink(Mobile from)
{
if (Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)))
{
from.SendLocalizedMessage(1062725); // You can not use a purple potion while paralyzed.
return;
}
ThrowTarget targ = from.Target as ThrowTarget;
if (targ != null && targ.Potion == this)
return;
from.RevealingAction();
if (m_Users == null)
m_Users = new ArrayList();
if (!m_Users.Contains(from))
m_Users.Add(from);
from.Target = new ThrowTarget(this);
if (m_Timer == null)
{
from.SendLocalizedMessage(500236); // You should throw it now!
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(0.75), TimeSpan.FromSeconds(1.0), 4, new TimerStateCallback(Detonate_OnTick), new object[] { from, 3 });
}
}
示例14: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
from.RevealingAction();
int number = -1;
if ( targeted is Mobile )
{
Mobile targ = (Mobile)targeted;
if ( targ.Player ) // We can't beg from players
{
from.SendAsciiMessage("Perhaps just asking would work better.");
number = 500398; // Perhaps just asking would work better.
}
else if ( !targ.Body.IsHuman ) // Make sure the NPC is human
{
from.SendAsciiMessage("There is little chance of getting money from that!");
number = 500399; // There is little chance of getting money from that!
}
else if ( !from.InRange( targ, 2 ) )
{
if (!targ.Female)
{
from.SendAsciiMessage("You are too far away to beg from him.");
number = 500401; // You are too far away to beg from him.
}
else
from.SendAsciiMessage("You are too far away to beg from her.");
//number = 500402; // You are too far away to beg from her.
}
else if ( from.Mounted ) // If we're on a mount, who would give us money?
{
from.SendAsciiMessage("They seem unwilling to give you any money.");
number = 500404; // They seem unwilling to give you any money.
}
else
{
// Face eachother
from.Direction = from.GetDirectionTo( targ );
targ.Direction = targ.GetDirectionTo( from );
from.Animate( 32, 5, 1, true, false, 0 ); // Bow
new InternalTimer( from, targ ).Start();
m_SetSkillTime = false;
}
}
else // Not a Mobile
{
from.SendAsciiMessage("There is little chance of getting money from that!");
//number = 500399; // There is little chance of getting money from that!
}
number = -1;
if ( number != -1 )
from.SendLocalizedMessage( number );
}
示例15: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (from == null)
return;
from.RevealingAction();
from.BeginTarget(1, false, TargetFlags.None, new TargetCallback(ItemClaimer_OnTarget));
}