I got a new BaseCreature mob in my server , But I have problems to add it in my server.
It errors with Serialize constructor but I have serialize method in my code..
upload_2017-3-8_23-12-25.png
Here is my code :
Code:
using System;
using Server.Engines.CannedEvil;
using Server.Items;
using Server.Spells.Fifth;
using Server.Spells.Seventh;

namespace Server.Mobiles
{
    public class NightmareMounter : BaseCreature
    {
        [Constructable]
        public NightmareMounter()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.Female = true;
            this.Name = "Bragyar";
            this.Title = "The Dark Queen";
            this.Body = 0x190;
            this.Fame = 22500;
            this.Karma = -22500;

            LeatherGloves gloves = new LeatherGloves();
            gloves.Hue = 1109;
            EquipItem(gloves);


            LeatherCap cap = new LeatherCap();
            cap.Hue = 1109;
            EquipItem(cap);

            LeatherChest chest = new LeatherChest();
            chest.Hue = 1109;
            EquipItem(chest);

            LeatherLegs legs = new LeatherLegs();
            legs.Hue = 1109;
            EquipItem(legs);

            LeatherGorget gor = new LeatherGorget();
            gor.Hue = 1109;
            EquipItem(gor);

            LeatherArms slev = new LeatherArms();
            slev.Hue = 1109;
            EquipItem(slev);

            Cloak cloak = new Cloak();
            cloak.Hue = 1109;
            EquipItem(cloak);

            Nightmare nm = new Nightmare();
            nm.Rider = this;

        }

     

     
        public override bool AlwaysMurderer
        {
            get
            {
                return true;
            }
        }
      
        public override bool BardImmune
        {
            get
            {
                return !Core.SE;
            }
        }
        public override bool AllureImmune
        {
            get
            {
                return true;
            }
        }
        public override bool Unprovokable
        {
            get
            {
                return Core.SE;
            }
        }
        public override bool Uncalmable
        {
            get
            {
                return Core.SE;
            }
        }
     
        public override bool ShowFameTitle
        {
            get
            {
                return false;
            }
        }
        public override bool ClickTitle
        {
            get
            {
                return false;
            }
        }
        public override void GenerateLoot()
        {
            this.AddLoot(LootPack.UltraRich, 3);
        }


        public override void OnDeath(Container c)
        {
            base.OnDeath(c);
            c = this.Corpse;
            c.AddItem(new Doublet(1153));
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

         
        }
        }
    }
 
It is missing the serial constructor though, you only have the normal one
Code:
        public NightmareMounter(Serial serial)
            : base(serial)
        { }
 
Thanks for it , I got one question more ...

How can I delete the nightmare which is this creature riding after 15 minutes from Rider's killed.
 
public override bool OnBeforeDeath()
{
IMount mount = this.Mount;
if ( mount != null )
{
if ( mount is MidniteHorse )mount.Rider = null;
}
return base.OnBeforeDeath();
}
specific mount
something like this no idea on makin it disappear 10 minutes later tho 2 versions different mounts hope this helps My scripting it trial and error testing but these work in JustUo for several mobs We have
unspecific mount
public override bool OnBeforeDeath()
{
IMount mount = this.Mount;

if ( mount != null )
mount.Rider = null;

if ( mount is Mobile )
((Mobile)mount).Delete();

return base.OnBeforeDeath();
}
 
Back