public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendMessage("You must have the egg in your backpack.");
            }
            else if (this.AllowEvolution == true)
            {
                this.Delete();
                from.SendMessage("You are now the proud owner of a baby Korpre!!");

                EvolutionKorpre Korpre = new EvolutionKorpre();

                Korpre.Map      = from.Map;
                Korpre.Location = from.Location;

                Korpre.Controlled = true;

                Korpre.ControlMaster = from;

                Korpre.IsBonded = true;
            }
            else
            {
                from.SendMessage("This Korpre is not ready.");
            }
        }
Example #2
0
            protected override void OnTarget(Mobile from, object obj)
            {
                if (!from.Alive)
                {
                    from.SendMessage("You may not do that while dead.");
                }
                else if (obj is EvolutionKorpre && obj is BaseCreature)//Korpre
                {
                    BaseCreature    bc = (BaseCreature)obj;
                    EvolutionKorpre ed = (EvolutionKorpre)obj;

                    if (ed.Controlled == true && ed.ControlMaster == from)
                    {
                        ed.PublicOverheadMessage(MessageType.Regular, ed.SpeechHue, true, ed.Name + " has " + ed.KPKorpre + " kill points.", false);
                    }
                    else
                    {
                        from.SendMessage("You do not control this Korpre!");
                    }
                }
            }