Exemple #1
0
        public static void SetupCoffer(Coffer coffer)
        {
            if ((coffer.Name).Contains(" coffer"))
            {
                coffer.CofferType = (coffer.Name).Replace(" coffer", "");
            }
            coffer.Name = "coffer";

            coffer.Hue = 0x6A5;
            if (Utility.RandomMinMax(0, 13) != 13)
            {
                coffer.Hue = Server.Misc.RandomThings.GetRandomWoodColor();
            }

            int money1 = 30;
            int money2 = 120;

            double w1 = money1 * (DifficultyLevel.GetGoldCutRate() * .01);
            double w2 = money2 * (DifficultyLevel.GetGoldCutRate() * .01);

            money1 = (int)w1;
            money2 = (int)w2;

            coffer.CofferGold     = Utility.RandomMinMax(money1, money2);
            coffer.CofferRobber   = "";
            coffer.CofferRobbed   = 0;
            coffer.CofferSnooperA = null;
            coffer.CofferSnooperB = null;
            coffer.CofferSnooperC = null;
            coffer.CofferSnooperD = null;
            coffer.CofferSnooperE = null;
        }
Exemple #2
0
        public void BeginRepair(Mobile from)
        {
            // = GOLD PIECES
            // WIZARD FOR THE GOLD STONE LIMITER ////////////////////////////////////
            int money = 1000;

            double w = money * (DifficultyLevel.GetGoldCutRate() * .01);

            money = (int)w;

            if (Deleted || !from.Alive)
            {
                return;
            }

            int nCost = money;

            if (BeggingPose(from) > 0)               // LET US SEE IF THEY ARE BEGGING - WIZARD
            {
                nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                {
                    nCost = 1;
                }
                SayTo(from, "Since you are begging, do you still want me to decipher a treasure map for you, it will only cost " + nCost.ToString() + " gold per level of the map?");
            }
            else
            {
                SayTo(from, "If you want me to decipher a treasure map for you, it will cost " + nCost.ToString() + " gold per level of the map");
            }

            from.Target = new RepairTarget(this);
        }
Exemple #3
0
        public override int ComputeGold(int quantity, bool exceptional, BulkMaterialType material, int itemCount, Type type)
        {
            int[][][] goldTable = m_GoldTable;

            int typeIndex = ComputeType(type, itemCount);
            int quanIndex = (quantity == 20 ? 2 : quantity == 15 ? 1 : 0);
            int mtrlIndex = (material >= BulkMaterialType.DullCopper && material <= BulkMaterialType.Valorite) ? 1 + (int)(material - BulkMaterialType.DullCopper) : 0;

            if (exceptional)
            {
                typeIndex++;
            }

            int gold = goldTable[typeIndex][quanIndex][mtrlIndex];

            int min = (gold * 9) / 10;
            int max = (gold * 10) / 9;

            int money = Utility.RandomMinMax(min, max);               // WIZARD ADDED FOR GOLD CONTROLLER

            double w = money * (DifficultyLevel.GetGoldCutRate() * .01);

            money = (int)w;

            return(money);
        }
Exemple #4
0
        public StealMetalBox()
        {
            Hue    = BoxColor;
            Name   = BoxName;
            Weight = 10.0;
            GumpID = 0x4B;

            int nStolen = Utility.RandomMinMax(1, 3);

            if (nStolen == 1)
            {
                DropItem(Loot.RandomArty());
            }
            else if (nStolen == 2)
            {
                DropItem(DungeonLoot.RandomSlayer());
            }
            else if (nStolen < 5)
            {
                DropItem(Loot.RandomSArty());
            }
            else if (nStolen < 9)
            {
                DropItem(Loot.RandomRelic());
            }
            else
            {
                Item idropped = DungeonLoot.RandomRare();
                if (idropped is OilLeather || idropped is OilMetal)
                {
                    idropped.Amount = Utility.RandomMinMax(1, 8);
                }
                else if (idropped is MagicalDyes)
                {
                    idropped.Amount = Utility.RandomMinMax(3, 10);
                }
                else if (idropped.Stackable == true)
                {
                    idropped.Amount = Utility.RandomMinMax(5, 20);
                }
                DropItem(idropped);
            }

            int money = Utility.RandomMinMax(1000, 4000);

            double w = money * (DifficultyLevel.GetGoldCutRate() * .01);

            money = (int)w;
            DropItem(new Gold(money));
        }
Exemple #5
0
        public override int ComputeGold(int quantity, bool exceptional, BulkMaterialType material, int itemCount, Type type)
        {
            int[][][] goldTable = (Core.AOS ? m_AosGoldTable : m_OldGoldTable);

            int typeIndex = ((itemCount == 6 ? 3 : itemCount == 5 ? 2 : itemCount == 4 ? 1 : 0) * 2) + (exceptional ? 1 : 0);
            int quanIndex = (quantity == 20 ? 2 : quantity == 15 ? 1 : 0);
            int mtrlIndex = (material == BulkMaterialType.Barbed ? 3 : material == BulkMaterialType.Horned ? 2 : material == BulkMaterialType.Spined ? 1 : 0);

            int gold = goldTable[typeIndex][quanIndex][mtrlIndex];

            int min = (gold * 9) / 10;
            int max = (gold * 10) / 9;

            int money = Utility.RandomMinMax(min, max);               // WIZARD ADDED FOR GOLD CONTROLLER

            double w = money * (DifficultyLevel.GetGoldCutRate() * .01);

            money = (int)w;

            return(money);
        }
Exemple #6
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                // = GOLD PIECES
                // WIZARD FOR THE GOLD STONE LIMITER ////////////////////////////////////
                int money = 1000;

                double w = money * (DifficultyLevel.GetGoldCutRate() * .01);

                money = (int)w;

                if (targeted is TreasureMap && from.Backpack != null)
                {
                    TreasureMap tmap      = targeted as TreasureMap;
                    Container   pack      = from.Backpack;
                    int         toConsume = tmap.Level * money;

                    if (BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        toConsume = toConsume - (int)((from.Skills[SkillName.Begging].Value * 0.005) * toConsume);
                    }

                    if (toConsume == 0)
                    {
                        return;
                    }

                    if (tmap.Decoder != null)
                    {
                        m_Mapmaker.SayTo(from, "That map has already been deciphered.");
                    }
                    else if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS
                        if (tmap.Level == 1)
                        {
                            m_Mapmaker.SayTo(from, "This map was really quite simple.");
                        }
                        else if (tmap.Level == 2)
                        {
                            m_Mapmaker.SayTo(from, "Seemed pretty easy...so here it is.");
                        }
                        else if (tmap.Level == 3)
                        {
                            m_Mapmaker.SayTo(from, "This map was a bit of a challenge.");
                        }
                        else if (tmap.Level == 4)
                        {
                            m_Mapmaker.SayTo(from, "Whoever drew this map, did not want it found.");
                        }
                        else if (tmap.Level == 5)
                        {
                            m_Mapmaker.SayTo(from, "This took more research than normal.");
                        }
                        else
                        {
                            m_Mapmaker.SayTo(from, "With the ancient writings and riddles, this map should now lead you there.");
                        }

                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        Effects.PlaySound(from.Location, from.Map, 0x249);
                        tmap.Decoder = from;
                    }
                    else
                    {
                        m_Mapmaker.SayTo(from, "It would cost you {0} gold for me to decipher that map.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                else
                {
                    m_Mapmaker.SayTo(from, "That does not need my services.");
                }
            }