public override void Drink( Mobile from )
		{
			
			if ( from.BeginAction( typeof( BaseMaskOfDeathPotion ) ) )
			{
				
				if ( !UnderEffect( from ) )
				{
					Timer t = (Timer)m_Table[from];
	
					if ( t != null )
						t.Stop();
	
					m_Table[from] = t = Timer.DelayCall( Duration, new TimerStateCallback( Expire_Callback ), from );			
	
					//Effects.SendPacket( from, from.Map, new GraphicalEffect( EffectType.FixedFrom, from.Serial, Serial.Zero, 0x375A, from.Location, from.Location, 10, 15, true, false ) );//Default
					from.FixedParticles( 0x3779, 10, 15, 5002, EffectLayer.Head );
					from.FixedParticles( 0x376A, 9, 32, 5008, EffectLayer.Waist );
					from.FixedParticles( 0x3778, 10, 30, 5010, EffectLayer.Head );
					
					
				        from.SendLocalizedMessage( 503326 ); // You are now ignored by monsters.
	
					Delete();
				}
				Timer.DelayCall( TimeSpan.FromMinutes( Delay ),new TimerStateCallback( Release ), from );
			}
			else
			{
				from.SendMessage("You must wait 30 minutes to use this potion" );					
			}		
			
			
		}
        public override void OnDeath( Mobile m )
        {
            bool toreturn = true;

            if ( m != null && !m.Deleted)
            {

                if (m is PlayerMobile && m_Controller.NoPlayerItemDrop)
                {
                    if (m.Female)
                    {
                        m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist);
                        m.Body = 403;
                        m.Hidden = true;
                    }
                    else
                    {
                        m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist);
                        m.Body = 402;
                        m.Hidden = true;
                    }
                    m.Hidden = false;
                    toreturn = false;
                }
                else if ( !(m is PlayerMobile) && m_Controller.NoNPCItemDrop)
                {
                    if (m.Female)
                    {
                        m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist);
                        m.Body = 403;
                        m.Hidden = true;
                    }
                    else
                    {
                        m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist);
                        m.Body = 402;
                        m.Hidden = true;
                    }
                    m.Hidden = false;
                    toreturn = false;
                }
                else
                    toreturn = true;

                // Start a 1 second timer
                // The Timer will check if they need moving, corpse deleting etc.
                m_Timer = new MovePlayerTimer(m, m_Controller);
                m_Timer.Start();

               // return base.OnDeath(m);
            }

            base.OnDeath(m);

        }
 public static void FinalEffect( Mobile caster, Mobile target, int duration, double protection )
 {
     target.PlaySound( 0x202 );
     target.FixedParticles( 0x376A, 1, 62, 9923, 3, 3, EffectLayer.Waist );
     target.FixedParticles( 0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist );
     ( (IKhaerosMobile)target ).ShieldingMobile = caster;
     ( (IKhaerosMobile)target ).ShieldValue = protection;
     ( (IKhaerosMobile)caster ).ShieldedMobile = target;
     Timer.DelayCall( TimeSpan.FromMinutes( duration ), new TimerCallback( ( (IKhaerosMobile)target ).RemoveShieldOfSacrifice ) );
     Timer.DelayCall( TimeSpan.FromMinutes( duration ), new TimerCallback( ( (IKhaerosMobile)caster ).RemoveShieldOfSacrifice ) );
 }
Example #4
0
        public static void FinalEffect(Mobile caster, Mobile target, int hold)
        {
            target.PlaySound(0x204);
            target.FixedParticles(0x37C4, 1, 8, 9916, 39, 3, EffectLayer.Head);
            target.FixedParticles(0x37C4, 1, 8, 9502, 39, 4, EffectLayer.Head);

            target.Emote("*is rooted to the ground, unmoving*");
            target.SendMessage("You are overwhelmed by guilt over your sins.");

            if (((IKhaerosMobile)target).StunnedTimer != null)
                ((IKhaerosMobile)target).StunnedTimer.Stop();

            ((IKhaerosMobile)target).StunnedTimer = new JusticePrisonTimer(target, hold);
            ((IKhaerosMobile)target).StunnedTimer.Start();
        }
		public override void Drink( Mobile m )
		{
			TimeSpan duration = TimeSpan.FromMinutes( 1 );
			
			if (m.Hidden == false)
			{
				m.FixedParticles( 0x376A, 9, 32, 5007, EffectLayer.Waist );
				m.PlaySound( 0x3C4 );
				
				BuffInfo.RemoveBuff( m, BuffIcon.HidingAndOrStealth );
				BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.Invisibility, 1075825 ) );	//Invisibility/Invisible

				BasePotion.PlayDrinkEffect( m );

				this.Consume();
				
				m.Hidden = true;
				
				RemoveTimer( m );
				
				Timer t = new InternalTimer( m, duration );

				m_Table[m] = t;

				t.Start();
				
			}
			else
			{
				m.SendMessage( "An invisibility potion is already taking effect on your person." ); //An invisibility potion is already taking effect on your person.
			}
		}
Example #6
0
        public override void OnHit( Mobile attacker, Mobile defender, int damage )
        {
            if ( !IsBladeweaveAttack )
            {
                if ( !Validate( attacker ) )
                    return;
                if ( !CheckMana( attacker, true ) )
                    return;
            }

            ClearCurrentAbility( attacker );

            Timer t = (Timer) m_Table[attacker];

            if ( t != null )
                t.Stop();

            Skill ninjitsu = attacker.Skills[SkillName.Ninjitsu];

            int delay = (int) ( ninjitsu.Value / 12.0 );

            attacker.SendLocalizedMessage( 1063345 ); // You block an attack!
            defender.SendLocalizedMessage( 1063346 ); // Your attack was blocked!

            attacker.FixedParticles( 0x37C4, 1, 16, 0x251D, 0x39D, 0x3, EffectLayer.RightHand );

            m_Table[attacker] = t = Timer.DelayCall( TimeSpan.FromSeconds( delay ), new TimerStateCallback( Expire_Callback ), attacker );
        }
		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			attacker.SendLocalizedMessage( 1063353 ); // You perform a masterful defense!

			attacker.FixedParticles( 0x375A, 1, 17, 0x7F2, 0x3E8, 0x3, EffectLayer.Waist );

			int modifier = (int)(30.0 * ((Math.Max( attacker.Skills[SkillName.Bushido].Value, attacker.Skills[SkillName.Ninjitsu].Value ) - 50.0) / 70.0));

			DefenseMasteryInfo info = m_Table[attacker] as DefenseMasteryInfo;

			if( info != null )
				EndDefense( (object)info );

			ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, 50 + modifier );
			attacker.AddResistanceMod( mod );

			info = new DefenseMasteryInfo( attacker, 80 - modifier, mod );
			info.m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), new TimerStateCallback( EndDefense ), info );

			m_Table[attacker] = info;

			attacker.Delta( MobileDelta.WeaponDamage );
		}
Example #8
0
		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			if( Server.Items.ParalyzingBlow.IsImmune( defender ) )	//After mana consumption intentional
			{
				attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
				defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
				return;
			}

			attacker.SendLocalizedMessage( 1063356 ); // You cripple your target with a nerve strike!
			defender.SendLocalizedMessage( 1063357 ); // Your attacker dealt a crippling nerve strike!

			attacker.PlaySound( 0x204 );
			defender.FixedEffect( 0x376A, 9, 32 );
			defender.FixedParticles( 0x37C4, 1, 8, 0x13AF, 0, 0, EffectLayer.Waist );

			AOS.Damage( defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 10), 100, 0, 0, 0, 0 );	//10-25

			defender.Freeze( TimeSpan.FromSeconds( 2.0 ) );
			Server.Items.ParalyzingBlow.BeginImmunity( defender, Server.Items.ParalyzingBlow.FreezeDelayDuration );
		}
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.Blessed != true )
			{
				if ( IsChildOf( from.Backpack ) )
				{
					new InvulTimer(from).Start();
	
					from.FixedParticles( 0x376A, 9, 32, 5007, EffectLayer.Waist );
					from.PlaySound( 0x1E3 );
	
					BasePotion.PlayDrinkEffect( from );
	
					this.Consume();
				}
				else
				{
					from.SendMessage("The Potion must be in your backpack.");
				}
			}
			else
			{
				from.SendMessage( "You are already invulnerable." );
			}
		}
Example #10
0
        public override void OnHit( Mobile attacker, Mobile defender, int damage )
        {
            if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
                return;

            ClearCurrentAbility( attacker );

            Timer t = (Timer) m_Table[attacker];

            if ( t != null )
                t.Stop();

            attacker.SendLocalizedMessage( 1063353 ); // You perform a masterful defense!

            m_Table[attacker] = t = Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), new TimerStateCallback( Expire_Callback ), attacker );

            if ( mods == null )
            {
                mods = new object[1] { new ResistanceMod( ResistanceType.Physical, 70 ) };

                m_Table[attacker] = mods;

                attacker.AddResistanceMod( (ResistanceMod) mods[0] );
            }

            att = attacker;

            attacker.FixedParticles( 0x375A, 1, 17, 0x7F2, 0x3E8, 0x3, EffectLayer.Waist );
        }
Example #11
0
		public override void OnDoubleClick( Mobile from )
		{
			if( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); //That must be in your pack to use it.
			}
			else
			{
				if( from.Skills.Magery.Base < 85 )
				{
					from.SendMessage( "The scroll bursts into flame in your hands!" );
					from.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist );
					from.Damage( Utility.RandomMinMax( 40, 55 ) );
					
					this.Delete();
				}
				else
				{
					from.Frozen = true;
					from.PublicOverheadMessage( MessageType.Spell, from.SpeechHue, true, "In Kal Quas", false );
					
					if( !from.Mounted && from.Body.IsHuman )
						from.Animate( 206, 7, 1, true, false, 0 );
					
					from.BeginTarget( 10, false, TargetFlags.None, new TargetCallback( BlessingOfKhopesh_OnTarget ) );
				}
			}
		}
Example #12
0
        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 ( Server.Items.MortalStrike.IsWounded( m ) )
            {
                Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 );
            }
            /* // idea... dont allow lesser heal to heal through poison (but allow it on gheal)
            else if ( m.Poisoned || Server.Items.MortalStrike.IsWounded( m ) )
            {
                Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 ); // You cannot heal that target/yourself in their/your current state.
            }*/
            else if ( CheckBSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                int toHeal = 1 + (int)( Utility.Random( 15 ) * Caster.Skills[SkillName.Magery].Value / 100.0 );
                if ( Caster != m && Caster.NetState != null )
                    Caster.NetState.Send( new MessageLocalizedAffix( Serial.MinusOne, -1, MessageType.Label, 0x3B2, 3, 1008158, "", AffixType.Append | AffixType.System, (m.Hits+toHeal > m.HitsMax ? m.HitsMax - m.Hits : toHeal).ToString(), "" ) );
                m.Heal( toHeal );

                m.FixedParticles( 0x376A, 9, 32, 5005, EffectLayer.Waist );
                m.PlaySound( 0x1F2 );
            }

            FinishSequence();
        }
Example #13
0
		public override void Drink( Mobile from )
		{
			if ( from.BeginAction( typeof( LightCycle ) ) )
			{
				new LightCycle.NightSightTimer( from ).Start();

				if( Server.Utilities.StartupSettings.LightingChanged )
					from.LightLevel = 15;
				else if( from.Map != Map.Trammel )
					from.LightLevel = LightCycle.DungeonLevel / 2;
				else
					from.LightLevel = 6;

				from.FixedParticles( 0x376A, 9, 32, 5007, EffectLayer.Waist );
				from.PlaySound( 0x1E3 );

				BasePotion.PlayDrinkEffect( from );

				this.Consume();
			}
			else
			{
				from.SendMessage( "You already have nightsight." );
			}
		}
		// Dance of Clouds
		// Activate to grant all nearby allies 20% concealment for 60 seconds.
		public static void LightAirCombo( Mobile from )
		{
			from.SendMessage( 2075, "You execute the maneuver: Dance Of The Clouds" );

			Party p = Party.Get( from );

			object[] objs =
			{
				AosAttribute.DefendChance, 25
			};

			if ( p == null )
			{
				from.SendMessage( 2075, "Monk Boost: +25% defense" );
				from.FixedParticles( 0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist );
				new EnhancementTimer( from, 15, "monk", objs ).Start();
				return;
			}

			for ( int i = 0; i < p.Members.Count; ++i )
			{
				if ( !(p.Members[i].Mobile.InRange( from, 10 )) )
					continue;

				p.Members[i].Mobile.SendMessage( 2075, "Monk Boost: +25% defense" );
				p.Members[i].Mobile.FixedParticles( 0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist );
				new EnhancementTimer( p.Members[i].Mobile, 60, "monk", objs ).Start();
				p.Members[i].Mobile.PlaySound( 0x28F );
			}
		}
Example #15
0
        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 ( 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 = (int)(Caster.Skills[SkillName.Magery].Value * 0.4) + Utility.Random( 10 ) + 1;
                if ( Caster != m && Caster.NetState != null )
                    Caster.NetState.Send( new MessageLocalizedAffix( Serial.MinusOne, -1, MessageType.Label, 0x3B2, 3, 1008158, "", AffixType.Append | AffixType.System, (m.Hits+toHeal > m.HitsMax ? m.HitsMax - m.Hits : toHeal).ToString(), "" ) );
                m.Heal( toHeal );

                m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
                m.PlaySound( 0x202 );
            }

            FinishSequence();
        }
Example #16
0
		public override void OnDoubleClick(Mobile from)
		{
			if(m_Charges <= 0)
                from.SendLocalizedMessage(501259); //This magic item is out of charges.
            if (IsUnderEffects(from, m_Ward))
                from.SendLocalizedMessage(502173); //You are already under a similar effect.
            else if (from.FindItemOnLayer(Layer.MiddleTorso) == this)
            {
                Charges--;

                m_Table[from] = m_Ward;
                Timer.DelayCall(TimeSpan.FromSeconds(10.0), new TimerStateCallback(RemoveEffects), from);

                from.FixedParticles(14154, 1, 30, 9964, 3, 3, EffectLayer.Waist);

                for (int i = -1; i <= 1; i++)
                {
                    IEntity entity = new Entity(Serial.Zero, new Point3D(from.X + i, from.Y, from.Z), from.Map);
                    IEntity to = new Entity(Serial.Zero, new Point3D(from.X + i, from.Y, from.Z + 50), from.Map);
                    Effects.SendMovingParticles(entity, to, 7956, 1, 0, false, false, 33, 3, 9501, 1, 0, EffectLayer.Head, 0x100);
                }

                from.PlaySound(0x5C1);
                from.SendLocalizedMessage(1116243); //The runes glow and a magical warding forms around your body.

                BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.Warding, 1151395, 1151396, m_Ward == WardingEffect.WeaponDamage ? 1116172 : 1116173)); 
            }
            else
            {
                from.SendLocalizedMessage(1112886); //You must be wearing this item in order to use it.
            }
		}
Example #17
0
		public override bool Use( Mobile from ) {
			if ( from.BeginAction( typeof( ClarityPotion ) ) ) {
				int amount = Utility.Dice( 3, 3, 3 );
				int time = Utility.RandomMinMax( 5, 30 );

				from.PlaySound( 0x2D6 );

				if ( from.Body.IsHuman ) {
					from.Animate( 34, 5, 1, true, false, 0 );
				}

				from.FixedParticles( 0x375A, 10, 15, 5011, EffectLayer.Head );
				from.PlaySound( 0x1EB );

				StatMod mod = from.GetStatMod( "Concussion" );

				if ( mod != null ) {
					from.RemoveStatMod( "Concussion" );
					from.Mana -= mod.Offset;
				}

				from.PlaySound( 0x1EE );
				from.AddStatMod( new StatMod( StatType.Int, "clarity-potion", amount, TimeSpan.FromMinutes( time ) ) );

				Timer.DelayCall( TimeSpan.FromMinutes( time ), delegate() {
					from.EndAction( typeof( ClarityPotion ) );
				} );

				return true;
			}

			return false;
		}
Example #18
0
		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );


			attacker.SendMessage( "You attack by psychic energy" ); 
			defender.SendMessage( "You attacking by psychic energy" );

			//defender.Mana -= Utility.Random( (int)attacker.Skills[SkillName.Anatomy].Value/10, (int)attacker.Skills[SkillName.Anatomy].Value/5 );
							
					int toDrain = defender.Mana;

					if ( toDrain < 0 )
						toDrain = 0;
					else if ( toDrain > defender.Mana )
						toDrain = defender.Mana;

					if ( m_Table.Contains( defender ) )
						toDrain = 0;

					defender.FixedParticles( 0x3789, 10, 25, 5032, EffectLayer.Head );
					defender.PlaySound( 0x1F8 );

					if ( toDrain > 0 )
					{
						defender.Mana -= toDrain;

						m_Table[defender] = Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerStateCallback( AosDelay_Callback ), new object[]{ defender, toDrain } );
					}
		}
Example #19
0
        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.Poisoned || 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 = (int)(Caster.Skills[SkillName.Magery].Value * 0.4);
                toHeal += Utility.Random( 1, 10 );

                m.Heal( toHeal );

                m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
                m.PlaySound( 0x202 );
            }

            FinishSequence();
        }
      public override void OnDoubleClick( Mobile from )
      {

	PlayerMobile pm = from as PlayerMobile;

			//if ( !IsChildOf( from.Backpack ) )
			{
				//from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			//else if( from.InRange( this.GetWorldLocation(), 1 ) ) 
		        {
           		from.FixedParticles( 0x373A, 10, 15, 5036, EffectLayer.Head ); 
                from.PlaySound( 521 );
        		RidablePolar RidablePolar = new RidablePolar();
        		RidablePolar.Controlled = true;
        		RidablePolar.ControlMaster = from;
        		RidablePolar.IsBonded = true;
        		RidablePolar.Location = from.Location;
        		RidablePolar.Map = from.Map;
        		World.AddMobile( RidablePolar );

               		from.SendMessage( "You click the deed, and a polar bear appears! It is now your loyal pet." );
      			this.Delete();
		        } 
		        //else 
		        { 
		            from.SendLocalizedMessage( 500446 ); // That is too far away. 
		        }
      }
Example #21
0
      public override void OnDoubleClick( Mobile from )
      {

	PlayerMobile pm = from as PlayerMobile;

			//if ( !IsChildOf( from.Backpack ) )
			{
				//from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			//else if( from.InRange( this.GetWorldLocation(), 1 ) ) 
		        {
           		from.FixedParticles( 0x373A, 10, 15, 5036, EffectLayer.Head ); 
               		from.PlaySound( 521 );
        		FireDrake FireDrake = new FireDrake();
        		FireDrake.Controlled = true;
        		FireDrake.ControlMaster = from;
        		FireDrake.IsBonded = true;
        		FireDrake.Location = from.Location;
        		FireDrake.Map = from.Map;
        		World.AddMobile( FireDrake );

               		from.SendMessage( "You raised a Fire Drake with loving care." );
      			this.Delete();
		        } 
		        //else 
		        { 
		            from.SendLocalizedMessage( 500446 ); // That is too far away. 
		        }
      }
Example #22
0
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            if (0.20 > Utility.RandomDouble() && (defender.Mounted || defender.Flying))
            {
                if (defender is PlayerMobile)
                {
                    if (Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(defender))
                    {
                        defender.SendLocalizedMessage(1114066, this.Name); // ~1_NAME~ knocked you out of animal form!
                    }
                    else if (defender.Mounted)
                    {
                        defender.SendLocalizedMessage(1040023); // You have been knocked off of your mount!
                    }

                    ((PlayerMobile)defender).SetMountBlock(BlockMountType.Dazed, TimeSpan.FromSeconds(10), true);
                }
                else if (defender.Mount != null)
                    defender.Mount.Rider = null;

                defender.PlaySound(0x140);
                defender.FixedParticles(0x3728, 10, 15, 9955, EffectLayer.Waist);
            }

            base.OnGaveMeleeAttack(defender);
        }
        public override void Drink(Mobile from)
        {
            Item am = from.Backpack.FindItemByType(typeof(RecluseStingMarker));
            if (am != null)
            {
                from.BodyMod = 0;
                from.Hue = -1;
                from.YellowHealthbar = false;

                from.PlaySound(0xF6);
                from.PlaySound(0x1F7);
                from.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head);

                    BasePotion.PlayDrinkEffect(from);

                    this.Consume();
                    from.SendGump(new RecluseAntidoteGump());
                    //am.Delete();
                }
                else if (am == null )
                {
                    from.SendGump(new RecluseCuredGump());
                    
                }
            }
 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);
 }
        public override void OnDoubleClick(Mobile from)
        {
            MerlinsStaff Staff = from.FindItemOnLayer(Layer.TwoHanded) as MerlinsStaff;

            if (Parent != from)
            {
                from.SendMessage("You remember that you must equip the staff to summon a portal to Merlin");
            }
            else
            {
                Item marker1 = from.Backpack.FindItemByType(typeof(Marker1));
                if (marker1 != null)
                {
                    marker1.Delete();

                    from.AddToBackpack(new Marker2());
                    from.AddToBackpack(new Tablet());
                    from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot);
                    from.SendGump(new MerlinsQuestGump6(from));
                    from.SendMessage("Muahahahaha!!!! You fool!");
                    Talon2 tl = new Talon2();
                    tl.Map = from.Map;
                    tl.Location = from.Location;
                    Delete();
                }
                else
                {
                    from.SendMessage("You have no right to have this staff!!!!");
                }
            }
        }
Example #26
0
		public override bool OnBeforeDamage( Mobile attacker, Mobile defender )
		{
			if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return false;

			ClearCurrentAbility( attacker );

			attacker.SendMessage( "You become one with you weapon, allowing it to guide you hand. The effects of this attack are unpredictable, but effective." );
			defender.SendMessage( "You enemie become one with their weapon and the effects of his attack are unpredictable" );

				attacker.PlaySound( 0x20C );
				attacker.PlaySound( 0x56 );
				attacker.FixedParticles( 0x3779, 1, 30, 9964, 3, 3, EffectLayer.Waist );

				IEntity from = new Entity( Serial.Zero, new Point3D( attacker.X, attacker.Y, attacker.Z ), attacker.Map );
				IEntity to = new Entity( Serial.Zero, new Point3D( attacker.X, attacker.Y, attacker.Z + 50 ), attacker.Map );
				Effects.SendMovingParticles( from, to, 0xF5F, 1, 0, false, false, 33, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );

			int damage = 10; 

			damage += Math.Min( 5, (int)(Math.Abs( attacker.Skills[SkillName.Anatomy].Value + attacker.Skills[SkillName.ArmsLore].Value ) / 8));

			defender.Damage( damage, attacker );

			return true;
		}
Example #27
0
        public override void OnHit( Mobile attacker, Mobile defender, int damage )
        {
            if ( !IsBladeweaveAttack && ( !Validate( attacker ) || !CheckMana( attacker, true ) ) )
                return;

            ClearCurrentAbility( attacker );

            if ( m_Table.ContainsKey( attacker ) )
            {
                Timer t = m_Table[attacker].Timer;

                if ( t != null )
                    t.Stop();
            }

            Timer expireTimer = Timer.DelayCall( EffectDuration, new TimerCallback(
                delegate
                {
                    m_Table.Remove( attacker );
                } ) );

            double skill = Math.Max( attacker.Skills.Bushido.Value, attacker.Skills.Ninjitsu.Value );

            int damageModifier = (int) ( skill * 50.0 / 120.0 );

            m_Table[attacker] = new FeintContext( expireTimer, defender, damageModifier );

            attacker.SendLocalizedMessage( 1063360 ); // You baffle your target with a feint!
            defender.SendLocalizedMessage( 1063361 ); // You were deceived by an attacker's feint!

            attacker.FixedParticles( 0x3728, 1, 13, 0x7F3, 0x962, 0, EffectLayer.Waist );

            BuffInfo.AddBuff( attacker, new BuffInfo( BuffIcon.Feint, 1151308, 1151307, EffectDuration, attacker, String.Format( "{0}\t{1}", defender.Name, damageModifier ) ) );
        }
Example #28
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                // The item must be in your backpack to use it.
                from.SendLocalizedMessage(1060640);
            } 
            else if (from.NextSkillTime > DateTime.Now)
            {
                // You must wait a few seconds before you can use that item.
                from.SendLocalizedMessage(1070772);
            }

            else
            {
                SkillHandlers.Hiding.CombatOverride = true;

                if (from.UseSkill(SkillName.Hiding))
                {

                    from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot);
                    from.PlaySound(0x22F);

                    Consume();
                }

                SkillHandlers.Hiding.CombatOverride = false;
            }
        }
		public void SandAttack( Mobile m )
		{
			DoHarmful( m );

			m.FixedParticles( 0x36B0, 10, 25, 9540, 2413, 0, EffectLayer.Waist );

			new InternalTimer( m, this ).Start();
		}
Example #30
0
		public override void OnHit(Mobile attacker, Mobile defender, int damage)
		{
			if (!Validate(attacker) || !CheckMana(attacker, true))
				return;

			ClearCurrentAbility(attacker);


			attacker.SendMessage("You poisoned your target.");
			defender.SendMessage("You've been poisoned.");

			int level;

			if (Core.AOS)
			{
				if (attacker.InRange(defender, 2))
				{
					int total = (attacker.Skills.Poisoning.Fixed) / 2;

					if (total >= 1000)
						level = 3;
					else if (total > 850)
						level = 2;
					else if (total > 650)
						level = 1;
					else
						level = 0;
				}
				else
				{
					level = 0;
				}
			}
			else
			{
				double total = attacker.Skills[SkillName.Poisoning].Value;

				double dist = attacker.GetDistanceToSqrt(defender);

				if (dist >= 3.0)
					total -= (dist - 3.0) * 10.0;

				if (total >= 200.0 && 1 > Utility.Random(10))
					level = 3;
				else if (total > (Core.AOS ? 170.1 : 170.0))
					level = 2;
				else if (total > (Core.AOS ? 130.1 : 130.0))
					level = 1;
				else
					level = 0;
			}

			defender.ApplyPoison(attacker, Poison.GetPoison(level));

			defender.FixedParticles(0x374A, 10, 15, 5021, EffectLayer.Waist);
			defender.PlaySound(0x474);
		}