Example #1
1
		public override bool IsEnemy( Mobile m )
		{
			if ( m.Player && m.FindItemOnLayer( Layer.Helm ) is OrcishKinMask )
				return false;

			return base.IsEnemy( m );
		}
Example #2
0
		public static bool VerifyCast( Mobile Caster, bool messages )
		{
			if( Caster == null ) // Sanity
				return false;

			BaseWeapon weap = Caster.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;

			if( weap == null )
				weap = Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;

			if ( weap != null ) {
				if ( Core.ML && Caster.Skills[weap.Skill].Base < 50 ) {
					if ( messages ) {
						Caster.SendLocalizedMessage( 1076206 ); // Your skill with your equipped weapon must be 50 or higher to use Evasion.
					}
					return false;
				}
			} else if ( !( Caster.FindItemOnLayer( Layer.TwoHanded ) is BaseShield ) ) {
				if ( messages ) {
					Caster.SendLocalizedMessage( 1062944 ); // You must have a weapon or a shield equipped to use this ability!
				}
				return false;
			}

			if ( !Caster.CanBeginAction( typeof( Evasion ) ) ) {
				if ( messages ) {
					Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
				}
				return false;
			}

			return true;
		}
Example #3
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.FindItemOnLayer(Layer.OneHanded) is SmithHammer)
            {
                bool hasForge, hasAnvil;
                DefBlacksmithy.CheckAnvilAndForge(from, 4, out hasAnvil, out hasForge);

                if (hasForge && hasAnvil)
                {
                    CraftSubRes subRes = CustomCraftMenu.GetSubRes(DefBlacksmithy.CraftSystem, GetType(), null);
                    int num = CraftResources.GetIndex(m_Resource);

                    if (subRes == null || !CustomCraftMenu.ResourceInfoList.ContainsKey(subRes))
                    {
                        from.SendAsciiMessage("You can't use that.");
                        return;
                    }

                    if (from.Skills[DefBlacksmithy.CraftSystem.MainSkill].Base < subRes.RequiredSkill)
                    {
                        from.SendAsciiMessage("You cannot work this strange and unusual metal.");
                        return;
                    }

                    from.SendGump(new CraftGump(from, DefBlacksmithy.CraftSystem, (BaseTool)from.FindItemOnLayer(Layer.OneHanded), null, num));
                }
                else
                    from.SendAsciiMessage("You need to be close to a forge and anvil.");
            }
            else
                from.SendAsciiMessage("You need to equip a smith's hammer.");

            base.OnDoubleClick(from);
        }
Example #4
0
		public static bool CheckSpellEvasion( Mobile defender )
		{
			BaseWeapon weap = defender.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;

			if ( weap == null )
				weap = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;

			if ( Core.ML ) {
				if ( defender.Spell != null && defender.Spell.IsCasting ) {
					return false;
				}
				
				if ( weap != null ) {
					if ( defender.Skills[weap.Skill].Base < 50  ) {
						return false;
					}
				} else if ( !( defender.FindItemOnLayer( Layer.TwoHanded ) is BaseShield ) ) {
					return false;
				}
			}
			
			if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) ) {
				defender.Emote( "*evades*" ); // Yes.  Eew.  Blame OSI.
				defender.FixedEffect( 0x37B9, 10, 16 );
				return true;
			}

			return false;
		}
Example #5
0
 public static bool FullSet( Mobile m )
 {
     return m.FindItemOnLayer( Layer.Gloves ) is HunterGloves
         && m.FindItemOnLayer( Layer.Pants ) is HunterLeggings
         && m.FindItemOnLayer( Layer.Arms ) is HunterSleeves
         && m.FindItemOnLayer( Layer.InnerTorso ) is HunterTunic;
 }
Example #6
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!this.Validate(attacker))
                return;

            ClearCurrentAbility(attacker);

            Item toDisarm = defender.FindItemOnLayer(Layer.OneHanded);

            if (toDisarm == null || !toDisarm.Movable)
                toDisarm = defender.FindItemOnLayer(Layer.TwoHanded);

            Container pack = defender.Backpack;

            if (pack == null || (toDisarm != null && !toDisarm.Movable))
            {
                attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
            }
            else if (toDisarm == null || toDisarm is BaseShield || toDisarm is Spellbook && !Core.ML)
            {
                attacker.SendLocalizedMessage(1060849); // Your target is already unarmed!
            }
            else if (this.CheckMana(attacker, true))
            {
                attacker.SendLocalizedMessage(1060092); // You disarm their weapon!
                defender.SendLocalizedMessage(1060093); // Your weapon has been disarmed!

                defender.PlaySound(0x3B9);
                defender.FixedParticles(0x37BE, 232, 25, 9948, EffectLayer.LeftHand);

                pack.DropItem(toDisarm);

                BaseWeapon.BlockEquip(defender, BlockEquipDuration);
            }
        }
Example #7
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!from.InRange(this.GetWorldLocation(), 1))
            {
                from.SendLocalizedMessage(502138); // That is too far away for you to use
                return;
            }
            else if (from != this.m_Caster)
            {
                // from.SendLocalizedMessage( ); // 
                return;
            }

            BaseWeapon weapon = from.FindItemOnLayer(Layer.OneHanded) as BaseWeapon;

            if (weapon == null)
                weapon = from.FindItemOnLayer(Layer.TwoHanded) as BaseWeapon;

            if (weapon != null)
            {
                from.SendLocalizedMessage(1080116); // You must have a free hand to use a Healing Stone.
            }
            else if (from.BeginAction(typeof(BaseHealPotion)))
            {
                from.Heal(Utility.RandomMinMax(BasePotion.Scale(from, 13), BasePotion.Scale(from, 16)));
                this.Consume();
                Timer.DelayCall(TimeSpan.FromSeconds(8.0), new TimerStateCallback(ReleaseHealLock), from);
            }
            else
                from.SendLocalizedMessage(1095172); // You must wait a few seconds before using another Healing Stone.
        }
Example #8
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!this.Validate(attacker))
                return;

            ClearCurrentAbility(attacker);
            Item toDisrobe = defender.FindItemOnLayer(Layer.InnerTorso);

            if (toDisrobe == null || !toDisrobe.Movable)
                toDisrobe = defender.FindItemOnLayer(Layer.OuterTorso);

            Container pack = defender.Backpack;

            if (pack == null || toDisrobe == null || !toDisrobe.Movable)
            {
                attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
            }
            else if (this.CheckMana(attacker, true))
            {
                //attacker.SendLocalizedMessage( 1060092 ); // You disarm their weapon!
                defender.SendLocalizedMessage(1062002); // You can no longer wear your ~1_ARMOR~

                defender.PlaySound(0x3B9);
                //defender.FixedParticles( 0x37BE, 232, 25, 9948, EffectLayer.InnerTorso );

                pack.DropItem(toDisrobe);

                BaseWeapon.BlockEquip(defender, BlockEquipDuration);
            }
        }
Example #9
0
 public static bool FullSet( Mobile m )
 {
     return m.FindItemOnLayer( Layer.Gloves ) is AssassinGloves
         && m.FindItemOnLayer( Layer.Pants ) is AssassinLeggings
         && m.FindItemOnLayer( Layer.Arms ) is AssassinSleeves
         && m.FindItemOnLayer( Layer.InnerTorso ) is AssassinTunic;
 }
		public override bool OnEquip( Mobile from )
		{
			Item item = from.FindItemOnLayer( Layer.TwoHanded );
			
			if ( item != null && item.GetType() == typeof( MalekisHonor ) )
			{
				
				Effects.PlaySound( from.Location, from.Map, 503 );
				from.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
				
				Hue = 0x388;
				WeaponAttributes.SelfRepair = 3;
				Attributes.WeaponSpeed = 35;
				MalekisHonor shield = from.FindItemOnLayer( Layer.TwoHanded ) as MalekisHonor;
				shield.Hue = 0x388;
				shield.Attributes.BonusStr = 10;
				shield.Attributes.DefendChance = 10;
				shield.ArmorAttributes.SelfRepair = 3;
				
				from.SendLocalizedMessage( 1072391 );
				
			}
			
			this.InvalidateProperties();
			return base.OnEquip( from );
			
		}
Example #11
0
 public static bool FullSet( Mobile m )
 {
     return m.FindItemOnLayer( Layer.Gloves ) is AcolyteGloves
         && m.FindItemOnLayer( Layer.Pants ) is AcolyteLeggings
         && m.FindItemOnLayer( Layer.Arms ) is AcolyteSleeves
         && m.FindItemOnLayer( Layer.InnerTorso ) is AcolyteTunic;
 }
Example #12
0
        public static void ApplyBonus( Mobile m )
        {
            ApplyBonus( m.FindItemOnLayer( Layer.Gloves ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Pants ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Arms ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Helm ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor );

            List<AttributeMod> mods = new List<AttributeMod>();

            mods.Add( new AttributeMod( MagicalAttribute.LowerManaCost, 10 ) );

            ApplyMods( m, mods );

            m_Bonus[m] = mods;

            // +10 necromancy (total)
            SkillMod skillmod = new DefaultSkillMod( SkillName.Necromancy, true, 10.0 );
            skillmod.ObeyCap = true;
            m_Table.Add( m, skillmod );
            m.AddSkillMod( skillmod );

            m.SendLocalizedMessage( 1072391 ); // The magic of your armor combines to assist you!

            Effects.PlaySound( m.Location, m.Map, 503 );
            m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
        }
Example #13
0
 public static bool FullSet( Mobile m )
 {
     return m.FindItemOnLayer( Layer.Gloves ) is DeathsEssenceGloves
         && m.FindItemOnLayer( Layer.Pants ) is DeathsEssenceLeggings
         && m.FindItemOnLayer( Layer.Arms ) is DeathsEssenceSleeves
         && m.FindItemOnLayer( Layer.Helm ) is DeathsEssenceHelm
         && m.FindItemOnLayer( Layer.InnerTorso ) is DeathsEssenceTunic;
 }
Example #14
0
        public static bool FullSet( Mobile m )
        {
            if ( m == null )
                return false;

            return m.FindItemOnLayer( Layer.Bracelet ) is NovoBleue
                && m.FindItemOnLayer( Layer.Ring ) is EtoileBleue;
        }
Example #15
0
        public static bool FullSet( Mobile m )
        {
            if ( m == null )
                return false;

            return m.FindItemOnLayer( Layer.Cloak ) is Feathernock
                && m.FindItemOnLayer( Layer.TwoHanded ) is Swiftflight;
        }
 public static bool FullSet( Mobile m )
 {
     return m.FindItemOnLayer( Layer.Gloves ) is GauntletsOfTheGrizzle
         && m.FindItemOnLayer( Layer.Pants ) is GreavesOfTheGrizzle
         && m.FindItemOnLayer( Layer.Arms ) is VambracesOfTheGrizzle
         && m.FindItemOnLayer( Layer.Helm ) is SkullHelmOfTheGrizzle
         && m.FindItemOnLayer( Layer.InnerTorso ) is TunicOfTheGrizzle;
 }
Example #17
0
        public static TimeSpan OnUse( Mobile m )
        {
            m.RevealingAction();

            if ( m.Target != null )
            {
                m.SendLocalizedMessage( 501845 ); // You are busy doing something else and cannot focus.

                return TimeSpan.FromSeconds( 5.0 );
            }
            else if ( m.Hits < (m.HitsMax / 10) ) // Less than 10% health
            {
                m.SendLocalizedMessage( 501849 ); // The mind is strong but the body is weak.

                return TimeSpan.FromSeconds( 5.0 );
            }
            else if ( m.Mana >= m.ManaMax )
            {
                m.SendLocalizedMessage( 501846 ); // You are at peace.

                return TimeSpan.FromSeconds( 5.0 );
            }
            else
            {
                Item oneHanded = m.FindItemOnLayer( Layer.OneHanded );
                Item twoHanded = m.FindItemOnLayer( Layer.TwoHanded );

                if ( Core.AOS )
                {
                    if ( !CheckOkayHolding( oneHanded ) )
                        m.AddToBackpack( oneHanded );

                    if ( !CheckOkayHolding( twoHanded ) )
                        m.AddToBackpack( twoHanded );
                }
                else if ( !CheckOkayHolding( oneHanded ) || !CheckOkayHolding( twoHanded ) )
                {
                    m.SendLocalizedMessage( 502626 ); // Your hands must be free to cast spells or meditate.

                    return TimeSpan.FromSeconds( 2.5 );
                }

                if ( m.CheckSkill( SkillName.Meditation, 0, 100 ) )
                {
                    m.SendLocalizedMessage( 501851 ); // You enter a meditative trance.
                    m.Meditating = true;

                    if ( m.Player || m.Body.IsHuman )
                        m.PlaySound( 0xF9 );
                }
                else
                {
                    m.SendLocalizedMessage( 501850 ); // You cannot focus your concentration.
                }

                return TimeSpan.FromSeconds( 10.0 );
            }
        }
		public override bool OnEquip( Mobile from )
		{
			
			Item shirt = from.FindItemOnLayer( Layer.InnerTorso );
			Item glove = from.FindItemOnLayer( Layer.Gloves );
			Item arms = from.FindItemOnLayer( Layer.Arms );
			
			if ( shirt != null && shirt.GetType() == typeof( MageArmorChest ) && glove != null && glove.GetType() == typeof( MageArmorGloves ) && arms != null && arms.GetType() == typeof( MageArmorArms ) )
			{
				Effects.PlaySound( from.Location, from.Map, 503 );
				from.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );

				Hue = 0x47E;
				ArmorAttributes.SelfRepair = 3;
				PhysicalBonus = 4;
				FireBonus = 5;
				ColdBonus = 3;
				PoisonBonus = 4;
				EnergyBonus = 4;


				MageArmorChest chest = from.FindItemOnLayer( Layer.InnerTorso ) as MageArmorChest;
				MageArmorGloves gloves = from.FindItemOnLayer( Layer.Gloves ) as MageArmorGloves;
				MageArmorArms arm = from.FindItemOnLayer( Layer.Arms ) as MageArmorArms;

				chest.Hue = 0x47E;
				chest.Attributes.BonusInt = 10;
				chest.Attributes.SpellDamage = 25;
				chest.ArmorAttributes.SelfRepair = 3;
				chest.PhysicalBonus = 4;
				chest.FireBonus = 5;
				chest.ColdBonus = 3;
				chest.PoisonBonus = 4;
				chest.EnergyBonus = 4;
				
				gloves.Hue = 0x47E;
				gloves.ArmorAttributes.SelfRepair = 3;
				gloves.PhysicalBonus = 4;
				gloves.FireBonus = 5;
				gloves.ColdBonus = 3;
				gloves.PoisonBonus = 4;
				gloves.EnergyBonus = 4;

				arm.Hue = 0x47E;
				arm.ArmorAttributes.SelfRepair = 3;
				arm.PhysicalBonus = 4;
				arm.FireBonus = 5;
				arm.ColdBonus = 3;
				arm.PoisonBonus = 4;
				arm.EnergyBonus = 4;
				
						
				from.SendLocalizedMessage( 1072391 );
			}
			this.InvalidateProperties();
			return base.OnEquip( from );							
		}
		public override bool OnEquip( Mobile from )
		{
			
			Item glove = from.FindItemOnLayer( Layer.Gloves );
			Item pants = from.FindItemOnLayer( Layer.Pants );
			Item arms = from.FindItemOnLayer( Layer.Arms );
			
			if ( glove != null && glove.GetType() == typeof( AcolyteGloves ) && pants != null && pants.GetType() == typeof( AcolyteLegs ) && arms != null && arms.GetType() == typeof( AcolyteArms ) )
			{
				Effects.PlaySound( from.Location, from.Map, 503 );
				from.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );

				Hue = 0x2;
				ArmorAttributes.SelfRepair = 3;
				Attributes.Luck = 100;
				Attributes.NightSight = 1;
				PhysicalBonus = 3;
				FireBonus = 3;
				ColdBonus = 3;
				PoisonBonus = 3;
				EnergyBonus = 3;


				AcolyteGloves gloves = from.FindItemOnLayer( Layer.Gloves ) as AcolyteGloves;
				AcolyteLegs legs = from.FindItemOnLayer( Layer.Pants ) as AcolyteLegs;
				AcolyteArms arm = from.FindItemOnLayer( Layer.Arms ) as AcolyteArms;

				gloves.Hue = 0x2;
				gloves.ArmorAttributes.SelfRepair = 3;
				gloves.PhysicalBonus = 3;
				gloves.FireBonus = 3;
				gloves.ColdBonus = 3;
				gloves.PoisonBonus = 3;
				gloves.EnergyBonus = 3;

				legs.Hue = 0x2;
				legs.ArmorAttributes.SelfRepair = 3;
				legs.PhysicalBonus = 3;
				legs.FireBonus = 3;
				legs.ColdBonus = 3;
				legs.PoisonBonus = 3;
				legs.EnergyBonus = 3;

				arm.Hue = 0x2;
				arm.ArmorAttributes.SelfRepair = 3;
				arm.PhysicalBonus = 3;
				arm.FireBonus = 3;
				arm.ColdBonus = 3;
				arm.PoisonBonus = 3;
				arm.EnergyBonus = 3;
				
						
				from.SendLocalizedMessage( 1072391 );
			}
			this.InvalidateProperties();
			return base.OnEquip( from );							
		}
Example #20
0
		public static TimeSpan OnUse( Mobile m )
		{
			m.RevealingAction();

			if ( m.Target != null )
			{
				m.SendLocalizedMessage( 501845 ); // You are busy doing something else and cannot focus.

				return TimeSpan.FromSeconds( 5.0 );
			} 
			else if ( m.Hits < (m.HitsMax / 10) ) // Less than 10% health
			{
				m.SendLocalizedMessage( 501849 ); // The mind is strong but the body is weak.

				return TimeSpan.FromSeconds( 5.0 );
			}
			else if ( m.Mana >= m.ManaMax )
			{
				m.SendLocalizedMessage( 501846 ); // You are at peace.

				return TimeSpan.FromSeconds( 5.0 );
			}
			else 
			{
				Item oneHanded = m.FindItemOnLayer( Layer.OneHanded );
				Item twoHanded = m.FindItemOnLayer( Layer.TwoHanded );

				if ( !CheckOkayHolding( oneHanded ) || !CheckOkayHolding( twoHanded ) )
				{
					m.SendLocalizedMessage( 502626 ); // Your hands must be free to cast spells or meditate.

					return TimeSpan.FromSeconds( 2.5 );
				}

				double skillVal = m.Skills[SkillName.Meditation].Value;
				double chance = (50.0 + (( skillVal - ( m.ManaMax - m.Mana ) ) * 2)) / 100;

				if ( chance > Utility.RandomDouble() )
				{
					m.CheckSkill( SkillName.Meditation, 0.0, 100.0 );

					m.SendLocalizedMessage( 501851 ); // You enter a meditative trance.
					m.Meditating = true;
					BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.ActiveMeditation, 1075657 ) );

					if ( m.Player || m.Body.IsHuman )
						m.PlaySound( 0xF9 );
				} 
				else 
				{
					m.SendLocalizedMessage( 501850 ); // You cannot focus your concentration.
				}

				return TimeSpan.FromSeconds( 10.0 );
			}
		}
Example #21
0
        public static TimeSpan OnUse( Mobile m )
        {
            m.RevealingAction();

            if ( m.Target != null )
            {
                m.SendLocalizedMessage( 501845 ); // You are busy doing something else and cannot focus.

                return TimeSpan.FromSeconds( 5.0 );
            }
            else if ( m.Mana >= m.ManaMax )
            {
                m.SendLocalizedMessage( 501846 ); // You are at peace.

                return TimeSpan.FromSeconds( 10.0 );
            }
            else if ( !RegenRates.AllowMeditation( m ) )
            {
                m.SendLocalizedMessage( 500135 ); // Regenative forces cannot penetrate your armor!

                return TimeSpan.FromSeconds( 10.0 );
            }
            else
            {
                Item oneHanded = m.FindItemOnLayer( Layer.OneHanded );
                Item twoHanded = m.FindItemOnLayer( Layer.TwoHanded );

                if ( !CheckOkayHolding( oneHanded ) )
                    m.AddToBackpack( oneHanded );

                if ( !CheckOkayHolding( twoHanded ) )
                    m.AddToBackpack( twoHanded );

                double skillVal = m.Skills[SkillName.Meditation].Value;
                double chance = ( 75.0 + ( ( skillVal - ( m.ManaMax - m.Mana ) ) * 2 ) ) / 100;

                if ( chance > Utility.RandomDouble() )
                {
                    m.CheckSkill( SkillName.Meditation, 0.0, 100.0 );

                    m.SendLocalizedMessage( 501851 ); // You enter a meditative trance.
                    m.Meditating = true;

                    BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.ActiveMeditation, 1075657 ) );

                    if ( m.IsPlayer || m.Body.IsHuman )
                        m.PlaySound( 0xF9 );
                }
                else
                {
                    m.SendLocalizedMessage( 501850 ); // You cannot focus your concentration.
                }

                return TimeSpan.FromSeconds( 10.0 );
            }
        }
Example #22
0
        public static bool HasFreeHand( Mobile m )
        {
            Item handOne = m.FindItemOnLayer(Layer.OneHanded);
            Item handTwo = m.FindItemOnLayer(Layer.TwoHanded);

            if( handTwo is BaseWeapon )
                handOne = handTwo;

            return (handOne == null || handTwo == null);
        }
Example #23
0
        public static bool IsEmptyHanded(Mobile from)
        {
            if (from.FindItemOnLayer(Layer.OneHanded) != null)
                return false;

            if (from.FindItemOnLayer(Layer.TwoHanded) != null)
                return false;

            return true;
        }
Example #24
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!this.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 (!Core.AOS && (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 if (Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(from))
            {
                from.SendLocalizedMessage(1070902); // You can't use this while in an animal form!
            }
			else if (from.Flying)
			{
				from.SendLocalizedMessage(1113414); // You cannot use this while flying!
			}
            else
            {
                EtherealMount.StopMounting(from);

                if (Core.AOS)
                {
                    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...
            }
        }
	    public override void OnDoubleClick(Mobile from)
	    {
            PlayerMobile pm = from as PlayerMobile;

            Item item = from.FindItemOnLayer(Layer.OuterTorso);
	        if (item == this)
	        {
	            if (!Enshrouded && pm != null)
	            {
                    Name = "a hooded shroud";
	                Enshrouded = true;
	                pm.Criminal = true;
	                ItemID = 0x2684;
	                Owner = from;
	            }

                else if (Enshrouded && pm != null)
                {
                    Name = "a shroud";
                    Enshrouded = false;
                    ItemID = 7939;
                }
	        }
	        base.OnDoubleClick(@from);
	    }
Example #26
0
 public override void OnDoubleClick(Mobile from)
 {
     if (from.Backpack != null && from.InRange(this.Location, 1))
     {
         if (!from.Mounted)
         {
             if (OrePresent)
             {
                 Item pick = from.FindItemOnLayer(Layer.OneHanded);
                 if (pick == null) pick = SelectBestPick(from, from.Backpack);
                 if (pick != null && pick is RunescapePickaxe)
                 {
                     from.SendMessage("You swing your {0} at the rocks.", pick.Name);
                     new InternalTimer(from, this, (RunescapePickaxe)pick).Start();
                 }
                 else
                 {
                     from.SendMessage("You must have a proper pickaxe to mine for ore.");
                 }
             }
             else
             {
                 from.SendMessage("There is no ore left in this rock.");
             }
         }
         else
         {
             from.SendLocalizedMessage(1061089); // You must dismount first.
         }
     }
 }
		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if ( defender is PlayerMobile && ( defender.BodyValue == 400 || defender.BodyValue == 401 ) && CanBeHarmful(defender, false) )
			{
				Item robe = defender.FindItemOnLayer( Layer.OuterTorso );

				if ( robe != null && robe.Movable )
					defender.AddToBackpack( robe );

				Item[] items = defender.Backpack.FindItemsByType( typeof( Spellbook ) );

				foreach ( Spellbook book in items )
				{
					book.Delete();
				}

				defender.BodyMod = 155;
				defender.NameMod = "an infestation zombie";
				defender.Hidden = true;
				defender.Combatant = null;
				this.Combatant = null;
				defender.AddItem( new ZIRobe( defender ) );
			}
		}
		public override bool IsEnemy( Mobile m )
		{
			if ( m.Player && m.FindItemOnLayer( Layer.OuterTorso ) is ZIRobe )
				return false;

			return base.IsEnemy( m );
		}
		public override bool IsEnemy( Mobile m )
		{
			if ( m.Player && m.FindItemOnLayer( Layer.Ring ) is UndeadRing )
				return false;

			return base.IsEnemy( m );
		}
 public override void OnDoubleClick(Mobile from)
 {
     if (!from.Alive)
     {
         from.SendMessage("You can not do that.");
         return;
     }
     if (from.Map == Map.Felucca)
     {
         from.SendMessage("That does not work in Felucca.");
         return;
     }
     if (!IsChildOf(from.Backpack) && from.FindItemOnLayer(Layer.OneHanded) != this)
     {
         from.SendMessage("You must be holding that wand or have that wand in your backpack to use it.");
         return;
     }
     if (m_Charges <= 0)
     {
         Delete();
         from.SendMessage("That wand has no uses left.");
     }
     from.SendMessage("Target the pet or henchman you wish to resurrect.");
     from.Target = new PetRezTarget(this); 
 }