protected override void OnTarget(Mobile from, object o)
            {
                Corpse c = o as Corpse;

                if (c == null)
                {
                    from.SendMessage(1365, "You cannot study that.");
                    return;
                }
                else if (c.Channeled)
                {
                    from.SendMessage(1365, "The creature's body no longer has anything left in it.");
                }
                else
                {
                    c.Channeled = true;
                    c.Hue       = 0x835;
                    BlueMonster b = c.Owner as BlueMonster;

                    if (b == null)
                    {
                        from.SendMessage(1365, "Upon further inspection, it would seem this monster knew little of use to you.");
                    }
                    else if ((from.Skills[SkillName.Forensics].Base * 0.01) > Utility.RandomDouble())
                    {
                        BlueMageControl.CheckKnown(from, b.SpellToCast, true);
                    }
                    else
                    {
                        from.SendMessage(1365, "You failed to learn anything about this creature's abilities.");
                    }
                }
            }
Example #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (Hue != 1150)
            {
                base.OnDoubleClick(from);
                return;
            }

            Container pack = from.Backpack;

            if (!(pack != null && Parent == pack))
            {
                from.SendLocalizedMessage(1080058);                   // This must be in your backpack to use it.
                return;
            }

            from.Animate(34, 5, 1, true, false, 0);
            from.PlaySound(Utility.Random(0x3A, 3));

            if (BlueMageControl.IsBlueMage(from))
            {
                BlueMageControl.CheckKnown(from, typeof(AngelsSnackSpell), true);
            }

            Hue  = Utility.RandomList(0, 0x66D, 0x53D, 0x8A5, 0x21, 0x5, 0x38, 0xD, 0x59B, 0x46F, 0x10, 0x42, 0x2B);
            Name = "grasses";
        }
Example #3
0
        public override void OnThink()
        {
            CantWalk = !Controlled;

            if (AlwaysFollow != null)
            {
                ControlOrder  = OrderType.Follow;
                ControlTarget = AlwaysFollow;
            }

            if (DateTime.Now > m_Delay)
            {
                if (!Controlled)
                {
                    switch (Utility.Random(6))
                    {
                    case 0: Say("Please help me."); break;

                    case 1: Say("I want to go home."); break;

                    case 2: Say("*cries*"); break;

                    case 3: Say("Help me"); break;

                    case 4: Say("Wait, come over here."); break;

                    case 5: Say("I don't want to die."); break;
                    }
                }
                else if (X > 1960 && X < 1965 && Y > 490 && Y < 500)
                {
                    // Tele helper
                    MoveToWorld(new Point3D(1960, 643, -26), Map.Ilshenar);
                }
                else if (X > 2020 && X < 2030 && Y > 695 && Y < 705)
                {
                    // Tele helper
                    MoveToWorld(new Point3D(1963, 685, -21), Map.Ilshenar);
                }
                else if (X > 1970 && X < 1980 && Y > 825 && Y < 830)
                {
                    // Auto Life's animation
                    PlaySound(0x214);

                    Effects.SendLocationParticles(
                        EffectItem.Create(new Point3D(X - 1, Y - 1, Z), Map, EffectItem.DefaultDuration),
                        0x3709, 10, 30, 1153, 4, 0, 0);
                    Effects.SendLocationParticles(
                        EffectItem.Create(new Point3D(X - 1, Y + 1, Z), Map, EffectItem.DefaultDuration),
                        0x3709, 10, 30, 1153, 4, 0, 0);
                    Effects.SendLocationParticles(
                        EffectItem.Create(new Point3D(X + 1, Y - 1, Z), Map, EffectItem.DefaultDuration),
                        0x3709, 10, 30, 1153, 4, 0, 0);
                    Effects.SendLocationParticles(
                        EffectItem.Create(new Point3D(X + 1, Y + 1, Z), Map, EffectItem.DefaultDuration),
                        0x3709, 10, 30, 1153, 4, 0, 0);

                    if (ControlTarget is PlayerMobile)                       // Did it somehow switch?
                    {
                        ControlTarget.SendMessage("As a reward for freeing the pixie she teaches you Auto Life!");
                        BlueMageControl.CheckKnown(ControlTarget, typeof(AutoLifeSpell), true);
                    }

                    Delete();
                }

                m_Delay = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(7, 14));
            }

            base.OnThink();
        }