コード例 #1
0
ファイル: Winter2006.cs プロジェクト: dpisanu/xrunuo
        public override void GiveGift(Mobile mob)
        {
            Container stocking = null;

            if (Utility.RandomBool())
            {
                stocking = new GreenStocking();
            }
            else
            {
                stocking = new RedStocking();
            }

            stocking.DropItem(new SnowPile());
            stocking.DropItem(new HolidayCard(mob.Name));
            stocking.DropItem(new GingerbreadCookie(true));
            stocking.DropItem(new GingerbreadCookie(true));
            stocking.DropItem(new RecipeScroll(93));
            stocking.DropItem(new RedCandyCane(0x2BDD));
            stocking.DropItem(new RedCandyCane(0x2BDE));
            stocking.DropItem(new GreenCandyCane(0x2BDF));
            stocking.DropItem(new GreenCandyCane(0x2BE0));
            stocking.DropItem(new GingerbreadHouseDeed());

            switch (GiveGift(mob, stocking))
            {
            case GiftResult.Backpack:
                mob.SendMessage(String.Format("Happy Holidays from the entire {0} Staff Team. We have placed a stocking for you in your backpack.", Core.Config.ServerName));
                break;

            case GiftResult.BankBox:
                mob.SendMessage(String.Format("Happy Holidays from the entire {0} Staff Team. We have placed a stocking for you in your bank box.", Core.Config.ServerName));
                break;
            }
        }
コード例 #2
0
        public override void GiveGift(Mobile mob)
        {
            RedStocking bag = new RedStocking();

            bag.DropItem(new HolidayTreeDeed());
            bag.DropItem(new GingerBreadCookie());
            bag.DropItem(new CandyCane());
            bag.DropItem(new HearthOfHomeFireDeed());
            bag.DropItem(new HolidayGarland2010());
            bag.DropItem(new HolidayGarland2010());
            bag.DropItem(new BlueSnowflake());
            bag.DropItem(new WhiteSnowflake());

            RudolphStatue deer = new RudolphStatue();

            deer.Name = "Rudolph the Riendeer raised by " + mob.Name;
            bag.DropItem(deer);

            SantasReindeer2 deer2 = new SantasReindeer2();

            deer2.Name = "A Reindeer raised by " + mob.Name;
            bag.DropItem(deer2);

/*
 *                      int random = Utility.Random( 100 );
 *
 *                      if ( random < 30 )
 *                              bag.DropItem( new ShazzyToken() );
 *                      else
 *                              bag.DropItem( new HeritageToken() );
 */
            switch (GiveGift(mob, bag))
            {
            case GiftResult.Backpack:
                mob.SendMessage(0x482, "Happy Holidays! A Red Holiday Stocking has been placed in your backpack.");
                break;

            case GiftResult.BankBox:
                mob.SendMessage(0x482, "Happy Holidays! A Red Holiday Stocking has been placed in your bank box.");
                break;
            }
            GreenStocking bag2 = new GreenStocking();

            bag2.DropItem(new GingerBreadCookie());
            bag2.DropItem(new CandyCane());
            bag2.DropItem(new WreathDeed());
            bag2.DropItem(new SantasSleighDeed());
            bag2.DropItem(new HolidayGarland2010());
            bag2.DropItem(new HolidayGarland2010());

            RedPoinsettia sman = new RedPoinsettia();

            sman.Name = "A Red Poinsettia grown by " + mob.Name;
            bag2.DropItem(sman);

            WhitePoinsettia white = new WhitePoinsettia();

            white.Name = "A White Poinsettia grown by " + mob.Name;
            bag2.DropItem(white);

            //int random = Utility.Random( 100 );

/*
 *                      if ( random < 30 )
 *                              bag2.DropItem( new HeritageToken() );
 *                      else
 *                              bag2.DropItem( new ShazzyToken() );
 *
 */         switch (GiveGift(mob, bag2))
            {
            case GiftResult.Backpack:
                mob.SendMessage(0x482, "Happy Holidays from Shazzy's Shard! A Green Holiday Stocking has been placed in your backpack.");
                break;

            case GiftResult.BankBox:
                mob.SendMessage(0x482, "Happy Holidays from Shazzy's Shard! A Green Holiday Stocking has been placed in your bank box.");
                break;
            }
        }