示例#1
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 );
			}
		}
示例#2
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 );
            }
        }
示例#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 )
			{
				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 );
			}
		}
示例#4
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
            }
        }
示例#5
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 );
			}
		}