ITLongwell / mondains-legacy

Automatically exported from code.google.com/p/mondains-legacy
0 stars 0 forks source link

Tree Stump Script #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On osi when you place tree stump with axe west or north and click on it
once the name says tree stump with axe and the tree stump east and south
when you click on it once says tree stump yours when you click any of them
says name stump.

Original issue reported on code.google.com by uorevolu...@gmail.com on 2 Dec 2008 at 1:51

GoogleCodeExporter commented 8 years ago
Posted on the forum also, the tree stump needs to be updated like the ore cart. 
it 
is giving unlimited logs.(section in question shown below with possible fix???)

public override void OnComponentUsed( AddonComponent c, Mobile from )
        {           
            BaseHouse house = BaseHouse.FindHouseAt( this );

            if ( house != null && house.HasSecureAccess( from, 
SecureLevel.Friends ) )
            {
                if ( m_Logs > 0 )
                {
                    Item logs = null;

                    switch ( Utility.Random( 7 ) )
                    {
                        case 0: logs = new Log(); break;
                        case 1: logs = new AshLog(); break;
                        case 2: logs = new OakLog(); break;
                        case 3: logs = new YewLog(); break;
                        case 4: logs = new HeartwoodLog(); 
break;
                        case 5: logs = new BloodwoodLog(); 
break;
                        case 6: logs = new FrostwoodLog(); 
break;
                    }
                    int amount = Math.Min( 10, m_Logs );
                    logs.Amount = amount;

                    if ( !from.PlaceInBackpack( logs ) )
                    {
                        logs.Delete();
                        from.SendLocalizedMessage( 
1078837 ); // Your backpack is full! Please make room and try again.
                    }
                    else
                    {
                        PublicOverheadMessage
(MessageType.Regular, 0, 1094719, amount.ToString() ); // Logs: ~1_COUNT~
                        m_Logs -= amount;

                    }
                }
                else 
                    from.SendLocalizedMessage( 1094720 ); // 
There are no more logs available.
            }
            else 
                from.SendLocalizedMessage( 1061637 ); // You are not 
allowed to access this.
        }

Thanks!

Koluch :]

Original comment by ShazzySh...@gmail.com on 2 Dec 2008 at 4:56

GoogleCodeExporter commented 8 years ago
Fixed in version 1.04.

Original comment by gje...@gmail.com on 5 Dec 2008 at 4:54