Exemplo n.º 1
0
        public void Summon(SoulSliver sliver)
        {
            Mobile soul = sliver.Target;

            Map     map = sliver.Map;
            Point3D loc = sliver.Location;

            if (!SpellHelper.CheckTravel(soul, TravelCheckType.RecallFrom))
            {
            }
            else if (!SpellHelper.CheckTravel(Caster, Caster.Map, sliver.Location, TravelCheckType.RecallTo))
            {
            }
            else if (SpellHelper.CheckCombat(soul))
            {
                Caster.SendMessage("They cannot be called in the heat of battle."); // Wouldst thou flee during the heat of battle??
            }
            else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z))
            {
                Caster.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (CheckSequence())
            {
                Effects.SendLocationParticles(EffectItem.Create(soul.Location, soul.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042);
                Effects.PlaySound(soul, soul.Map, 0x201);
                soul.SendMessage("You feel a sickening wrenching sensation.");
                soul.MoveToWorld(loc, map);
                soul.PlaySound(0x1FC);
            }

            FinishSequence();
        }
Exemplo n.º 2
0
            protected override void OnTarget(Mobile from, object o)
            {
                if (o is RecallRune)
                {
                    RecallRune rune = (RecallRune)o;

                    if (rune.Marked)
                    {
                        m_Owner.Effect(rune.Target, rune.TargetMap, true);
                    }
                    else
                    {
                        from.SendLocalizedMessage(501805); // That rune is not yet marked.
                    }
                }
                else if (o is Runebook)
                {
                    RunebookEntry e = ((Runebook)o).Default;

                    if (e != null)
                    {
                        m_Owner.Effect(e.Location, e.Map, true);
                    }
                    else
                    {
                        from.SendLocalizedMessage(502354); // Target is not marked.
                    }
                }
                else if (o is Key && ((Key)o).KeyValue != 0 && ((Key)o).Link is BaseBoat)
                {
                    BaseBoat boat = ((Key)o).Link as BaseBoat;

                    if (!boat.Deleted && boat.CheckKey(((Key)o).KeyValue))
                    {
                        m_Owner.Effect(boat.GetMarkedLocation(), boat.Map, false);
                    }
                    else
                    {
                        from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object.
                    }
                }
                else if (o is SoulSliver)
                {
                    SoulSliver soul = (SoulSliver)o;

                    if (soul.Marked)
                    {
                        TeiravonMobile summoned = soul.Target as TeiravonMobile;

                        if (summoned.Map != Map.Internal && summoned != null)
                        {
                            m_Owner.Summon(soul);
                        }
                        else
                        {
                            from.SendMessage("The soul lies dormant and does not answer your summons.");
                        }
                    }
                    else
                    {
                        from.SendMessage("This sliver has not been attuned.");
                    }
                }
                else
                {
                    from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object.
                }
            }