Exemple #1
0
        public virtual void EndSummon(object state)
        {
            Mobile from = (Mobile)state;

            if (m_Chyloth != null && !m_Chyloth.Deleted)
            {
                from.SendLocalizedMessage(1050010); // The ferry man has already been summoned.  There is no need to ring for him again.
            }
            else if (m_Dragon != null && !m_Dragon.Deleted)
            {
                from.SendLocalizedMessage(1050017); // The ferryman has recently been summoned already.  You decide against ringing the bell again so soon.
            }
            else if (m_Summoning)
            {
                m_Summoning = false;

                Point3D loc = GetWorldLocation();

                loc.Z -= 16;

                Effects.SendLocationParticles(EffectItem.Create(loc, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 0, 0, 2023, 0);
                Effects.PlaySound(loc, Map, 0x1FE);

                m_Chyloth = new Chyloth();

                m_Chyloth.Direction = (Direction)(7 & (4 + (int)from.GetDirectionTo(loc)));
                m_Chyloth.MoveToWorld(loc, Map);

                m_Chyloth.Bell    = this;
                m_Chyloth.AngryAt = from;
                m_Chyloth.BeginGiveWarning();
                m_Chyloth.BeginRemove(TimeSpan.FromSeconds(40.0));
            }
        }
Exemple #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_Chyloth = reader.ReadMobile() as Chyloth;
            m_Dragon  = reader.ReadMobile() as SkeletalDragon;

            if (m_Chyloth != null)
            {
                m_Chyloth.Delete();
            }
        }
Exemple #3
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 2 && info.IsSwitched(1))
            {
                if (m_Member.Region.IsPartOf("Doom"))
                {
                    m_Leader.SendLocalizedMessage(1050054, m_Member.Name); // ~1_NAME~ has accepted your invitation to cross lake Mortis.

                    Chyloth.TeleportToFerry(m_Member);
                }
                else
                {
                    m_Member.SendLocalizedMessage(1050051); // The invitation has been revoked.
                }
            }
            else
            {
                m_Member.SendLocalizedMessage(1050052);                // You have declined their invitation.
                m_Leader.SendLocalizedMessage(1050053, m_Member.Name); // ~1_NAME~ has declined your invitation to cross lake Mortis.
            }
        }