public override void OnDeath(Container c) { base.OnDeath(c); DragonTooth ingut = new DragonTooth(); ingut.Amount = Utility.RandomMinMax(1, 2); c.DropItem(ingut); Mobile killer = this.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (killer is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 5) == 1 && !Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "DragonKing")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "DragonKing"); ManualOfItems book = new ManualOfItems(); book.Hue = 0x6DF; book.Name = "Tome of Dragon King 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 = 20.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 = 6; book.m_Slayer_2 = 0; book.m_Owner = null; book.m_Extra = "of the Dragon King"; book.m_FromWho = "Taken from the King of Dragons"; book.m_HowGiven = "Acquired by"; book.m_Points = 150; book.m_Hue = 0x6DF; c.DropItem(book); } if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 10) == 1) { DragonLamp lamp = new DragonLamp(); lamp.Hue = 0x6DD; lamp.LampName = this.Name + " " + this.Title; lamp.LampColor = "Dark"; c.DropItem(lamp); } } } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You have pulled Vulcrum's Vault toward you.", from.NetState); LootChest MyChest = new LootChest(6); MyChest.Name = "Vulcrum's Vault"; MyChest.Hue = 0x4EA; if (from is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(from.Luck)) { Item arty = ArtifactBuilder.CreateArtifact("random"); MyChest.DropItem(arty); } if (GetPlayerInfo.LuckyKiller(from.Luck) && !Server.Items.CharacterDatabase.GetSpecialsKilled(from, "Vulcrum")) { Server.Items.CharacterDatabase.SetSpecialsKilled(from, "Vulcrum", true); ManualOfItems lexicon = new ManualOfItems(); lexicon.Hue = 0x4EA; lexicon.Name = "Tome of Vulcrum Relics"; lexicon.m_Charges = 1; lexicon.m_Skill_1 = 0; lexicon.m_Skill_2 = 0; lexicon.m_Skill_3 = 0; lexicon.m_Skill_4 = 0; lexicon.m_Skill_5 = 0; lexicon.m_Value_1 = 0.0; lexicon.m_Value_2 = 0.0; lexicon.m_Value_3 = 0.0; lexicon.m_Value_4 = 0.0; lexicon.m_Value_5 = 0.0; lexicon.m_Slayer_1 = 19; lexicon.m_Slayer_2 = 0; lexicon.m_Owner = from; lexicon.m_Extra = "of Vulcrum of the Flame"; lexicon.m_FromWho = "Taken from Vulcrum"; lexicon.m_HowGiven = "Acquired by"; lexicon.m_Points = 200; lexicon.m_Hue = 0x4EA; MyChest.DropItem(lexicon); } } MyChest.MoveToWorld(from.Location, from.Map); LoggingFunctions.LogGenericQuest(from, "defeated Vulcrum of the Flame"); this.Delete(); } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDeath(Container c) { base.OnDeath(c); GhostlyDust ingut = new GhostlyDust(); ingut.Amount = Utility.RandomMinMax(1, 3); c.DropItem(ingut); Mobile killer = this.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (killer is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 5) == 1 && !Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "LichKing")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "LichKing"); ManualOfItems book = new ManualOfItems(); book.Hue = 0x845; book.Name = "Tome of Lich King 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 = 20.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 = 6; book.m_Slayer_2 = 0; book.m_Owner = null; book.m_Extra = "of the Lich King"; book.m_FromWho = "Taken from the King of the Dead"; book.m_HowGiven = "Acquired by"; book.m_Points = 150; book.m_Hue = 0x845; c.DropItem(book); } if (GetPlayerInfo.LuckyKiller(killer.Luck) && Server.Misc.IntelligentAction.FameBasedEvent(this)) { LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this)); Server.Misc.ContainerFunctions.MakeTomb(MyChest, this, 1); c.DropItem(MyChest); } } } }
public override bool OnBeforeDeath() { LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this)); MyChest.Name = "demonic chest"; MyChest.Hue = 0x966; MyChest.MoveToWorld(Location, Map); Mobile killer = this.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (killer is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 5) == 1 && !Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "BlackGateDemon")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "BlackGateDemon", true); ManualOfItems book = new ManualOfItems(); book.Hue = 0x497; book.Name = "Tome of Demonic Relics"; book.m_Charges = 1; book.m_Skill_1 = 99; book.m_Skill_2 = 32; 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 = 10.0; book.m_Value_3 = 0.0; book.m_Value_4 = 0.0; book.m_Value_5 = 0.0; book.m_Slayer_1 = 14; book.m_Slayer_2 = 0; book.m_Owner = null; book.m_Extra = "of the Black Gate"; book.m_FromWho = "Found within the Black Gate"; book.m_HowGiven = "Acquired by"; book.m_Points = 150; book.m_Hue = 0x497; MyChest.AddItem(book); } } } m_MoonTimer = new InternalTimer(this); m_MoonTimer.Start(); 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(); } if (killer is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 5) == 1 && !Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "Dracula")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "Dracula", true); ManualOfItems book = new ManualOfItems(); book.Hue = 0x497; book.Name = "Tome of Dracula's 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 = 15.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 = 24; book.m_Slayer_2 = 0; book.m_Owner = killer; book.m_Extra = "of the Vampire"; book.m_FromWho = "from Dracula"; book.m_HowGiven = "Acquired by"; book.m_Points = 300; book.m_Hue = 0x497; killer.AddToBackpack(book); killer.PrivateOverheadMessage(MessageType.Regular, 1153, false, "You found a book and put it in your pack.", killer.NetState); } if (GetPlayerInfo.LuckyKiller(killer.Luck) && Server.Misc.IntelligentAction.FameBasedEvent(this)) { LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this)); Server.Misc.ContainerFunctions.MakeTomb(MyChest, this, 0); c.DropItem(MyChest); } } } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { if (CharacterDatabase.GetBardsTaleQuest(from, "BardsTaleKylearanKey") && CharacterDatabase.GetBardsTaleQuest(from, "BardsTaleSpectreEye")) { from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You find nothing of interest.", from.NetState); } else { CharacterDatabase.SetBardsTaleQuest(from, "BardsTaleKylearanKey", true); CharacterDatabase.SetBardsTaleQuest(from, "BardsTaleSpectreEye", true); from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You found a key with a symbol of a unicorn on it.", from.NetState); from.CloseGump(typeof(Server.Gumps.ClueGump)); from.SendGump(new Server.Gumps.ClueGump("You found a key with a symbol of a unicorn on it, along with a magical book of items.", "Tarjan's Death")); if (!Server.Items.CharacterDatabase.GetSpecialsKilled(from, "Tarjan")) { Server.Items.CharacterDatabase.SetSpecialsKilled(from, "Tarjan", true); ManualOfItems book = new ManualOfItems(); book.Hue = 0x5B7; book.Name = "Tome of Tarjan Relics"; book.m_Charges = 1; book.m_Skill_1 = 99; book.m_Skill_2 = 32; 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 = 10.0; book.m_Value_3 = 0.0; book.m_Value_4 = 0.0; book.m_Value_5 = 0.0; book.m_Slayer_1 = 11; book.m_Slayer_2 = 0; book.m_Owner = from; book.m_Extra = "of the Mad God"; book.m_FromWho = "Taken from Tarjan"; book.m_HowGiven = "Acquired by"; book.m_Points = 100; book.m_Hue = 0x5B7; from.AddToBackpack(book); from.SendMessage("A book has been added to your pack!"); } } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDeath(Container c) { base.OnDeath(c); DemigodBlood ingut = new DemigodBlood(); ingut.Amount = Utility.RandomMinMax(1, 3); c.DropItem(ingut); Mobile killer = this.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (killer is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 5) == 1 && !Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "BloodDemigod")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "BloodDemigod", true); ManualOfItems book = new ManualOfItems(); book.Hue = 0x870; book.Name = "Tome of Bloody Relics"; book.m_Charges = 1; book.m_Skill_1 = 99; book.m_Skill_2 = 2; book.m_Skill_3 = 23; book.m_Skill_4 = 0; book.m_Skill_5 = 0; book.m_Value_1 = 10.0; book.m_Value_2 = 10.0; book.m_Value_3 = 10.0; book.m_Value_4 = 0.0; book.m_Value_5 = 0.0; book.m_Slayer_1 = 24; book.m_Slayer_2 = 0; book.m_Owner = null; book.m_Extra = "of Blood"; book.m_FromWho = "Taken from the Demigoddess of Blood"; book.m_HowGiven = "Acquired by"; book.m_Points = 150; book.m_Hue = 0x870; c.DropItem(book); } } } }
public override void OnDeath(Container c) { base.OnDeath(c); Mobile killer = this.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (killer is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 5) == 1 && !Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "OrkDemigod")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "OrkDemigod"); ManualOfItems book = new ManualOfItems(); book.Hue = 0x7D4; book.Name = "Tome of Orcish 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 = 20.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 = 2; book.m_Slayer_2 = 0; book.m_Owner = null; book.m_Extra = "of the Orcs"; book.m_FromWho = "Taken from the Orc Demigod"; book.m_HowGiven = "Acquired by"; book.m_Points = 150; book.m_Hue = 0x7D4; c.DropItem(book); } } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } if (CharacterDatabase.GetBardsTaleQuest(m_Mobile, "BardsTaleEbonyKey")) { m_Giver.Say("You already have the onyx key. Use it to enter Mangar's tower."); } else if (!m_Mobile.HasGump(typeof(SpeechGump))) { CharacterDatabase.SetBardsTaleQuest(m_Mobile, "BardsTaleEbonyKey"); m_Mobile.SendSound(0x3D); m_Mobile.SendGump(new SpeechGump("Thank You Brave Adventurer", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Kylearan"))); ManualOfItems book = new ManualOfItems(); book.Hue = 0xA20; book.Name = "Tome of Kylearan Relics"; book.m_Charges = 1; book.m_Skill_1 = 17; book.m_Skill_2 = 31; book.m_Skill_3 = 32; book.m_Skill_4 = 33; book.m_Skill_5 = 0; book.m_Value_1 = 5.0; book.m_Value_2 = 5.0; book.m_Value_3 = 5.0; book.m_Value_4 = 5.0; book.m_Value_5 = 0.0; book.m_Slayer_1 = 27; book.m_Slayer_2 = 0; book.m_Owner = m_Mobile; book.m_Extra = "of the Archmage"; book.m_FromWho = "Gifted from Kylearan"; book.m_HowGiven = "Gifted to"; book.m_Points = 150; book.m_Hue = 0xA20; m_Mobile.AddToBackpack(book); m_Mobile.SendMessage("A book has been added to your pack!"); } }
public override bool OnBeforeDeath() { int CanDie = 0; int CanKillIt = 0; Mobile winner = this; foreach (Mobile m in this.GetMobilesInRange(30)) { if (m is PlayerMobile && m.Map == this.Map && !m.Blessed) { Item obelisk = m.Backpack.FindItemByType(typeof(ObeliskTip)); if (obelisk != null) { ObeliskTip tip = (ObeliskTip)obelisk; if (tip.ObeliskOwner == m && tip.HasEarth > 0 && tip.WonEarth < 1) { CanDie = 1; winner = m; tip.WonEarth = 1; m.SendMessage("You absord the Titan's power into the Heart of Earth."); m.PlaySound(0x65A); m.FixedParticles(0x375A, 1, 30, 9966, 33, 2, EffectLayer.Head); } } } } if (CanDie == 0) { foreach (Mobile m in this.GetMobilesInRange(30)) { if (m is PlayerMobile && m.Map == this.Map && !m.Blessed && m.StatCap >= 300) // TITANS OF ETHER CAN KILL IT { CanKillIt = 1; } if (m is PlayerMobile && m.Map == this.Map && !m.Blessed) // ANYONE WITH THE BLACKROCK CAN KILL IT { Item obelisk = m.Backpack.FindItemByType(typeof(ObeliskTip)); if (obelisk != null) { ObeliskTip tip = (ObeliskTip)obelisk; if (tip.ObeliskOwner == m && tip.HasEarth > 0 && tip.WonEarth > 0) { CanKillIt = 1; } } } } } if (CanDie == 0 && CanKillIt == 0) { Say("You cannot crush me puny one!"); this.Hits = this.HitsMax; this.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist); this.PlaySound(0x202); return(false); } else if (CanKillIt == 0) { string Iam = "the Titan of Earth"; Server.Misc.LoggingFunctions.LogSlayingLord(this.LastKiller, Iam); if (winner is PlayerMobile) { LoggingFunctions.LogGenericQuest(winner, "has obtained the power of the earth titan"); } if (winner != null) { if (winner is BaseCreature) { winner = ((BaseCreature)winner).GetMaster(); } if (winner is PlayerMobile && !winner.Blessed) { Party p = Engines.PartySystem.Party.Get(winner); if (p != null) { foreach (PartyMemberInfo pmi in p.Members) { if (pmi.Mobile is PlayerMobile && pmi.Mobile.InRange(this.Location, 20) && pmi.Mobile.Map == this.Map && !pmi.Mobile.Blessed && pmi.Mobile.StatCap < 300 && !Server.Items.CharacterDatabase.GetSpecialsKilled(pmi.Mobile, "TitanLithos")) { Server.Items.CharacterDatabase.SetSpecialsKilled(pmi.Mobile, "TitanLithos", true); ManualOfItems book = new ManualOfItems(); book.Hue = 0xAC0; book.ItemID = 0x1AA3; book.Name = "Tome of Earth Titan Relics"; book.m_Charges = 1; book.m_Skill_1 = 0; book.m_Skill_2 = 0; book.m_Skill_3 = 0; book.m_Skill_4 = 0; book.m_Skill_5 = 0; book.m_Value_1 = 0.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 the Earth"; book.m_FromWho = "Taken from Lithos"; book.m_HowGiven = "Acquired by"; book.m_Points = 300; book.m_Hue = 0xAC0; pmi.Mobile.AddToBackpack(book); pmi.Mobile.SendMessage("An item has appeared in your backpack!"); } } } else if (winner.StatCap < 300 && !Server.Items.CharacterDatabase.GetSpecialsKilled(winner, "TitanLithos")) { Server.Items.CharacterDatabase.SetSpecialsKilled(winner, "TitanLithos", true); ManualOfItems book = new ManualOfItems(); book.Hue = 0xAC0; book.ItemID = 0x1AA3; book.Name = "Tome of Earth Titan Relics"; book.m_Charges = 1; book.m_Skill_1 = 0; book.m_Skill_2 = 0; book.m_Skill_3 = 0; book.m_Skill_4 = 0; book.m_Skill_5 = 0; book.m_Value_1 = 0.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 = winner; book.m_Extra = "of the Earth"; book.m_FromWho = "Taken from Lithos"; book.m_HowGiven = "Acquired by"; book.m_Points = 300; book.m_Hue = 0xAC0; winner.AddToBackpack(book); winner.SendMessage("An item has appeared in your backpack!"); } } } } return(base.OnBeforeDeath()); }
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(); } } }
public override bool OnBeforeDeath() { int CanDie = 0; Mobile winner = this; foreach (Mobile m in this.GetMobilesInRange(30)) { if (m is PlayerMobile && !m.Blessed) { if (this.Name == "Astaroth") { Item flame = m.Backpack.FindItemByType(typeof(CandleOfLove)); if (flame != null) { CanDie = 1; winner = m; m.SendMessage("The Candle of Love has vanished after dispatching the Shadowlord."); Server.Items.QuestSouvenir.GiveReward(m, flame.Name, flame.Hue, flame.ItemID); } } else if (this.Name == "Faulinei") { Item flame = m.Backpack.FindItemByType(typeof(BookOfTruth)); if (flame != null) { CanDie = 1; winner = m; m.SendMessage("The Book of Truth has vanished after dispatching the Shadowlord."); Server.Items.QuestSouvenir.GiveReward(m, flame.Name, flame.Hue, flame.ItemID); } } else { Item flame = m.Backpack.FindItemByType(typeof(BellOfCourage)); if (flame != null) { CanDie = 1; winner = m; m.SendMessage("The Bell of Courage has vanished after dispatching the Shadowlord."); Server.Items.QuestSouvenir.GiveReward(m, flame.Name, flame.Hue, flame.ItemID); } } } } if (CanDie == 0) { Say("Foolish mortal! You cannot defeat me!"); this.Hits = this.HitsMax; this.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist); this.PlaySound(0x202); return(false); } else { this.Body = 13; this.Hue = 0x497; string Iam = this.Name + " the Shadowlord"; Server.Misc.LoggingFunctions.LogSlayingLord(this.LastKiller, Iam); ArrayList targets = new ArrayList(); foreach (Item item in World.Items.Values) { if (this.Name == "Astaroth" && (item is CandleOfLove)) { targets.Add(item); } else if (this.Name == "Faulinei" && (item is BookOfTruth)) { targets.Add(item); } else if (this.Name == "Nosfentor" && (item is BellOfCourage)) { targets.Add(item); } } for (int i = 0; i < targets.Count; ++i) { Item item = ( Item )targets[i]; item.Delete(); } if (this.Name == "Astaroth" && winner is PlayerMobile) { winner.AddToBackpack(new ShardOfHatred()); winner.SendMessage("You have obtained the Shard of Hatred!"); LoggingFunctions.LogGenericQuest(winner, "has obtained the shard of hatred"); } else if (this.Name == "Faulinei" && winner is PlayerMobile) { winner.AddToBackpack(new ShardOfFalsehood()); winner.SendMessage("You have obtained the Shard of Falsehood!"); LoggingFunctions.LogGenericQuest(winner, "has obtained the shard of falsehood"); } else if (this.Name == "Nosfentor" && winner is PlayerMobile) { winner.AddToBackpack(new ShardOfCowardice()); winner.SendMessage("You have obtained the Shard of Cowardice!"); LoggingFunctions.LogGenericQuest(winner, "has obtained the shard of cowardice"); } if (winner != null) { if (winner is BaseCreature) { winner = ((BaseCreature)winner).GetMaster(); } if (winner is PlayerMobile && !winner.Blessed) { Party p = Engines.PartySystem.Party.Get(winner); if (p != null) { foreach (PartyMemberInfo pmi in p.Members) { if (pmi.Mobile is PlayerMobile && pmi.Mobile.InRange(this.Location, 20) && pmi.Mobile.Map == this.Map && !pmi.Mobile.Blessed && !Server.Items.CharacterDatabase.GetSpecialsKilled(pmi.Mobile, this.Name)) { Server.Items.CharacterDatabase.SetSpecialsKilled(pmi.Mobile, this.Name, true); ManualOfItems book = new ManualOfItems(); book.Hue = 0x541; book.Name = "Tome of Shadowlord Relics"; book.m_Charges = 1; book.m_Skill_1 = 99; book.m_Skill_2 = 32; 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 = 10.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 the Shadows"; book.m_FromWho = "Spawned from the Shadowlords"; book.m_HowGiven = "Acquired by"; book.m_Points = 200; book.m_Hue = 0x541; pmi.Mobile.AddToBackpack(book); pmi.Mobile.SendMessage("An item has appeared in your backpack!"); } } } else if (!Server.Items.CharacterDatabase.GetSpecialsKilled(winner, this.Name)) { Server.Items.CharacterDatabase.SetSpecialsKilled(winner, this.Name, true); ManualOfItems book = new ManualOfItems(); book.Hue = 0x541; book.Name = "Tome of Shadowlord Relics"; book.m_Charges = 1; book.m_Skill_1 = 99; book.m_Skill_2 = 32; 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 = 10.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 = winner; book.m_Extra = "of the Shadows"; book.m_FromWho = "Spawned from the Shadowlords"; book.m_HowGiven = "Acquired by"; book.m_Points = 200; book.m_Hue = 0x541; winner.AddToBackpack(book); winner.SendMessage("An item has appeared in your backpack!"); } } } } return(base.OnBeforeDeath()); }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { if (CharacterDatabase.GetBardsTaleQuest(from, "BardsTaleWin")) { from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You find nothing of interest.", from.NetState); from.SendMessage("A gate is open nearby. You better hurry or you will remain trapped here."); } else { CharacterDatabase.SetBardsTaleQuest(from, "BardsTaleWin"); from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You have pulled Mangar's Vault toward you.", from.NetState); from.SendMessage("A gate is open nearby. You better hurry or you will remain trapped here."); LootChest MyChest = new LootChest(6); MyChest.Name = "Mangar's Vault"; MyChest.Hue = 0x497; Item arty = ArtifactBuilder.CreateArtifact("random"); MyChest.DropItem(arty); int IamNecro = 0; int IamMage = 0; int IamBard = 0; if (from.Skills[SkillName.Necromancy].Base > 0) { IamNecro = (int)from.Skills[SkillName.Necromancy].Base; } if (from.Skills[SkillName.Magery].Base > 0) { IamMage = (int)from.Skills[SkillName.Magery].Base; } if (from.Skills[SkillName.Musicianship].Base > 0) { IamBard = (int)from.Skills[SkillName.Musicianship].Base; } if (!Server.Items.CharacterDatabase.GetSpecialsKilled(from, "Mangar")) { Server.Items.CharacterDatabase.SetSpecialsKilled(from, "Mangar"); ManualOfItems lexicon = new ManualOfItems(); lexicon.Hue = 0x497; lexicon.Name = "Tome of Mangar Relics"; lexicon.m_Charges = 1; lexicon.m_Skill_1 = 17; lexicon.m_Skill_2 = 31; lexicon.m_Skill_3 = 32; lexicon.m_Skill_4 = 33; lexicon.m_Skill_5 = 36; lexicon.m_Value_1 = 5.0; lexicon.m_Value_2 = 5.0; lexicon.m_Value_3 = 5.0; lexicon.m_Value_4 = 5.0; lexicon.m_Value_5 = 5.0; lexicon.m_Slayer_1 = 0; lexicon.m_Slayer_2 = 0; lexicon.m_Owner = from; lexicon.m_Extra = "of Mangar the Dark"; lexicon.m_FromWho = "Taken from Mangar"; lexicon.m_HowGiven = "Acquired by"; lexicon.m_Points = 250; lexicon.m_Hue = 0x497; MyChest.DropItem(lexicon); } if (IamBard > IamMage && IamBard > IamNecro && IamBard > 0) { MyChest.DropItem(new BardicFeatheredHat()); MySongbook newBook = new MySongbook(); newBook.Name = "Songs of Skara Brae"; newBook.Content = 0xFFFF; MyChest.DropItem(newBook); } else if (IamMage > IamBard && IamMage > IamNecro && IamMage > 0) { MyChest.DropItem(new MangarsRobe()); MySpellbook newBook = new MySpellbook(); newBook.Hue = 0x497; string book = newBook.Name; string[] eachWord = book.Split('\''); int nLine = 1; foreach (string eachWords in eachWord) { if (nLine != 1) { newBook.Name = "Mangar'" + eachWords; } else { nLine = 2; } } MyChest.DropItem(newBook); } else if (IamNecro > IamBard && IamNecro > IamMage && IamNecro > 0) { MyChest.DropItem(new MangarsNecroRobe()); MyNecromancerSpellbook newBook = new MyNecromancerSpellbook(); newBook.Hue = 0x497; string book = newBook.Name; string[] eachWord = book.Split('\''); int nLine = 1; foreach (string eachWords in eachWord) { if (nLine != 1) { newBook.Name = "Mangar'" + eachWords; } else { nLine = 2; } } MyChest.DropItem(newBook); } else if (IamMage > 0) { MyChest.DropItem(new MangarsRobe()); MySpellbook newBook = new MySpellbook(); newBook.Hue = 0x497; string book = newBook.Name; string[] eachWord = book.Split('\''); int nLine = 1; foreach (string eachWords in eachWord) { if (nLine != 1) { newBook.Name = "Mangar'" + eachWords; } else { nLine = 2; } } MyChest.DropItem(newBook); } else if (IamNecro > 0) { MyChest.DropItem(new MangarsNecroRobe()); MyNecromancerSpellbook newBook = new MyNecromancerSpellbook(); newBook.Hue = 0x497; string book = newBook.Name; string[] eachWord = book.Split('\''); int nLine = 1; foreach (string eachWords in eachWord) { if (nLine != 1) { newBook.Name = "Mangar'" + eachWords; } else { nLine = 2; } } MyChest.DropItem(newBook); } else if (IamBard > 0) { MyChest.DropItem(new BardicFeatheredHat()); MySongbook newBook = new MySongbook(); newBook.Name = "Songs of Skara Brae"; newBook.Content = 0xFFFF; MyChest.DropItem(newBook); } MyChest.MoveToWorld(from.Location, from.Map); LoggingFunctions.LogGenericQuest(from, "defeated Mangar and escaped Skara Brae"); } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDeath(Container c) { base.OnDeath(c); Mobile killer = this.LastKiller; if (killer != null) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (killer is PlayerMobile) { if (GetPlayerInfo.LuckyKiller(killer.Luck)) { StatueJormungandr trophy = new StatueJormungandr(); string waters = Server.Misc.Worlds.GetRegionName(killer.Map, killer.Location); if (waters == "the Bottle World of Kuldar") { waters = "the Kuldar Sea"; } else if (waters == "the Land of Ambrosia") { waters = "the Ambrosia Lakes"; } else if (waters == "the Island of Umber Veil") { waters = "the Umber Sea"; } else if (waters == "the Land of Lodoria") { waters = "the Lodoria Ocean"; } else if (waters == "the Underworld") { waters = "Carthax Lake"; } else if (waters == "the Serpent Island") { waters = "the Serpent Seas"; } else if (waters == "the Isles of Dread") { waters = "the Dreadful Sea"; } else if (waters == "the Savaged Empire") { waters = "the Savage Seas"; } else if (waters == "the Land of Sosaria") { waters = "the Sosaria Ocean"; } trophy.AnimalWhere = "From " + waters; string trophyKiller = killer.Name + " the " + Server.Misc.GetPlayerInfo.GetSkillTitle(killer); trophy.AnimalKiller = "Killed by " + trophyKiller; c.DropItem(trophy); } if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 5) == 1 && !Server.Items.CharacterDatabase.GetSpecialsKilled(killer, "Jormungandr")) { Server.Items.CharacterDatabase.SetSpecialsKilled(killer, "Jormungandr", true); ManualOfItems book = new ManualOfItems(); book.Hue = 0xB3D; book.Name = "Tome of Midgard 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 = 20.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 = 34; book.m_Slayer_2 = 8; book.m_Owner = null; book.m_Extra = "of Midgard"; book.m_FromWho = "Taken from Jormungandr the Serpent of Midgard"; book.m_HowGiven = "Acquired by"; book.m_Points = 200; book.m_Hue = 0xB3D; c.DropItem(book); } } } LootChest MyChest = new LootChest(10); Server.Misc.ContainerFunctions.MakeDemonBox(MyChest, this); MyChest.ItemID = Utility.RandomList(0x2823, 0x2824); MyChest.Hue = Utility.RandomList(0xB3D, 0xB3E, 0xB3F, 0xB40); c.DropItem(MyChest); }