ExX
Member
I had this really old script for a pack of npcs that I love. I am trying to update it to ServUO. I fixed a lot of the issues on compile but this one stumps me. At first I was getting ComputeSkillTotal errors and through research I read that it was changed to SkillsTotal so I made that change in the script but I am getting a new error and I am unsure how to use the method. To be honest I am not even sure what that code is supposed to do. I've learned an insane amount in the last month I have been here but this is a bit over my head. This is the error.
the actual code that is erroring is this.
int theirTotal = PlayerMobile.SkillsTotal( m );
int ourTotal = PlayerMobile.SkillsTotal( this );
But here is the entire method if it helps.
Code:
Errors:
CS1955: Line 142: Non-invocable member 'Server.Mobile.SkillsTotal' cannot be
used like a method.
CS1955: Line 143: Non-invocable member 'Server.Mobile.SkillsTotal' cannot be
used like a method.
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
the actual code that is erroring is this.
int theirTotal = PlayerMobile.SkillsTotal( m );
int ourTotal = PlayerMobile.SkillsTotal( this );
But here is the entire method if it helps.
Code:
public override void OnDeath( Container c )
{
base.OnDeath( c );
Mobile m = FindMostRecentDamager( false );
if ( m != null && m.Player )
{
bool gainedPath = false;
int theirTotal = PlayerMobile.SkillsTotal( m );
int ourTotal = PlayerMobile.SkillsTotal( this );
int pointsToGain = 1 + ((theirTotal - ourTotal) / 50);
if ( pointsToGain < 1 )
pointsToGain = 1;
else if ( pointsToGain > 4 )
pointsToGain = 4;
if ( VirtueHelper.Award( m, VirtueName.Justice, pointsToGain, ref gainedPath ) )
{
if ( gainedPath )
m.SendLocalizedMessage( 1049367 ); // You have gained a path in Justice!
else
m.SendLocalizedMessage( 1049363 ); // You have gained in Justice.
m.FixedParticles( 0x375A, 9, 20, 5027, EffectLayer.Waist );
m.PlaySound( 0x1F7 );
}
}
}