|Sutats|

Initiate
I'm attempting to add clothing to a personal housebound pet trainer, this is what im using to add the trainers clothing

"
}
public override void InitOutfit()
{
base.InitOutfit();

AddItem(new StaffRobe( 2500 ));
AddItem(new Lantern( 2063 ));

}
"
but I get this error message when I try
"Server.Mobiles.SutatsTrainer.InitOutfit()': no suitable method found to override."

Any and all help is appreciated.
 
Add this lines in mob constructor:
Code:
AddItem(new StaffRobe( 2500 ));
AddItem(new Lantern( 2063 ));

look for an example - Brigand.cs
 
Add this lines in mob constructor:
Code:
AddItem(new StaffRobe( 2500 ));
AddItem(new Lantern( 2063 ));

look for an example - Brigand.cs

Sorry, I'm not too savvy on this type of thing. Is mob constructor a cs file or am I just extremely dense.
 
Scripts\Mobiles\Normal\Brigand.cs
This block of code marks with attribute [Constructable]. It's must be in all mobiles. And u can add your equipment in this block.
Code:
        [Constructable]
        public Brigand()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();
            Title = "the brigand";
            Hue = Utility.RandomSkinHue();

            if (Female = Utility.RandomBool())
            {
                Body = 0x191;
                Name = NameList.RandomName("female");
                AddItem(new Skirt(Utility.RandomNeutralHue()));
            }
            else
            {
                Body = 0x190;
                Name = NameList.RandomName("male");
                AddItem(new ShortPants(Utility.RandomNeutralHue()));
            }

            SetStr(86, 100);
            SetDex(81, 95);
            SetInt(61, 75);

            SetDamage(10, 23);

            SetSkill(SkillName.Fencing, 66.0, 97.5);
            SetSkill(SkillName.Macing, 65.0, 87.5);
            SetSkill(SkillName.MagicResist, 25.0, 47.5);
            SetSkill(SkillName.Swords, 65.0, 87.5);
            SetSkill(SkillName.Tactics, 65.0, 87.5);
            SetSkill(SkillName.Wrestling, 15.0, 37.5);

            Fame = 1000;
            Karma = -1000;

            AddItem(new Boots(Utility.RandomNeutralHue()));
            AddItem(new FancyShirt());
            AddItem(new Bandana());

            switch ( Utility.Random(7))
            {
                case 0:
                    AddItem(new Longsword());
                    break;
                case 1:
                    AddItem(new Cutlass());
                    break;
                case 2:
                    AddItem(new Broadsword());
                    break;
                case 3:
                    AddItem(new Axe());
                    break;
                case 4:
                    AddItem(new Club());
                    break;
                case 5:
                    AddItem(new Dagger());
                    break;
                case 6:
                    AddItem(new Spear());
                    break;
            }

            Utility.AssignRandomHair(this);
        }
 
Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Mobiles;

namespace Server.Mobiles
{
  [CorpseName( " corpse of Sutats The Trainer" )]
  public class SutatsTrainer : BaseCreature
  {
   public override bool NoHouseRestrictions { get { return true; } }
   public override bool IsHouseSummonable { get { return true; } }

   [Constructable]
   public SutatsTrainer() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 2, 5 )
   {
     Name = "Sutats The Trainer";
     Hue = 33770;
     Body = 400; 
     BaseSoundID = 0; 
     SetStr( 999 );
     SetDex( 300 );
     SetInt( 300 );
     SetHits( 25000, 60000 );
     SetDamage( 6, 10 );
     CantWalk = true;
     IsParagon = false;	
   }
	public override void InitOutfit()
	{
		base.InitOutfit();	
	
			AddItem(new StaffRobe( 2500 ));
			AddItem(new Lantern( 2063 ));
                               
   }
   public override bool AutoDispel{ get{ return true; } }
   public override bool BardImmune{ get{ return true; } }
   public override bool Unprovokable{ get{ return true; } }
   public override bool AlwaysMurderer{ get{ return true; } }

      public SutatsTrainer(Serial serial)
          : base(serial)
   {
   }
   
   public override void Damage(int amount, Mobile from)
   {
   }

   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();
   }
  }
}
This is what I have and it does seem to be under the construables area, but i still receive the same error.
 
Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Mobiles
{
  [CorpseName( " corpse of Sutats The Trainer" )]
  public class SutatsTrainer : BaseCreature
  {
   public override bool NoHouseRestrictions { get { return true; } }
   public override bool IsHouseSummonable { get { return true; } }
   [Constructable]
   public SutatsTrainer() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 2, 5 )
   {
     Name = "Sutats The Trainer";
     Hue = 33770;
     Body = 400;
     BaseSoundID = 0;
     SetStr( 999 );
     SetDex( 300 );
     SetInt( 300 );
     SetHits( 25000, 60000 );
     SetDamage( 6, 10 );
     CantWalk = true;
     IsParagon = false;

            AddItem(new StaffRobe( 2500 ));
            AddItem(new Lantern( 2063 ));
   }

   public override bool AutoDispel{ get{ return true; } }
   public override bool BardImmune{ get{ return true; } }
   public override bool Unprovokable{ get{ return true; } }
   public override bool AlwaysMurderer{ get{ return true; } }
      public SutatsTrainer(Serial serial)
          : base(serial)
   {
   }
  
   public override void Damage(int amount, Mobile from)
   {
   }
   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();
   }
  }
}
 
Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Mobiles
{
  [CorpseName( " corpse of Sutats The Trainer" )]
  public class SutatsTrainer : BaseCreature
  {
   public override bool NoHouseRestrictions { get { return true; } }
   public override bool IsHouseSummonable { get { return true; } }
   [Constructable]
   public SutatsTrainer() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 2, 5 )
   {
     Name = "Sutats The Trainer";
     Hue = 33770;
     Body = 400;
     BaseSoundID = 0;
     SetStr( 999 );
     SetDex( 300 );
     SetInt( 300 );
     SetHits( 25000, 60000 );
     SetDamage( 6, 10 );
     CantWalk = true;
     IsParagon = false;

            AddItem(new StaffRobe( 2500 ));
            AddItem(new Lantern( 2063 ));
   }

   public override bool AutoDispel{ get{ return true; } }
   public override bool BardImmune{ get{ return true; } }
   public override bool Unprovokable{ get{ return true; } }
   public override bool AlwaysMurderer{ get{ return true; } }
      public SutatsTrainer(Serial serial)
          : base(serial)
   {
   }
 
   public override void Damage(int amount, Mobile from)
   {
   }
   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();
   }
  }
}

I've attempted it like this also, it doesn't throw any errors but it spawns the trainer naked without clothing. I've also tried it with many different items seeing if it was just my selection that was bugged but that didn't work either.
 
new StaffRobe(2500)
new Lantern(2063)
what is it params?? - 2500; 2063 ?

if u need set color for this items, u must make next:
Code:
   AddItem(new StaffRobe() { Hue = 2500 });
            AddItem(new Lantern() { Hue = 2063 });
 
what is it params?? - 2500; 2063 ?

if u need set color for this items, u must make next:
Code:
   AddItem(new StaffRobe() { Hue = 2500 });
            AddItem(new Lantern() { Hue = 2063 });
That worked, I wasn't too sure how to input the hue number. Thank you very much!
 
Just for clarity on why this was happening...

It was calling the Serial constructor: SutatsTrainer(Serial serial)

This is because Serial is implicitly convertible to and from Int32 and there were no other constructors accepting a single argument of Int32.

The items were actually being created and added to the mobile, but they would have been uninitialized and any further interaction with them would crash the server.

If any of those items you tested were saved, they might still exist on your test mobile... you may want to delete those items manually.

You will likely be able to locate them using; [global interface where item itemid = 0 (Just don't delete the vendor display cache that appears in the list)
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back