Example #1
0
        public override void EndSortNubia()
        {
            if (m_invoc != null)
            {
                BaseCreature m = m_invoc as BaseCreature;

                Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z + 4), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z - 4), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z + 4), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z - 4), m.Map, 0x3728, 13);

                Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 11), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 7), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 3), m.Map, 0x3728, 13);
                Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z - 1), m.Map, 0x3728, 13);

                m.Delete();
                m_invoc = null;

                Owner.PlaySound(0x228);
            }


            base.EndSortNubia();
        }
        public void FinishSequence(Mobile cible)
        {
            Owner.Animate(17, 7, 1, true, false, 0);

            //SortNubiaHelper.MakeEffect( Owner, cible, this, true, mustExplose );
            if (!(cible is NubiaCreature))
            {
                return;
            }

            NubiaCreature creat = cible as NubiaCreature;

            if (creat.Hits < Math.Max(8, (creat.HitsMax / 5)))
            {
                SortNubiaHelper.makeBigSmoke(creat.Location, creat.Map);
                RuneVie rune = new RuneVie();
                rune.creature = NubiaHelper.CopyCreature(creat);
                rune.MoveToWorld(creat.Location, creat.Map);
                creat.Delete();
            }
            else
            {
                Owner.SendMessage("La créature n'est pas assez affaibli");
            }

            EndSortNubia();             //important ;)
        }
Example #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_toClone = (NubiaCreature)reader.ReadMobile();
            m_invoc   = (NubiaCreature)reader.ReadMobile();
        }
Example #4
0
        public override bool Cast()
        {
            if (!base.Cast())
            {
                return(false);
            }

            double time = (int)(Owner.Niveau) * (Maitrise / 10.0);

            time *= getRatio();

            if (m_toClone == null)
            {
                return(false);
            }

            if (m_invoc != null)
            {
                m_invoc.Delete();
                m_invoc = null;
            }

            NubiaCreature m = NubiaHelper.CopyCreature(m_toClone);

            m_invoc = m;

            m_invoc.Summoned      = true;
            m_invoc.ControlMaster = Owner;
            m_invoc.ControlOrder  = OrderType.Guard;
            m_invoc.Controlled    = true;

            m.MoveToWorld(Owner.Location, Owner.Map);

            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z + 4), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z - 4), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z + 4), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z - 4), m.Map, 0x3728, 13);

            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 11), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 7), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 3), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z - 1), m.Map, 0x3728, 13);

            Owner.PlaySound(0x228);



            m_timer = new InternalTimer(this, time);
            m_timer.Start();
            return(true);
        }
        public void FinishSequence(Mobile cible)
        {
            Owner.Animate(17, 7, 1, true, false, 0);

            //SortNubiaHelper.MakeEffect( Owner, cible, this, true, mustExplose );
            if (!(cible is NubiaCreature))
            {
                return;
            }

            NubiaCreature creat = cible as NubiaCreature;

            Owner.SendMessage("{0} est lié à '{1}'", creat.Name, SortNubiaHelper.getEnergieString(creat.Energie));

            EndSortNubia(); //important ;)
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_toClone    = (NubiaCreature)reader.ReadMobile();
            m_bonusStr   = reader.ReadInt();
            m_bonusDex   = reader.ReadInt();
            m_bonusInt   = reader.ReadInt();
            m_bonusSkill = reader.ReadDouble();
            m_nom        = reader.ReadString();
            if (version > 0)
            {
                int count = reader.ReadInt();
                for (int i = 0; i < count; i++)
                {
                    m_listItem.Add(reader.ReadItem());
                }
            }
        }
Example #7
0
        public static NubiaCreature CopyCreature(NubiaCreature originale)
        {
            NubiaCreature copy = new Dog();

            copy.Name        = originale.Name;
            copy.BaseSoundID = originale.BaseSoundID;
            copy.Hue         = originale.Hue;
            copy.BodyValue   = originale.BodyValue;
            copy.Str         = originale.Str;
            copy.Dex         = originale.Dex;
            copy.Int         = originale.Int;
            copy.HitsMaxSeed = originale.HitsMax;
            copy.ManaMaxSeed = originale.ManaMax;
            copy.Hits       += 5000;
            copy.Mana       += 5000;
            copy.ChangeAIType(originale.AI);
            int min = originale.DamageMin;
            int max = originale.DamageMax;

            copy.SetDamage(min, max);

            copy.Fame         = originale.Fame;
            copy.Karma        = originale.Karma;
            copy.VirtualArmor = originale.VirtualArmor;

            for (int i = 0; i < copy.Skills.Length; ++i)
            {
                //this.Skills[i].Base = 0;
                copy.Skills[i].Base = originale.Skills[i].Value;
            }

            for (int i = 0; i < originale.Items.Count; i++)
            {
                copy.AddItem(CloneItem(originale.Items[i]));
            }

            //    copy.competenceLie = originale.competenceLie;

            return(copy);
        }
Example #8
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                base.OnTarget(from, targeted);
                if (from == null)
                {
                    return;
                }
                if (!from.Alive)
                {
                    return;
                }

                if (targeted is NubiaCreature)
                {
                    NubiaCreature mount = targeted as NubiaCreature;

                    if (mount.IsFriend(from) || mount.ControlMaster == from)
                    {
                        int body = mount.BodyValue;
                        if (body == 0xC8 ||
                            body == 0x3E9F ||
                            body == 0xE2 ||
                            body == 0x3EA0 ||
                            body == 0xE4 ||
                            body == 0x3EA1 ||
                            body == 0xCC ||
                            body == 0x3EA2)  //HORSE
                        {
                            from.Emote("*Scelle les sacs sur le cheval*");
                            Point3D p      = mount.Location;
                            Map     m      = mount.Map;
                            Mobile  master = mount.ControlMaster;
                            bool    tamed  = mount.Controlled;
                            mount.Delete();
                            PackHorse horse = new PackHorse();
                            horse.MoveToWorld(p, m);
                            horse.ControlMaster = master;
                            horse.Controlled    = tamed;
                            horse.ControlOrder  = OrderType.Stay;
                            if (mPack != null)
                            {
                                mPack.Delete();
                            }
                        }
                        else if (mount is Llama || mount is RidableLlama)
                        {
                            from.Emote("*Scelle les sacs sur le Lama*");
                            Point3D p      = mount.Location;
                            Map     m      = mount.Map;
                            Mobile  master = mount.ControlMaster;
                            bool    tamed  = mount.Controlled;
                            mount.Delete();
                            PackLlama lama = new PackLlama();
                            lama.MoveToWorld(p, m);
                            lama.ControlMaster = master;
                            lama.Controlled    = tamed;
                            lama.ControlOrder  = OrderType.Stay;
                            if (mPack != null)
                            {
                                mPack.Delete();
                            }
                        }
                        else
                        {
                            from.SendMessage("Utilisez cela sur un cheval ou un lama");
                        }
                    }
                    else
                    {
                        from.SendMessage("La monture ne se laisse pas approcher");
                        mount.Emote("*s'agite nerveusement*");
                    }
                }
                else
                {
                    from.SendMessage("Vous devez visez une monture vous appartenant");
                }
            }