Hello all, I tried doing some searches with no real luck. I recently came back to ServUO after life got to hectic and I am trying to update my old server for some friends and family to check out. I have been chugging away at the errors but it seems some weapons I had that used to work no longer work. I am getting this error.

Errors:
+ Custom/Items/Soul Weapons/Entrapped Soul Axes/EntrappedSoulAxe.cs:
CS0115: Line 38: 'EntrappedSoulAxe.OnHit(Mobile, Mobile, double)': no suitable method found to override

This is the part of the script.

public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
{
if ( this.Charges >= 1 && Utility.RandomDouble() <= .25 )
{
Map map = this.Map;
if ( map == null || map == Map.Internal ) return;
TimeSpan duration = TimeSpan.FromMinutes( 5 );
EnslavedEntrappedSoul minion = new EnslavedEntrappedSoul( attacker, defender, duration );
minion.MoveToWorld( defender.Location, defender.Map );
attacker.Say( "Those I kill become my slaves!" );
minion.Combatant = defender;
this.Charges -= 1;
attacker.Karma -= 25;
}
base.OnHit( attacker, defender, damageBonus );
}

What has changed that this would be causing an error now? I'm sorry, I'm pretty out of the loop. This is the same error many of my weapons are having but once I figure it out I can fix all those too.
 
Last edited:
there used to be a great tutorial on this
i do not believe it is accessible any longer
 
  • Like
Reactions: ExX
Yea, errors out when trying to access it. that would have been helpful. Hopefully someone can point me in the right direction with the change.
 
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
to
public override void OnHit(Mobile attacker, IDamageable defender, double Damagebonus)
 
Thanks a ton! Seems the change is causing some other issues too. Here are my new errors.

+ Custom/Items/Soul Weapons/Entrapped Soul Axes/EntrappedSoulAxe.cs:
CS1503: Line 45: Argument 2: cannot convert from 'Server.IDamageable' to 'Server.Mobile'
CS0103: Line 52: The name 'damageBonus' does not exist in the current context

wich the bold lines are line 45 and 52.

public override void OnHit(Mobile attacker, IDamageable defender, double Damagebonus)
{
if ( this.Charges >= 1 && Utility.RandomDouble() <= .25 )
{
Map map = this.Map;
if ( map == null || map == Map.Internal ) return;
TimeSpan duration = TimeSpan.FromMinutes( 5 );
EnslavedEntrappedSoul minion = new EnslavedEntrappedSoul( attacker, defender, duration );
minion.MoveToWorld( defender.Location, defender.Map );
attacker.Say( "Those I kill become my slaves!" );
minion.Combatant = defender;
this.Charges -= 1;
attacker.Karma -= 25;
}
base.OnHit( attacker, defender, damageBonus );
}

I used so many scripts to learn the process a few years back and now it's all been turned upside down. lol

I can't find an updated version of this script. It's from RunUO days back in the day. Once i have the bugs ironed out I'll post the full file to share.
 
I attached the whole package updated for servuo, should save you some time.

as for the error though
EnslavedEntrappedSoul minion = new EnslavedEntrappedSoul( attacker, defender, duration );
to
EnslavedEntrappedSoul minion = new EnslavedEntrappedSoul( attacker, ((Mobile)defender), duration );
 

Attachments

  • SoulWeapons.7z
    6.9 KB · Views: 19
  • Like
Reactions: ExX
Back