bryant
Member
- ServUO Version
- Publish Unknown
- Ultima Expansion
- None
in the portion
Effects.SendLocationEffect( p, Map, 0x352D, 16, 4 );
I change the number 16 to 1500 and the bobber stays longer but it only last for around 10 seconds I need it to stay around 20 seconds. I've tried 3000 and it still disappears at 10 seconds. Trying to get the bobber to stay until It comes up with a catch is how I want it to work.
Effects.SendLocationEffect( p, Map, 0x352D, 16, 4 );
I change the number 16 to 1500 and the bobber stays longer but it only last for around 10 seconds I need it to stay around 20 seconds. I've tried 3000 and it still disappears at 10 seconds. Trying to get the bobber to stay until It comes up with a catch is how I want it to work.
bobber Timmer:
private static bool ValidateDeepWater( Map map, int x, int y )
{
int tileID = map.Tiles.GetLandTile( x, y ).ID;
bool water = false;
for ( int i = 0; !water && i < m_WaterTiles.Length; i += 2 )
water = ( tileID >= m_WaterTiles[i] && tileID <= m_WaterTiles[i + 1] );
return water;
}
private void DoEffect( object state )
{
if ( Deleted )
return;
object[] states = (object[])state;
Point3D p = (Point3D)states[0];
int index = (int)states[1];
states[1] = ++index;
if ( index == 1 )
{
// Effects.SendLocationEffect( p, Map, 0x352D, 16, 4 );
Effects.SendLocationEffect( p, Map, 0x3C0F, 16, 4 );
Effects.PlaySound( p, Map, 0x364 );
}
else if ( index <= 10 || index == 20 )
{
for ( int i = 0; i < 3; ++i )
{
int x, y;
switch ( Utility.Random( 8 ) )
{
default:
case 0: x = -1; y = -1; break;
case 1: x = -1; y = 0; break;
case 2: x = -1; y = +1; break;
case 3: x = 0; y = -1; break;
case 4: x = 0; y = +1; break;
case 5: x = +1; y = -1; break;
case 6: x = +1; y = 0; break;
case 7: x = +1; y = +1; break;
}
Effects.SendLocationEffect( new Point3D( p.X + x, p.Y + y, p.Z ), Map, 0x352D, 16, 4 );
}
Effects.PlaySound( p, Map, 0x364 );
if ( index == 20 )
FinishEffect( p );
else
this.Z -= 1;
}
}
private void FinishEffect( Point3D p )
{
Item fish = GiveFish( m_Player.Skills.Fishing.Base / 100 );
if ( fish != null )
{
m_Player.SendMessage( "You empty your catch from the trap." );
fish.MoveToWorld( m_Player.Location, m_Player.Map );
Movable = true;
if ( !m_Player.PlaceInBackpack( this ) )
MoveToWorld( m_Player.Location, m_Player.Map );
}
else if (Utility.RandomDouble() < 0.75)
{
Movable = true;
if ( !m_Player.PlaceInBackpack( this ) )
MoveToWorld( m_Player.Location, m_Player.Map );
m_Player.SendLocalizedMessage( 1074487 ); // The creatures are too quick for you!
}
else
{
this.Delete();
m_Player.SendMessage( "Your trap is destroyed while trying to pull it from the water." );
}
}