IsCriminalAction() public method

public IsCriminalAction ( Server.Mobile from ) : bool
from Server.Mobile
return bool
 public static bool CanUseWithDeed(Mobile from, Corpse corpse)
 {
     if (corpse.IsCriminalAction(from))
     {
         from.SendMessage("You did not earn the right to use this creature in the deed.");
         return false;
     }
     else return true;
 }
Exemplo n.º 2
0
 private bool isCorpseLootable(PlayerMobile player, Corpse corpse)
 {
     if (corpse.Owner == null || corpse.Deleted || corpse.Owner is PlayerMobile ||
         (corpse.Owner is BaseCreature && ((BaseCreature)corpse.Owner).IsBonded) ||
         !corpse.CheckLoot(player) || corpse.IsCriminalAction(player)
         )
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 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 );
			}
		}
Exemplo n.º 4
0
        public virtual void OnCarve( Mobile from, Corpse corpse )
        {
            int feathers = Feathers;
            int wool = Wool;
            int meat = Meat;
            int hides = Hides;
            int scales = Scales;
            int lightfur = LightFur;
            int darkfur = DarkFur;

            if ( (feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned || IsBonded )
            {
                from.SendAsciiMessage( "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.DropItem( new Feather( feathers ) );
                    from.SendAsciiMessage( "You pluck the bird. The feathers are now on the corpse." );
                }

                if ( wool != 0 )
                {
                    corpse.DropItem( new Wool( wool ) );
                    from.SendAsciiMessage( "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.SendAsciiMessage( "You carve some meat, which remains on the corpse." );
                }

                if ( lightfur != 0 )
                {
                    if ( LightFurType == LightFurType.LightFur )
                        corpse.DropItem( new LightFur( lightfur ) );

                    from.SendAsciiMessage ( "You skin it, and the fur is now on the corpse." );
                }

                if ( darkfur != 0 )
                {
                    if ( DarkFurType == DarkFurType.DarkFur )
                        corpse.DropItem( new DarkFur( darkfur ) );

                    from.SendAsciiMessage ( "You skin it, and the fur is now on the corpse." );
                }

                if ( hides != 0 )
                {
                    if ( HideType == HideType.Regular )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Spined )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Horned )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Barbed )
                        corpse.DropItem( new Hides( hides ) );

                    from.SendAsciiMessage( "You skin it, and the hides are now on 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.SendAsciiMessage( "You cut away some scales, but they remain on the corpse." );
                }

                corpse.Carved = true;

                if ( corpse.IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
        }
Exemplo n.º 5
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 );
            }
        }
Exemplo n.º 6
0
        public virtual void OnCarve( Mobile from, Corpse corpse )
        {
            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.
                }

                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 );
            }
        }
Exemplo n.º 7
0
		private bool isCorpseLootable(PlayerMobile player, Corpse corpse)
		{
			if ( corpse.Owner == null || corpse.Deleted || corpse.Owner is PlayerMobile 
				|| (corpse.Owner is BaseCreature && ((BaseCreature)corpse.Owner).IsBonded) 
				|| !Daat99MasterLootersUtils.CheckLoot(corpse, player) || corpse.IsCriminalAction(player)
				)
					return false;
			return true;
		}
Exemplo n.º 8
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 );
			}
		}
Exemplo n.º 9
0
		public virtual void OnCarve( Mobile from, Corpse corpse )
		{
			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
			{
				//	6/8/2004 - Pulse
				//		No longer doubles the resources from corpses if in Felucca, to re-add double resources
				//		un-comment the 6 lines of code below.
				//				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.
				}

				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 );
			}
		}
Exemplo n.º 10
0
		//    determine if the corpse is ok to loot
		private static bool CorpseIsLootable( Mobile from, Corpse corpse, bool notify )
		{
			if ( null == corpse )
				return false;

			bool result = false;
			string notification = "";

			if ( corpse.Owner == from )
				notification = "You may not claim your own corpses.";
			else if ( corpse.Owner is PlayerMobile && !LootPlayers )
				notification = "You may not loot player corpses.";
			else
			{
				BaseCreature creature = corpse.Owner as BaseCreature;

				if ( null != creature && creature.IsBonded )
					notification = "You may not loot the corpses of bonded pets.";
				else if ( null != creature && creature.Fame <= FreelyLootableFame )
					result = true;
				else
					result = corpse.CheckLoot( from, null ) && !( corpse.IsCriminalAction( from ) );
			}

			if ( false == result && notify )
			{
				from.PlaySound( 1074 );		// no
				from.SendMessage( notification );
			}

			return result;
		}
Exemplo n.º 11
0
        public virtual void OnCarve( Mobile from, Corpse corpse )
        {
            int feathers = Feathers;
            int wool = Wool;
            int meat = Meat;
            int hides = Hides;
            int scales = 0;//Scales;
            int furs = GenerateFurs( corpse );

            if ( (feathers == 0 && furs == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned )
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
            else
            {
                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.
                }

                if ( hides != 0 )
                {
                    if ( HideType == HideType.Regular )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Spined )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Horned )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Barbed )
                        corpse.DropItem( new Hides( hides ) );
                }

                //if ( hides != 0 || furs != 0 )
                //	from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.

                corpse.Carved = true;

                if ( corpse.IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
        }
Exemplo n.º 12
0
			public bool CheckStealing(Corpse corpse)
			{
				if (!corpse.IsCriminalAction(m_Thief))
					return true;

				try
				{
					if (m_Thief.AccessLevel == AccessLevel.Player)
					{
						RegionControl regstone = null;
						CustomRegion reg = null;
						if (corpse.Deleted == false)
							reg = CustomRegion.FindDRDTRegion(corpse);
						if (reg != null)
							regstone = reg.GetRegionControler();

						// if this region does not allow looting, fail
						if (regstone != null && regstone.BlockLooting == true)
							return false;
					}

				}
				catch (Exception ex)
				{
					Scripts.Commands.LogHelper.LogException(ex);
				}

				return true;
			}