public override void OnResponse(NetState sender, RelayInfo info) { if (info.ButtonID > 0) { Point3D loc = m_From.Location; Map map = m_From.Map; bool nearCoil = false; foreach (Item coil in m_From.GetItemsInRange(10)) { if (coil is PowerCoil) { nearCoil = true; loc = new Point3D(coil.X, coil.Y, (coil.Z + 20)); } } if (nearCoil) { int Fighter = info.ButtonID - 1; FrankenPorterItem flesh = new FrankenPorterItem(); string QuestLog = "has reanimated a flesh golem"; flesh.PorterOwner = m_From.Serial; flesh.PorterLevel = m_Journal.HasBrain; flesh.PorterType = Fighter; m_From.AddToBackpack(flesh); Server.Misc.LoggingFunctions.LogGenericQuest(m_From, QuestLog); m_From.PrivateOverheadMessage(MessageType.Regular, 1153, false, "My experiment is a success.", m_From.NetState); int sound = Utility.RandomList(0x028, 0x029); Effects.SendLocationEffect(loc, map, 0x2A4E, 30, 10, 0, 0); m_From.PlaySound(sound); m_Journal.Delete(); } else { m_From.SendMessage("You need to be near a power coil to do that."); m_From.SendSound(0x55); } } else { m_From.SendSound(0x55); m_From.CloseGump(typeof(StatsGump)); } }
protected override void OnTarget(Mobile from, object targeted) { Item iFluid = targeted as Item; if (iFluid is FrankenPorterItem) { FrankenPorterItem xFluid = (FrankenPorterItem)iFluid; int myCharges = xFluid.m_Charges; if (!iFluid.IsChildOf(from.Backpack)) { from.SendMessage("You can only use this fluid on items in your pack."); } else if (myCharges < 100) { int UpMe = 5; if (xFluid.PorterType > 0) { UpMe = 1; } xFluid.m_Charges = xFluid.m_Charges + UpMe; if (xFluid.m_Charges > 100) { xFluid.m_Charges = 100; } from.SendMessage("You preserve your reanimation with the embalming fluid."); xFluid.InvalidateProperties(); from.RevealingAction(); from.PlaySound(0x23E); from.AddToBackpack(new Bottle()); m_Embalming.Consume(); } else { from.SendMessage("That reanimation is already full of fluid."); } } else { from.SendMessage("You don't think that will really do anything."); } }