Full Version : Need help got one error
xmlspawner >>Scripting Support >>Need help got one error
<< Prev | Next >>
Erica- 03-24-2007
Hi i got the script Dryad in osi they are evil mode so they dont attack and if you die they rez you up heres the one error i got

CODE
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings) Errors: + Custom Scripts 2.0/Mondain Monsters and pets/DryadA.cs: CS0115: Line 72: 'Server.Mobiles.DryadA.CheckResurrect(Server.Mobile)': no s uitable method found to override
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

And heres the script

CODE
using System; using Server; using Server.Misc; using Server.Items; namespace Server.Mobiles // TODO: After verify, they rez players.
{
[CorpseName( "a dryad corpse" )]
public class DryadA : BaseCreature
{
public override bool InitialInnocent{ get{ return true; } }
public override int GetDeathSound()
{
return 0x57A;
}
public override int GetAttackSound()
{
return 0x57B;
}
public override int GetIdleSound()
{
return 0x57C;
}
public override int GetAngerSound()
{
return 0x57D;
}
public override int GetHurtSound()
{
return 0x57E;
}
[Constructable]
public DryadA() : base( AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 ) // TODO: Verify Fight Mode
{
Name = "a dryad";
Body = 266;
SetStr( 130, 150 ); // TODO: All Values are taken from Stratics and will change along with the info taken from stratics/OSI.
SetDex( 152, 168 );
SetInt( 251, 272 );
SetHits( 304, 316 );
SetDamage( 9, 11 ); // TODO: Correct
SetDamageType( ResistanceType.Physical, 100 );
SetResistance( ResistanceType.Physical, 41, 50 );
SetResistance( ResistanceType.Fire, 17, 25 );
SetResistance( ResistanceType.Cold, 40, 44 );
SetResistance( ResistanceType.Poison, 34, 40 );
SetResistance( ResistanceType.Energy, 25, 35 );
SetSkill( SkillName.Meditation, 82.9, 89.9 );
SetSkill( SkillName.EvalInt, 70.7, 78.7 );
SetSkill( SkillName.Magery, 70.7, 75.2 );
SetSkill( SkillName.MagicResist, 112.7, 117.1 );
SetSkill( SkillName.Tactics, 71.7, 76.8 );
SetSkill( SkillName.Wrestling, 72.5, 77.1 );
SetSkill( SkillName.Anatomy, 00.0 );
Fame = 1250; // Reaper/2
Karma = 1250; // -Reaper/2
}
public override void GenerateLoot()
{
AddLoot( LootPack.Average ); // Reaper
}
public override bool CheckResurrect( Mobile m )
{
if ( m.Criminal )
{
Say( 501222 ); // Thou art a criminal. I shall not resurrect thee.
return false;
}
else if ( m.Kills >= 5 )
{
Say( 501223 ); // Thou'rt not a decent and good person. I shall not resurrect thee.
return false;
}
return true;
}
public DryadA( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

ArteGordon- 03-24-2007
the CheckResurrect method is available on things derived from BaseHealer. Yours is derived from BaseCreature.

CODE
public class DryadA : BaseCreature

If you change it to BaseHealer it should work.