public override bool OnBeforeDeath() { Item reward = new SummonReward(); reward.Hue = 0x835; reward.ItemID = 0x2105; reward.Name = "Statue of Exodus"; this.PackItem(reward); this.Body = 752; Server.Misc.IntelligentAction.BurnAway(this); Server.Misc.LoggingFunctions.LogSlayingLord(this.LastKiller, this.Name); return(base.OnBeforeDeath()); }
public override void OnDeath(Container c) { base.OnDeath(c); Mobile killer = this.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } int chance = 0; if (killer is PlayerMobile) { if (Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "Exodus")) { chance = 9; } if (chance < Utility.RandomMinMax(1, 10)) { if (!Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "Exodus")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "Exodus", true); Item reward = new SummonReward(); reward.Hue = 0x835; reward.ItemID = 0x2105; reward.Name = "Statue of Exodus"; c.DropItem(reward); } c.DropItem(new DarkCoreExodus()); Server.Misc.LoggingFunctions.LogSlayingLord(this.LastKiller, this.Name); } } } }
public static void WellTheyDied(Mobile m, BaseCreature b) { if (m.EmoteHue == 505) { Mobile killer = m.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (!(killer is PlayerMobile)) { killer = m.FindMostRecentDamager(true); if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } } } } Map map = m.Map; if (map != null) { for (int x = -12; x <= 12; ++x) { for (int y = -12; y <= 12; ++y) { double dist = Math.Sqrt(x * x + y * y); if (dist <= 12) { new GoodiesTimer(map, m.X + x, m.Y + y).Start(); } } } SummonChest MyChest = new SummonChest(killer); MyChest.Prisoner = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase((m.Name).ToLower()); string myName = GetFirstName(m.Name); int myHue = m.Hue; Item reward = new SummonReward(); List <Item> belongings = new List <Item>(); foreach (Item i in m.Backpack.Items) { if (i is SummonPrison) { SummonPrison prison = (SummonPrison)i; reward.Hue = prison.RewardHue; reward.ItemID = prison.RewardID; reward.Name = prison.RewardName; MyChest.AddItem(reward); if (prison.PrisonerFullNameUsed > 0) { myName = m.Name; } if (prison.PrisonerClothColorUsed > 0) { for (int c = 0; c < m.Items.Count; ++c) { Item item = m.Items[c]; if (!(item is Cloak) && !(item is BaseWeapon) && !(item is WornHumanDeco)) { myHue = item.Hue; } } if (myHue == 0) { myHue = prison.RewardHue; } } } } if (killer is PlayerMobile) { Party p = Engines.PartySystem.Party.Get(killer); if (p != null) { foreach (PartyMemberInfo pmi in p.Members) { if (pmi.Mobile is PlayerMobile && pmi.Mobile.InRange(m.Location, 20)) { LoggingFunctions.LogSlayingLord(pmi.Mobile, m.Name + " from the Magical Prison"); Titles.AwardFame(pmi.Mobile, 300, true); if (((PlayerMobile)(pmi.Mobile)).KarmaLocked == true) { Titles.AwardKarma(pmi.Mobile, -300, true); } else { Titles.AwardKarma(pmi.Mobile, 300, true); } ManualOfItems book = new ManualOfItems(); book.Hue = myHue; book.Name = "Tome of " + myName + " Relics"; book.m_Charges = 1; book.m_Skill_1 = 99; book.m_Skill_2 = 0; book.m_Skill_3 = 0; book.m_Skill_4 = 0; book.m_Skill_5 = 0; book.m_Value_1 = 10.0; book.m_Value_2 = 0.0; book.m_Value_3 = 0.0; book.m_Value_4 = 0.0; book.m_Value_5 = 0.0; book.m_Slayer_1 = 5; book.m_Slayer_2 = 0; book.m_Owner = pmi.Mobile; book.m_Extra = "of " + myName; book.m_FromWho = "From " + m.Name; book.m_HowGiven = "Won by"; book.m_Points = 300; book.m_Hue = myHue; MyChest.AddItem(book); } } } else { LoggingFunctions.LogSlayingLord(killer, m.Name + " from the Magical Prison"); Titles.AwardFame(killer, 300, true); if (((PlayerMobile)killer).KarmaLocked == true) { Titles.AwardKarma(killer, -300, true); } else { Titles.AwardKarma(killer, 300, true); } ManualOfItems book = new ManualOfItems(); book.Hue = myHue; book.Name = "Tome of " + myName + " Relics"; book.m_Charges = 1; book.m_Skill_1 = 99; book.m_Skill_2 = 0; book.m_Skill_3 = 0; book.m_Skill_4 = 0; book.m_Skill_5 = 0; book.m_Value_1 = 10.0; book.m_Value_2 = 0.0; book.m_Value_3 = 0.0; book.m_Value_4 = 0.0; book.m_Value_5 = 0.0; book.m_Slayer_1 = 5; book.m_Slayer_2 = 0; book.m_Owner = killer; book.m_Extra = "of " + myName; book.m_FromWho = "From " + m.Name; book.m_HowGiven = "Won by"; book.m_Points = 300; book.m_Hue = myHue; MyChest.AddItem(book); } } MyChest.MoveToWorld(m.Location, m.Map); } if (!(m is PlayerMobile)) { Server.Misc.IntelligentAction.BurnAway(m); m.Delete(); } } }