Beispiel #1
0
        public bool SubmitSolution(Mobile m, UnderworldPuzzleSolution solution)
        {
            if (solution.Matches(m_Solution))
            {
                Item item = Loot.Construct(m_Rewards[Utility.Random(m_Rewards.Length)]);

                if (item != null)
                {
                    if (item is VoidEssence || item is SilverSerpentVenom || item is ToxicVenomSac)
                    {
                        item.Amount = 30;
                    }

                    if (item is LuckyCoin)
                    {
                        item.Amount = Utility.RandomMinMax(2, 6);
                    }

                    if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
                    {
                        m.BankBox.DropItem(item);
                    }
                }

                m.PlaySound(0x3D);
                m.SendLocalizedMessage(1113579); // Correct Code Entered. Crystal Lock Disengaged.

                Delete();
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        public bool SubmitSolution(Mobile m, UnderworldPuzzleSolution solution)
        {
            if (solution.Matches(m_Solution))
            {
                Item item = Loot.Construct(m_Rewards[Utility.Random(m_Rewards.Length)]);

                if (item != null)
                {
                    if (item is VoidEssence || item is SilverSerpentVenom || item is ToxicVenomSac)
                        item.Amount = 30;

                    if (item is LuckyCoin)
                        item.Amount = Utility.RandomMinMax(2, 6);

                    if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
                        m.BankBox.DropItem(item);
                }

                m.PlaySound(0x3D);
                m.SendLocalizedMessage(1113579); // Correct Code Entered. Crystal Lock Disengaged.

                Delete();
                return true;
            }

            return false;
        }
Beispiel #3
0
        public bool SubmitSolution(Mobile m, UnderworldPuzzleSolution solution)
        {
            if (m == null)
            {
                return(false);
            }

            if (solution.Matches(Solution))
            {
                Item item = Loot.Construct(m_Rewards[Utility.Random(m_Rewards.Length)]);

                if (item != null)
                {
                    if (item is VoidEssence || item is SilverSerpentVenom || item is ToxicVenomSac)
                    {
                        item.Amount = 30;
                    }

                    if (item is LuckyCoin)
                    {
                        item.Amount = Utility.RandomMinMax(2, 6);
                    }

                    if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
                    {
                        m.BankBox.DropItem(item);
                    }
                }

                m.PlaySound(0x3D);
                m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1113579, m.NetState); // Correct Code Entered. Crystal Lock Disengaged.

                Delete();
                return(true);
            }
            else
            {
                PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1150177, m.NetState); // Incorrect Code Sequence. Access Denied.
                return(false);
            }
        }