public void OnTileClicked(Mobile from, PuzzleTile tile) { if (Sequencing) { return; } if (from is PlayerMobile) { PristineCrystalLotusQuest quest = QuestHelper.GetQuest <PristineCrystalLotusQuest>((PlayerMobile)from); if (quest != null) { if (!PlayerOrder.ContainsKey(from)) { PlayerOrder[from] = new PuzzleTile[Order.Length]; } PuzzleTile[] list = PlayerOrder[from]; for (int i = 0; i < Order.Length; i++) { PuzzleTile actual = Order[i]; if (list[i] == null) { list[i] = tile; if (i == Order.Length - 1) { if (CheckMatch(list)) { from.SendLocalizedMessage(1151304); // You matched that pattern correctly. quest.PuzzlesComplete++; if (quest.PuzzlesComplete >= 5) { from.SendLocalizedMessage(1151306); // You may now retrieve a Pristine Crystal Lotus. } } else { from.SendLocalizedMessage(1151305); // You did not complete the pattern correctly. } } break; } } } } }
public override void OnSpeech(SpeechEventArgs e) { PlayerMobile pm = e.Mobile as PlayerMobile; if (pm == null) { return; } if (e.Speech.ToLower() == "i seek the lotus") { PristineCrystalLotusQuest quest = QuestHelper.GetQuest <PristineCrystalLotusQuest>(pm); if (quest != null) { pm.SendLocalizedMessage(1151300); // Complete the puzzle to obtain a Pristine Crystal Lotus. } else { pm.SendLocalizedMessage(1151301); // You marvel at the flashing tiles. } e.Handled = true; } else if (e.Speech.ToLower() == "give me the lotus") { PristineCrystalLotusQuest quest = QuestHelper.GetQuest <PristineCrystalLotusQuest>(pm); if (quest != null) { if (quest.PuzzlesComplete < 5) { pm.SendLocalizedMessage(1151303); // You have not completed the puzzle. } else if (!quest.ReceivedLotus) { PristineCrystalLotus lotus = new PristineCrystalLotus(); pm.AddToBackpack(lotus); pm.SendLocalizedMessage(1151302); // A Pristine Crystal Lotus has been placed in your backpack. QuestHelper.CheckRewardItem(pm, lotus); quest.ReceivedLotus = true; } } e.Handled = true; } }