Esempio n. 1
0
 public InternalTarget(ItemRenameDeed deed)
     : base(12, false, TargetFlags.None)
 {
     m_Deed = deed;
 }
Esempio n. 2
0
 public RenamePrompt(Mobile from, ItemRenameDeed deed, Item target)
 {
     m_From   = from;
     m_Deed   = deed;
     m_Target = target;
 }
Esempio n. 3
0
        public bool ReceivePrize(Mobile from, int seed)
        {
            Item   i    = null;
            string text = "";

            if (seed <= 5)
            {
                text = "You win a brown bear rug!";
                i    = new BrownBearRugSouthDeed();
            }
            else if (seed < 10)
            {
                text = "You win a brown bear rug!";
                i    = new BrownBearRugEastDeed();
            }
            else if (seed < 25)
            {
                text  = "You win pet dye!";
                i     = new PetDye();
                i.Hue = Utility.RandomList(2419, 2418, 2413, 2406, 2215, 2425, 2219, 2207);
            }
            else if (seed < 30)
            {
                text = "You win a Monster Statuette!";
                i    = new MonsterStatuette(MonsterStatuetteType.Dragon);
            }
            else if (seed < 35)
            {
                text = "You win a rare artifact!";
                i    = new FullJars3();
            }
            else if (seed < 40)
            {
                text = "You win a rare artifact!";
                i    = new TarotCardsArtifact();
            }
            else if (seed < 45)
            {
                text = "You win a rare artifact!";
                i    = new PottedTree();
            }
            else if (seed < 55)
            {
                text = "You win a pouch with many pockets!";
                i    = new PouchWithManyPockets();
            }
            else if (seed < 60)
            {
                text = "You win an item rename deed!";
                i    = new ItemRenameDeed();
            }
            else if (seed < 65)
            {
                text = "You win a magical weapon!";
                BaseWeapon wep = Loot.RandomWeapon();
                if (wep != null)
                {
                    wep.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(6);
                    wep.DamageLevel     = WeaponDamageLevel.Might;
                    wep.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
                }

                i = wep;
            }
            else if (seed < 70)
            {
                text = "You win Town Sandals!";
                i    = new Sandals()
                {
                    Hue = Utility.RandomList(TownCloth.Hues)
                };
            }
            else if (seed < 75)
            {
                text = "You win a rare artifact!";
                i    = new LongFlask();
            }
            else if (seed < 80)
            {
                text = "You win a rare artifact!";
                i    = new FullJars2();
            }
            else if (seed < 85)
            {
                text = "You win a rare title dye!";
                i    = TitleDye.RandomRareTitleDye();
            }
            else if (seed < 95)
            {
                text = "You win an uncommon title dye!";
                i    = TitleDye.RandomUncommonTitleDye();
            }
            else if (seed < 100)
            {
                text = "You win another Dragon Ticket!";
                i    = new DragonLotteryTicket();
            }
            else if (seed < 105)
            {
                text = "You win some rare cloth!";
                i    = new RareCloth();
            }
            else
            {
                text = "Sorry! Try another ticket.";
            }


            if (text.Length > 0)
            {
                from.PublicOverheadMessage(Network.MessageType.Regular, 0, false, text);
            }

            if (i != null)
            {
                if (!from.AddToBackpack(i))
                {
                    i.Delete();
                    from.SendMessage("You don't have enough room in your backpack. Please make room and try again.");
                    return(false);
                }
            }

            return(true);
        }