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;
     }
 }
Exemple #2
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;
			}
		}
        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 );
                    }
                }
            }
        }
        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;
        }