public RiddlePrompt(RiddleNPC riddler) { m_Riddler = riddler; }
public static void TryAnswer(Mobile m, string text, RiddleNPC riddler) { if (Riddles.Count > 0 && m.Backpack != null) { if (text.ToLower() == Riddles[0].Answer.ToLower()) { if (riddler != null) { riddler.BCast(m); riddler.m_HiddenDuration = TimeSpan.FromHours(Utility.RandomMinMax(20, 30)); riddler.m_HidingExpireTimer = new HidingExpireTimer(riddler); riddler.m_HidingExpireTimer.Start(); Effects.SendLocationEffect( new Point3D( riddler.X, riddler.Y, riddler.Z ), riddler.Map, 0x36BD, 10 ); riddler.Hidden = true; } m.SendMessage("Congratulations you have solved the riddle!"); EventRewardSystem.CreateCopperBar(m.Name, m.Backpack, Riddles[0].RewardAmount, "solved a riddle"); Riddles.RemoveAt(0); } else m.SendMessage("I am sorry that is not the correct answer, try again."); } }
public HidingExpireTimer( RiddleNPC r) : base(r.m_HiddenDuration) { m_RiddleMan = r; Priority = TimerPriority.OneMinute; }