Beispiel #1
0
        public override void OnDoubleClick(Mobile from)
        {
            RobeofRite             robe   = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite;
            ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger;

            bool alter = false;

            foreach (Item item in GetItemsInRange(5))
            {
                if (item is ExodusTomeAltar)
                {
                    alter = true;
                    break;
                }
            }

            if (robe != null && dagger != null && alter)
            {
                from.SendLocalizedMessage(1153604); // Target the summoning tome or yourself to declare your intentions for performing this ritual...
                ExodusTomeAltar.RitualTarget(this, from, null);
            }
            else
            {
                base.OnDoubleClick(from);
            }
        }
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack))
            {
                RobeofRite             robe   = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite;
                ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger;

                if (robe != null && dagger != null)
                {
                    if (robe.CoolDown != TimeSpan.Zero)
                    {
                        from.SendLocalizedMessage(1153599); // You've already used this item in another ritual.
                        return;
                    }

                    if (PeerlessExodusAltar.m_Rituals != null)
                    {
                        if (PeerlessExodusAltar.m_Rituals.Count != 0)
                        {
                            from.SendLocalizedMessage(1153600); // Which Summoning Tome do you wish to use this on?
                            ExodusTomeAltar.RitualTarget(this, from, robe);
                        }
                    }
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
        }
Beispiel #3
0
            public BeginTheRitual(ExodusTomeAltar altar, Mobile from) : base(1153608, 2) // Begin the Ritual
            {
                m_Mobile = from;
                m_altar  = altar;

                if (altar.Owner != from)
                {
                    Flags |= CMEFlags.Disabled;
                }
            }
Beispiel #4
0
        public override void OnDoubleClick(Mobile from)
        {
            RobeofRite             robe   = from.FindItemOnLayer(Layer.OuterTorso) as RobeofRite;
            ExodusSacrificalDagger dagger = from.FindItemOnLayer(Layer.OneHanded) as ExodusSacrificalDagger;

            if (robe != null && dagger != null)
            {
                if (PeerlessExodusAltar.m_Rituals != null)
                {
                    if (PeerlessExodusAltar.m_Rituals.Count != 0)
                    {
                        from.SendLocalizedMessage(1153604); // Target the summoning tome or yourself to declare your intentions for performing this ritual...
                        ExodusTomeAltar.RitualTarget(this, from, null);
                    }
                }
            }
            else
            {
                base.OnDoubleClick(from);
            }
        }
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is ExodusTomeAltar)
                {
                    ExodusTomeAltar altar = (ExodusTomeAltar)targeted;

                    if (altar.CheckParty(altar.Owner, from))
                    {
                        if (altar.Rituals.Count(s => s.RitualMobile == from) == 0)
                        {
                            altar.Rituals.Add(new RitualArray {
                                RitualMobile = from, Ritual1 = false, Ritual2 = false
                            });
                        }

                        bool RiteRitual = altar.Rituals.Find(s => s.RitualMobile == from).Ritual1;

                        if (!RiteRitual)
                        {
                            ((PlayerMobile)from).UseSummoningRite = true;
                            from.Say(1153597); // You place the rite within the tome and begin to meditate...
                            altar.Rituals.Find(s => s.RitualMobile == from).Ritual1 = true;
                            m_Deed.Delete();
                            from.SendLocalizedMessage(1153598, from.Name); // ~1_PLAYER~ has read the Summoning Rite!
                        }
                        else
                        {
                            from.SendLocalizedMessage(1153599); // You've already used this item in another ritual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(1153595); // You must first join the party of the person who built this altar.
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1153601); // That is not a Summoning Tome.
                }
            }
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is ExodusTomeAltar)
                {
                    ExodusTomeAltar altar = (ExodusTomeAltar)targeted;

                    if (altar.CheckParty(altar.Owner, from))
                    {
                        bool SacrificalRitual = altar.Rituals.Find(s => s.RitualMobile == from).Ritual2;

                        if (!SacrificalRitual)
                        {
                            ((PlayerMobile)from).UseSummoningRite = false;
                            from.Say(1153605); // *You thrust the dagger into your flesh as tribute to Exodus!*
                            altar.Rituals.Find(s => s.RitualMobile == from).Ritual2 = true;
                            m_Dagger.Delete();
                            Misc.Titles.AwardKarma(from, 10000, true);
                            Effects.SendLocationParticles(EffectItem.Create(altar.Location, altar.Map, TimeSpan.FromSeconds(2)), 0x373A, 10, 10, 2023);

                            from.SendLocalizedMessage(1153598, from.Name); // ~1_PLAYER~ has read the Summoning Rite!
                        }
                        else
                        {
                            from.SendLocalizedMessage(1153599); // You've already used this item in another ritual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(1153595); // You must first join the party of the person who built this altar.
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1153601); // That is not a Summoning Tome.
                }
            }
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is StaticTarget staticTarget)
                {
                    if (IsValidTile(staticTarget.ItemID) && (from.Map == Map.Felucca || from.Map == Map.Trammel))
                    {
                        bool alter = false;

                        foreach (var x in from.Map.GetItemsInRange(staticTarget.Location, 5))
                        {
                            if (x is ExodusTomeAltar)
                            {
                                alter = true;
                                break;
                            }
                        }

                        if (alter)
                        {
                            from.SendLocalizedMessage(1153590); // An altar has already been built here.
                        }
                        else if (ExodusTomeAltar.Altar == null && VerLorRegController.Active && VerLorRegController.Mobile != null && CheckExodus())
                        {
                            Point3D p = Point3D.Zero;

                            if (from.Region.IsPartOf("Shrine of Compassion"))
                            {
                                p = new Point3D(1858, 875, 12);
                            }
                            else if (from.Region.IsPartOf("Shrine of Honesty"))
                            {
                                p = new Point3D(4209, 564, 60);
                            }
                            else if (from.Region.IsPartOf("Shrine of Honor"))
                            {
                                p = new Point3D(1727, 3528, 15);
                            }
                            else if (from.Region.IsPartOf("Shrine of Humility"))
                            {
                                p = new Point3D(4274, 3697, 12);
                            }
                            else if (from.Region.IsPartOf("Shrine of Justice"))
                            {
                                p = new Point3D(1301, 634, 28);
                            }
                            else if (from.Region.IsPartOf("Shrine of Sacrifice"))
                            {
                                p = new Point3D(3355, 290, 16);
                            }
                            else if (from.Region.IsPartOf("Shrine of Spirituality"))
                            {
                                p = new Point3D(1606, 2490, 20);
                            }
                            else if (from.Region.IsPartOf("Shrine of Valor"))
                            {
                                p = new Point3D(2492, 3931, 17);
                            }
                            else
                            {
                                from.SendLocalizedMessage(500269); // You cannot build that there.
                                return;
                            }

                            if (p != Point3D.Zero)
                            {
                                ExodusTomeAltar altar = new ExodusTomeAltar();
                                altar.MoveToWorld(p, from.Map);
                                altar.Owner = from;
                                m_Deed.Delete();
                            }
                        }
                        else
                        {
                            from.SendLocalizedMessage(1075213); // The master of this realm has already been summoned and is engaged in combat.  Your opportunity will come after he has squashed the current batch of intruders!
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(500269); // You cannot build that there.
                    }
                }
                else
                {
                    from.SendLocalizedMessage(500269); // You cannot build that there.
                }
            }
        public void GetExodusAlter(Mobile from)
        {
            bool checktome = false;

            foreach (Item item in World.Items.Values)
            {
                if (item is ExodusTomeAltar)
                {
                    checktome = true;
                }
            }

            if (!checktome)
            {
                if (CheckParty(from))
                {
                    if (from.Region != null && (from.Map == Map.Trammel || from.Map == Map.Felucca))
                    {
                        ExodusTomeAltar alter;

                        if (CheckExodus())
                        {
                            if (from.Region.IsPartOf("Shrine of Compassion"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(1858, 875, 12), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                            else if (from.Region.IsPartOf("Shrine of Honesty"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(4209, 564, 60), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                            else if (from.Region.IsPartOf("Shrine of Honor"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(1727, 3528, 15), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                            else if (from.Region.IsPartOf("Shrine of Humility"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(4274, 3697, 12), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                            else if (from.Region.IsPartOf("Shrine of Justice"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(1301, 634, 28), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                            else if (from.Region.IsPartOf("Shrine of Sacrifice"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(3355, 290, 16), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                            else if (from.Region.IsPartOf("Shrine of Spirituality"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(1606, 2490, 20), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                            else if (from.Region.IsPartOf("Shrine of Valor"))
                            {
                                alter = new ExodusTomeAltar(from);
                                alter.MoveToWorld(new Point3D(2492, 3931, 17), from.Map);
                                PeerlessExodusAltar.m_Rituals.Add(new RitualArray {
                                    RitualMobile = from, Ritual1 = false, Ritual2 = false
                                });
                                this.Delete();
                                return;
                            }
                        }
                    }

                    from.SendMessage("That is not the right place to permorm thy ritual.");
                }
                else
                {
                    from.SendLocalizedMessage(1153595); // You must first join the party of the person who built this altar.
                }
            }
            else
            {
                from.SendLocalizedMessage(1075213); // The master of this realm has already been summoned and is engaged in combat.  Your opportunity will come after he has squashed the current batch of intruders!
            }
        }
Beispiel #9
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is ExodusTomeAltar)
                {
                    ExodusTomeAltar altar = (ExodusTomeAltar)targeted;

                    m_First_Ritual_Mobile = altar.Rituals.First().RitualMobile;
                    m_Ritual_Mobile       = altar.Rituals.Count(s => s.RitualMobile == m_Mobile);

                    if (altar.Rituals != null && altar.Rituals.Count != 0 && m_Mobile != null)
                    {
                        if (CheckParty(m_First_Ritual_Mobile, m_Mobile) || m_First_Ritual_Mobile == from)
                        {
                            if (m_First_Ritual_Mobile != m_Mobile && m_Ritual_Mobile == 0)
                            {
                                altar.Rituals.Add(new RitualArray {
                                    RitualMobile = m_Mobile, Ritual1 = false, Ritual2 = false
                                });
                            }

                            m_Ritual1 = altar.Rituals.Find(s => s.RitualMobile == m_Mobile).Ritual1;
                            m_Ritual2 = altar.Rituals.Find(s => s.RitualMobile == m_Mobile).Ritual2;

                            if (m_Item is ExodusSummoningRite)
                            {
                                if (!m_Ritual1 && !m_Ritual2)
                                {
                                    from.Say(1153597); // You place the rite within the tome and begin to meditate...
                                    altar.Rituals.Find(s => s.RitualMobile == m_Mobile).Ritual1 = true;
                                    m_Item.Delete();

                                    if (m_Robe != null)
                                    {
                                        m_Robe.CoolDown = TimeSpan.FromMinutes(14); // Do not give anyone
                                    }
                                }
                            }
                            else if (m_Item is ExodusSacrificalDagger)
                            {
                                if (m_Ritual1 && !m_Ritual2)
                                {
                                    from.Say(1153597); // You place the rite within the tome and begin to meditate...
                                    altar.Rituals.Find(s => s.RitualMobile == m_Mobile).Ritual2 = true;
                                    m_Item.Delete();
                                    Effects.SendLocationParticles(EffectItem.Create(((ExodusTomeAltar)targeted).Location, ((ExodusTomeAltar)targeted).Map, EffectItem.DefaultDuration), 0x373A, 10, 10, 2023);
                                }
                                else
                                {
                                    from.SendLocalizedMessage(1153603); // You must first use the Summoning Rite on a Summoning Tome.
                                }
                            }
                        }
                        else
                        {
                            from.SendLocalizedMessage(1153596); // You must join a party with the players you wish to perform the ritual with.
                        }
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1153601); // That is not a Summoning Tome.
                }
            }
        public void GetExodusAlter(Mobile from)
        {
            if (ExodusTomeAltar.Altar == null && VerLorRegController.Active && VerLorRegController.Mobile != null && CheckExodus())
            {
                if (CheckParty(from))
                {
                    if (from.Region != null && (from.Map == Map.Trammel || from.Map == Map.Felucca))
                    {
                        Point3D p = Point3D.Zero;

                        if (from.Region.IsPartOf("Shrine of Compassion"))
                        {
                            p = new Point3D(1858, 875, 12);
                        }
                        else if (from.Region.IsPartOf("Shrine of Honesty"))
                        {
                            p = new Point3D(4209, 564, 60);
                        }
                        else if (from.Region.IsPartOf("Shrine of Honor"))
                        {
                            p = new Point3D(1727, 3528, 15);
                        }
                        else if (from.Region.IsPartOf("Shrine of Humility"))
                        {
                            p = new Point3D(4274, 3697, 12);
                        }
                        else if (from.Region.IsPartOf("Shrine of Justice"))
                        {
                            p = new Point3D(1301, 634, 28);
                        }
                        else if (from.Region.IsPartOf("Shrine of Sacrifice"))
                        {
                            p = new Point3D(3355, 290, 16);
                        }
                        else if (from.Region.IsPartOf("Shrine of Spirituality"))
                        {
                            p = new Point3D(1606, 2490, 20);
                        }
                        else if (from.Region.IsPartOf("Shrine of Valor"))
                        {
                            p = new Point3D(2492, 3931, 17);
                        }

                        if (p != Point3D.Zero)
                        {
                            ExodusTomeAltar altar = new ExodusTomeAltar(from);
                            altar.MoveToWorld(p, from.Map);
                            altar.Rituals.Add(new RitualArray {
                                RitualMobile = from, Ritual1 = false, Ritual2 = false
                            });
                            this.Delete();
                        }
                    }
                    else
                    {
                        from.SendMessage("That is not the right place to perform thy ritual.");
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1153595); // You must first join the party of the person who built this altar.
                }
            }
            else
            {
                from.SendLocalizedMessage(1075213); // The master of this realm has already been summoned and is engaged in combat.  Your opportunity will come after he has squashed the current batch of intruders!
            }
        }