Deltuva.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 hellbound.Deltuva;
  16. import quests.Q00132_MatrasCuriosity.Q00132_MatrasCuriosity;
  17. import com.l2jserver.gameserver.model.actor.L2Npc;
  18. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  19. import com.l2jserver.gameserver.model.quest.Quest;
  20. import com.l2jserver.gameserver.model.quest.QuestState;
  21. /**
  22. * @author GKR
  23. */
  24. public class Deltuva extends Quest
  25. {
  26. private static final int DELTUVA = 32313;
  27. @Override
  28. public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
  29. {
  30. String htmltext = null;
  31. if (event.equalsIgnoreCase("teleport"))
  32. {
  33. final QuestState hostQuest = player.getQuestState(Q00132_MatrasCuriosity.class.getSimpleName());
  34. if ((hostQuest == null) || !hostQuest.isCompleted())
  35. {
  36. htmltext = "32313-02.htm";
  37. }
  38. else
  39. {
  40. player.teleToLocation(17934, 283189, -9701);
  41. }
  42. }
  43. return htmltext;
  44. }
  45. public Deltuva(int questId, String name, String descr)
  46. {
  47. super(questId, name, descr);
  48. addStartNpc(DELTUVA);
  49. addTalkId(DELTUVA);
  50. }
  51. public static void main(String[] args)
  52. {
  53. new Deltuva(-1, "Deltuva", "hellbound");
  54. }
  55. }