protected override void OnTarget(Mobile from, object targeted) { bool consume = false; if (targeted is ScrollClue) { ScrollClue scroll = (ScrollClue)targeted; consume = true; from.PlaySound(0xF9); if (scroll.ScrollIntelligence > 0) { from.SendMessage("That parchment hasn't been deciphered yet."); } else { string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell you that this parchment is"; break; case 1: WillSay = "Your mind is showing you that this parchment is"; break; case 2: WillSay = "The voices all speak that this parchment is"; break; case 3: WillSay = "You can see beyond that this parchment is"; break; } if (scroll.ScrollTrue == 1) { from.SendMessage(WillSay + " truthfully written."); } else { from.SendMessage(WillSay + " falsely written."); } } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is SearchPage) { SearchPage scroll = (SearchPage)targeted; consume = true; from.PlaySound(0xF9); string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell you that this legend "; break; case 1: WillSay = "Your mind is showing you that this legend "; break; case 2: WillSay = "The voices all speak that this legend "; break; case 3: WillSay = "You can see beyond that this legend "; break; } if (scroll.LegendReal == 1) { from.SendMessage(WillSay + " really happened."); } else { from.SendMessage(WillSay + " never happened."); } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is DynamicBook) { DynamicBook scroll = (DynamicBook)targeted; consume = true; from.PlaySound(0xF9); string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell you that this book "; break; case 1: WillSay = "Your mind is showing you that this book "; break; case 2: WillSay = "The voices all speak that this book "; break; case 3: WillSay = "You can see beyond that this book "; break; } if (scroll.BookTrue > 0) { from.SendMessage(WillSay + " contains the truth."); } else { from.SendMessage(WillSay + " contains falsehoods."); } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is SomeRandomNote) { SomeRandomNote scroll = (SomeRandomNote)targeted; consume = true; from.PlaySound(0xF9); string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell you that this parchment is"; break; case 1: WillSay = "Your mind is showing you that this parchment is"; break; case 2: WillSay = "The voices all speak that this parchment is"; break; case 3: WillSay = "You can see beyond that this parchment is"; break; } if (scroll.ScrollTrue == 1) { from.SendMessage(WillSay + " truthfully written."); } else { from.SendMessage(WillSay + " falsely written."); } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is DataPad) { consume = true; from.PlaySound(0xF9); string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell you that this glowing book is"; break; case 1: WillSay = "Your mind is showing you that this glowing book is"; break; case 2: WillSay = "The voices all speak that this glowing book is"; break; case 3: WillSay = "You can see beyond that this glowing book is"; break; } from.SendMessage(WillSay + " truthfully written."); } /////////////////////////////////////////////////////////////////////////////////// else { from.SendMessage("That is not a book or parchment."); } if (consume) { Server.Misc.Research.ConsumeScroll(from, true, m_SpellIndex, false); } m_Owner.FinishSequence(); }
protected override void OnTarget(Mobile from, object targeted) { Container pack = from.Backpack; if (targeted is ScrollClue) { ScrollClue scroll = (ScrollClue)targeted; int nCost = scroll.ScrollLevel * 100; if (BaseVendor.BeggingPose(from) > 0) // LET US SEE IF THEY ARE BEGGING - WIZARD { nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); } int toConsume = nCost; if (scroll.ScrollIntelligence > 0) { m_GypsyLady.SayTo(from, "That parchment hasn't been deciphered yet."); } else if (pack.ConsumeTotal(typeof(Gold), toConsume)) { string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell me that this parchment is"; break; case 1: WillSay = "My mind is showing me that this parchment is"; break; case 2: WillSay = "The voices all speak that this parchment is"; break; case 3: WillSay = "I can see beyond that this parchment is"; break; } if (scroll.ScrollTrue == 1) { m_GypsyLady.SayTo(from, WillSay + " truthfully written."); } else { m_GypsyLady.SayTo(from, WillSay + " falsely written."); } from.SendMessage(String.Format("You pay {0} gold.", toConsume)); } else { m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume); } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is SearchPage) { SearchPage scroll = (SearchPage)targeted; int nCost = (100 - scroll.LegendPercent) * 50; if (BaseVendor.BeggingPose(from) > 0) // LET US SEE IF THEY ARE BEGGING - WIZARD { nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); } int toConsume = nCost; if (pack.ConsumeTotal(typeof(Gold), toConsume)) { string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell me that this legend "; break; case 1: WillSay = "My mind is showing me that this legend "; break; case 2: WillSay = "The voices all speak that this legend "; break; case 3: WillSay = "I can see beyond that this legend "; break; } if (scroll.LegendReal == 1) { m_GypsyLady.SayTo(from, WillSay + " really happened."); } else { m_GypsyLady.SayTo(from, WillSay + " never happened."); } from.SendMessage(String.Format("You pay {0} gold.", toConsume)); } else { m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume); } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is DynamicBook) { DynamicBook scroll = (DynamicBook)targeted; int nCost = (scroll.BookPower + 1) * 50; if (BaseVendor.BeggingPose(from) > 0) // LET US SEE IF THEY ARE BEGGING - WIZARD { nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); } int toConsume = nCost; if (pack.ConsumeTotal(typeof(Gold), toConsume)) { string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell me that this book "; break; case 1: WillSay = "My mind is showing me that this book "; break; case 2: WillSay = "The voices all speak that this book "; break; case 3: WillSay = "I can see beyond that this book "; break; } if (scroll.BookTrue > 0) { m_GypsyLady.SayTo(from, WillSay + " contains the truth."); } else { m_GypsyLady.SayTo(from, WillSay + " contains falsehoods."); } from.SendMessage(String.Format("You pay {0} gold.", toConsume)); } else { m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume); } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is SomeRandomNote) { SomeRandomNote scroll = (SomeRandomNote)targeted; int nCost = 100; if (BaseVendor.BeggingPose(from) > 0) // LET US SEE IF THEY ARE BEGGING - WIZARD { nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); } int toConsume = nCost; if (pack.ConsumeTotal(typeof(Gold), toConsume)) { string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell me that this parchment is"; break; case 1: WillSay = "My mind is showing me that this parchment is"; break; case 2: WillSay = "The voices all speak that this parchment is"; break; case 3: WillSay = "I can see beyond that this parchment is"; break; } if (scroll.ScrollTrue == 1) { m_GypsyLady.SayTo(from, WillSay + " truthfully written."); } else { m_GypsyLady.SayTo(from, WillSay + " falsely written."); } from.SendMessage(String.Format("You pay {0} gold.", toConsume)); } else { m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume); } } /////////////////////////////////////////////////////////////////////////////////// else if (targeted is DataPad) { int nCost = 100; if (BaseVendor.BeggingPose(from) > 0) // LET US SEE IF THEY ARE BEGGING - WIZARD { nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); } int toConsume = nCost; if (pack.ConsumeTotal(typeof(Gold), toConsume)) { string WillSay = ""; switch (Utility.RandomMinMax(0, 3)) { case 0: WillSay = "The spirits tell me that this glowing book is"; break; case 1: WillSay = "My mind is showing me that this glowing book is"; break; case 2: WillSay = "The voices all speak that this glowing book is"; break; case 3: WillSay = "I can see beyond that this glowing book is"; break; } m_GypsyLady.SayTo(from, WillSay + " truthfully written."); from.SendMessage(String.Format("You pay {0} gold.", toConsume)); } else { m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume); } } /////////////////////////////////////////////////////////////////////////////////// else { m_GypsyLady.SayTo(from, "That is not a parchment."); } }