コード例 #1
0
 protected override void OnTick()
 {
     if (!m_Corpse.m_NoBones)
     {
         m_Corpse.TurnToBones();
     }
     else
     {
         m_Corpse.Delete();
     }
 }
コード例 #2
0
ファイル: GoblinElder.cs プロジェクト: greeduomacro/annox
        public override void OnCarve(Mobile from, Corpse corpse)
        {
            if (corpse.Carved == false)
            {
                base.OnCarve(from, corpse);

                new Blood(Utility.RandomMinMax(4650, 4655)).MoveToWorld(corpse.Location, corpse.Map);
                new GoblinEars().MoveToWorld(corpse.Location, corpse.Map);
                corpse.Delete();
            }
        }
コード例 #3
0
ファイル: Corpse.cs プロジェクト: seanrgraff/The-Basement
 protected override void OnTick()
 {
     if (!m_Corpse.GetFlag(CorpseFlag.NoBones))
     {
         m_Corpse.TurnToBones();
     }
     else
     {
         m_Corpse.Delete();
     }
 }
コード例 #4
0
 protected override void OnTick()
 {
     if (m_Corpse.TotalItems > 3 && (m_Corpse.Owner != null && m_Corpse.Owner.Player))
     {
         m_Corpse.TurnToBones();
     }
     else
     {
         m_Corpse.Delete();
     }
 }
コード例 #5
0
 protected override void OnTick()
 {
     /*** ADDED ***/
     // Alambik's Undead system
     if (m_Corpse.Amount == 3 && m_Corpse.Killer != null && m_Corpse.Killer.Player) // Protocol for corpse is Amount = owner's body value
     {
         // Scriptiz : on ajoute deux conditions sur le Killer pour éviter que des gardes
         // ne kills à longueur de journée des zombies
         Mobile zombie = new Zombie(true); // Create zombie with no packed items
         zombie.MoveToWorld(m_Corpse.Location, m_Corpse.Map);
         zombie.Emote("*se redresse*");
         m_Corpse.Delete();
     }
     else
     /*** END ***/
     if (!m_Corpse.GetFlag(CorpseFlag.NoBones))
     {
         m_Corpse.TurnToBones();
     }
     else
     {
         m_Corpse.Delete();
     }
 }
コード例 #6
0
        private void VampKnife5Target_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from)
                {
                    if (corpse.Owner is Serraphim)
                    {
                        from.AddToBackpack(new WhiteHeart());
                        from.Hits -= 70;
                        from.SendMessage("You carve open the monsters chest");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("This corpse is not of Serraphim!");
                    }
                }
                else
                {
                    from.SendMessage("You did not slay this creature!");
                }
            }
            else
            {
                from.SendMessage("This is not a corpse!");
            }
        }
コード例 #7
0
        private void TubOfButterTarget_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from)
                {
                    if (corpse.Owner is GillesDeRay)
                    {
                        from.AddToBackpack(new CrestedRing());
                        from.Hits -= 70;
                        from.SendMessage("You butter up the dead vampires fingure and slide off the ring");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("Why would you want to use this on that, You Sicko!!");
                    }
                }
                else
                {
                    from.SendMessage("YStop it you Freak!!!");
                }
            }
            else
            {
                from.SendMessage("Now you're getting twisted");
            }
        }
コード例 #8
0
        private void EmptyBloodVial1Target_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from || (corpse.Killer is BaseCreature && ((BaseCreature)corpse.Killer).ControlMaster == from))
                {
                    if (corpse.Owner is VampireMage || corpse.Owner is VampireWarrior || corpse.Owner is VampireArcher)
                    {
                        from.AddToBackpack(new VampiresBlood());
                        from.Hits -= 70;
                        from.SendMessage("You drain the vampires blood");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("This corpse is not a Vampires corpse!");
                    }
                }
                else
                {
                    from.SendMessage("You did not slay this creature!");
                }
            }
            else
            {
                from.SendMessage("This is not a corpse!");
            }
        }
コード例 #9
0
        private void VampKnife2Target_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from || (corpse.Killer is BaseCreature && ((BaseCreature)corpse.Killer).ControlMaster == from))
                {
                    if (corpse.Owner is Acheron)
                    {
                        from.AddToBackpack(new BlackHeart1());
                        from.Hits -= 70;
                        from.SendMessage("You carve open the monsters chest");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("This corpse is not of Acheron!");
                    }
                }
                else
                {
                    from.SendMessage("You did not slay this creature!");
                }
            }
            else
            {
                from.SendMessage("This is not a corpse!");
            }
        }
コード例 #10
0
        private void EmptyHeroVial1Target_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from)
                {
                    if (corpse.Owner is FallenHero)
                    {
                        from.AddToBackpack(new BloodOfHeroes());
                        from.Hits -= 70;
                        from.SendMessage("You drain the hero's blood");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("This corpse is not a Fallen Hero corpse!");
                    }
                }
                else
                {
                    from.SendMessage("You did not slay this creature!");
                }
            }
            else
            {
                from.SendMessage("This is not a corpse!");
            }
        }
コード例 #11
0
        private void StrangeKnifeTarget_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from)
                {
                    if (corpse.Owner is Nessa)
                    {
                        from.AddToBackpack(new BeastHide());
                        from.Hits -= 70;
                        from.SendMessage("You skin the Beast and remove the Hide");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("This corpse is not of the Beast!");
                    }
                }
                else
                {
                    from.SendMessage("You did not slay this creature!");
                }
            }
            else
            {
                from.SendMessage("This is not a corpse!");
            }
        }
コード例 #12
0
        private void EmptyNoxiousGem1Target_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from)
                {
                    if (corpse.Owner is NoxiousArcher || corpse.Owner is NoxiousMage || corpse.Owner is NoxiousWarlord || corpse.Owner is NoxiousWarrior)
                    {
                        from.AddToBackpack(new NoxiousEssence());
                        from.Hits -= 70;
                        from.SendMessage("You drain the essence of the noxious");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("This corpse is not a noxious corpse!");
                    }
                }
                else
                {
                    from.SendMessage("You did not slay this creature!");
                }
            }
            else
            {
                from.SendMessage("This is not a corpse!");
            }
        }
コード例 #13
0
        private void PracticalsKnifeTarget_Callback(Mobile from, object obj)
        {
            if (from.InRange(this.GetWorldLocation(), 2) == false)
            {
                from.SendLocalizedMessage(500486);                      //That is too far away.
            }
            else if (obj is Corpse)
            {
                Corpse corpse = (Corpse)obj;

                if (corpse.Killer == from)
                {
                    if (corpse.Owner is TheBigBadWolf)
                    {
                        from.AddToBackpack(new WolfsHead());
                        from.Hits -= 70;
                        from.SendMessage("You slowly carve the Wolf's head from its body!");
                        this.Delete();
                        corpse.Delete();
                        return;
                    }
                    else
                    {
                        from.SendMessage("This corpse is not of The Big Bad Wolf!");
                    }
                }
                else
                {
                    from.SendMessage("You did not slay this creature!");
                }
            }
            else
            {
                from.SendMessage("This is not a corpse!");
            }
        }
コード例 #14
0
            protected override void OnTarget(Mobile from, object target)
            {
                PlayerMobile pm = (PlayerMobile)from;

                if (target is Corpse)
                {
                    Corpse  corpse = target as Corpse;
                    Point3D loc    = corpse.Location;
                    Map     map    = corpse.Map;

                    if (corpse.Owner.Player == true && m_Bury.CanBuryPlayers == false)
                    {
                        pm.SendMessage(" You cannot bury player corpses.");
                    }

                    else
                    #region map

                    {
                        Tile lt = map.Tiles.GetLandTile(from.X, from.Y);

                        if (IsDirt(lt.ID))
                        {
                            Grave grave = new Grave();
                            from.SendMessage("You bury the creature. Your deity rewards you with some karma.");
                            from.Karma += Utility.Random(1, 10); // customize what you want to give
                            from.Stam  -= 2;

                            if (from.Luck >= 10)
                            {
                                switch (Utility.Random(100))
                                {
                                case 1:
                                {
                                    from.AddToBackpack(new Gold()); // customize what you want to give
                                    from.PlaySound(0x2E6);          // drop gold sound
                                    from.SendMessage("You are lucky and find a coin in the ground.");
                                    break;
                                }

                                case 2:
                                {
                                    from.AddToBackpack(new FertileDirt(Utility.Random(1, 2)));        // customize what you want to give
                                    from.SendMessage("This is very fertile ground.You decide to take some of it.");
                                    break;
                                }

                                case 3:
                                {
                                    from.AddToBackpack(new Spoon());        // customize what you want to give
                                    from.SendMessage("You found an old spoon in the ground.");
                                    break;
                                }

                                default: break;
                                }
                            }

                            grave.MoveToWorld(loc, map);
                            corpse.Delete();

                            ItemRemovalTimer2 thisTimer = new ItemRemovalTimer2(grave);
                            thisTimer.Start();
                        }

                        if (IsSand(lt.ID))
                        {
                            //Grave grave = new Grave();
                            from.SendMessage("You bury the creature in the sand. Your deity rewards you with some karma.");
                            from.Karma += Utility.Random(1, 10); // customize what you want to give
                            from.Stam  -= 2;

                            if (from.Luck >= 10)
                            {
                                switch (Utility.Random(100))
                                {
                                case 1:
                                {
                                    from.AddToBackpack(new Gold()); // customize what you want to give
                                    from.PlaySound(0x2E6);          // drop gold sound
                                    from.SendMessage("You are lucky and find a coin in the sand.");
                                    break;
                                }

                                case 2:
                                {
                                    from.AddToBackpack(new Diamond());        // customize what you want to give
                                    from.SendMessage("You found a diamond in the sand!");
                                    break;
                                }

                                default: break;
                                }
                            }
                            corpse.Delete();
                        }
                        #endregion

                        #region static
                        // is it a static swamp?

                        Tile[] tiles = map.Tiles.GetStaticTiles(from.X, from.Y);

                        for (int i = 0; i < tiles.Length; ++i)
                        {
                            Tile     t  = tiles[i];
                            ItemData id = TileData.ItemTable[t.ID & 0x3FFF];

                            int tand = t.ID & 0x3FFF;

                            if (t.Z != from.Z)
                            {
                                continue;
                            }
                            else if (IsStaticDirt(tand))
                            {
                                Grave grave = new Grave();
                                from.SendMessage("You bury the creature. Your deity rewards you with some karma.");
                                from.Karma += Utility.Random(1, 10); // customize what you want to give
                                from.Stam  -= 2;

                                if (from.Luck >= 10)
                                {
                                    switch (Utility.Random(100))
                                    {
                                    case 1:
                                    {
                                        from.AddToBackpack(new Gold()); // customize what you want to give
                                        from.PlaySound(0x2E6);          // drop gold sound
                                        from.SendMessage("You are lucky and find a coin in the ground.");
                                        break;
                                    }

                                    case 2:
                                    {
                                        from.AddToBackpack(new FertileDirt(Utility.Random(1, 2)));        // customize what you want to give
                                        from.SendMessage("This is very fertile ground.You decide to take some of it.");
                                        break;
                                    }

                                    case 3:
                                    {
                                        from.AddToBackpack(new Spoon());        // customize what you want to give
                                        from.SendMessage("You found an old spoon in the ground.");
                                        break;
                                    }

                                    default: break;
                                    }
                                }

                                grave.MoveToWorld(loc, map);
                                corpse.Delete();

                                ItemRemovalTimer2 thisTimer = new ItemRemovalTimer2(grave);
                                thisTimer.Start();
                            }


                            else if (IsStaticSand(tand))
                            {
                                from.SendMessage("You bury the creature in the sand. Your deity rewards you with some karma.");
                                from.Karma += Utility.Random(1, 10); // customize what you want to give
                                from.Stam  -= 2;

                                if (from.Luck >= 10)
                                {
                                    switch (Utility.Random(100))
                                    {
                                    case 1:
                                    {
                                        from.AddToBackpack(new Gold()); // customize what you want to give
                                        from.PlaySound(0x2E6);          // drop gold sound
                                        from.SendMessage("You are lucky and find a coin in the sand.");
                                        break;
                                    }

                                    case 2:
                                    {
                                        from.AddToBackpack(new Diamond());        // customize what you want to give
                                        from.SendMessage("You found a diamond in the sand!");
                                        break;
                                    }

                                    default: break;
                                    }
                                }
                            }
                            else
                            {
                                from.SendMessage("You can't bury this here.");
                            }
                        }
                    }
                    #endregion
                }

                else
                {
                    from.SendMessage("You may only use this to bury corpses.");
                }
                return;
            }
コード例 #15
0
		public static bool ClaimCorpse( Mobile from, Corpse corpse, ClaimOption option )
		{
			if ( null == corpse || corpse.Owner == from )
				return false;

			Container goldBag = GetGoldBag( from );
			Container silverBag = GetSilverBag( from );
			Container lootBag = GetLootBag( from );

			if ( ClaimConfig.AggregateSilver )
				AggregateSilver( from, silverBag );

			if ( ClaimOption.Carve == option && !(corpse.Owner is PlayerMobile) )
				corpse.Carve( from, null );

			LootCorpse( from, corpse, option, goldBag, silverBag, lootBag );
			AwardGold( from, corpse, goldBag );
			corpse.Delete();

			return true;
		}