public override void OnAfterMove( Point3D oldLocation )
 {
     if( Utility.Random( 100 ) > 40 && this.CanUseSpecial )
     {
         this.PlaySound( 1173 );
         SpiderWeb spdw = new SpiderWeb();
         spdw.MoveToWorld( this.Location );
         spdw.Map = this.Map;
         this.CanUseSpecial = false;
     }
 }
        public override void OnAfterMove( Point3D oldLocation )
        {
            if( Utility.Random( 100 ) > 80 && this.CanUseSpecial )
            {
                if( this.Combatant != null )
                {
                    Mobile m = World.FindMobile( this.Combatant.Serial );

                    if( this.InRange( m, 5 ) && this.CanSee( m ) )
                    {
                        this.MovingEffect( m, 4306, 12, 1, false, false );
                        this.PlaySound( 1173 );
                        SpiderWeb spdw = new SpiderWeb();
                        spdw.MoveToWorld( m.Location );
                        spdw.Map = m.Map;
                        this.CanUseSpecial = false;

                        if( this.Combatant is PlayerMobile && ((PlayerMobile)this.Combatant).Evaded() )
                            return;

                        spdw.OnTrigger( m );
                    }
                }
            }
        }
Example #3
0
        public void Entangle( Mobile m )
		{
			Point3D p = Location;

			if ( SpellHelper.FindValidSpawnLocation( Map, ref p, true ) )
			{
				TimeSpan delay = TimeSpan.FromSeconds( Utility.RandomMinMax( 3, 6 ) );
				m.MoveToWorld( p, Map );
				m.Freeze( delay );
				m.SendLocalizedMessage( 1042555 ); // You become entangled in the spider web.

				SpiderWeb web = new SpiderWeb( delay );
				p.Z += 2;
				web.MoveToWorld( p, Map );

				Combatant = m;
			}
		}
Example #4
0
 public SpiderWebTimer( Mobile m, int featlevel, SpiderWeb sw )
     : base(TimeSpan.FromSeconds( featlevel ))
 {
     m_m = m;
     m_sw = sw;
 }
Example #5
0
        public static void CheckAge( SpiderWeb trap )
        {
            TimeSpan maxage = new TimeSpan( 0, trap.m_FeatLevel, 0 );

            if( TimeSpan.Compare( maxage, trap.Aging ) < 0 )
            {
                if( trap.Owner != null )
                {
                    Mobile m = World.FindMobile( trap.Owner.Serial );

                    if( m != null )
                    {
                        if( !m.Alive || m.Location == trap.Location )
                        {
                            m.Emote( "*broke free from a spider web*" );
                            m.CantWalk = false;
                        }
                    }
                }

                trap.Delete();
            }
        }
Example #6
0
        public override void OnActionCombat()
        {
            Mobile combatant = Combatant;

            if (i == 100)
            {

                switch ( Utility.Random( 3 ) )
                {
                    case 0:
                    {
                        Effects.SendMovingEffect(this, combatant, 0x36E4, 2, 0, false, false , 0x480,0);

                        SpiderWeb ragnatela = new SpiderWeb( TimeSpan.FromSeconds(10));
                        ragnatela.MoveToWorld( new Point3D( combatant.X, combatant.Y, combatant.Z ),Map);
                    break;
                    }
                }
                i -= 99;
            }
            i += 1;
        }