コード例 #1
0
ファイル: Feather.cs プロジェクト: proxeeus/UORebirth
 private void OnTargShafts(Mobile from, object target)
 {
     if (target is Shaft)
     {
         Shaft shaft = (Shaft)target;
         if (shaft.IsChildOf(from.Backpack))
         {
             new Engines.Craft.FletchingSystem(this, shaft).Begin(from, null);
         }
         else
         {
             from.SendAsciiMessage("That belongs to someone else.");
         }
     }
     else
     {
         from.SendAsciiMessage("You can't use feathers on that.");
     }
 }
コード例 #2
0
ファイル: UOACZShaftBundle.cs プロジェクト: Pumpk1ns/outlands
        public override void OnDoubleClick(Mobile from)
        {
            base.OnDoubleClick(from);

            if (!IsChildOf(from.Backpack))
            {
                from.SendMessage("That item must be in your pack in order to use it.");
                return;
            }

            from.SendMessage("You separate the shaft bundle and its contents are placed in your backpack.");

            Item[] shafts = from.Backpack.FindItemsByType(typeof(Shaft));

            Shaft largestItem  = null;
            int   highestCount = 0;

            foreach (Item item in shafts)
            {
                Shaft shaft = item as Shaft;

                if (shaft.Amount > highestCount)
                {
                    largestItem = shaft;
                }
            }

            if (largestItem != null)
            {
                largestItem.Amount += 25;
            }

            else
            {
                from.Backpack.DropItem(new Shaft(25));
            }

            Delete();
        }
コード例 #3
0
ファイル: WalkingDead.cs プロジェクト: zerodowned/angelisland
		public override void InitOutfit()
		{
			WipeLayers();

			// black backpack. we need a backpack so our walking-dead can be disarmed, and black is cool
			Shaft WoodenStake = new Shaft();
			WoodenStake.Hue = 51;
			WoodenStake.Name = "wooden stake";
			PackItem(WoodenStake);
			Backpack.Hue = 0x01;

			if (Utility.RandomBool())
				AddItem(new Cleaver());
			else
				AddItem(new ButcherKnife());

			// walking dead are naked
			if (this.Female)
			{

				Item hair = new Item(0x203C);
				if (Utility.RandomMinMax(0, 100) <= 20) //20% chance to have black hair
				{
					hair.Hue = 0x1;
				}
				else
					hair.Hue = Utility.RandomHairHue();

				hair.Layer = Layer.Hair;
				AddItem(hair);
			}
			else
			{
				Item hair2 = new Item(Utility.RandomList(0x203C, 0x203B));
				hair2.Hue = Utility.RandomHairHue();
				hair2.Layer = Layer.Hair;
				AddItem(hair2);
			}
		}
コード例 #4
0
ファイル: VladDracula.cs プロジェクト: zerodowned/angelisland
		public override void InitOutfit()
		{
			WipeLayers();

			// add a "wooden stake" to our loot
			Shaft WoodenStake = new Shaft();
			WoodenStake.Hue = 51;
			WoodenStake.Name = "wooden stake";
			PackItem(WoodenStake);

			// black backpack. we need a backpack so our walking-dead can be disarmed, and black is cool
			Backpack.Hue = 0x01;

			// add Scepter
			Scepter weapon = new Scepter();		// can disarm, but can't steal
			weapon.LootType = LootType.Newbied;	// can't steal (will drop on death)
			AddItem(weapon);

			Item hair = new LongHair(1); 
			Item pants = new LongPants(0x1);
			Item shirt = new FancyShirt();
			hair.Layer = Layer.Hair;
			AddItem(hair);
			AddItem(pants);
			AddItem(shirt);

			Item necklace = new GoldNecklace();
			AddItem(necklace);
			Item ring = new GoldRing();
			AddItem(ring);
			Item bracelet = new GoldBracelet();
			AddItem(bracelet);

			Item boots = new Sandals(0x1);
			AddItem(boots);
		}
コード例 #5
0
ファイル: Fletching.cs プロジェクト: FreeReign/Rebirth-Repack
        public override void Finish( CraftSystemItem item )
        {
            End();

            if ( m_Mobile.Deleted || !m_Mobile.Alive || m_Wood == null || m_Wood.Deleted )
                return;

            if ( !CheckTool() )
                return;

            if ( item.CreateType == typeof( Shaft ) )
            {
                if ( HasResources( m_Wood.Amount, typeof( Shaft ) ) )
                {
                    if ( m_Mobile.CheckSkill( item.Skill, item.MinSkill, item.MaxSkill ) )
                    {
                        Item created = new Shaft( m_Wood.Amount );
                        m_Wood.Delete();
                        OnSuccess( created );
                    }
                    else
                    {
                        OnFailure();
                    }
                }
                else
                {
                    OnNotEnoughResources();
                }
            }
            else
            {
                base.Finish(item);
            }
        }
コード例 #6
0
ファイル: Fletching.cs プロジェクト: FreeReign/Rebirth-Repack
 public FletchingSystem( Feather feather, Shaft shaft )
 {
     m_Shafts = shaft;
     m_Feathers = feather;
 }