示例#1
0
        public static bool CutLeather(Item item, Mobile from)
        {
            if (!item.IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack.
                return(false);
            }

            Leather cloth = new Leather();

            cloth.Amount = 1;
            cloth.Hue    = item.Hue;

            item.Delete();

            from.AddToBackpack(cloth);
            from.SendMessage("You cut the item into cloth.");

            return(false);
        }
        public void OnChop(Mobile from)
        {
            if (from.InRange(this.GetWorldLocation(), 2))
            {
                Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10);                   //smoke or dust
                Effects.PlaySound(Location, Map, 0x11C);

                switch (Utility.Random(25))
                {
                case 0:
                    Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10);                               // Poison Player
                    from.PlaySound(0x231);
                    from.ApplyPoison(from, Poison.Lesser);
                    break;

                case 1:
                    Effects.SendLocationEffect(from, from.Map, 0x3709, 30);                             // Burn Player
                    from.PlaySound(0x54);
                    AOS.Damage(from, from, Utility.RandomMinMax(2, 5), 0, 100, 0, 0, 0);
                    break;

                case 2:
                    new BarrelLid().MoveToWorld(Location, Map);
                    new BarrelHoops().MoveToWorld(Location, Map);
                    break;

                case 3:
                    Bandage b = new Bandage(Utility.RandomMinMax(5, 10));
                    b.MoveToWorld(Location, Map);
                    break;

                case 4:
                    new BarrelStaves().MoveToWorld(Location, Map);
                    new BarrelHoops().MoveToWorld(Location, Map);
                    break;

                case 5:
                    Gold g = new Gold(Utility.RandomMinMax(25, 50));
                    g.MoveToWorld(Location, Map);
                    break;

                case 6:
                    new AgilityPotion().MoveToWorld(Location, Map);
                    break;

                case 7:
                    new LesserCurePotion().MoveToWorld(Location, Map);
                    break;

                case 8:
                    new LesserExplosionPotion().MoveToWorld(Location, Map);
                    break;

                case 9:
                    new LesserHealPotion().MoveToWorld(Location, Map);
                    break;

                case 10:
                    new LesserLightningPotion().MoveToWorld(Location, Map);
                    break;

                case 11:
                    new LesserManaPotion().MoveToWorld(Location, Map);
                    break;

                case 12:
                    new MindPotion().MoveToWorld(Location, Map);
                    break;

                case 13:
                    new LesserPoisonPotion().MoveToWorld(Location, Map);
                    break;

                case 14:
                    new LesserShatterPotion().MoveToWorld(Location, Map);
                    break;

                case 15:
                    new StrengthPotion().MoveToWorld(Location, Map);
                    break;

                case 16:
                    new LesserToxicPotion().MoveToWorld(Location, Map);
                    break;

                case 17:
                    Arrow arrow = new Arrow(Utility.RandomMinMax(5, 25));
                    arrow.MoveToWorld(Location, Map);
                    break;

                case 18:
                    Bolt bolt = new Bolt(Utility.RandomMinMax(5, 25));
                    bolt.MoveToWorld(Location, Map);
                    break;

                case 19:
                    IronIngot ii = new IronIngot(Utility.RandomMinMax(5, 25));
                    ii.MoveToWorld(Location, Map);
                    break;

                case 20:
                    Leather leather = new Leather(Utility.RandomMinMax(5, 25));
                    leather.MoveToWorld(Location, Map);
                    break;

                case 21:
                    Log log = new Log(Utility.RandomMinMax(5, 25));
                    log.MoveToWorld(Location, Map);
                    break;

                case 22:
                    BoltOfCloth boc = new BoltOfCloth(Utility.RandomMinMax(1, 25));
                    boc.MoveToWorld(Location, Map);
                    break;

                case 23:
                    SpidersSilk spiderssilk = new SpidersSilk(Utility.RandomMinMax(5, 25));
                    spiderssilk.MoveToWorld(Location, Map);
                    break;

                case 24:
                    SulfurousAsh sulfurousash = new SulfurousAsh(Utility.RandomMinMax(1, 25));
                    sulfurousash.MoveToWorld(Location, Map);
                    break;
                }

                Destroy();
            }
            else
            {
                from.SendLocalizedMessage(500446);                   // That is too far away.
            }
        }
示例#3
0
		public virtual void OnCarve( Mobile from, Corpse corpse, Item with )
		{
			int feathers = Feathers;
			int wool = Wool;
			int meat = Meat;
			int hides = Hides;
			int scales = Scales;

			if ( (feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned || IsBonded || corpse.Animated )
			{
				if ( corpse.Animated ) 
					corpse.SendLocalizedMessageTo( from, 500464 );	// Use this on corpses to carve away meat and hide
				else
				from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
			}
			else
			{
				if( Core.ML && from.Race == Race.Human )
				{
					hides = (int)Math.Ceiling( hides * 1.1 );	//10% Bonus Only applies to Hides, Ore & Logs
				}

				if ( corpse.Map == Map.Felucca )
				{
					feathers *= 2;
					wool *= 2;
					hides *= 2;

					if (Core.ML)
					{
						meat *= 2;
						scales *= 2;
					}
				}

				new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

				if ( feathers != 0 )
				{
					corpse.AddCarvedItem( new Feather( feathers ), from );
					from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
				}

				if ( wool != 0 )
				{
					corpse.AddCarvedItem( new TaintedWool( wool ), from );
					from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
				}

				if ( meat != 0 )
				{
					if ( MeatType == MeatType.Ribs )
						corpse.AddCarvedItem( new RawRibs( meat ), from );
					else if ( MeatType == MeatType.Bird )
						corpse.AddCarvedItem( new RawBird( meat ), from );
					else if ( MeatType == MeatType.LambLeg )
						corpse.AddCarvedItem( new RawLambLeg( meat ), from );

					from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
				}

				if ( hides != 0 )
				{
					Item holding = from.Weapon as Item;
					if ( Core.AOS && ( holding is SkinningKnife /* TODO: || holding is ButcherWarCleaver || with is ButcherWarCleaver */ ) )
					{
						Item leather = null;

						switch ( HideType )
						{
							case HideType.Regular: leather = new Leather( hides ); break;
							case HideType.Spined: leather = new SpinedLeather( hides ); break;
							case HideType.Horned: leather = new HornedLeather( hides ); break;
							case HideType.Barbed: leather = new BarbedLeather( hides ); break;
						}

						if ( leather != null )
						{
							if ( !from.PlaceInBackpack( leather ) )
							{
								corpse.DropItem( leather );
								from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
							}
							else
								from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.
						}
					}
					else
					{
						if ( HideType == HideType.Regular )
							corpse.DropItem( new Hides( hides ) );
						else if ( HideType == HideType.Spined )
							corpse.DropItem( new SpinedHides( hides ) );
						else if ( HideType == HideType.Horned )
							corpse.DropItem( new HornedHides( hides ) );
						else if ( HideType == HideType.Barbed )
							corpse.DropItem( new BarbedHides( hides ) );

						from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
					}
				}

				if ( scales != 0 )
				{
					ScaleType sc = this.ScaleType;

					switch ( sc )
					{
						case ScaleType.Red:     corpse.AddCarvedItem( new RedScales( scales ), from ); break;
						case ScaleType.Yellow:  corpse.AddCarvedItem( new YellowScales( scales ), from ); break;
						case ScaleType.Black:   corpse.AddCarvedItem( new BlackScales( scales ), from ); break;
						case ScaleType.Green:   corpse.AddCarvedItem( new GreenScales( scales ), from ); break;
						case ScaleType.White:   corpse.AddCarvedItem( new WhiteScales( scales ), from ); break;
						case ScaleType.Blue:    corpse.AddCarvedItem( new BlueScales( scales ), from ); break;
						case ScaleType.All:
						{
							corpse.AddCarvedItem( new RedScales( scales ), from );
							corpse.AddCarvedItem( new YellowScales( scales ), from );
							corpse.AddCarvedItem( new BlackScales( scales ), from );
							corpse.AddCarvedItem( new GreenScales( scales ), from );
							corpse.AddCarvedItem( new WhiteScales( scales ), from );
							corpse.AddCarvedItem( new BlueScales( scales ), from );
							break;
						}
					}

					from.SendMessage( "You cut away some scales, but they remain on the corpse." );
				}

				corpse.Carved = true;

				if ( corpse.IsCriminalAction( from ) )
					from.CriminalAction( true );
			}
		}
示例#4
0
        public virtual void OnCarve( Mobile from, Corpse corpse, bool butcher )
        {
            int feathers = Feathers;
            int wool = Wool;
            int meat = Meat;
            int hides = Hides;
            int scales = Scales;
            int blood = Blood;
            int fur = Fur;

            if ( ( feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0 && blood == 0 && fur == 0 ) || Summoned || IsBonded )
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
            else
            {
                if ( from.Race == Race.Human )
                    hides = (int) Math.Ceiling( hides * 1.1 ); // 10% Bonus Only applies to Hides, Ore & Logs

                if ( corpse.Map == Map.Felucca )
                {
                    feathers *= 2;
                    wool *= 2;
                    meat *= 2;
                    hides *= 2;
                    scales *= 2;
                    blood *= 2;
                    fur *= 2;
                }

                new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

                if ( feathers != 0 )
                {
                    corpse.AddCarvedItem( new Feather( feathers ), from );
                    from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
                }

                if ( wool != 0 )
                {
                    corpse.AddCarvedItem( new Wool( wool ), from );
                    from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
                }

                if ( meat != 0 )
                {
                    if ( MeatType == MeatType.Ribs )
                        corpse.AddCarvedItem( new RawRibs( meat ), from );
                    else if ( MeatType == MeatType.Bird )
                        corpse.AddCarvedItem( new RawBird( meat ), from );
                    else if ( MeatType == MeatType.LambLeg )
                        corpse.AddCarvedItem( new RawLambLeg( meat ), from );
                    else if ( MeatType == MeatType.Rotworm )
                        corpse.AddCarvedItem( new RawRotwormMeat( meat ), from );

                    from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
                }

                if ( hides != 0 )
                {
                    if ( butcher )
                    {
                        Item item = null;

                        if ( HideType == HideType.Regular )
                            item = new Leather( hides );
                        else if ( HideType == HideType.Spined )
                            item = new SpinedLeather( hides );
                        else if ( HideType == HideType.Horned )
                            item = new HornedLeather( hides );
                        else if ( HideType == HideType.Barbed )
                            item = new BarbedLeather( hides );

                        if ( item != null )
                        {
                            if ( from.AddToBackpack( item ) )
                            {
                                from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.
                            }
                            else
                            {
                                corpse.AddCarvedItem( item, from );
                                from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
                            }
                        }
                    }
                    else
                    {
                        if ( HideType == HideType.Regular )
                            corpse.AddCarvedItem( new Hides( hides ), from );
                        else if ( HideType == HideType.Spined )
                            corpse.AddCarvedItem( new SpinedHides( hides ), from );
                        else if ( HideType == HideType.Horned )
                            corpse.AddCarvedItem( new HornedHides( hides ), from );
                        else if ( HideType == HideType.Barbed )
                            corpse.AddCarvedItem( new BarbedHides( hides ), from );

                        from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
                    }
                }

                if ( scales != 0 )
                {
                    ScaleType sc = this.ScaleType;

                    switch ( sc )
                    {
                        case ScaleType.Red:
                            corpse.AddCarvedItem( new RedScales( scales ), from );
                            break;
                        case ScaleType.Yellow:
                            corpse.AddCarvedItem( new YellowScales( scales ), from );
                            break;
                        case ScaleType.Black:
                            corpse.AddCarvedItem( new BlackScales( scales ), from );
                            break;
                        case ScaleType.Green:
                            corpse.AddCarvedItem( new GreenScales( scales ), from );
                            break;
                        case ScaleType.White:
                            corpse.AddCarvedItem( new WhiteScales( scales ), from );
                            break;
                        case ScaleType.Blue:
                            corpse.AddCarvedItem( new BlueScales( scales ), from );
                            break;
                        case ScaleType.All:
                            {
                                corpse.AddCarvedItem( new RedScales( scales ), from );
                                corpse.AddCarvedItem( new YellowScales( scales ), from );
                                corpse.AddCarvedItem( new BlackScales( scales ), from );
                                corpse.AddCarvedItem( new GreenScales( scales ), from );
                                corpse.AddCarvedItem( new WhiteScales( scales ), from );
                                corpse.AddCarvedItem( new BlueScales( scales ), from );
                                break;
                            }
                    }

                    from.SendLocalizedMessage( 1079284 ); // You cut away some scales, but they remain on the corpse.
                }

                if ( blood != 0 )
                {
                    corpse.AddCarvedItem( new DragonsBlood( blood ), from );
                    from.SendLocalizedMessage( 1094946 ); // Some blood is left on the corpse.
                }

                if ( fur != 0 )
                {
                    if ( FurType == FurType.Green )
                        corpse.AddCarvedItem( new GreenFur( fur ), from );
                    else if ( FurType == FurType.Red )
                        corpse.AddCarvedItem( new RedFur( fur ), from );
                    else if ( FurType == FurType.Yellow )
                        corpse.AddCarvedItem( new YellowFur( fur ), from );
                    else if ( FurType == FurType.DarkGreen )
                        corpse.AddCarvedItem( new DarkGreenFur( fur ), from );

                    from.SendLocalizedMessage( 1112765 ); // You shear it, and the fur is now on the corpse.
                }

                corpse.Carved = true;

                if ( corpse.IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
        }
示例#5
0
        public override void OnComponentUsed(AddonComponent c, Mobile from)
        {
            BaseHouse house = BaseHouse.FindHouseAt(this);

            /*
             * Unique problems have unique solutions.  OSI does not have a problem with 1000s of mining carts
             * due to the fact that they have only a miniscule fraction of the number of 10 year vets that a
             * typical RunUO shard will have (RunUO's scaled down account aging system makes this a unique problem),
             * and the "freeness" of free accounts. We also dont have mitigating factors like inactive (unpaid)
             * accounts not gaining veteran time.
             *
             * The lack of high end vets and vet rewards on OSI has made testing the *exact* ranging/stacking
             * behavior of these things all but impossible, so either way its just an estimation.
             *
             * If youd like your shard's carts/stumps to work the way they did before, simply replace the check
             * below with this line of code:
             *
             * if (!from.InRange(GetWorldLocation(), 2)
             *
             * However, I am sure these checks are more accurate to OSI than the former version was.
             *
             */

            if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this) || !((from.Z - Z) > -3 && (from.Z - Z) < 3))
            {
                from.LocalOverheadMessage(Network.MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
            }
            else if (house != null && house.HasSecureAccess(from, SecureLevel.Friends))
            {
                if (m_ResourceCount > 0)
                {
                    Item res = null;

                    switch (Utility.Random(5))
                    {
                    case 0: res = new Wool(); break;

                    case 1: res = new Leather(); break;

                    case 2: res = new SpinedLeather(); break;

                    case 3: res = new HornedLeather(); break;

                    case 4: res = new BarbedLeather(); break;
                    }

                    int amount = Math.Min(10, m_ResourceCount);
                    res.Amount = amount;

                    if (!from.PlaceInBackpack(res))
                    {
                        res.Delete();
                        from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
                    }
                    else
                    {
                        ResourceCount -= amount;
                        PublicOverheadMessage(MessageType.Regular, 0, 1151834, m_ResourceCount.ToString()); // Resources: ~1_COUNT~
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1094725); // There are no more ResourceCounts available at this time.
                }
            }
            else
            {
                from.SendLocalizedMessage(1061637); // You are not allowed to access
            }
        }
示例#6
0
		public virtual void OnCarve( Mobile from, Corpse corpse, Item with )
		{
			int feathers = Feathers;
			int wool = Wool;
			int meat = Meat;
			int hides = Hides;
			int scales = Scales;

			if ( (feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned || IsBonded )
			{
				from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
			}
			else
			{
				if( Core.ML && from.Race == Race.Human )
				{
					hides = (int)Math.Ceiling( hides * 1.1 );	//10% Bonus Only applies to Hides, Ore & Logs
				}

				if ( corpse.Map == Map.Felucca )
				{
					feathers *= 2;
					wool *= 2;
					hides *= 2;
				}

				new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

				if ( feathers != 0 )
				{
					corpse.DropItem( new Feather( feathers ) );
					from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
				}

				if ( wool != 0 )
				{
					corpse.DropItem( new Wool( wool ) );
					from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
				}

				if ( meat != 0 )
				{
					if ( MeatType == MeatType.Ribs )
						corpse.DropItem( new RawRibs( meat ) );
					else if ( MeatType == MeatType.Bird )
						corpse.DropItem( new RawBird( meat ) );
					else if ( MeatType == MeatType.LambLeg )
						corpse.DropItem( new RawLambLeg( meat ) );

					from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
				}

				#region GeNova: Mondain's Legacy
				if ( hides != 0 && with is ButchersWarCleaver )
				{
					Item leather = null;
					
					if ( HideType == HideType.Regular )
						leather = new Leather( hides );
					else if ( HideType == HideType.Spined )
						leather = new SpinedLeather( hides );
					else if ( HideType == HideType.Horned )
						leather = new HornedLeather( hides );
					else if ( HideType == HideType.Barbed )
						leather = new BarbedLeather( hides );
						
					if ( leather != null )
					{
						if ( !from.PlaceInBackpack( leather ) )
						{						
							leather.MoveToWorld( from.Location, from.Map );
							from.SendLocalizedMessage( 1077182 ); // Your backpack is too full, and it falls to the ground.	
						}	
						else
							from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.		
					}							
				}
				#endregion
				else if ( hides != 0 )
				{
					if ( HideType == HideType.Regular )
						corpse.DropItem( new Hides( hides ) );
					else if ( HideType == HideType.Spined )
						corpse.DropItem( new SpinedHides( hides ) );
					else if ( HideType == HideType.Horned )
						corpse.DropItem( new HornedHides( hides ) );
					else if ( HideType == HideType.Barbed )
						corpse.DropItem( new BarbedHides( hides ) );

					from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
				}

				if ( scales != 0 )
				{
					ScaleType sc = this.ScaleType;

					switch ( sc )
					{
						case ScaleType.Red:		corpse.DropItem( new RedScales( scales ) ); break;
						case ScaleType.Yellow:	corpse.DropItem( new YellowScales( scales ) ); break;
						case ScaleType.Black:	corpse.DropItem( new BlackScales( scales ) ); break;
						case ScaleType.Green:	corpse.DropItem( new GreenScales( scales ) ); break;
						case ScaleType.White:	corpse.DropItem( new WhiteScales( scales ) ); break;
						case ScaleType.Blue:	corpse.DropItem( new BlueScales( scales ) ); break;
						case ScaleType.All:
						{
							corpse.DropItem( new RedScales( scales ) );
							corpse.DropItem( new YellowScales( scales ) );
							corpse.DropItem( new BlackScales( scales ) );
							corpse.DropItem( new GreenScales( scales ) );
							corpse.DropItem( new WhiteScales( scales ) );
							corpse.DropItem( new BlueScales( scales ) );
							break;
						}
					}

					from.SendMessage( "You cut away some scales, but they remain on the corpse." );
				}

				corpse.Carved = true;

				if ( corpse.IsCriminalAction( from ) )
					from.CriminalAction( true );
			}
		}
示例#7
0
        public virtual bool Scissor(Mobile from, Scissors scissors)
        {
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
				return false;
			}

			if ( Ethic.IsImbued( this ) )
			{
				from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
				return false;
			}

			CraftSystem system = DefTailoring.CraftSystem;

			CraftItem item = system.CraftItems.SearchFor( GetType() );

			if ( item != null && item.Resources.Count == 1 && item.Resources.GetAt( 0 ).Amount >= 2 )
			{
				try
				{
					Type resourceType = null;

					CraftResourceInfo info = CraftResources.GetInfo( m_Resource );

					if ( info != null && info.ResourceTypes.Length > 0 )
						resourceType = info.ResourceTypes[0];

					if ( resourceType == null )
						resourceType = item.Resources.GetAt( 0 ).ItemType;

                    // Debug code
                    //from.SendMessage("item: {0}", Layer);

                    Item res = null;

                    if (Layer == Layer.Shoes)
                        res = new Leather();
                    else
                        res = new Bandage();

					ScissorHelper( from, res, (item.Resources.GetAt( 0 ).Amount / 2) );
                    
					res.LootType = LootType.Regular;

					return true;
				}
				catch
				{
				}
			}

			from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
			return false;
		}
示例#8
0
        public virtual bool Scissor(Mobile from, Scissors scissors)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(502437);                   // Items you wish to cut must be in your backpack.
                return(false);
            }

            if (Ethic.IsImbued(this))
            {
                from.SendLocalizedMessage(502440);                   // Scissors can not be used on that to produce anything.
                return(false);
            }

            CraftSystem system = DefTailoring.CraftSystem;

            CraftItem item = system.CraftItems.SearchFor(GetType());

            if (item != null && item.Resources.Count == 1 && item.Resources.GetAt(0).Amount >= 2)
            {
                try
                {
                    Type resourceType = null;

                    CraftResourceInfo info = CraftResources.GetInfo(m_Resource);

                    if (info != null && info.ResourceTypes.Length > 0)
                    {
                        resourceType = info.ResourceTypes[0];
                    }

                    if (resourceType == null)
                    {
                        resourceType = item.Resources.GetAt(0).ItemType;
                    }

                    // Debug code
                    //from.SendMessage("item: {0}", Layer);

                    Item res = null;

                    if (Layer == Layer.Shoes)
                    {
                        res = new Leather();
                    }
                    else
                    {
                        res = new Bandage();
                    }

                    ScissorHelper(from, res, (item.Resources.GetAt(0).Amount / 2));

                    res.LootType = LootType.Regular;

                    return(true);
                }
                catch
                {
                }
            }

            from.SendLocalizedMessage(502440);               // Scissors can not be used on that to produce anything.
            return(false);
        }
示例#9
0
		public virtual void OnCarve( Mobile from, Corpse corpse, Item with )
		{
			int feathers = Feathers;
			int wool = Wool;
			int meat = Meat;
			int hides = Hides;

			if ( ( feathers == 0 && wool == 0 && meat == 0 && hides == 0 ) || Summoned || IsBonded || corpse.Animated )
			{
				if ( corpse.Animated )
					corpse.SendLocalizedMessageTo( from, 500464 ); // Use this on corpses to carve away meat and hide
				else
					from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
			}
			else
			{
				if ( corpse.Map == Map.Felucca )
				{
					feathers *= 2;
					wool *= 2;
					hides *= 2;
				}

				new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

				if ( feathers != 0 )
				{
					corpse.AddCarvedItem( new Feather( feathers ), from );
					from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
				}

				if ( wool != 0 )
				{
					corpse.AddCarvedItem( new TaintedWool( wool ), from );
					from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
				}

				if ( meat != 0 )
				{
					if ( MeatType == MeatType.Ribs )
						corpse.AddCarvedItem( new RawRibs( meat ), from );
					else if ( MeatType == MeatType.Bird )
						corpse.AddCarvedItem( new RawBird( meat ), from );
					else if ( MeatType == MeatType.LambLeg )
						corpse.AddCarvedItem( new RawLambLeg( meat ), from );

					from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
				}

				if ( hides != 0 )
				{
					Item holding = from.Weapon as Item;

					if ( false && ( holding is SkinningKnife /* TODO: || holding is ButcherWarCleaver || with is ButcherWarCleaver */ ) )
					{
						Item leather = null;

						switch ( HideType )
						{
							case HideType.Regular: leather = new Leather( hides ); break;
							case HideType.Spined: leather = new SpinedLeather( hides ); break;
							case HideType.Horned: leather = new HornedLeather( hides ); break;
							case HideType.Barbed: leather = new BarbedLeather( hides ); break;
						}

						if ( leather != null )
						{
							if ( !from.PlaceInBackpack( leather ) )
							{
								corpse.DropItem( leather );
								from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
							}
							else
							{
								from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.
							}
						}
					}
					else
					{
						if ( HideType == HideType.Regular )
							corpse.DropItem( new Hides( hides ) );
						else if ( HideType == HideType.Spined )
							corpse.DropItem( new SpinedHides( hides ) );
						else if ( HideType == HideType.Horned )
							corpse.DropItem( new HornedHides( hides ) );
						else if ( HideType == HideType.Barbed )
							corpse.DropItem( new BarbedHides( hides ) );

						from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
					}
				}

				corpse.Carved = true;

				if ( corpse.IsCriminalAction( from ) )
					from.CriminalAction( true );
			}
		}