Esempio n. 1
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.
            }
        }
Esempio n. 2
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();
                }
            });
        }
Esempio n. 3
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.
			}
		}
        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.
            }
        }
Esempio n. 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;

            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.
            }
        }
Esempio n. 6
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();
                    }
                });
        }
Esempio n. 7
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.
            }
        }