Q00214_TrialOfTheScholar.java 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080
  1. /*
  2. * Copyright (C) 2004-2015 L2J DataPack
  3. *
  4. * This file is part of L2J DataPack.
  5. *
  6. * L2J DataPack is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J DataPack is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package quests.Q00214_TrialOfTheScholar;
  20. import com.l2jserver.gameserver.enums.QuestSound;
  21. import com.l2jserver.gameserver.model.actor.L2Npc;
  22. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  23. import com.l2jserver.gameserver.model.base.ClassId;
  24. import com.l2jserver.gameserver.model.quest.Quest;
  25. import com.l2jserver.gameserver.model.quest.QuestState;
  26. import com.l2jserver.gameserver.network.serverpackets.SocialAction;
  27. import com.l2jserver.gameserver.util.Util;
  28. /**
  29. * Trial Of The Scholar (214)
  30. * @author ivantotov
  31. */
  32. public final class Q00214_TrialOfTheScholar extends Quest
  33. {
  34. // NPCs
  35. private static final int HIGH_PRIEST_SYLVAIN = 30070;
  36. private static final int CAPTAIN_LUCAS = 30071;
  37. private static final int WAREHOUSE_KEEPER_VALKON = 30103;
  38. private static final int MAGISTER_DIETER = 30111;
  39. private static final int GRAND_MAGISTER_JUREK = 30115;
  40. private static final int TRADER_EDROC = 30230;
  41. private static final int WAREHOUSE_KEEPER_RAUT = 30316;
  42. private static final int BLACKSMITH_POITAN = 30458;
  43. private static final int MAGISTER_MIRIEN = 30461;
  44. private static final int MARIA = 30608;
  45. private static final int ASTROLOGER_CRETA = 30609;
  46. private static final int ELDER_CRONOS = 30610;
  47. private static final int DRUNKARD_TRIFF = 30611;
  48. private static final int ELDER_CASIAN = 30612;
  49. // Items
  50. private static final int MIRIENS_1ST_SIGIL = 2675;
  51. private static final int MIRIENS_2ND_SIGIL = 2676;
  52. private static final int MIRIENS_3RD_SIGIL = 2677;
  53. private static final int MIRIENS_INSTRUCTION = 2678;
  54. private static final int MARIAS_1ST_LETTER = 2679;
  55. private static final int MARIAS_2ND_LETTER = 2680;
  56. private static final int LUCASS_LETTER = 2681;
  57. private static final int LUCILLAS_HANDBAG = 2682;
  58. private static final int CRETAS_1ST_LETTER = 2683;
  59. private static final int CRERAS_PAINTING1 = 2684;
  60. private static final int CRERAS_PAINTING2 = 2685;
  61. private static final int CRERAS_PAINTING3 = 2686;
  62. private static final int BROWN_SCROLL_SCRAP = 2687;
  63. private static final int CRYSTAL_OF_PURITY1 = 2688;
  64. private static final int HIGH_PRIESTS_SIGIL = 2689;
  65. private static final int GRAND_MAGISTER_SIGIL = 2690;
  66. private static final int CRONOS_SIGIL = 2691;
  67. private static final int SYLVAINS_LETTER = 2692;
  68. private static final int SYMBOL_OF_SYLVAIN = 2693;
  69. private static final int JUREKS_LIST = 2694;
  70. private static final int MONSTER_EYE_DESTROYER_SKIN = 2695;
  71. private static final int SHAMANS_NECKLACE = 2696;
  72. private static final int SHACKLES_SCALP = 2697;
  73. private static final int SYMBOL_OF_JUREK = 2698;
  74. private static final int CRONOS_LETTER = 2699;
  75. private static final int DIETERS_KEY = 2700;
  76. private static final int CRETAS_2ND_LETTER = 2701;
  77. private static final int DIETERS_LETTER = 2702;
  78. private static final int DIETERS_DIARY = 2703;
  79. private static final int RAUTS_LETTER_ENVELOPE = 2704;
  80. private static final int TRIFFS_RING = 2705;
  81. private static final int SCRIPTURE_CHAPTER_1 = 2706;
  82. private static final int SCRIPTURE_CHAPTER_2 = 2707;
  83. private static final int SCRIPTURE_CHAPTER_3 = 2708;
  84. private static final int SCRIPTURE_CHAPTER_4 = 2709;
  85. private static final int VALKONS_REQUEST = 2710;
  86. private static final int POITANS_NOTES = 2711;
  87. private static final int STRONG_LIGUOR = 2713;
  88. private static final int CRYSTAL_OF_PURITY2 = 2714;
  89. private static final int CASIANS_LIST = 2715;
  90. private static final int GHOULS_SKIN = 2716;
  91. private static final int MEDUSAS_BLOOD = 2717;
  92. private static final int FETTERED_SOULS_ICHOR = 2718;
  93. private static final int ENCHANTED_GARGOYLES_NAIL = 2719;
  94. private static final int SYMBOL_OF_CRONOS = 2720;
  95. // Reward
  96. private static final int MARK_OF_SCHOLAR = 2674;
  97. private static final int DIMENSIONAL_DIAMOND = 7562;
  98. // Monsters
  99. private static final int MONSTER_EYE_DESTREOYER = 20068;
  100. private static final int MEDUSA = 20158;
  101. private static final int GHOUL = 20201;
  102. private static final int SHACKLE1 = 20235;
  103. private static final int BREKA_ORC_SHAMAN = 20269;
  104. private static final int SHACKLE2 = 20279;
  105. private static final int FETTERED_SOUL = 20552;
  106. private static final int GRANDIS = 20554;
  107. private static final int ENCHANTED_GARGOYLE = 20567;
  108. private static final int LETO_LIZARDMAN_WARRIOR = 20580;
  109. // Misc
  110. private static final int MIN_LVL = 35;
  111. private static final int LEVEL = 36;
  112. public Q00214_TrialOfTheScholar()
  113. {
  114. super(214, Q00214_TrialOfTheScholar.class.getSimpleName(), "Trial Of The Scholar");
  115. addStartNpc(MAGISTER_MIRIEN);
  116. addTalkId(MAGISTER_MIRIEN, HIGH_PRIEST_SYLVAIN, CAPTAIN_LUCAS, WAREHOUSE_KEEPER_VALKON, MAGISTER_DIETER, GRAND_MAGISTER_JUREK, TRADER_EDROC, WAREHOUSE_KEEPER_RAUT, BLACKSMITH_POITAN, MARIA, ASTROLOGER_CRETA, ELDER_CRONOS, DRUNKARD_TRIFF, ELDER_CASIAN);
  117. addKillId(MONSTER_EYE_DESTREOYER, MEDUSA, GHOUL, SHACKLE1, BREKA_ORC_SHAMAN, SHACKLE2, FETTERED_SOUL, GRANDIS, ENCHANTED_GARGOYLE, LETO_LIZARDMAN_WARRIOR);
  118. registerQuestItems(MIRIENS_1ST_SIGIL, MIRIENS_2ND_SIGIL, MIRIENS_3RD_SIGIL, MIRIENS_INSTRUCTION, MARIAS_1ST_LETTER, MARIAS_2ND_LETTER, LUCASS_LETTER, LUCILLAS_HANDBAG, CRETAS_1ST_LETTER, CRERAS_PAINTING1, CRERAS_PAINTING1, CRERAS_PAINTING3, BROWN_SCROLL_SCRAP, CRYSTAL_OF_PURITY1, HIGH_PRIESTS_SIGIL, GRAND_MAGISTER_SIGIL, CRONOS_SIGIL, SYLVAINS_LETTER, SYMBOL_OF_SYLVAIN, JUREKS_LIST, MONSTER_EYE_DESTROYER_SKIN, SHAMANS_NECKLACE, SHACKLES_SCALP, SYMBOL_OF_JUREK, CRONOS_LETTER, DIETERS_KEY, CRETAS_2ND_LETTER, DIETERS_LETTER, DIETERS_DIARY, RAUTS_LETTER_ENVELOPE, TRIFFS_RING, SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3, SCRIPTURE_CHAPTER_4, VALKONS_REQUEST, POITANS_NOTES, STRONG_LIGUOR, CRYSTAL_OF_PURITY2, CASIANS_LIST, GHOULS_SKIN, MEDUSAS_BLOOD, FETTERED_SOULS_ICHOR, ENCHANTED_GARGOYLES_NAIL, SYMBOL_OF_CRONOS);
  119. }
  120. @Override
  121. public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
  122. {
  123. final QuestState qs = getQuestState(player, false);
  124. if (qs == null)
  125. {
  126. return null;
  127. }
  128. String htmltext = null;
  129. switch (event)
  130. {
  131. case "ACCEPT":
  132. {
  133. if (qs.isCreated())
  134. {
  135. qs.startQuest();
  136. if (!hasQuestItems(player, MIRIENS_1ST_SIGIL))
  137. {
  138. giveItems(player, MIRIENS_1ST_SIGIL, 1);
  139. }
  140. playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
  141. if (player.getVariables().getInt("2ND_CLASS_DIAMOND_REWARD", 0) == 0)
  142. {
  143. giveItems(player, DIMENSIONAL_DIAMOND, 168);
  144. player.getVariables().set("2ND_CLASS_DIAMOND_REWARD", 1);
  145. htmltext = "30461-04a.htm";
  146. }
  147. else
  148. {
  149. htmltext = "30461-04.htm";
  150. }
  151. }
  152. break;
  153. }
  154. case "30103-02.html":
  155. case "30103-03.html":
  156. case "30111-02.html":
  157. case "30111-03.html":
  158. case "30111-04.html":
  159. case "30111-08.html":
  160. case "30111-14.html":
  161. case "30115-02.html":
  162. case "30316-03.html":
  163. case "30461-09.html":
  164. case "30608-07.html":
  165. case "30609-02.html":
  166. case "30609-03.html":
  167. case "30609-04.html":
  168. case "30609-08.html":
  169. case "30609-13.html":
  170. case "30610-02.html":
  171. case "30610-03.html":
  172. case "30610-04.html":
  173. case "30610-05.html":
  174. case "30610-06.html":
  175. case "30610-07.html":
  176. case "30610-08.html":
  177. case "30610-09.html":
  178. case "30610-13.html":
  179. case "30611-02.html":
  180. case "30611-03.html":
  181. case "30611-06.html":
  182. case "30612-03.html":
  183. {
  184. htmltext = event;
  185. break;
  186. }
  187. case "30461-10.html":
  188. {
  189. if (hasQuestItems(player, MIRIENS_2ND_SIGIL, SYMBOL_OF_JUREK))
  190. {
  191. takeItems(player, MIRIENS_2ND_SIGIL, 1);
  192. giveItems(player, MIRIENS_3RD_SIGIL, 1);
  193. takeItems(player, SYMBOL_OF_JUREK, 1);
  194. qs.setCond(19, true);
  195. htmltext = event;
  196. }
  197. break;
  198. }
  199. case "30070-02.html":
  200. {
  201. giveItems(player, HIGH_PRIESTS_SIGIL, 1);
  202. giveItems(player, SYLVAINS_LETTER, 1);
  203. qs.setCond(2, true);
  204. htmltext = event;
  205. break;
  206. }
  207. case "30071-04.html":
  208. {
  209. if (hasQuestItems(player, CRERAS_PAINTING2))
  210. {
  211. takeItems(player, CRERAS_PAINTING2, 1);
  212. giveItems(player, CRERAS_PAINTING3, 1);
  213. qs.setCond(10, true);
  214. htmltext = event;
  215. }
  216. break;
  217. }
  218. case "30103-04.html":
  219. {
  220. giveItems(player, VALKONS_REQUEST, 1);
  221. htmltext = event;
  222. break;
  223. }
  224. case "30111-05.html":
  225. {
  226. if (hasQuestItems(player, CRONOS_LETTER))
  227. {
  228. takeItems(player, CRONOS_LETTER, 1);
  229. giveItems(player, DIETERS_KEY, 1);
  230. qs.setCond(21, true);
  231. htmltext = event;
  232. }
  233. break;
  234. }
  235. case "30111-09.html":
  236. {
  237. if (hasQuestItems(player, CRETAS_2ND_LETTER))
  238. {
  239. takeItems(player, CRETAS_2ND_LETTER, 1);
  240. giveItems(player, DIETERS_LETTER, 1);
  241. giveItems(player, DIETERS_DIARY, 1);
  242. qs.setCond(23, true);
  243. htmltext = event;
  244. }
  245. break;
  246. }
  247. case "30115-03.html":
  248. {
  249. giveItems(player, JUREKS_LIST, 1);
  250. giveItems(player, GRAND_MAGISTER_SIGIL, 1);
  251. qs.setCond(16, true);
  252. htmltext = event;
  253. break;
  254. }
  255. case "30230-02.html":
  256. {
  257. if (hasQuestItems(player, DIETERS_LETTER))
  258. {
  259. takeItems(player, DIETERS_LETTER, 1);
  260. giveItems(player, RAUTS_LETTER_ENVELOPE, 1);
  261. qs.setCond(24, true);
  262. htmltext = event;
  263. }
  264. break;
  265. }
  266. case "30316-02.html":
  267. {
  268. if (hasQuestItems(player, RAUTS_LETTER_ENVELOPE))
  269. {
  270. takeItems(player, RAUTS_LETTER_ENVELOPE, 1);
  271. giveItems(player, SCRIPTURE_CHAPTER_1, 1);
  272. giveItems(player, STRONG_LIGUOR, 1);
  273. qs.setCond(25, true);
  274. htmltext = event;
  275. }
  276. break;
  277. }
  278. case "30608-02.html":
  279. {
  280. if (hasQuestItems(player, SYLVAINS_LETTER))
  281. {
  282. giveItems(player, MARIAS_1ST_LETTER, 1);
  283. takeItems(player, SYLVAINS_LETTER, 1);
  284. qs.setCond(3, true);
  285. htmltext = event;
  286. }
  287. break;
  288. }
  289. case "30608-08.html":
  290. {
  291. if (hasQuestItems(player, CRETAS_1ST_LETTER))
  292. {
  293. giveItems(player, LUCILLAS_HANDBAG, 1);
  294. takeItems(player, CRETAS_1ST_LETTER, 1);
  295. qs.setCond(7, true);
  296. htmltext = event;
  297. }
  298. break;
  299. }
  300. case "30608-14.html":
  301. {
  302. if (hasQuestItems(player, CRERAS_PAINTING3))
  303. {
  304. takeItems(player, CRERAS_PAINTING3, 1);
  305. takeItems(player, BROWN_SCROLL_SCRAP, -1);
  306. giveItems(player, CRYSTAL_OF_PURITY1, 1);
  307. qs.setCond(13, true);
  308. htmltext = event;
  309. }
  310. break;
  311. }
  312. case "30609-05.html":
  313. {
  314. if (hasQuestItems(player, MARIAS_2ND_LETTER))
  315. {
  316. takeItems(player, MARIAS_2ND_LETTER, 1);
  317. giveItems(player, CRETAS_1ST_LETTER, 1);
  318. qs.setCond(6, true);
  319. htmltext = event;
  320. }
  321. break;
  322. }
  323. case "30609-09.html":
  324. {
  325. if (hasQuestItems(player, LUCILLAS_HANDBAG))
  326. {
  327. takeItems(player, LUCILLAS_HANDBAG, 1);
  328. giveItems(player, CRERAS_PAINTING1, 1);
  329. qs.setCond(8, true);
  330. htmltext = event;
  331. }
  332. break;
  333. }
  334. case "30609-14.html":
  335. {
  336. if (hasQuestItems(player, DIETERS_KEY))
  337. {
  338. takeItems(player, DIETERS_KEY, 1);
  339. giveItems(player, CRETAS_2ND_LETTER, 1);
  340. qs.setCond(22, true);
  341. htmltext = event;
  342. }
  343. break;
  344. }
  345. case "30610-10.html":
  346. {
  347. giveItems(player, CRONOS_SIGIL, 1);
  348. giveItems(player, CRONOS_LETTER, 1);
  349. qs.setCond(20, true);
  350. htmltext = event;
  351. break;
  352. }
  353. case "30610-14.html":
  354. {
  355. if (hasQuestItems(player, SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3, SCRIPTURE_CHAPTER_4))
  356. {
  357. takeItems(player, CRONOS_SIGIL, 1);
  358. takeItems(player, DIETERS_DIARY, 1);
  359. takeItems(player, TRIFFS_RING, 1);
  360. takeItems(player, SCRIPTURE_CHAPTER_1, 1);
  361. takeItems(player, SCRIPTURE_CHAPTER_2, 1);
  362. takeItems(player, SCRIPTURE_CHAPTER_3, 1);
  363. takeItems(player, SCRIPTURE_CHAPTER_4, 1);
  364. giveItems(player, SYMBOL_OF_CRONOS, 1);
  365. qs.setCond(31, true);
  366. htmltext = event;
  367. }
  368. break;
  369. }
  370. case "30611-04.html":
  371. {
  372. if (hasQuestItems(player, STRONG_LIGUOR))
  373. {
  374. giveItems(player, TRIFFS_RING, 1);
  375. takeItems(player, STRONG_LIGUOR, 1);
  376. qs.setCond(26, true);
  377. htmltext = event;
  378. }
  379. break;
  380. }
  381. case "30612-04.html":
  382. {
  383. giveItems(player, CASIANS_LIST, 1);
  384. qs.setCond(28, true);
  385. htmltext = event;
  386. break;
  387. }
  388. case "30612-07.html":
  389. {
  390. giveItems(player, SCRIPTURE_CHAPTER_4, 1);
  391. takeItems(player, POITANS_NOTES, 1);
  392. takeItems(player, CASIANS_LIST, 1);
  393. takeItems(player, GHOULS_SKIN, -1);
  394. takeItems(player, MEDUSAS_BLOOD, -1);
  395. takeItems(player, FETTERED_SOULS_ICHOR, -1);
  396. takeItems(player, ENCHANTED_GARGOYLES_NAIL, -1);
  397. qs.setCond(30, true);
  398. htmltext = event;
  399. break;
  400. }
  401. }
  402. return htmltext;
  403. }
  404. @Override
  405. public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
  406. {
  407. final QuestState qs = getQuestState(killer, false);
  408. if ((qs != null) && qs.isStarted() && Util.checkIfInRange(1500, npc, killer, true))
  409. {
  410. switch (npc.getId())
  411. {
  412. case MONSTER_EYE_DESTREOYER:
  413. {
  414. if (hasQuestItems(killer, MIRIENS_2ND_SIGIL, GRAND_MAGISTER_SIGIL, JUREKS_LIST) && (getQuestItemsCount(killer, MONSTER_EYE_DESTROYER_SKIN) < 5))
  415. {
  416. giveItems(killer, MONSTER_EYE_DESTROYER_SKIN, 1);
  417. if ((getQuestItemsCount(killer, MONSTER_EYE_DESTROYER_SKIN) == 5) && (getQuestItemsCount(killer, SHAMANS_NECKLACE) >= 5) && (getQuestItemsCount(killer, SHACKLES_SCALP) >= 2))
  418. {
  419. qs.setCond(17, true);
  420. }
  421. else
  422. {
  423. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  424. }
  425. }
  426. break;
  427. }
  428. case MEDUSA:
  429. {
  430. if (hasQuestItems(killer, TRIFFS_RING, POITANS_NOTES, CASIANS_LIST) && (getQuestItemsCount(killer, MEDUSAS_BLOOD) < 12))
  431. {
  432. giveItems(killer, MEDUSAS_BLOOD, 1);
  433. if (getQuestItemsCount(killer, MEDUSAS_BLOOD) == 12)
  434. {
  435. playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
  436. }
  437. else
  438. {
  439. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  440. }
  441. }
  442. break;
  443. }
  444. case GHOUL:
  445. {
  446. if (hasQuestItems(killer, TRIFFS_RING, POITANS_NOTES, CASIANS_LIST) && (getQuestItemsCount(killer, GHOULS_SKIN) < 10))
  447. {
  448. giveItems(killer, GHOULS_SKIN, 1);
  449. if (getQuestItemsCount(killer, GHOULS_SKIN) == 10)
  450. {
  451. qs.setCond(29, true);
  452. }
  453. else
  454. {
  455. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  456. }
  457. }
  458. break;
  459. }
  460. case SHACKLE1:
  461. case SHACKLE2:
  462. {
  463. if (hasQuestItems(killer, MIRIENS_2ND_SIGIL, GRAND_MAGISTER_SIGIL, JUREKS_LIST) && (getQuestItemsCount(killer, SHACKLES_SCALP) < 2))
  464. {
  465. giveItems(killer, SHACKLES_SCALP, 1);
  466. if ((getQuestItemsCount(killer, MONSTER_EYE_DESTROYER_SKIN) >= 5) && (getQuestItemsCount(killer, SHAMANS_NECKLACE) >= 5) && (getQuestItemsCount(killer, SHACKLES_SCALP) == 2))
  467. {
  468. qs.setCond(17, true);
  469. }
  470. else
  471. {
  472. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  473. }
  474. }
  475. break;
  476. }
  477. case BREKA_ORC_SHAMAN:
  478. {
  479. if (hasQuestItems(killer, MIRIENS_2ND_SIGIL, GRAND_MAGISTER_SIGIL, JUREKS_LIST) && (getQuestItemsCount(killer, SHAMANS_NECKLACE) < 5))
  480. {
  481. giveItems(killer, SHAMANS_NECKLACE, 1);
  482. if ((getQuestItemsCount(killer, MONSTER_EYE_DESTROYER_SKIN) >= 5) && (getQuestItemsCount(killer, SHAMANS_NECKLACE) == 5) && (getQuestItemsCount(killer, SHACKLES_SCALP) >= 2))
  483. {
  484. qs.setCond(17, true);
  485. }
  486. else
  487. {
  488. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  489. }
  490. }
  491. break;
  492. }
  493. case FETTERED_SOUL:
  494. {
  495. if (hasQuestItems(killer, TRIFFS_RING, POITANS_NOTES, CASIANS_LIST) && (getQuestItemsCount(killer, FETTERED_SOULS_ICHOR) < 5))
  496. {
  497. giveItems(killer, FETTERED_SOULS_ICHOR, 1);
  498. if (getQuestItemsCount(killer, FETTERED_SOULS_ICHOR) >= 5)
  499. {
  500. playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
  501. }
  502. else
  503. {
  504. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  505. }
  506. }
  507. break;
  508. }
  509. case GRANDIS:
  510. {
  511. if (hasQuestItems(killer, MIRIENS_3RD_SIGIL, CRONOS_SIGIL, TRIFFS_RING) && !hasQuestItems(killer, SCRIPTURE_CHAPTER_3))
  512. {
  513. giveItems(killer, SCRIPTURE_CHAPTER_3, 1);
  514. playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
  515. }
  516. break;
  517. }
  518. case ENCHANTED_GARGOYLE:
  519. {
  520. if (hasQuestItems(killer, TRIFFS_RING, POITANS_NOTES, CASIANS_LIST) && (getQuestItemsCount(killer, ENCHANTED_GARGOYLES_NAIL) < 5))
  521. {
  522. giveItems(killer, ENCHANTED_GARGOYLES_NAIL, 1);
  523. if (getQuestItemsCount(killer, ENCHANTED_GARGOYLES_NAIL) >= 5)
  524. {
  525. playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
  526. }
  527. else
  528. {
  529. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  530. }
  531. }
  532. break;
  533. }
  534. case LETO_LIZARDMAN_WARRIOR:
  535. {
  536. if (hasQuestItems(killer, MIRIENS_1ST_SIGIL, HIGH_PRIESTS_SIGIL, CRERAS_PAINTING3) && (getQuestItemsCount(killer, BROWN_SCROLL_SCRAP) < 5))
  537. {
  538. giveItems(killer, BROWN_SCROLL_SCRAP, 1);
  539. if (getQuestItemsCount(killer, BROWN_SCROLL_SCRAP) == 5)
  540. {
  541. qs.setCond(12, true);
  542. }
  543. else
  544. {
  545. playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
  546. }
  547. }
  548. break;
  549. }
  550. }
  551. }
  552. return super.onKill(npc, killer, isSummon);
  553. }
  554. @Override
  555. public String onTalk(L2Npc npc, L2PcInstance player)
  556. {
  557. final QuestState qs = getQuestState(player, true);
  558. String htmltext = getNoQuestMsg(player);
  559. if (qs.isCreated())
  560. {
  561. if (npc.getId() == MAGISTER_MIRIEN)
  562. {
  563. if ((player.getClassId() == ClassId.wizard) || (player.getClassId() == ClassId.elvenWizard) || ((player.getClassId() == ClassId.darkWizard)))
  564. {
  565. if (player.getLevel() < MIN_LVL)
  566. {
  567. htmltext = "30461-02.html";
  568. }
  569. else
  570. {
  571. htmltext = "30461-03.htm";
  572. }
  573. }
  574. else
  575. {
  576. htmltext = "30461-01.html";
  577. }
  578. }
  579. }
  580. else if (qs.isStarted())
  581. {
  582. switch (npc.getId())
  583. {
  584. case MAGISTER_MIRIEN:
  585. {
  586. if (hasQuestItems(player, MIRIENS_1ST_SIGIL))
  587. {
  588. if (!hasQuestItems(player, SYMBOL_OF_SYLVAIN))
  589. {
  590. htmltext = "30461-05.html";
  591. }
  592. else
  593. {
  594. takeItems(player, MIRIENS_1ST_SIGIL, 1);
  595. giveItems(player, MIRIENS_2ND_SIGIL, 1);
  596. takeItems(player, SYMBOL_OF_SYLVAIN, 1);
  597. qs.setCond(15, true);
  598. htmltext = "30461-06.html";
  599. }
  600. }
  601. else if (hasQuestItems(player, MIRIENS_2ND_SIGIL))
  602. {
  603. if (!hasQuestItems(player, SYMBOL_OF_JUREK))
  604. {
  605. htmltext = "30461-07.html";
  606. }
  607. else
  608. {
  609. htmltext = "30461-08.html";
  610. }
  611. }
  612. else if (hasQuestItems(player, MIRIENS_INSTRUCTION))
  613. {
  614. if (player.getLevel() < LEVEL)
  615. {
  616. htmltext = "30461-11.html";
  617. }
  618. else
  619. {
  620. takeItems(player, MIRIENS_INSTRUCTION, 1);
  621. giveItems(player, MIRIENS_3RD_SIGIL, 1);
  622. qs.setCond(19, true);
  623. htmltext = "30461-12.html";
  624. }
  625. }
  626. else if (hasQuestItems(player, MIRIENS_3RD_SIGIL))
  627. {
  628. if (!hasQuestItems(player, SYMBOL_OF_CRONOS))
  629. {
  630. htmltext = "30461-13.html";
  631. }
  632. else
  633. {
  634. giveAdena(player, 319628, true);
  635. giveItems(player, MARK_OF_SCHOLAR, 1);
  636. addExpAndSp(player, 1753926, 113754);
  637. qs.exitQuest(false, true);
  638. player.sendPacket(new SocialAction(player.getObjectId(), 3));
  639. htmltext = "30461-14.html";
  640. }
  641. }
  642. break;
  643. }
  644. case HIGH_PRIEST_SYLVAIN:
  645. {
  646. if (hasQuestItems(player, MIRIENS_1ST_SIGIL) && !hasAtLeastOneQuestItem(player, HIGH_PRIESTS_SIGIL, SYMBOL_OF_SYLVAIN))
  647. {
  648. htmltext = "30070-01.html";
  649. }
  650. else if (!hasQuestItems(player, CRYSTAL_OF_PURITY1) && hasQuestItems(player, HIGH_PRIESTS_SIGIL, MIRIENS_1ST_SIGIL))
  651. {
  652. htmltext = "30070-03.html";
  653. }
  654. else if (hasQuestItems(player, HIGH_PRIESTS_SIGIL, MIRIENS_1ST_SIGIL, CRYSTAL_OF_PURITY1))
  655. {
  656. takeItems(player, CRYSTAL_OF_PURITY1, 1);
  657. takeItems(player, HIGH_PRIESTS_SIGIL, 1);
  658. giveItems(player, SYMBOL_OF_SYLVAIN, 1);
  659. qs.setCond(14, true);
  660. htmltext = "30070-04.html";
  661. }
  662. else if (hasQuestItems(player, MIRIENS_1ST_SIGIL, SYMBOL_OF_SYLVAIN) && !hasQuestItems(player, HIGH_PRIESTS_SIGIL))
  663. {
  664. htmltext = "30070-05.html";
  665. }
  666. else if (hasAtLeastOneQuestItem(player, MIRIENS_2ND_SIGIL, MIRIENS_3RD_SIGIL))
  667. {
  668. htmltext = "30070-06.html";
  669. }
  670. break;
  671. }
  672. case CAPTAIN_LUCAS:
  673. {
  674. if (hasQuestItems(player, MIRIENS_1ST_SIGIL, HIGH_PRIESTS_SIGIL))
  675. {
  676. if (hasQuestItems(player, MARIAS_1ST_LETTER))
  677. {
  678. takeItems(player, MARIAS_1ST_LETTER, 1);
  679. giveItems(player, LUCASS_LETTER, 1);
  680. qs.setCond(4, true);
  681. htmltext = "30071-01.html";
  682. }
  683. else if (hasAtLeastOneQuestItem(player, MARIAS_2ND_LETTER, CRETAS_1ST_LETTER, LUCILLAS_HANDBAG, CRERAS_PAINTING1, LUCASS_LETTER))
  684. {
  685. htmltext = "30071-02.html";
  686. }
  687. else if (hasQuestItems(player, CRERAS_PAINTING2))
  688. {
  689. htmltext = "30071-03.html";
  690. }
  691. else if (hasQuestItems(player, CRERAS_PAINTING3))
  692. {
  693. if (getQuestItemsCount(player, BROWN_SCROLL_SCRAP) < 5)
  694. {
  695. htmltext = "30071-05.html";
  696. }
  697. else
  698. {
  699. htmltext = "30071-06.html";
  700. }
  701. }
  702. }
  703. else if (hasAtLeastOneQuestItem(player, SYMBOL_OF_SYLVAIN, MIRIENS_2ND_SIGIL, MIRIENS_3RD_SIGIL, CRYSTAL_OF_PURITY1))
  704. {
  705. htmltext = "30071-07.html";
  706. }
  707. break;
  708. }
  709. case WAREHOUSE_KEEPER_VALKON:
  710. {
  711. if (hasQuestItems(player, TRIFFS_RING))
  712. {
  713. if (!hasAtLeastOneQuestItem(player, VALKONS_REQUEST, CRYSTAL_OF_PURITY2, SCRIPTURE_CHAPTER_2))
  714. {
  715. htmltext = "30103-01.html";
  716. }
  717. else if (hasQuestItems(player, VALKONS_REQUEST) && !hasAtLeastOneQuestItem(player, CRYSTAL_OF_PURITY2, SCRIPTURE_CHAPTER_2))
  718. {
  719. htmltext = "30103-05.html";
  720. }
  721. else if (hasQuestItems(player, CRYSTAL_OF_PURITY2) && !hasAtLeastOneQuestItem(player, VALKONS_REQUEST, SCRIPTURE_CHAPTER_2))
  722. {
  723. giveItems(player, SCRIPTURE_CHAPTER_2, 1);
  724. takeItems(player, CRYSTAL_OF_PURITY2, 1);
  725. htmltext = "30103-06.html";
  726. }
  727. else if (hasQuestItems(player, SCRIPTURE_CHAPTER_2) && !hasAtLeastOneQuestItem(player, VALKONS_REQUEST, CRYSTAL_OF_PURITY2))
  728. {
  729. htmltext = "30103-07.html";
  730. }
  731. }
  732. break;
  733. }
  734. case MAGISTER_DIETER:
  735. {
  736. if (hasQuestItems(player, MIRIENS_3RD_SIGIL, CRONOS_SIGIL))
  737. {
  738. if (hasQuestItems(player, CRONOS_LETTER))
  739. {
  740. htmltext = "30111-01.html";
  741. }
  742. else if (hasQuestItems(player, DIETERS_KEY))
  743. {
  744. htmltext = "30111-06.html";
  745. }
  746. else if (hasQuestItems(player, CRETAS_2ND_LETTER))
  747. {
  748. htmltext = "30111-07.html";
  749. }
  750. else if (hasQuestItems(player, DIETERS_DIARY, DIETERS_LETTER))
  751. {
  752. htmltext = "30111-10.html";
  753. }
  754. else if (hasQuestItems(player, DIETERS_DIARY, RAUTS_LETTER_ENVELOPE))
  755. {
  756. htmltext = "30111-11.html";
  757. }
  758. else if (hasQuestItems(player, DIETERS_DIARY) && !hasAtLeastOneQuestItem(player, DIETERS_LETTER, RAUTS_LETTER_ENVELOPE))
  759. {
  760. if (hasQuestItems(player, SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3, SCRIPTURE_CHAPTER_4))
  761. {
  762. htmltext = "30111-13.html";
  763. }
  764. else
  765. {
  766. htmltext = "30111-12.html";
  767. }
  768. }
  769. }
  770. else if (hasQuestItems(player, SYMBOL_OF_CRONOS))
  771. {
  772. htmltext = "30111-15.html";
  773. }
  774. break;
  775. }
  776. case GRAND_MAGISTER_JUREK:
  777. {
  778. if (hasQuestItems(player, MIRIENS_2ND_SIGIL))
  779. {
  780. if (!hasAtLeastOneQuestItem(player, GRAND_MAGISTER_SIGIL, SYMBOL_OF_JUREK))
  781. {
  782. htmltext = "30115-01.html";
  783. }
  784. else if (hasQuestItems(player, JUREKS_LIST))
  785. {
  786. if ((getQuestItemsCount(player, MONSTER_EYE_DESTROYER_SKIN) + getQuestItemsCount(player, SHAMANS_NECKLACE) + getQuestItemsCount(player, SHACKLES_SCALP)) < 12)
  787. {
  788. htmltext = "30115-04.html";
  789. }
  790. else
  791. {
  792. takeItems(player, GRAND_MAGISTER_SIGIL, 1);
  793. takeItems(player, JUREKS_LIST, 1);
  794. takeItems(player, MONSTER_EYE_DESTROYER_SKIN, -1);
  795. takeItems(player, SHAMANS_NECKLACE, -1);
  796. takeItems(player, SHACKLES_SCALP, -1);
  797. giveItems(player, SYMBOL_OF_JUREK, 1);
  798. qs.setCond(18, true);
  799. htmltext = "30115-05.html";
  800. }
  801. }
  802. else if (hasQuestItems(player, SYMBOL_OF_JUREK) && !hasQuestItems(player, GRAND_MAGISTER_SIGIL))
  803. {
  804. htmltext = "30115-06.html";
  805. }
  806. }
  807. else if (hasAtLeastOneQuestItem(player, MIRIENS_1ST_SIGIL, MIRIENS_3RD_SIGIL))
  808. {
  809. htmltext = "30115-07.html";
  810. }
  811. break;
  812. }
  813. case TRADER_EDROC:
  814. {
  815. if (hasQuestItems(player, DIETERS_DIARY))
  816. {
  817. if (hasQuestItems(player, DIETERS_LETTER))
  818. {
  819. htmltext = "30230-01.html";
  820. }
  821. else if (hasQuestItems(player, RAUTS_LETTER_ENVELOPE))
  822. {
  823. htmltext = "30230-03.html";
  824. }
  825. else if (hasAtLeastOneQuestItem(player, STRONG_LIGUOR, TRIFFS_RING))
  826. {
  827. htmltext = "30230-04.html";
  828. }
  829. }
  830. break;
  831. }
  832. case WAREHOUSE_KEEPER_RAUT:
  833. {
  834. if (hasQuestItems(player, DIETERS_DIARY))
  835. {
  836. if (hasQuestItems(player, RAUTS_LETTER_ENVELOPE))
  837. {
  838. htmltext = "30316-01.html";
  839. }
  840. else if (hasQuestItems(player, SCRIPTURE_CHAPTER_1, STRONG_LIGUOR))
  841. {
  842. htmltext = "30316-04.html";
  843. }
  844. else if (hasQuestItems(player, SCRIPTURE_CHAPTER_1, TRIFFS_RING))
  845. {
  846. htmltext = "30316-05.html";
  847. }
  848. }
  849. break;
  850. }
  851. case BLACKSMITH_POITAN:
  852. {
  853. if (hasQuestItems(player, TRIFFS_RING))
  854. {
  855. if (!hasAtLeastOneQuestItem(player, POITANS_NOTES, CASIANS_LIST, SCRIPTURE_CHAPTER_4))
  856. {
  857. giveItems(player, POITANS_NOTES, 1);
  858. htmltext = "30458-01.html";
  859. }
  860. else if (hasQuestItems(player, POITANS_NOTES) && !hasAtLeastOneQuestItem(player, CASIANS_LIST, SCRIPTURE_CHAPTER_4))
  861. {
  862. htmltext = "30458-02.html";
  863. }
  864. else if (hasQuestItems(player, POITANS_NOTES, CASIANS_LIST) && !hasQuestItems(player, SCRIPTURE_CHAPTER_4))
  865. {
  866. htmltext = "30458-03.html";
  867. }
  868. else if (hasQuestItems(player, SCRIPTURE_CHAPTER_4) && !hasAtLeastOneQuestItem(player, POITANS_NOTES, CASIANS_LIST))
  869. {
  870. htmltext = "30458-04.html";
  871. }
  872. }
  873. break;
  874. }
  875. case MARIA:
  876. {
  877. if (hasQuestItems(player, MIRIENS_1ST_SIGIL, HIGH_PRIESTS_SIGIL))
  878. {
  879. if (hasQuestItems(player, SYLVAINS_LETTER))
  880. {
  881. htmltext = "30608-01.html";
  882. }
  883. else if (hasQuestItems(player, MARIAS_1ST_LETTER))
  884. {
  885. htmltext = "30608-03.html";
  886. }
  887. else if (hasQuestItems(player, LUCASS_LETTER))
  888. {
  889. giveItems(player, MARIAS_2ND_LETTER, 1);
  890. takeItems(player, LUCASS_LETTER, 1);
  891. qs.setCond(5, true);
  892. htmltext = "30608-04.html";
  893. }
  894. else if (hasQuestItems(player, MARIAS_2ND_LETTER))
  895. {
  896. htmltext = "30608-05.html";
  897. }
  898. else if (hasQuestItems(player, CRETAS_1ST_LETTER))
  899. {
  900. htmltext = "30608-06.html";
  901. }
  902. else if (hasQuestItems(player, LUCILLAS_HANDBAG))
  903. {
  904. htmltext = "30608-09.html";
  905. }
  906. else if (hasQuestItems(player, CRERAS_PAINTING1))
  907. {
  908. takeItems(player, CRERAS_PAINTING1, 1);
  909. giveItems(player, CRERAS_PAINTING2, 1);
  910. qs.setCond(9, true);
  911. htmltext = "30608-10.html";
  912. }
  913. else if (hasQuestItems(player, CRERAS_PAINTING2))
  914. {
  915. htmltext = "30608-11.html";
  916. }
  917. else if (hasQuestItems(player, CRERAS_PAINTING3))
  918. {
  919. if (getQuestItemsCount(player, BROWN_SCROLL_SCRAP) < 5)
  920. {
  921. qs.setCond(11, true);
  922. htmltext = "30608-12.html";
  923. }
  924. else
  925. {
  926. htmltext = "30608-13.html";
  927. }
  928. }
  929. else if (hasQuestItems(player, CRYSTAL_OF_PURITY1))
  930. {
  931. htmltext = "30608-15.html";
  932. }
  933. }
  934. else if (hasAtLeastOneQuestItem(player, SYMBOL_OF_SYLVAIN, MIRIENS_2ND_SIGIL))
  935. {
  936. htmltext = "30608-16.html";
  937. }
  938. else if (hasQuestItems(player, MIRIENS_3RD_SIGIL))
  939. {
  940. if (!hasQuestItems(player, VALKONS_REQUEST))
  941. {
  942. htmltext = "30608-17.html";
  943. }
  944. else
  945. {
  946. takeItems(player, VALKONS_REQUEST, 1);
  947. giveItems(player, CRYSTAL_OF_PURITY2, 1);
  948. htmltext = "30608-18.html";
  949. }
  950. }
  951. break;
  952. }
  953. case ASTROLOGER_CRETA:
  954. {
  955. if (hasQuestItems(player, MIRIENS_1ST_SIGIL, HIGH_PRIESTS_SIGIL))
  956. {
  957. if (hasQuestItems(player, MARIAS_2ND_LETTER))
  958. {
  959. htmltext = "30609-01.html";
  960. }
  961. else if (hasQuestItems(player, CRETAS_1ST_LETTER))
  962. {
  963. htmltext = "30609-06.html";
  964. }
  965. else if (hasQuestItems(player, LUCILLAS_HANDBAG))
  966. {
  967. htmltext = "30609-07.html";
  968. }
  969. else if (hasAtLeastOneQuestItem(player, CRERAS_PAINTING1, CRERAS_PAINTING2, CRERAS_PAINTING3))
  970. {
  971. htmltext = "30609-10.html";
  972. }
  973. }
  974. else if (hasAtLeastOneQuestItem(player, CRYSTAL_OF_PURITY1, SYMBOL_OF_SYLVAIN, MIRIENS_2ND_SIGIL))
  975. {
  976. htmltext = "30609-11.html";
  977. }
  978. else if (hasQuestItems(player, MIRIENS_3RD_SIGIL))
  979. {
  980. if (hasQuestItems(player, DIETERS_KEY))
  981. {
  982. htmltext = "30609-12.html";
  983. }
  984. else
  985. {
  986. htmltext = "30609-15.html";
  987. }
  988. }
  989. break;
  990. }
  991. case ELDER_CRONOS:
  992. {
  993. if (hasQuestItems(player, MIRIENS_3RD_SIGIL))
  994. {
  995. if (!hasAtLeastOneQuestItem(player, CRONOS_SIGIL, SYMBOL_OF_CRONOS))
  996. {
  997. htmltext = "30610-01.html";
  998. }
  999. else if (hasQuestItems(player, CRONOS_SIGIL))
  1000. {
  1001. if (hasQuestItems(player, SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3, SCRIPTURE_CHAPTER_4))
  1002. {
  1003. htmltext = "30610-12.html";
  1004. }
  1005. else
  1006. {
  1007. htmltext = "30610-11.html";
  1008. }
  1009. }
  1010. else if (hasQuestItems(player, SYMBOL_OF_CRONOS) && !hasQuestItems(player, CRONOS_SIGIL))
  1011. {
  1012. htmltext = "30610-15.html";
  1013. }
  1014. }
  1015. break;
  1016. }
  1017. case DRUNKARD_TRIFF:
  1018. {
  1019. if (hasQuestItems(player, DIETERS_DIARY, SCRIPTURE_CHAPTER_1, STRONG_LIGUOR))
  1020. {
  1021. htmltext = "30611-01.html";
  1022. }
  1023. else if (hasAtLeastOneQuestItem(player, TRIFFS_RING, SYMBOL_OF_CRONOS))
  1024. {
  1025. htmltext = "30611-05.html";
  1026. }
  1027. break;
  1028. }
  1029. case ELDER_CASIAN:
  1030. {
  1031. if (hasQuestItems(player, TRIFFS_RING, POITANS_NOTES))
  1032. {
  1033. if (!hasQuestItems(player, CASIANS_LIST))
  1034. {
  1035. if (hasQuestItems(player, SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3))
  1036. {
  1037. htmltext = "30612-02.html";
  1038. }
  1039. else
  1040. {
  1041. htmltext = "30612-01.html";
  1042. }
  1043. }
  1044. else
  1045. {
  1046. if ((getQuestItemsCount(player, GHOULS_SKIN) + getQuestItemsCount(player, MEDUSAS_BLOOD) + getQuestItemsCount(player, FETTERED_SOULS_ICHOR) + getQuestItemsCount(player, ENCHANTED_GARGOYLES_NAIL)) < 32)
  1047. {
  1048. htmltext = "30612-05.html";
  1049. }
  1050. else
  1051. {
  1052. htmltext = "30612-06.html";
  1053. }
  1054. }
  1055. }
  1056. else if (hasQuestItems(player, TRIFFS_RING, SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3, SCRIPTURE_CHAPTER_4) && !hasAtLeastOneQuestItem(player, POITANS_NOTES, CASIANS_LIST))
  1057. {
  1058. htmltext = "30612-08.html";
  1059. }
  1060. break;
  1061. }
  1062. }
  1063. }
  1064. else if (qs.isCompleted())
  1065. {
  1066. if (npc.getId() == MAGISTER_MIRIEN)
  1067. {
  1068. htmltext = getAlreadyCompletedMsg(player);
  1069. }
  1070. }
  1071. return htmltext;
  1072. }
  1073. }