Full Version : Mercinary resist cap
xmlspawner >>Scripting Support >>Mercinary resist cap


<< Prev | Next >>

Botnick- 10-07-2007
Maybe you guys can help me, we have an evo mercinary script on our shard and we would like to cap the resists even if a player can add armor and weapons with resists, we would like the resists to be capped for each level...

Something similar to the resist cap that's effective for players (70)

Any idea how we could go about capping the resists?

ArteGordon- 10-07-2007
you can add an override to the GetMaxResistance method in your evo script just like you find in PlayerMobile.cs

CODE

 public override int GetMaxResistance( ResistanceType type )
 {
  int max = base.GetMaxResistance( type );

  if ( type != ResistanceType.Physical && 60 < max && Spells.Fourth.CurseSpell.UnderEffect( this ) )
   max = 60;

  if( Core.ML && this.Race == Race.Elf && type == ResistanceType.Energy )
   max += 5; //Intended to go after the 60 max from curse

  return max;
 }


and cap them any way you want.