本文整理汇总了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);
}
}
示例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 );
}
}
示例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;
}
}
}
}
示例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();
}
示例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.
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
}
示例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
}
示例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 );
}
}
示例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();
}
示例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 );
}
示例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);
}
}