Example #1
0
 public GiveBountyTimer(PlayerMobile b, Mobile g, Head h, Mobile f)
     : base(TimeSpan.FromSeconds(5))
 {
     pm = b;
     guard = g;
     head = h;
     from = f;
     Priority = TimerPriority.OneSecond;
 }
			protected override void OnTick()
			{
				// Guillotine is in the middle, we kill the unlucky guy...
				m_Guillotine.ItemID = 4679;
				Head item = new Head();
				item.Name=m_Guillotine.m_Target.Name;
				item.Location=new Point3D(m_Guillotine.X,m_Guillotine.Y-1,m_Guillotine.Z+1);
				item.Map=m_Guillotine.Map;
				m_Guillotine.m_Target.Location=new Point3D(m_Guillotine.X,m_Guillotine.Y+1,m_Guillotine.Z);
				m_Guillotine.m_Target.Kill();
			}
        public virtual void Carve( Mobile from, Item item )
        {
            if ( IsCriminalAction( from ) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0 )
            {
                if ( m_Owner == null || !m_Owner.Player )
                    from.SendLocalizedMessage( 1005035 ); // You did not earn the right to loot this creature!
                else
                    from.SendLocalizedMessage( 1010049 ); // You may not loot this corpse.

                return;
            }

            Mobile dead = m_Owner;

            if ( GetFlag( CorpseFlag.Carved ) || dead == null )
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
            else if ( ((Body)Amount).IsHuman && ItemID == 0x2006 )
            {
                new Blood( 0x122D ).MoveToWorld( Location, Map );

                new Torso().MoveToWorld( Location, Map );
                new LeftLeg().MoveToWorld( Location, Map );
                new LeftArm().MoveToWorld( Location, Map );
                new RightLeg().MoveToWorld( Location, Map );
                new RightArm().MoveToWorld( Location, Map );

                Head head = new Head( dead.Name );
                head.MoveToWorld( Location, Map );

                if (m_Killer != null)
                {
                    if (m_Killer is BaseCreature && ((BaseCreature)m_Killer).ControlMaster != null)
                        head.HeadKiller = ((BaseCreature)m_Killer).ControlMaster;
                    else head.HeadKiller = m_Killer;
                    head.DateKill = m_TimeOfDeath;
                    head.HeadOwner = m_Owner;
                }

                if ( Region.Find( Location, Map ).IsPartOf( "a spectator area" ) )
                    head.HeadType = HeadType.Duel;

                SetFlag( CorpseFlag.Carved, true );

                ProcessDelta();
                SendRemovePacket();
                ItemID = Utility.Random( 0xECA, 9 ); // bone graphic
                Hue = 0;
                ProcessDelta();

                if ( IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
            else if ( dead is BaseCreature )
            {
                ((BaseCreature)dead).OnCarve( from, this, item );
            }
            else
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
        }
Example #4
0
		public void Carve( Mobile from, Item item )
		{
            if (IsCriminalAction(from) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0)
            {
                if (m_Owner == null || !m_Owner.Player)
                    from.SendLocalizedMessage(1005035); // You did not earn the right to loot this creature!
                else
                    from.SendLocalizedMessage(1010049); // You may not loot this corpse.

                return;
            }

            //Taran: Had to add this or you could carve corpses with an axe without range or los checks
            //Couldn't find the range/los checks for daggers, they should be removed.
            if (!from.InRange(GetWorldLocation(), 3) || !from.InLOS(this))
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
                return;
            }

            if (from.Region is CustomRegion && !((CustomRegion)from.Region).Controller.CanCutCorpse)
            {
                from.SendAsciiMessage("You can't cut corpses here.");
                return;
            }

		    Mobile dead = m_Owner;

            if (GetFlag(CorpseFlag.Carved) || dead == null)
            {
				from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
			}
			else if ( ((Body)Amount).IsHuman && (ItemID == 0x2006 || dead is PlayerMobile) )
			{
                if (from.Mounted)
                    from.Animate(28, 5, 1, true, false, 1);
                else
                    from.Animate(32, 5, 1, true, false, 1);

                from.PublicOverheadMessage(MessageType.Regular, 906, true, "*Chop Chop*");

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

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

                Head head = new Head {Name = string.Format("head of {0}", dead.Name), PlayerName = Owner.Name, Owner = dead, Fame = (int)(dead.Fame / 0.9)};
			    head.MoveToWorld(Location, Map);

                Heart heart = new Heart {Name = string.Format("heart of {0}", dead.Name), Owner = dead};
			    heart.MoveToWorld(Location, Map);

                LeftLeg ll = new LeftLeg {Name = string.Format("leg of {0}", dead.Name), Owner = dead};
			    ll.MoveToWorld(Location, Map);

                LeftArm la = new LeftArm {Name = string.Format("arm of {0}", dead.Name), Owner = dead};
			    la.MoveToWorld(Location, Map);

                RightLeg rl = new RightLeg {Name = string.Format("leg of {0}", dead.Name), Owner = dead};
			    rl.MoveToWorld(Location, Map);

                RightArm ra = new RightArm {Name = string.Format("arm of {0}", dead.Name), Owner = dead};
			    ra.MoveToWorld(Location, Map);

                //bounty system here
                if (m_Killer is PlayerMobile)
                {
                    head.Owner = m_Owner;
                    head.Killer = m_Killer;
                    head.CreationTime = DateTime.Now;
                    head.IsPlayer = true;
                }
                //end bounty sytem
                
                new RawRibs(2).MoveToWorld(Location, Map);

                SetFlag(CorpseFlag.Carved, true);

                ProcessDelta();
                SendRemovePacket();
                ItemID = Utility.Random(0xECA, 9); // bone graphic
                Hue = 0;
                ProcessDelta();
            }
			else if ( dead is BaseCreature )
			{
                ((BaseCreature)dead).OnCarve(from, this, item);
            }
			else
			{
				from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
			}
		}
Example #5
0
        public void Carve(Mobile from, Item item)
        {
            if (IsCriminalAction(from) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0)
            {
                if (m_Owner == null || !m_Owner.Player)
                {
                    from.SendLocalizedMessage(1005035);                       // You did not earn the right to loot this creature!
                }
                else
                {
                    from.SendLocalizedMessage(1010049);                       // You may not loot this corpse.
                }
                return;
            }

            Mobile dead = m_Owner;

            string world      = Server.Misc.Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y);
            bool   HumanLands = false;

            if (world == "the Bottle World of Kuldar" || world == "the Land of Sosaria")
            {
                HumanLands = true;
            }

            if (GetFlag(CorpseFlag.Carved) || dead == null)
            {
                from.SendLocalizedMessage(500485);                   // You see nothing useful to carve from the corpse.
            }
            else if (((Body)Amount).IsHuman && ItemID == 0x2006 && ( // DON'T WANT TO CARVE ORKS AND ELVES
                         dead is EvilMage || dead is EvilMageLord || dead is Brigand || dead is Executioner ||
                         dead is Savage || dead is SavageRider ||
                         dead is Bandit || dead is Mangar || dead is ZuluuNative ||
                         dead is ZuluuArcher || dead is NativeWitchDoctor || dead is NativeArcher || dead is Native ||
                         dead is Rogue || dead is ZuluuWitchDoctor || dead is PirateLand || dead is PirateCrew ||
                         dead is Monks || dead is PirateCaptain || dead is EvilSailorArcher || dead is EvilSailorWizard ||
                         dead is Minstrel || dead is EvilSailorMinstrel || dead is SailorArcher || dead is SailorWizard ||
                         dead is Berserker || dead is SailorMinstrel || dead is BlackKnight || dead is BloodAssassin ||
                         dead is Archmage || dead is BombWorshipper || dead is Psionicist || dead is SavageAlien ||
                         (HumanLands == true && dead is BaseVendor) || (HumanLands == true && dead is BaseHealer) || (HumanLands == true && dead is BasePerson)
                         ))
            {
                new Blood(0x122D).MoveToWorld(Location, Map);

                Corpse bodyBag = (Corpse)this;
                bodyBag.AddCarvedItem(new Torso(), from);
                bodyBag.AddCarvedItem(new LeftLeg(), from);
                bodyBag.AddCarvedItem(new LeftArm(), from);
                bodyBag.AddCarvedItem(new RightLeg(), from);
                bodyBag.AddCarvedItem(new RightArm(), from);
                bodyBag.AddCarvedItem(new TastyHeart(dead.Name), from);

                string myWork = "";

                bool CriminalCarve = true;

                if (m_CorpseName != null && m_CorpseName != "")
                {
                    if (m_CorpseName.Contains(" the assassin"))
                    {
                        myWork = "Assassin";     dead.Name = (dead.Name).Replace(" the assassin", "");   CriminalCarve = false;
                    }
                    else if (m_CorpseName.Contains(" the thief"))
                    {
                        myWork = "Thief";              dead.Name = (dead.Name).Replace(" the thief", "");              CriminalCarve = false;
                    }
                    else if (m_CorpseName.Contains(" the pirate"))
                    {
                        myWork = "Pirate";    dead.Name = (dead.Name).Replace(" the pirate", "");             CriminalCarve = false;
                    }
                    else if (m_CorpseName.Contains(" the bandit"))
                    {
                        myWork = "Bandit";    dead.Name = (dead.Name).Replace(" the bandit", "");             CriminalCarve = false;
                    }
                    else if (m_CorpseName.Contains(" the brigand"))
                    {
                        myWork = "Brigand";  dead.Name = (dead.Name).Replace(" the brigand", "");    CriminalCarve = false;
                    }
                }

                if (CriminalCarve == true)
                {
                    if (IsCriminalAction(from))
                    {
                        from.CriminalAction(true);
                    }

                    Misc.Titles.AwardKarma(from, -50, true);
                }

                Head head = new Head(dead.Name);
                if (myWork != "")
                {
                    head.m_Job = myWork;
                }

                bodyBag.AddCarvedItem(head, from);

                SetFlag(CorpseFlag.Carved, true);

                ProcessDelta();
                SendRemovePacket();
                ItemID = Utility.Random(0xECA, 9);                   // bone graphic
                Hue    = 0;
                ProcessDelta();
            }
            else if (
                dead is ElfEvilSailorMinstrel || dead is ElfEvilSailorArcher || dead is ElfEvilSailorWizard ||
                dead is ElfPirateCaptain || dead is ElfPirateCrew || dead is OrkRogue ||
                dead is ElfRogue
                )
            {
                string myWork = "";

                if (m_CorpseName != null && m_CorpseName != "")
                {
                    if (m_CorpseName.Contains(" the assassin"))
                    {
                        myWork = "Assassin";     dead.Name = (dead.Name).Replace(" the assassin", "");
                    }
                    else if (m_CorpseName.Contains(" the thief"))
                    {
                        myWork = "Thief";              dead.Name = (dead.Name).Replace(" the thief", "");
                    }
                    else if (m_CorpseName.Contains(" the pirate"))
                    {
                        myWork = "Pirate";    dead.Name = (dead.Name).Replace(" the pirate", "");
                    }
                    else if (m_CorpseName.Contains(" the bandit"))
                    {
                        myWork = "Bandit";    dead.Name = (dead.Name).Replace(" the bandit", "");
                    }
                    else if (m_CorpseName.Contains(" the brigand"))
                    {
                        myWork = "Brigand";  dead.Name = (dead.Name).Replace(" the brigand", "");
                    }
                }

                if (myWork != "")                   // ONLY ADD A HEAD FOR ORKS AND ELVES...ROGUES & PIRATES
                {
                    Head head = new Head(dead.Name);
                    head.Hue = dead.Hue;
                    if (myWork != "")
                    {
                        head.m_Job = myWork;
                    }

                    Corpse bodyBag = (Corpse)this;
                    bodyBag.AddCarvedItem(head, from);
                }

                ((BaseCreature)dead).OnCarve(from, this, item);
            }
            else if (dead is BaseCreature)
            {
                ((BaseCreature)dead).OnCarve(from, this, item);
            }
            else
            {
                from.SendLocalizedMessage(500485);                   // You see nothing useful to carve from the corpse.
            }
        }
Example #6
0
        public void Carve(Mobile from, Item item)
        {
            if (IsCriminalAction(from) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0)
            {
                if (m_Owner == null || !m_Owner.Player)
                {
                    from.SendLocalizedMessage(1005035); // You did not earn the right to loot this creature!
                }
                else
                {
                    from.SendLocalizedMessage(1010049); // You may not loot this corpse.
                }
                return;
            }

            Mobile dead = m_Owner;

            if (m_Carved || dead == null)
            {
                from.SendLocalizedMessage(500485); // You see nothing useful to carve from the corpse.
            }
            else if (((Body)Amount).IsHuman && ItemID == 0x2006)
            {
                new Blood(0x122D).MoveToWorld(Location, Map);

                new Torso().MoveToWorld(Location, Map);
                new LeftLeg().MoveToWorld(Location, Map);
                new LeftArm().MoveToWorld(Location, Map);
                new RightLeg().MoveToWorld(Location, Map);
                new RightArm().MoveToWorld(Location, Map);

                Head head = new Head(HeadType.Regular, dead);

                PlayerMobile pm_Dead = dead as PlayerMobile;

                if (pm_Dead != null)
                {
                    if (pm_Dead.Murderer)
                    {
                        head.PlayerType = PlayerType.Murderer;
                    }

                    if (pm_Dead.LastPlayerKilledBy != null)
                    {
                        head.Killer     = pm_Dead.LastPlayerKilledBy;
                        head.KillerName = pm_Dead.LastPlayerKilledBy.RawName;

                        if (pm_Dead.LastPlayerKilledBy.Murderer)
                        {
                            head.KillerType = PlayerType.Murderer;
                        }

                        else
                        {
                            head.KillerType = PlayerType.None;
                        }
                    }
                }

                head.MoveToWorld(Location, Map);

                m_Carved = true;

                ProcessDelta();
                SendRemovePacket();
                ItemID = Utility.Random(0xECA, 9); // bone graphic
                Hue    = 0;
                ProcessDelta();

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

            else if (dead is BaseCreature)
            {
                ((BaseCreature)dead).OnCarve(from, this);
            }

            else
            {
                from.SendLocalizedMessage(500485); // You see nothing useful to carve from the corpse.
            }
        }
Example #7
0
		//returns:
		//true if head taken, false if not
		//goldRewarded is the gold placed in the placer's back
		//message is:
		//		-1: default - meaningless
		//		-2: player head - no bounty
		//		-3: player head, bounty, illegal return, no bounty given
		//		1: player head - bounty given
		public static bool CollectBounty( Head h, Mobile from, Mobile collector, ref int goldGiven, ref int message )
		{
			bool bReturn = false;
			goldGiven = 0;
			message = -1;
			try
			{
				int goldRewarded = 0;
				int goldForLBBonus = 0;
				bool eligibleforlbbonus = false;
				if( h.IsPlayerHead )
				{
					if( BountyKeeper.CanCollectReward( (PlayerMobile)from, h.Player ) )
					{
						ArrayList found_bounties = new ArrayList();
						foreach( Bounty b in BountyKeeper.Bounties )
						{
							if( b.WantedPlayer == h.Player )
							{
								if( h.Time > b.RewardDate )
								{
									goldRewarded += b.Reward;
									if( b.LBBonus )
									{
										eligibleforlbbonus = true;
									}
									found_bounties.Add(b);
								}
							}
						}

						if( eligibleforlbbonus )
						{
							goldForLBBonus = BountyKeeper.CurrentLBBonusAmount;
						}
						bool bRewardGiven = false;
						if( goldRewarded > 0 )
						{
							message = 1;
							//collector.Say( string.Format("My thanks for slaying this vile person.  Here's the reward of {0} gold!", goldRewarded) );
							Container c = from.Backpack;
							if( c != null )
							{
								//Gold g = new Gold(goldRewarded + goldForLBBonus);
								BankCheck g = new BankCheck(goldRewarded + goldForLBBonus);
								goldGiven = goldRewarded + goldForLBBonus;
								BountyKeeper.LBFund -= goldForLBBonus;
								from.AddToBackpack( g );
								bReturn = true;
								bRewardGiven = true;
							}
						}
						else
						{
							message = -2;
							//collector.Say("You disgusting miscreant!  Why are you giving me an innocent person's head?");
						}

						if( bRewardGiven )
						{
							foreach(Bounty b in found_bounties)
							{
								BountyKeeper.Bounties.Remove(b);
							}
							found_bounties.Clear();
						}
							
					}
					else
					{
						message = -3;
						//collector.Say("I suspect treachery....");
						//collector.Say("I'll take that head, you just run along now.");
						bReturn = true;
					}
				}
			}
			catch( Exception e )
			{
				LogHelper.LogException(e);
				System.Console.WriteLine("Error (nonfatal) in BaseGuard.OnDragDrop(): " + e.Message);
				System.Console.WriteLine(e.StackTrace);
			}

			return bReturn;
		}
Example #8
0
        public Cracker() 
        : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {	        
	        Name = NameList.RandomName( "male" );
	        Title = "The vicious murderer";
            Body = 0x190;
            Kills = 5;
			Hue = Utility.RandomSkinHue();

			SetStr(276, 350);
			SetDex(150, 200);
			SetInt(126, 150);

			SetHits(350, 400);

			SetDamage(11, 14);

			SetResistance( ResistanceType.Physical, 5 );
			SetDamageType(ResistanceType.Physical, 100);

			SetSkill(SkillName.Tactics, 80.1, 100.0);
			SetSkill(SkillName.MagicResist, 100.1, 110.0);
			SetSkill(SkillName.Anatomy, 80.1, 100.0);
			SetSkill(SkillName.Healing, 80.1, 100.0);
			SetSkill(SkillName.Fencing, 85.1, 100);

			Fame = 9000;
			Karma = -15000;

            PackItem(new Apple(Utility.RandomMinMax(3, 5)));
            PackItem(new Bandage(Utility.RandomMinMax(15, 55)));

            	CrackerDagger chd = new CrackerDagger();
				chd.Crafter = this;
				chd.Name = this.Name + "'s Dagger";
            	CrackerBuckler chb = new CrackerBuckler();
				chb.Crafter = this;
				chb.Name = this.Name + "'s Buckler";
            if (0.5 > Utility.RandomDouble())
				AddItem(chd);
            else
                AddItem(new Dagger());
           
            if (0.10 > Utility.RandomDouble())
				AddItem(chb);
            else
                AddItem(new Buckler());
           
            //if (0.15 > Utility.RandomDouble())
			//	 AddItem(new RandomAddonTicket());
                
			//m_Timer = new InternalTimer( this );
			//m_Timer.Start();
			
			//CraftResource res = CraftResource.None;;
			//switch (Utility.Random(4))
			//{
			//	case 0: res = CraftResource.RegularLeather; break;
			//	case 1: res = CraftResource.SpinedLeather; break;
			//	case 2: res = CraftResource.HornedLeather; break;
			//	case 3: res = CraftResource.BarbedLeather; break;
			//}
            //if (0.05 > Utility.RandomDouble())
            //    AddItem(new RunicSewingKit(res, Utility.RandomMinMax(1, 5)));
            //else
            //   AddItem(new SewingKit());
                
			LeatherChest Tunic = new LeatherChest();
			Tunic.ItemID = 9859;
			Tunic.Name = "Leather Hood Robe";
			Tunic.Layer = Layer.OuterTorso;
			//Tunic.Resource = res;
			Tunic.Movable = false;
			Tunic.Quality = ArmorQuality.Exceptional;
			Tunic.Crafter = this;
			AddItem(Tunic);

			LeatherLegs Legs = new LeatherLegs();
			//Legs.Resource = res;
			Legs.Movable = false;
			AddItem(Legs);
			
			Boots boot = new Boots();
			//boot.Resource = res;
			boot.Movable = false;
			AddItem(boot);

			LeatherArms Arms = new LeatherArms();
			//Arms.Resource = res;
			Arms.Movable = false;
			AddItem(Arms);

			LeatherGloves Gloves = new LeatherGloves();
			//Gloves.Resource = res;
			Gloves.Movable = false;
			Gloves.Quality = ArmorQuality.Exceptional;
			Gloves.Crafter = this;
			AddItem(Gloves);

			LeatherCap Helm = new LeatherCap();
			//Helm.Resource = res;
			Helm.Movable = false;
			Helm.Quality = ArmorQuality.Exceptional;
			Helm.Crafter = this;
			AddItem(Helm);

			Head hd = new Head();
			hd.Name = "the head of " + NameList.RandomName( "male" );
			AddItem(hd);
			
			//EtherealOstard mt = new EtherealOstard();
			//mt.Hue = Utility.RandomNeutralHue();
			//mt.Movable = false;
			//mt.Rider = this;
        }
Example #9
0
		public virtual void TjnarsScythe_OnTarget( Mobile from, object target )
		{
			if( !from.CanSee( target ) )
			{
				from.SendLocalizedMessage( 500237 ); //Target cannot be seen.
			}
			else if( target is Mobile )
			{
				Mobile targetMobile = (Mobile)target;
				
				if( targetMobile.Body.IsHuman )
				{
					if( targetMobile.Hits < (targetMobile.HitsMax / 10) )
					{
						targetMobile.PlaySound( 565 ); //Consecrate Weapon sound
						from.PlaySound( 565 );
						
						from.MovingEffect( targetMobile, 0x26C4, 9, 1, false, false ); //Launches a solid scythe
						Effects.SendMovingParticles( from, targetMobile, 0x26C4, 1, 0, false, false, 1109, 3, 9501, 1, 0, EffectLayer.Waist, 0x100 ); //Launches a rendered scythe
						
						targetMobile.FixedParticles( 0x3779, 1, 30, 9964, 1109, 3, EffectLayer.Waist ); //Small sparklies on the target
						
						targetMobile.Kill();
						
						Head head = new Head( String.Format( "the head of {0}", targetMobile.Name ) );
						from.AddToBackpack( head );
						
						from.BoltEffect( 1 );
						
						this.Delete();
					}
					else
					{
						from.PublicOverheadMessage( MessageType.Emote, from.EmoteHue, false, "*the voice of Tjnar rings out across the region:*", false );
						from.PublicOverheadMessage( MessageType.Yell, from.SpeechHue, false, "\"You fool! That mere mortal is not prepared to die! Crush the body, and the mind shall be yours!\"", false );
						
						from.SendMessage( "Your target must have less than 10% of his health in order for this spell to work." );
					}
				}
				else
				{
					from.SendMessage( "This spell will only work on humans." );
				}
			}

			from.Frozen = false;
		}
Example #10
0
        public void DoExplode(PlayerMobile pm)
        {
            pm.Emote("*The gaze of the asylum guardian melts the flesh from your bones and causes your organs to explode.*");
            int range = Utility.RandomMinMax(5, 7);
            int zOffset = pm.Mounted ? 20 : 10;

            Point3D src = pm.Location.Clone3D(0, 0, zOffset);
            Point3D[] points = src.GetAllPointsInRange(pm.Map, 0, range);

            Effects.PlaySound(pm.Location, pm.Map, 0x19C);

            pm.FixedParticles(0x36BD, 20, 10, 5044, 137, 0, EffectLayer.Head);
            pm.PlaySound(0x307);

            Timer.DelayCall(
                TimeSpan.FromMilliseconds(100),
                () =>
                {
                    int i = 0;
                    int place = 0;
                    int[] BodyPartArray = {7584, 7583, 7586, 7585, 7588, 7587};
                    foreach (Point3D trg in points)
                    {
                        i++;
                        int bodypartID = Utility.RandomMinMax(4650, 4655);

                        if (Utility.RandomDouble() <= 0.1 && place < BodyPartArray.Count())
                        {
                            bodypartID = BodyPartArray[place];
                            place++;
                        }
                        new MovingEffectInfo(src, trg.Clone3D(0, 0, 2), pm.Map, bodypartID).MovingImpact(
                            info =>
                            {
                                Item bodypart;
                                if (bodypartID <= 4655 && bodypartID >= 4650)
                                {
                                    bodypart = new Blood
                                    {
                                        ItemID = bodypartID
                                    };
                                    bodypart.MoveToWorld(info.Target.Location, info.Map);
                                }

                                switch (bodypartID)
                                {
                                    case 7584:
                                        bodypart = new Head();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7583:
                                        bodypart = new Torso();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7586:
                                        bodypart = new RightArm();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7585:
                                        bodypart = new LeftArm();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7588:
                                        bodypart = new RightLeg();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7587:
                                        bodypart = new LeftLeg();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;
                                }

                                Effects.PlaySound(info.Target, info.Map, 0x028);
                            });
                    }
                });

            pm.Damage(pm.Hits + 5);

            Timer.DelayCall(
                TimeSpan.FromMilliseconds(100),
                () =>
                {
                    var corpse = pm.Corpse as Corpse;

                    if (corpse != null && !corpse.Deleted)
                    {
                        corpse.TurnToBones();
                    }
                });
        }
Example #11
0
        public void Carve( Mobile from, Item item )
        {
            Mobile dead = m_Owner;

            if ( m_Carved || dead == null )
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
            else if ( ((Body)Amount).IsHuman && ItemID == 0x2006 )
            {
                new Blood( 0x122D ).MoveToWorld( Location, Map );

                new Torso( dead.Name ).MoveToWorld( Location, Map );
                new LeftLeg( dead.Name ).MoveToWorld( Location, Map );
                new LeftArm( dead.Name ).MoveToWorld( Location, Map );
                new RightLeg( dead.Name ).MoveToWorld( Location, Map );
                new RightArm( dead.Name ).MoveToWorld( Location, Map );
            //bounty system here
                Head head = new Head( String.Format( dead.Name ) );
                head.MoveToWorld( Location, Map );

                if(m_Killer is PlayerMobile)
                {
                    head.Owner = m_Owner;
                    head.Killer = m_Killer;
                    head.CreationTime = DateTime.Now;
                    head.IsPlayer = true;
                }
            //end bounty sytem

                m_Carved = true;

                ProcessDelta();
                SendRemovePacket();
                ItemID = Utility.Random( 0xECA, 9 ); // bone graphic
                Hue = 0;
                ProcessDelta();

                if ( IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
            else if ( dead is BaseCreature )
            {
                ((BaseCreature)dead).OnCarve( from, this );
            }
            else
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
        }