I was wondering what I need to add to make it so musical instruments show remaining uses.
Thank you in advance.
 
My last RunUO is 2.0 (approx. SVN 400) and it already displays uses on instruments within BaseInstrument.cs in this section:

Code:
public override void GetProperties( ObjectPropertyList list )

I'm surprised that it would be missing from later versions.
 
  • Like
Reactions: Cad
is there a way to modify this to get it to show uses remaining?

C#:
        public override void GetProperties( ObjectPropertyList list )
        {
            int oldUses = m_UsesRemaining;
            CheckReplenishUses( false );
 
Adding this line should do it:
Code:
list.Add( 1060584, m_UsesRemaining.ToString() ); // uses remaining: ~1_val~

Here is that whole section from my 2.0 code:

Code:
        public override void GetProperties( ObjectPropertyList list )
        {
            int oldUses = m_UsesRemaining;
            CheckReplenishUses( false );

            base.GetProperties( list );

            if ( m_Crafter != null )
                list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~

            if ( m_Quality == InstrumentQuality.Exceptional )
                list.Add( 1060636 ); // exceptional

            list.Add( 1060584, m_UsesRemaining.ToString() ); // uses remaining: ~1_val~

            if( m_ReplenishesCharges )
                list.Add( 1070928 ); // Replenish Charges

            if( m_Slayer != SlayerName.None )
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName( m_Slayer );
                if( entry != null )
                    list.Add( entry.Title );
            }

            if( m_Slayer2 != SlayerName.None )
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName( m_Slayer2 );
                if( entry != null )
                    list.Add( entry.Title );
            }

            if( m_UsesRemaining != oldUses )
                Timer.DelayCall( TimeSpan.Zero, new TimerCallback( InvalidateProperties ) );
        }
 
  • Like
Reactions: Cad
So I have all of those lines, but still nothing, Im wondering if it is because im running a T2A Era shard. I have already modified it to show Properties and I even tested uses remaining by changing expansions and still no results. Btw now using latest ServUO server files.
 
It looks like it has been tried before and doesn't work without sending a later expansion flag.


The display / no display may happen with the client itself based on what expansion it is told the server is running.

Tasanar found a workaround by changing the core script expansion.cs so it disables the fluff but supports item info:

along with an edit to the CurrentExpansion.cs script so that OPLs are displayed.
 
Back