SagaOfTheDuelist.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package quests.SagasScripts;
  16. import com.l2jserver.gameserver.model.actor.L2Npc;
  17. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  18. import com.l2jserver.gameserver.model.quest.QuestState;
  19. /**
  20. *
  21. * @author Emperorc
  22. */
  23. public class SagaOfTheDuelist extends SagasSuperClass
  24. {
  25. public static String qn1 = "73_SagaOfTheDuelist";
  26. public static int qnu = 73;
  27. public static String qna = "Saga of the Duelist";
  28. /**
  29. * Third Class Transfer Quest - Duelist: The quest asks for "Top-grade Meat" which can now be acquired directly through NPC Tunatun, instead of through an additional quest from NPC Tunatun.
  30. */
  31. private final int TUNATUN = 31537;
  32. private final int TOPQUALITYMEAT = 7546;
  33. public SagaOfTheDuelist()
  34. {
  35. super(qnu, qn1, qna);
  36. NPC = new int[] { 30849, 31624, 31226, 31331, 31639, 31646, 31647, 31653, 31654, 31655, 31656, 31277 };
  37. Items = new int[] { 7080, 7537, 7081, 7488, 7271, 7302, 7333, 7364, 7395, 7426, 7096, 7546 };
  38. Mob = new int[] { 27289, 27222, 27281 };
  39. qn = qn1;
  40. classid = new int[] { 88 };
  41. prevclass = new int[] { 0x02 };
  42. X = new int[] { 164650, 47429, 47391 };
  43. Y = new int[] { -74121, -56923, -56929 };
  44. Z = new int[] { -2871, -2383, -2370 };
  45. Text = new String[] {
  46. "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!",
  47. "... Oh ... good! So it was ... let's begin!",
  48. "I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!",
  49. "Paying homage to those who disrupt the orderly will be PLAYERNAME's death!",
  50. "Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...",
  51. "Why do you interfere others' battles?",
  52. "This is a waste of time.. Say goodbye...!",
  53. "...That is the enemy",
  54. "...Goodness! PLAYERNAME you are still looking?",
  55. "PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.",
  56. "Your sword is not an ornament. Don't you think, PLAYERNAME?",
  57. "Goodness! I no longer sense a battle there now.",
  58. "let...",
  59. "Only engaged in the battle to bar their choice. Perhaps you should regret.",
  60. "The human nation was foolish to try and fight a giant's strength.",
  61. "Must...Retreat... Too...Strong.",
  62. "PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker",
  63. "....! Fight...Defeat...It...Fight...Defeat...It..." };
  64. registerNPCs();
  65. addTalkId(TUNATUN);
  66. }
  67. @Override
  68. public String onTalk(L2Npc npc, L2PcInstance player)
  69. {
  70. if (npc.getNpcId() == TUNATUN)
  71. {
  72. String htmltext = getNoQuestMsg(player);
  73. QuestState st = player.getQuestState(qn);
  74. if (st != null)
  75. {
  76. int cond = st.getInt("cond");
  77. if (cond == 3)
  78. {
  79. if (st.getQuestItemsCount(TOPQUALITYMEAT) == 0)
  80. {
  81. st.giveItems(TOPQUALITYMEAT, 1);
  82. return "tunatun_01.htm";
  83. }
  84. else
  85. return "tunatun_02.htm";
  86. }
  87. }
  88. return htmltext;
  89. }
  90. else
  91. return super.onTalk(npc, player);
  92. }
  93. }