From 3b2c0bd8dc01d93d55721e8e0e17ac904825fc2b Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 18 Nov 2017 15:25:22 +0000 Subject: [PATCH] Pailaka Injured Dragon and other quest related changes. Adapted from: L2jUnity free files. --- .../Pailaka/PailakaInjuredDragon.xml | 595 ++++++++++++--- .../PailakaInjuredDragon/32499-01.html | 3 + .../PailakaInjuredDragon/32499-02.html | 3 + .../PailakaInjuredDragon.java | 711 ++++++++++++++---- .../Q00144_PailakaInjuredDragon/32499-01.html | 5 + .../Q00144_PailakaInjuredDragon/32499-04.html | 3 + .../Q00144_PailakaInjuredDragon/32499-05.html | 6 + .../Q00144_PailakaInjuredDragon/32499-06.html | 7 + .../Q00144_PailakaInjuredDragon/32499-07.html | 8 + .../Q00144_PailakaInjuredDragon/32499-08.html | 7 + .../Q00144_PailakaInjuredDragon/32499-09.html | 4 + .../Q00144_PailakaInjuredDragon/32499-10.html | 2 +- .../Q00144_PailakaInjuredDragon/32499-11.html | 2 +- .../Q00144_PailakaInjuredDragon/32502-06.html | 4 + .../Q00144_PailakaInjuredDragon/32509-01.html | 4 +- .../Q00144_PailakaInjuredDragon/32509-05.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-06.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-08.html | 15 +- .../Q00144_PailakaInjuredDragon/32509-09.html | 14 +- .../Q00144_PailakaInjuredDragon/32509-10.html | 27 +- .../Q00144_PailakaInjuredDragon/32512-01.html | 6 +- .../Q00144_PailakaInjuredDragon/32512-02.html | 9 +- .../Q00144_PailakaInjuredDragon/32512-03.html | 7 +- .../Q00144_PailakaInjuredDragon.java | 326 ++++---- .../dist/game/data/xsd/zones.xsd | 23 +- .../dist/game/data/zones/teleportzones.xml | 158 ++++ .../instancemanager/ZoneManager.java | 37 + .../gameserver/model/zone/L2ZoneType.java | 135 +++- .../zone/type/L2OlympiadStadiumZone.java | 23 - .../model/zone/type/L2TeleportZone.java | 74 ++ .../Pailaka/PailakaInjuredDragon.xml | 595 ++++++++++++--- .../PailakaInjuredDragon/32499-01.html | 3 + .../PailakaInjuredDragon/32499-02.html | 3 + .../PailakaInjuredDragon.java | 711 ++++++++++++++---- .../Q00144_PailakaInjuredDragon/32499-01.html | 5 + .../Q00144_PailakaInjuredDragon/32499-04.html | 3 + .../Q00144_PailakaInjuredDragon/32499-05.html | 6 + .../Q00144_PailakaInjuredDragon/32499-06.html | 7 + .../Q00144_PailakaInjuredDragon/32499-07.html | 8 + .../Q00144_PailakaInjuredDragon/32499-08.html | 7 + .../Q00144_PailakaInjuredDragon/32499-09.html | 4 + .../Q00144_PailakaInjuredDragon/32499-10.html | 2 +- .../Q00144_PailakaInjuredDragon/32499-11.html | 2 +- .../Q00144_PailakaInjuredDragon/32502-06.html | 4 + .../Q00144_PailakaInjuredDragon/32509-01.html | 4 +- .../Q00144_PailakaInjuredDragon/32509-05.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-06.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-08.html | 15 +- .../Q00144_PailakaInjuredDragon/32509-09.html | 14 +- .../Q00144_PailakaInjuredDragon/32509-10.html | 27 +- .../Q00144_PailakaInjuredDragon/32512-01.html | 6 +- .../Q00144_PailakaInjuredDragon/32512-02.html | 9 +- .../Q00144_PailakaInjuredDragon/32512-03.html | 7 +- .../Q00144_PailakaInjuredDragon.java | 326 ++++---- .../dist/game/data/xsd/zones.xsd | 23 +- .../dist/game/data/zones/teleportzones.xml | 158 ++++ .../instancemanager/ZoneManager.java | 37 + .../gameserver/model/zone/L2ZoneType.java | 135 +++- .../zone/type/L2OlympiadStadiumZone.java | 23 - .../model/zone/type/L2TeleportZone.java | 74 ++ .../Pailaka/PailakaInjuredDragon.xml | 595 ++++++++++++--- .../PailakaInjuredDragon/32499-01.html | 3 + .../PailakaInjuredDragon/32499-02.html | 3 + .../PailakaInjuredDragon.java | 711 ++++++++++++++---- .../Q00144_PailakaInjuredDragon/32499-01.html | 5 + .../Q00144_PailakaInjuredDragon/32499-04.html | 3 + .../Q00144_PailakaInjuredDragon/32499-05.html | 6 + .../Q00144_PailakaInjuredDragon/32499-06.html | 7 + .../Q00144_PailakaInjuredDragon/32499-07.html | 8 + .../Q00144_PailakaInjuredDragon/32499-08.html | 7 + .../Q00144_PailakaInjuredDragon/32499-09.html | 4 + .../Q00144_PailakaInjuredDragon/32499-10.html | 2 +- .../Q00144_PailakaInjuredDragon/32499-11.html | 2 +- .../Q00144_PailakaInjuredDragon/32502-06.html | 4 + .../Q00144_PailakaInjuredDragon/32509-01.html | 4 +- .../Q00144_PailakaInjuredDragon/32509-05.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-06.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-08.html | 15 +- .../Q00144_PailakaInjuredDragon/32509-09.html | 14 +- .../Q00144_PailakaInjuredDragon/32509-10.html | 27 +- .../Q00144_PailakaInjuredDragon/32512-01.html | 6 +- .../Q00144_PailakaInjuredDragon/32512-02.html | 9 +- .../Q00144_PailakaInjuredDragon/32512-03.html | 7 +- .../Q00144_PailakaInjuredDragon.java | 326 ++++---- .../dist/game/data/xsd/zones.xsd | 23 +- .../dist/game/data/zones/teleportzones.xml | 158 ++++ .../instancemanager/ZoneManager.java | 37 + .../gameserver/model/zone/L2ZoneType.java | 135 +++- .../zone/type/L2OlympiadStadiumZone.java | 23 - .../model/zone/type/L2TeleportZone.java | 74 ++ .../Pailaka/PailakaInjuredDragon.xml | 595 ++++++++++++--- .../instances/MuseumDungeon/33126-01.html | 4 +- .../PailakaInjuredDragon/32499-01.html | 3 + .../PailakaInjuredDragon/32499-02.html | 3 + .../PailakaInjuredDragon.java | 711 ++++++++++++++---- .../Q00061_LawEnforcement/32138-01.html | 2 +- .../Q00061_LawEnforcement/32138-02.html | 4 +- .../Q00061_LawEnforcement/32138-03.html | 2 +- .../Q00061_LawEnforcement/32138-04.html | 7 +- .../Q00061_LawEnforcement/32138-05.html | 6 +- .../Q00061_LawEnforcement/32138-06.html | 5 +- .../Q00061_LawEnforcement/32138-07.html | 7 +- .../Q00061_LawEnforcement/32138-08.html | 5 +- .../Q00061_LawEnforcement/32138-09.html | 6 +- .../Q00061_LawEnforcement/32138-10.html | 2 +- .../quests/Q00061_LawEnforcement/32222-01.htm | 4 +- .../quests/Q00061_LawEnforcement/32222-02.htm | 6 +- .../quests/Q00061_LawEnforcement/32222-03.htm | 4 +- .../quests/Q00061_LawEnforcement/32222-04.htm | 6 +- .../Q00061_LawEnforcement/32222-05.html | 3 + .../Q00061_LawEnforcement/32222-06.html | 2 +- .../Q00061_LawEnforcement/32469-01.html | 2 +- .../Q00061_LawEnforcement/32469-03.html | 4 +- .../Q00061_LawEnforcement/32469-04.html | 6 +- .../Q00061_LawEnforcement/32469-05.html | 2 +- .../Q00061_LawEnforcement/32469-06.html | 7 +- .../Q00061_LawEnforcement/32469-07.html | 7 +- .../Q00061_LawEnforcement/32972-01.html | 4 + .../Q00061_LawEnforcement.java | 222 +++--- .../Q00109_InSearchOfTheNest/31553-01.htm | 5 + .../Q00109_InSearchOfTheNest/31553-02.html | 5 + .../Q00109_InSearchOfTheNest/31553-03.html | 4 + .../Q00109_InSearchOfTheNest/31553-04.htm | 4 + .../Q00109_InSearchOfTheNest/31553-05.html | 5 + .../Q00109_InSearchOfTheNest/31553-06.html | 5 + .../Q00109_InSearchOfTheNest/31553-07.html | 3 + .../Q00109_InSearchOfTheNest/31554-01.html | 4 + .../Q00109_InSearchOfTheNest/31554-02.html | 3 + .../Q00109_InSearchOfTheNest/32015-01.html | 4 + .../Q00109_InSearchOfTheNest/32015-02.html | 3 + .../Q00109_InSearchOfTheNest/32015-03.html | 3 + .../Q00109_InSearchOfTheNest.java | 184 +++-- .../Q00110_ToThePrimevalIsle/31338-01.htm | 5 + .../Q00110_ToThePrimevalIsle/31338-02.htm | 4 + .../Q00110_ToThePrimevalIsle/31338-03.htm | 4 + .../Q00110_ToThePrimevalIsle/31338-04.htm | 5 + .../Q00110_ToThePrimevalIsle/31338-05.html | 4 + .../Q00110_ToThePrimevalIsle/31338-06.html | 4 + .../Q00110_ToThePrimevalIsle/32113-01.html | 4 + .../Q00110_ToThePrimevalIsle/32113-02.html | 5 + .../Q00110_ToThePrimevalIsle/32113-03.html | 5 + .../Q00110_ToThePrimevalIsle/32113-04.html | 5 + .../Q00110_ToThePrimevalIsle/32113-05.html | 4 + .../Q00110_ToThePrimevalIsle.java | 121 +-- .../Q00111_ElrokianHuntersProof/32113-01.htm | 2 +- .../Q00111_ElrokianHuntersProof/32113-02.htm | 7 +- .../Q00111_ElrokianHuntersProof/32113-03.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-06.htm | 4 + .../Q00111_ElrokianHuntersProof/32113-07.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-09.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-10.html | 8 +- .../Q00111_ElrokianHuntersProof/32113-11.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-12.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-13.html | 4 +- .../Q00111_ElrokianHuntersProof/32113-14.html | 6 +- .../Q00111_ElrokianHuntersProof/32113-17.html | 5 +- .../Q00111_ElrokianHuntersProof/32113-18.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-19.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-20.html | 10 +- .../Q00111_ElrokianHuntersProof/32113-21.html | 6 +- .../Q00111_ElrokianHuntersProof/32113-22.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-23.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-24.html | 2 +- .../Q00111_ElrokianHuntersProof/32113-26.html | 5 +- .../Q00111_ElrokianHuntersProof/32115-02.html | 2 +- .../Q00111_ElrokianHuntersProof/32115-05.html | 4 +- .../Q00111_ElrokianHuntersProof/32115-07.html | 5 +- .../Q00111_ElrokianHuntersProof/32115-08.html | 2 +- .../Q00111_ElrokianHuntersProof/32116-02.html | 2 +- .../Q00111_ElrokianHuntersProof/32116-03.html | 2 +- .../Q00111_ElrokianHuntersProof/32116-05.html | 2 +- .../Q00111_ElrokianHuntersProof/32116-06.html | 4 +- .../Q00111_ElrokianHuntersProof/32116-09.html | 2 +- .../Q00111_ElrokianHuntersProof.java | 49 +- .../Q00115_TheOtherSideOfTruth/32018-01.html | 12 +- .../Q00115_TheOtherSideOfTruth/32018-03.html | 4 +- .../Q00115_TheOtherSideOfTruth/32018-04.html | 4 +- .../Q00115_TheOtherSideOfTruth/32018-05.html | 7 +- .../Q00115_TheOtherSideOfTruth/32018-06.html | 4 +- .../Q00115_TheOtherSideOfTruth/32020-01.htm | 6 +- .../Q00115_TheOtherSideOfTruth/32020-02.html | 6 +- .../Q00115_TheOtherSideOfTruth/32020-03.htm | 3 + .../Q00115_TheOtherSideOfTruth/32020-04.html | 3 +- .../Q00115_TheOtherSideOfTruth/32020-06.html | 8 +- .../Q00115_TheOtherSideOfTruth/32020-07.html | 12 +- .../Q00115_TheOtherSideOfTruth/32020-08.html | 4 +- .../Q00115_TheOtherSideOfTruth/32020-09.html | 8 +- .../Q00115_TheOtherSideOfTruth/32020-10.html | 13 +- .../Q00115_TheOtherSideOfTruth/32020-11.html | 14 +- .../Q00115_TheOtherSideOfTruth/32020-12.html | 6 +- .../Q00115_TheOtherSideOfTruth/32020-13.html | 8 +- .../Q00115_TheOtherSideOfTruth/32020-14.html | 8 +- .../Q00115_TheOtherSideOfTruth/32020-15.html | 4 +- .../Q00115_TheOtherSideOfTruth/32020-16.html | 10 +- .../Q00115_TheOtherSideOfTruth/32020-17.html | 10 +- .../Q00115_TheOtherSideOfTruth/32020-18.html | 6 +- .../Q00115_TheOtherSideOfTruth/32020-19.html | 2 +- .../Q00115_TheOtherSideOfTruth/32020-20.html | 4 +- .../Q00115_TheOtherSideOfTruth/32020-21.html | 2 +- .../Q00115_TheOtherSideOfTruth/32020-22.html | 5 +- .../Q00115_TheOtherSideOfTruth/32020-23.html | 4 +- .../Q00115_TheOtherSideOfTruth/32020-24.html | 9 +- .../Q00115_TheOtherSideOfTruth/32020-26.html | 4 +- .../Q00115_TheOtherSideOfTruth/32020-27.html | 8 +- .../Q00115_TheOtherSideOfTruth/32020-28.html | 4 +- .../Q00115_TheOtherSideOfTruth/32020-29.html | 2 +- .../Q00115_TheOtherSideOfTruth/32020-30.html | 2 +- .../Q00115_TheOtherSideOfTruth/32021-01.html | 6 +- .../Q00115_TheOtherSideOfTruth/32021-02.html | 2 +- .../Q00115_TheOtherSideOfTruth/32021-03.html | 4 +- .../Q00115_TheOtherSideOfTruth/32021-05.html | 6 +- .../Q00115_TheOtherSideOfTruth/32021-06.html | 8 +- .../Q00115_TheOtherSideOfTruth/32021-08.html | 8 +- .../Q00115_TheOtherSideOfTruth/32022-01.html | 4 +- .../Q00115_TheOtherSideOfTruth/32022-02.html | 4 +- .../Q00115_TheOtherSideOfTruth/32022-03.html | 2 +- .../Q00115_TheOtherSideOfTruth/32022-04.html | 2 +- .../Q00115_TheOtherSideOfTruth/32022-05.html | 2 +- .../Q00115_TheOtherSideOfTruth.java | 214 +++--- .../Q00137_TempleChampionPart1/30070-01.htm | 2 +- .../Q00137_TempleChampionPart1/30070-03.html | 8 +- .../Q00137_TempleChampionPart1/30070-05.html | 8 +- .../Q00137_TempleChampionPart1/30070-06.html | 6 +- .../Q00137_TempleChampionPart1/30070-07.html | 4 +- .../Q00137_TempleChampionPart1/30070-08.html | 6 +- .../Q00137_TempleChampionPart1/30070-09.html | 5 +- .../Q00137_TempleChampionPart1/30070-10.html | 7 +- .../Q00137_TempleChampionPart1/30070-11.html | 4 +- .../Q00137_TempleChampionPart1/30070-12.html | 4 +- .../Q00137_TempleChampionPart1/30070-13.html | 4 +- .../Q00137_TempleChampionPart1/30070-14.html | 4 +- .../Q00137_TempleChampionPart1/30070-16.html | 2 +- .../Q00137_TempleChampionPart1/30070-17.html | 5 + .../Q00137_TempleChampionPart1/30070-18.html | 7 + .../Q00137_TempleChampionPart1.java | 150 ++-- .../Q00138_TempleChampionPart2/30070-01.htm | 3 +- .../Q00138_TempleChampionPart2/30070-02.htm | 2 +- .../Q00138_TempleChampionPart2/30070-04.html | 5 +- .../Q00138_TempleChampionPart2/30070-10.htm | 5 + .../Q00138_TempleChampionPart2/30070-11.htm | 6 + .../Q00138_TempleChampionPart2/30118-01.html | 8 +- .../Q00138_TempleChampionPart2/30118-02.html | 5 +- .../Q00138_TempleChampionPart2/30118-04.html | 2 +- .../Q00138_TempleChampionPart2/30118-08.html | 3 +- .../Q00138_TempleChampionPart2/30118-09.html | 2 +- .../Q00138_TempleChampionPart2/30474-01.html | 3 +- .../Q00138_TempleChampionPart2/30474-04.html | 3 +- .../Q00138_TempleChampionPart2/30666-01.html | 6 +- .../Q00138_TempleChampionPart2/30666-02.html | 8 +- .../Q00138_TempleChampionPart2/30666-03.html | 4 +- .../Q00138_TempleChampionPart2/30666-04.html | 8 +- .../Q00138_TempleChampionPart2/30666-05.html | 8 +- .../Q00138_TempleChampionPart2/30666-06.html | 4 +- .../Q00138_TempleChampionPart2/30666-07.html | 7 +- .../Q00138_TempleChampionPart2/30666-08.html | 12 +- .../Q00138_TempleChampionPart2/30666-09.html | 4 +- .../Q00138_TempleChampionPart2.java | 289 +++---- .../Q00144_PailakaInjuredDragon/32499-01.html | 5 + .../Q00144_PailakaInjuredDragon/32499-04.html | 3 + .../Q00144_PailakaInjuredDragon/32499-05.html | 6 + .../Q00144_PailakaInjuredDragon/32499-06.html | 7 + .../Q00144_PailakaInjuredDragon/32499-07.html | 8 + .../Q00144_PailakaInjuredDragon/32499-08.html | 7 + .../Q00144_PailakaInjuredDragon/32499-09.html | 4 + .../Q00144_PailakaInjuredDragon/32499-10.html | 2 +- .../Q00144_PailakaInjuredDragon/32499-11.html | 2 +- .../Q00144_PailakaInjuredDragon/32502-06.html | 4 + .../Q00144_PailakaInjuredDragon/32509-01.html | 4 +- .../Q00144_PailakaInjuredDragon/32509-05.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-06.html | 2 +- .../Q00144_PailakaInjuredDragon/32509-08.html | 15 +- .../Q00144_PailakaInjuredDragon/32509-09.html | 14 +- .../Q00144_PailakaInjuredDragon/32509-10.html | 27 +- .../Q00144_PailakaInjuredDragon/32512-01.html | 6 +- .../Q00144_PailakaInjuredDragon/32512-02.html | 9 +- .../Q00144_PailakaInjuredDragon/32512-03.html | 7 +- .../Q00144_PailakaInjuredDragon.java | 326 ++++---- .../dist/game/data/xsd/zones.xsd | 23 +- .../dist/game/data/zones/teleportzones.xml | 158 ++++ .../instancemanager/ZoneManager.java | 37 + .../gameserver/model/zone/L2ZoneType.java | 135 +++- .../zone/type/L2OlympiadStadiumZone.java | 23 - .../model/zone/type/L2TeleportZone.java | 74 ++ .../dist/game/data/xsd/zones.xsd | 23 +- .../instancemanager/ZoneManager.java | 37 + .../gameserver/model/zone/L2ZoneType.java | 135 +++- .../zone/type/L2OlympiadStadiumZone.java | 23 - .../model/zone/type/L2TeleportZone.java | 74 ++ 288 files changed, 8082 insertions(+), 3071 deletions(-) create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/zones/teleportzones.xml create mode 100644 L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/zones/teleportzones.xml create mode 100644 L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/zones/teleportzones.xml create mode 100644 L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-05.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32972-01.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-01.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-02.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-03.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-04.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-05.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-06.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-07.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-01.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-02.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-01.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-02.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-03.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-01.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-02.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-03.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-04.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-05.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-06.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-01.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-02.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-03.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-04.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-05.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-06.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-03.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-17.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-18.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-10.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-11.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/zones/teleportzones.xml create mode 100644 L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java create mode 100644 L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml index 9fdb71ba8d..191e977a9f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml @@ -1,129 +1,524 @@ - + + diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..896afc1a23 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest! + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html new file mode 100644 index 0000000000..6a5d8e03ff --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+I have faith that you will remove the dark shadow which hides our Great Flame! + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java index a16ac0cb96..8303a5d872 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java @@ -16,221 +16,616 @@ */ package instances.PailakaInjuredDragon; -import java.util.HashMap; -import java.util.List; - -import com.l2jmobius.gameserver.ai.CtrlIntention; -import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.commons.util.CommonUtil; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.instancemanager.ZoneManager; +import com.l2jmobius.gameserver.model.L2World; +import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.Id; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; +import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.QuestState; -import com.l2jmobius.gameserver.model.spawns.SpawnGroup; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone; +import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera; import instances.AbstractInstance; import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon; /** - * @author Mathael + * Pailaka (Varka Silenos Barracks) Instance zone. + * @author Sdw */ -public class PailakaInjuredDragon extends AbstractInstance +public final class PailakaInjuredDragon extends AbstractInstance { // NPCs - private static final int KETRA_ORC_SUPPORTER_END = 32512; - // Monsters - private static final int RECRUIT = 18635; - private static final int FOOTMAN = 18636; - private static final int WARRIOR = 18642; - private static final int OFFICER = 18646; - private static final int GREAT_MAGUS = 18649; - private static final int GENERAL = 18650; - private static final int ELITE_GUARD = 18653; - private static final int COMMANDER = 18654; - private static final int HEAD_GUARD = 18655; - private static final int PROPHET_GUARD = 18657; - private static final int PROPHET = 18659; - private static final int SHAMAN = 18640; - private static final int CHIEF_PRIEST = 18648; - private static final int GRAND_PRIEST = 18652; + private static final int KETRA_ORC_SHAMAN = 32499; + private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; + private static final int KETRA_ORC_SUPPORTER = 32512; private static final int LATANA = 18660; - private static final int ANTELOPE1 = 18637; - private static final int ANTELOPE2 = 18643; - private static final int ANTELOPE3 = 18651; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Walls - private static final HashMap ZONES_TELEPORTS = new HashMap<>(); - static + private static final int DRAGON_CAMERA_1 = 18603; + private static final int DRAGON_CAMERA_2 = 18604; + private static final int DRAGON_TARGET = 18605; + private static final int LATANA_SKILL_USE = 18661; + private static final int TELEPORT_TRAP = 18663; + //@formatter:off + private static final int[] WARRIORS = { - ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981)); - ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641)); - ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636)); - ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544)); - ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707)); - ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265)); - ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380)); - ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271)); - ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001)); - } - // Skill - private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1); + 18635, 18636, 18638, + 18642, 18646, 18649, + 18650, 18653, 18654, + 18655, 18657, + }; + private static final int[] WIZARDS = + { + 18639, 18640, 18641, + 18644, 18645, 18648, + 18652, 18656, 18658, + 18659, + }; + private static final int[] ANIMALS = + { + 18637, 18643, + 18647, 18651, + }; + // Skills + private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3); + private static final SkillHolder HEAL = new SkillHolder(4065, 7); + private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1); + private static final SkillHolder STUN = new SkillHolder(5716, 1); + private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1); + private static final SkillHolder ANGER = new SkillHolder(5719, 1); + private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1); + private static final int[] REJECTED_SKILLS = + { + 28, 680, 51, + 511, 15, 254, + 1069, 1097, 1042, + 1072, 1170, 352, + 358, 1394, 695, + 115, 1083, 1160, + 1164, 1201, 1206, + 1222, 1223, 1224, + 1092, 65, 106, + 122, 127, 1049, + 1064, 1071, 1074, + 1169, 1263, 1269, + 352, 353, 1336, + 1337, 1338, 1358, + 1359, 402, 403, + 412, 1386, 1394, + 1396, 485, 501, + 1445, 1446, 1447, + 522, 531, 1481, + 1482, 1483, 1484, + 1485, 1486, 695, + 696, 716, 775, + 1511, 792, 1524, + 1529, + }; + //@formatter:on + // Items + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; // Misc private static final int TEMPLATE_ID = 45; public PailakaInjuredDragon() { super(TEMPLATE_ID); - addInstanceEnterId(TEMPLATE_ID); - addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA); - addSpawnId(LATANA); - addAggroRangeEnterId(LATANA); - addEnterZoneId(ZONES_TELEPORTS.keySet()); - addInstanceCreatedId(TEMPLATE_ID); + addStartNpc(KETRA_ORC_SHAMAN); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER); + addAttackId(WARRIORS); + addAttackId(WIZARDS); + addAttackId(LATANA); + addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2); + addSpawnId(WIZARDS); + setCreatureSeeId(this::onCreatureSee, WIZARDS); + setCreatureSeeId(this::onCreatureSee, LATANA); + addKillId(ANIMALS); + addKillId(LATANA); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - switch (event) + String htmltext = null; + final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) { - case "enter": + switch (event) { - enterInstance(player, npc, TEMPLATE_ID); - break; - } - case "camera_start": - { - specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0); - break; // TODO: Need retail values - } - case "camera_end": - { - specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0); - break; // TODO: Need retail values - } - } - return super.onAdvEvent(event, npc, player); - } - - @Override - protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter) - { - super.onEnter(player, instance, firstEnter); - if (firstEnter) - { - final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); - if ((qs != null) && qs.isCond(1)) - { - qs.setCond(2, true); - showHtmlFile(player, "32499-09.html"); - } - } - } - - @Override - public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon) - { - if (npc.isScriptValue(0)) - { - npc.setScriptValue(1); - startQuestTimer("camera_start", 300, npc, player); - npc.doCast(LATANA_PRESENTATION_SKILL.getSkill()); - } - return super.onAggroRangeEnter(npc, player, isSummon); - } - - @Override - public void onInstanceCreated(Instance instance, L2PcInstance player) - { - for (int i = 0; i < 9; i++) - { - final int zoneId = 200000 + (i + 1); - final List npcs = instance.spawnGroup("wall_" + zoneId); - npcs.forEach(k -> k.setScriptValue(zoneId)); - instance.getParameters().set("wall_" + zoneId, npcs.size()); - } - - super.onInstanceCreated(instance, player); - } - - @Override - public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) - { - final int npcId = npc.getId(); - if (npcId == LATANA) - { - startQuestTimer("camera_end", 1000, npc, killer); - addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId()); - } - else - { - switch (getRandom(1, 3)) - { - case 1: + case "enterInstance": { - npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8)); + enterInstance(player, npc, TEMPLATE_ID); + qs.setCond(2, true); + htmltext = "32499-01.html"; break; } - case 2: + case "reEnterInstance": { - npc.dropItem(killer, HEAL_POTION, getRandom(1, 4)); + enterInstance(player, npc, TEMPLATE_ID); + htmltext = "32499-02.html"; + break; + } + case "exitInstance": + { + finishInstance(player, 0); break; } } - - if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST)) + } + return htmltext; + } + + @Override + public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (event) { - final Instance world = npc.getInstanceWorld(); - final int zoneId = npc.getScriptValue(); - int killcount = world.getParameters().getInt("wall_" + zoneId); - killcount--; - world.setParameter("wall_" + zoneId, killcount); - - if (killcount <= 0) + case "SET_VISIBLE": { - world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll); - world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll); - } - else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false)) - { - world.setParameter("wall_" + zoneId + "_add", true); - world.spawnGroup("wall_" + zoneId + "_add").forEach(mage -> + if (!npc.getVariables().getBoolean("visible", false)) { - mage.setTarget(killer); - mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer); + npc.setInvisible(false); + npc.getVariables().set("visible", true); + getTimers().addTimer("CAST_SKILL", 5000, npc, player); + } + break; + } + case "CAST_SKILL": + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, player, holder, 500000); + } + getTimers().addTimer("CAST_SKILL", 10000, npc, player); + break; + } + case "LOOK_NEIGHBOR": + { + L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs -> + { + if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10)) + { + addSkillCastDesire(npc, npcs, HEAL, 1000000); + } }); + getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null); + break; + } + case "CHECK_FOR_DROP": + { + if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty()) + { + final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class); + if (zone != null) + { + zone.setEnabled(false, world.getId()); + } + npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1); + npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1); + switch (npc.getParameters().getInt("GM_ID", 0)) + { + case 2316001: + case 2316002: + case 2316003: + { + if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + case 2316007: + case 2316008: + { + if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + } + npc.deleteMe(); + } + else + { + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + } + break; + } + case "SCE_RATANA_CAMERA_START_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_4": + { + npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_5": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_6": + { + npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_7": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player); + break; + } + case "SUICIDE_DRAGON": + { + npc.deleteMe(); + break; + } + case "LATANA_ANGER_RESET": + { + npc.setScriptValue(0); + break; + } + case "SPAWN_DRAGON_TARGET": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "SOCIAL_ACTION": + { + npc.broadcastSocialAction(0); + getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player); + break; + } + case "DISPLAY_SKILL": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000); + } + getTimers().addTimer("LATANA_CAST", 9700, npc, player); + break; + } + case "LATANA_CAST": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, STUN, 5000); + } + getTimers().addTimer("ATTACK", 11030, npc, player); + break; + } + case "ATTACK": + { + if (npc.calculateDistance(player, false, false) < 100) + { + if (getRandom(100) < 30) + { + addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000); + } + else + { + addAttackDesire(npc, player); + } + } + else if (getRandomBoolean()) + { + addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId()); + } + else + { + addSkillCastDesire(npc, player, FIRE_BREATH, 500000); + } + getTimers().addTimer("ATTACK", 6000, npc, player); + break; + } + case "SPAWN_DRAGON_TARGET2": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "LATANA_ATTACK": + { + addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000); + getTimers().addTimer("LATANA_CAST", 3000, npc, player); + break; + } + case "SPAWN_REWARD_NPC": + { + addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId()); + npc.deleteMe(); + break; + } + case "DRAGON_CAMERA_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0)); + getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null); + break; + } + case "DRAGON_CAMERA_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0)); + getTimers().addTimer("SUICIDE", 10000, npc, null); + break; } } } - return super.onKill(npc, killer, isSummon); } @Override public String onSpawn(L2Npc npc) { - npc.setIsImmobilized(true); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (npc.getId()) + { + case TELEPORT_TRAP: + { + world.getParameters().set(npc.getParameters().getString("GM_ID"), 1); + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + break; + } + case DRAGON_TARGET: + { + getTimers().addTimer("SUICIDE", 60000, npc, null); + break; + } + case LATANA_SKILL_USE: + { + final L2Npc latana = world.getNpc(LATANA); + final L2PcInstance player = world.getFirstPlayer(); + if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900)) + { + addSkillCastDesire(npc, player, STUN, 500000); + } + getTimers().addTimer("SUICIDE", 5000, npc, null); + break; + } + case DRAGON_CAMERA_2: + { + npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1)); + getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null); + break; + } + default: + { + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + npc.setInvisible(true); + getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null); + } + npc.initSeenCreatures(); + } + } + } return super.onSpawn(npc); } - @Override - public String onEnterZone(L2Character character, L2ZoneType zone) + private void onCreatureSee(OnCreatureSee event) { - if (!character.isPlayer() || (character.getInstanceId() == 0)) + final L2Character creature = event.getSeen(); + final L2Npc npc = (L2Npc) event.getSeer(); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - return super.onEnterZone(character, zone); + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + if (creature.isPlayer() && npc.isScriptValue(0)) + { + npc.setScriptValue(1); + getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer()); + } + } + else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer()) + { + final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer()); + npc.setScriptValue(1); + } + else + { + playSound(creature.getActingPlayer(), QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer()); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer()); + npc.getVariables().set("creatureSeen", true); + } + } + + } } - - final Instance world = character.getInstanceWorld(); - if (world.getParameters().getInt("wall_" + zone.getId()) > 0) + } + + @Override + public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - character.teleToLocation(ZONES_TELEPORTS.get(zone.getId())); + if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId())) + { + final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1); + if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId()))) + { + if (npc.calculateDistance(attacker, false, false) > 150) + { + if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate)) + { + addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000); + } + } + else + { + npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL); + } + } + if (CommonUtil.contains(WARRIORS, npc.getId())) + { + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + } + else if ((npc.getId() == LATANA)) + { + if (!npc.getVariables().getBoolean("creatureSeen", false)) + { + final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker); + npc.setScriptValue(1); + } + else + { + playSound(attacker, QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker); + npc.getVariables().set("creatureSeen", true); + } + } + } + + if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0)) + { + addSkillCastDesire(npc, npc, ANGER, 50000000); + npc.setScriptValue(1); + getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker); + } + } } - - return super.onEnterZone(character, zone); + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + // @formatter:off + @RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL) + @RegisterType(ListenerRegisterType.NPC) + @Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657}) + // @formatter:on + public void onAttackableFactionCall(OnAttackableFactionCall event) + { + final L2Npc npc = event.getNpc(); + final L2PcInstance attacker = event.getAttacker(); + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + if (CommonUtil.contains(ANIMALS, npc.getId())) + { + npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1); + } + else if (npc.getId() == LATANA) + { + addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId()); + addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId()); + } + } + return super.onKill(npc, killer, isSummon); } public static void main(String[] args) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..edce7961ea --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html @@ -0,0 +1,5 @@ +Ketra Orc Shaman:
+I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.
+He summons us to return him to his rightful place of glory, but...
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html new file mode 100644 index 0000000000..b2a09cdee0 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...
+(Only characters level 77 or below may undertake this quest.) \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html new file mode 100644 index 0000000000..cfe8d7c95c --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html @@ -0,0 +1,6 @@ +Ketra Orc Shaman:
+The Ketra believe we are children of the Fire Spirit.
+We worship the Red Dragon, who wields the strongest fire in all Goddard.
+Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html new file mode 100644 index 0000000000..5edd1281dc --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+It is a darkness without shape or substance.
+It came from across the sea, and now spreads its black shadow over our land as well.
+The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!
+We must summon all our strength to defeat the darkness!
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html new file mode 100644 index 0000000000..429909ab5e --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html @@ -0,0 +1,8 @@ +Ketra Orc Shaman:
+Warrior, I ask for your aid!
+We are of Ketra descent, so we cannot enter the Shadow of Darkness.
+But I believe that an adventurer like you can enter and remove this foul curse from us.
+Will you do it?
+(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html new file mode 100644 index 0000000000..ca055cf23b --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.
+They will help you.
+When you are prepared, I will send you to the Shadow World, Pailaka!
+ + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html new file mode 100644 index 0000000000..a8afa84a24 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+Warrior, do you wish to enter the Shadow World, Pailaka?
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html index 8b6e98c940..c3567a11e9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html @@ -1,4 +1,4 @@ Ketra Orc Shaman:
The darkness still exists! Will you enter Pailaka again?
- + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html index 96342171ff..06e78f427f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html @@ -1,3 +1,3 @@ Ketra Orc Shaman:
-I have faith that you will remove the dark shadow which hides our Great Flame! +Very well, I shall wait here until you are ready. \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html new file mode 100644 index 0000000000..db773f938b --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html @@ -0,0 +1,4 @@ +Ketra Orc Supporter:
+Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this Spear of Silenos, which we captured from our enemy. Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html index bd64070189..ff0ce54146 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html @@ -1,9 +1,9 @@ -Ketra Orc Intelligence Officer:
+Ketra Orc Intelligence Officer:
Dejakar Oroka!
You hold the Spear of Silenos! Your coming was foretold.
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!
- + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html index bde2867c90..0a8f57be50 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-You still need an Enchant Scroll. Acquire one by slaying more Silenos! +This spear has already been enhanced to its full potential. It is stronger than any other power in this place! \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html index 0a8f57be50..bde2867c90 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-This spear has already been enhanced to its full potential. It is stronger than any other power in this place! +You still need an Enchant Scroll. Acquire one by slaying more Silenos! \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html index 9a10cf5470..439b00cff0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html @@ -1,3 +1,16 @@ Ketra Orc Intelligence Officer:
-The fifth and final enhancement is complete! +We possess several types of enhancement magic. I can grant you at most 5 spells.
+Select them from the list below:
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html index ebfcb44c6d..9a10cf5470 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html @@ -1,15 +1,3 @@ Ketra Orc Intelligence Officer:
-Please select the next spell you wish to receive.
- - - - - - - - - - - - +The fifth and final enhancement is complete! \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html index a63f31ad32..485a51c7cb 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html @@ -1,16 +1,15 @@ Ketra Orc Intelligence Officer:
-We possess several types of enhancement magic. I can grant you at most 5 spells.
-Select them from the list below:
- - - - - - - - - - - - +Please select the next spell you wish to receive.
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html index 4e03ffb61f..8498d30f5a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html @@ -1,4 +1,6 @@ Ketra Orc Supporter:
-Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.
- +Dejakar Oroka!
+Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.
+Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.
+ \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html index af9607b574..4046d77b7f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html @@ -1,6 +1,5 @@ Ketra Orc Supporter:
-You have done it!
-You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!
-Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...
-Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. - +What happened here has not affected your world, but it may help you in the future...
+Now you must return to where you belong.
+Use the Scroll of Escape to leave Pailaka and return to your world! + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html index 1ee6d7027f..56f82938b2 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html @@ -1,3 +1,6 @@ Ketra Orc Supporter:
-Use the Scroll of Escape that I gave you to return to your world. - +You have done it!
+You have lifted the curse! I no longer feel the taint of darkness upon our Altar of Fire!
+Warrior, I wish you could stay here with us, but our shaman decrees that you must leave...
+Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java index 4cd38419a1..38ef374e42 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java @@ -16,43 +16,39 @@ */ package quests.Q00144_PailakaInjuredDragon; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.State; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** - * @author Mathael + * @author Sdw */ public class Q00144_PailakaInjuredDragon extends Quest { // NPCs private static final int KETRA_ORC_SHAMAN = 32499; private static final int KETRA_ORC_SUPPORTER = 32502; - private static final int KETRA_ORC_SUPPORTER_END = 32512; private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; - // Monsters + private static final int KETRA_ORC_SUPPORTER_2 = 32512; private static final int LATANA = 18660; - private static final int[] MONSTERS = - { - 18635, - 18636, - 18642, - 18646, - 18649, - 18650, - 18653, - 18654, - 18655, - 18657, - 18659 - }; - // Buffs + // Items + private static final int SPEAR_OF_SILENOS = 13052; + private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; + private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int SCROLL_OF_ESCAPE = 736; + private static final ItemHolder PAILAKA_SHIRT = new ItemHolder(13296, 1); + // Skills private static final SkillHolder[] BUFFS = { new SkillHolder(1086, 2), @@ -68,61 +64,56 @@ public class Q00144_PailakaInjuredDragon extends Quest new SkillHolder(1268, 4), new SkillHolder(1045, 6), }; - // Quest Items - private static final int SPEAR_OF_SILENOS = 13052; - private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; - private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; - private static final int WEAPON_UPGRADE_STAGE_1 = 13056; - private static final int WEAPON_UPGRADE_STAGE_2 = 13057; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Rewards - private static final long REWARD_EXP = 24570000; - private static final int REWARD_SP = 5896; - private static final int REWARD_PAILAKA_SHIRT = 13296; - private static final int REWARD_ADENA = 798840; - private static final int SCROLL_OF_ESCAPE = 736; // Misc private static final int MIN_LEVEL = 73; private static final int MAX_LEVEL = 77; - private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false; - private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false; - private int BUFF_COUNT = 0; public Q00144_PailakaInjuredDragon() { super(144); addStartNpc(KETRA_ORC_SHAMAN); - addFirstTalkId(KETRA_ORC_SUPPORTER_END); - addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END); + addFirstTalkId(KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_2); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER); addKillId(LATANA); - addKillId(MONSTERS); addCondMinLevel(MIN_LEVEL, "32499-03.html"); - addCondMaxLevel(MAX_LEVEL, "32499-04z.html"); - registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION); + addCondMinLevel(MAX_LEVEL, "32499-04.html"); + registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, PAILAKA_INSTANT_SHIELD, QUICK_HEALING_POTION); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (npc.getId() == KETRA_ORC_INTELLIGENCE_OFFICIER) + { + return "32509-01.html"; + } + else if (npc.getId() == KETRA_ORC_SUPPORTER_2) + { + final QuestState qs = getQuestState(player, false); + if (qs != null) + { + return qs.isCompleted() ? "32512-02.html" : "32512-01.html"; + } + } + return null; } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = getNoQuestMsg(player); final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } - final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event; - switch (request) + String htmltext = null; + switch (event) { - case "32499-04.htm": - case "32499-05.htm": - case "32499-06.htm": - case "32499-08a.html": - case "32499-08.htm": - case "32499-09.htm": - case "32502-01.html": + case "32499-05.html": + case "32499-06.html": + case "32499-07.html": + case "32499-11.html": case "32502-02.html": case "32502-03.html": case "32502-04.html": @@ -131,73 +122,54 @@ public class Q00144_PailakaInjuredDragon extends Quest htmltext = event; break; } - case "32499-07.htm": - { - qs.startQuest(); - htmltext = event; - break; - } case "32502-05.html": { if (qs.isCond(2)) { qs.setCond(3, true); - giveItems(player, SPEAR_OF_SILENOS, 1, true); + giveItems(player, SPEAR_OF_SILENOS, 1); htmltext = event; } break; } - case "32512-02.html": + case "32499-08.html": { - final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); - if ((inst != null) && qs.isCond(4)) - { - takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1); - rewardItems(player, 57, REWARD_ADENA); - rewardItems(player, REWARD_PAILAKA_SHIRT, 1); - addExpAndSp(player, REWARD_EXP, REWARD_SP); - giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. - qs.exitQuest(false, true); - inst.finishInstance(); - htmltext = event; - } + qs.startQuest(); + htmltext = event; break; } case "upgrade_weapon": { - if (qs.isCond(3) || qs.isCond(4)) + if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) { - if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) + htmltext = "32509-06.html"; + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) { - htmltext = "32509-06.html"; + takeItems(player, SPEAR_OF_SILENOS, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); + giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); + htmltext = "32509-02.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + else { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) - { - takeItems(player, SPEAR_OF_SILENOS, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); - giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); - htmltext = "32509-02.html"; - } - else - { - htmltext = "32509-04.html"; - } + htmltext = "32509-05.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) - { - takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); - giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); - htmltext = "32509-08.html"; - } - else - { - htmltext = "32509-04.html"; - } + takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); + giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); + htmltext = "32509-08.html"; + } + else + { + htmltext = "32509-04.html"; } } else @@ -206,141 +178,125 @@ public class Q00144_PailakaInjuredDragon extends Quest } break; } - case "enhancement_page": + case "ask_buff": { - htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html"; + htmltext = npc.isScriptValue(1) ? "32509-07.html" : "32509-08.html"; break; } - case "enhancement": + case "32512-03.html": { - if (BUFF_COUNT < 5) + if (qs.isCond(4)) { - final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1; - SkillCaster.triggerCast(npc, player, BUFFS[key].getSkill()); - BUFF_COUNT++; - if (BUFF_COUNT < 5) + if (player.getLevel() >= MIN_LEVEL) { - htmltext = "32509-09.html"; + addExpAndSp(player, 24570000, 5896); + giveAdena(player, 798840, true); + giveItems(player, PAILAKA_SHIRT); + giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. + qs.exitQuest(false, true); + htmltext = event; } else { - htmltext = "32509-08.html"; + htmltext = getNoQuestLevelRewardMsg(player); + } + final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); + if (inst != null) + { + inst.finishInstance(); + } + } + break; + } + } + if (event.startsWith("buff")) + { + if (npc.isScriptValue(0)) + { + final int currentBuffCount = npc.getVariables().getInt("buff_count"); + if (currentBuffCount < 5) + { + final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, BUFFS.length); + npc.setTarget(player); + npc.doCast(BUFFS[buffOffset].getSkill()); + npc.getVariables().set("buff_count", currentBuffCount + 1); + htmltext = "32509-10.html"; + if ((currentBuffCount + 1) >= 5) + { + htmltext = "32509-09.html"; + npc.setScriptValue(1); } } else { htmltext = "32509-07.html"; + npc.setScriptValue(1); } - break; } } - return htmltext; + } @Override - public String onTalk(L2Npc npc, L2PcInstance talker) + public String onTalk(L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(talker, true); - String htmltext = getNoQuestMsg(talker); + final QuestState qs = getQuestState(player, true); + String htmltext = null; - switch (npc.getId()) + switch (qs.getState()) { - case KETRA_ORC_SHAMAN: + case State.CREATED: { - switch (qs.getState()) + if (npc.getId() == KETRA_ORC_SHAMAN) { - case State.CREATED: + htmltext = "32499-01.html"; + } + break; + } + case State.STARTED: + { + if (npc.getId() == KETRA_ORC_SHAMAN) + { + if (qs.isCond(1)) { - htmltext = "32499-01.htm"; - break; + htmltext = "32499-09.html"; } - case State.COMPLETED: - { - htmltext = "32499-02.html"; - break; - } - case State.STARTED: + else { htmltext = "32499-10.html"; - break; } } - break; - } - case KETRA_ORC_SUPPORTER: - { - switch (qs.getCond()) + else if (npc.getId() == KETRA_ORC_SUPPORTER) { - case 3: - { - htmltext = "32502-07.html"; - break; - } - case 4: - { - htmltext = "32502-06.html"; - break; - } - default: + if (qs.isCond(2)) { htmltext = "32502-01.html"; - break; + } + else + { + htmltext = "32502-06.html"; } } break; } - case KETRA_ORC_INTELLIGENCE_OFFICIER: + case State.COMPLETED: { - htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html"; + htmltext = "32499-02.html"; break; } - case KETRA_ORC_SUPPORTER_END: - { - htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html"; - } } + return htmltext; } - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - final QuestState qs = getQuestState(player, false); - if (qs == null) - { - return getNoQuestMsg(player); - } - return qs.getState() == State.COMPLETED ? "32512-03.html" : "32512-01.html"; - } - @Override public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { - final int npcId = npc.getId(); - if (npcId != LATANA) + final QuestState qs = getQuestState(killer, false); + if (qs != null) { - if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS)) - { - if (getRandom(1, 6) > 2) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true); - WEAPON_UPGRADE_STAGE_1_DROPED = true; - } - } - if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED)) - { - if (getRandom(1, 6) > 4) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true); - WEAPON_UPGRADE_STAGE_2_DROPED = true; - } - } - } - else - { - final QuestState qs = getQuestState(killer, false); - if (qs != null) + if (qs.isCond(3) && (npc.calculateDistance(killer, false, false) <= 1500)) { qs.setCond(4, true); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/zones.xsd b/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/zones.xsd index 0096877cfa..4d485a70fe 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/zones.xsd +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/zones.xsd @@ -68,6 +68,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -101,7 +121,7 @@ - + @@ -151,6 +171,7 @@ + diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/zones/teleportzones.xml new file mode 100644 index 0000000000..243abe1a42 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/zones/teleportzones.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 87321a430e..5a0cf8db97 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.OptionalInt; import java.util.logging.Level; import java.util.logging.Logger; @@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader return null; } + /** + * Get zone by name. + * @param name the zone name + * @return the zone by name + */ + public L2ZoneType getZoneByName(String name) + { + for (Map map : _classZones.values()) + { + final Optional zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zoneType.isPresent()) + { + return zoneType.get(); + } + } + return null; + } + /** * Get zone by ID and zone class. * @param the generic type @@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader return (T) _classZones.get(zoneType).get(id); } + /** + * Get zone by name. + * @param the generic type + * @param name the zone name + * @param zoneType the zone type + * @return + */ + @SuppressWarnings("unchecked") + public T getZoneByName(String name, Class zoneType) + { + final Optional zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zone.isPresent()) + { + return (T) zone.get(); + } + return null; + } + /** * Returns all zones from where the object is located. * @param locational the locational diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java index 3138b311ae..3beea85891 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java @@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher; import com.l2jmobius.gameserver.model.events.ListenersContainer; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit; +import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; @@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer private final int _id; protected L2ZoneForm _zone; + protected List _blockedZone; protected Map _characterList = new ConcurrentHashMap<>(); /** Parameters to affect specific characters */ @@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer private boolean _allowStore; protected boolean _enabled; private AbstractZoneSettings _settings; + private int _instanceTemplateId; + private Map _enabledInInstance; protected L2ZoneType(int id) { @@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer { _enabled = Boolean.parseBoolean(value); } + else if (name.equals("instanceId")) + { + _instanceTemplateId = Integer.parseInt(value); + } else { _log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId()); @@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer */ private boolean isAffected(L2Character character) { + // Check instance + final Instance world = character.getInstanceWorld(); + if (world != null) + { + if (world.getTemplateId() != getInstanceTemplateId()) + { + return false; + } + if (!isEnabled(character.getInstanceId())) + { + return false; + } + } + else if (getInstanceTemplateId() > 0) + { + return false; + } + // Check lvl if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl)) { @@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer return _zone; } + public void setBlockedZones(List blockedZones) + { + if (_blockedZone != null) + { + throw new IllegalStateException("Blocked zone already set"); + } + _blockedZone = blockedZones; + } + + public List getBlockedZones() + { + return _blockedZone; + } + /** * Set the zone name. * @param name @@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer return _name; } + /** + * Checks if the given coordinates are within the zone, ignores instanceId check + * @param x + * @param y + * @param z + * @return + */ + public boolean isInsideZone(int x, int y, int z) + { + return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z); + } + + /** + * @param x + * @param y + * @param z + * @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise + */ + public boolean isInsideBannedZone(int x, int y, int z) + { + return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z)); + } + /** * Checks if the given coordinates are within zone's plane * @param x @@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(int x, int y) { - return _zone.isInsideZone(x, y, _zone.getHighZ()); + return isInsideZone(x, y, _zone.getHighZ()); } /** @@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(ILocational loc) { - return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ()); - } - - /** - * Checks if the given coordinates are within the zone, ignores instanceId check - * @param x - * @param y - * @param z - * @return - */ - public boolean isInsideZone(int x, int y, int z) - { - return _zone.isInsideZone(x, y, z); + return isInsideZone(loc.getX(), loc.getY(), loc.getZ()); } /** @@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer public void revalidateInZone(L2Character character) { - // If the character can't be affected by this zone return - if (_checkAffected) - { - if (!isAffected(character)) - { - return; - } - } - // If the object is inside the zone... if (isInsideZone(character)) { - // Was the character not yet inside this zone? - if (!_characterList.containsKey(character.getObjectId())) + // If the character can't be affected by this zone return + if (_checkAffected) + { + if (!isAffected(character)) + { + return; + } + } + + if (_characterList.putIfAbsent(character.getObjectId(), character) == null) { // Notify to scripts. EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this); - - // Register player. - _characterList.put(character.getObjectId(), character); - // Notify Zone implementation. onEnter(character); } @@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer return _allowStore; } + public int getInstanceTemplateId() + { + return _instanceTemplateId; + } + @Override public String toString() { @@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer return _enabled; } + public void setEnabled(boolean state, int instanceId) + { + if (_enabledInInstance == null) + { + synchronized (this) + { + if (_enabledInInstance == null) + { + _enabledInInstance = new ConcurrentHashMap<>(); + } + } + } + + _enabledInInstance.put(instanceId, state); + } + + public boolean isEnabled(int instanceId) + { + if (_enabledInInstance != null) + { + return _enabledInInstance.getOrDefault(instanceId, isEnabled()); + } + + return isEnabled(); + } + public void oustAllPlayers() { //@formatter:off diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java index 55f2f70d6b..94b5594d11 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java @@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn private final List _doors = new ArrayList<>(2); private final List _buffers = new ArrayList<>(2); private final List _spectatorLocations = new ArrayList<>(1); - private int _instanceTemplate = 0; public L2OlympiadStadiumZone(int id) { @@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn } } - @Override - public void setParameter(String name, String value) - { - if (name.equals("instanceTemplate")) - { - _instanceTemplate = Integer.parseInt(value); - } - else - { - super.setParameter(name, value); - } - } - public final void registerTask(OlympiadGameTask task) { getSettings().setTask(task); @@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn { return _spectatorLocations; } - - /** - * Returns zone instanceTemplate - * @return - */ - public int getInstanceTemplateId() - { - return _instanceTemplate; - } } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java new file mode 100644 index 0000000000..4293f06b14 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java @@ -0,0 +1,74 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.model.zone.type; + +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.zone.L2ZoneType; + +/** + * @author Sdw + */ +public class L2TeleportZone extends L2ZoneType +{ + private int _x = -1; + private int _y = -1; + private int _z = -1; + + public L2TeleportZone(int id) + { + super(id); + } + + @Override + public void setParameter(String name, String value) + { + switch (name) + { + case "oustX": + { + _x = Integer.parseInt(value); + break; + } + case "oustY": + { + _y = Integer.parseInt(value); + break; + } + case "oustZ": + { + _z = Integer.parseInt(value); + break; + } + default: + { + super.setParameter(name, value); + } + } + } + + @Override + protected void onEnter(L2Character character) + { + character.teleToLocation(new Location(_x, _y, _z)); + } + + @Override + protected void onExit(L2Character character) + { + } +} \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml b/L2J_Mobius_2.5_Underground/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml index 9fdb71ba8d..191e977a9f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml @@ -1,129 +1,524 @@ - + + diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..896afc1a23 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest! + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html new file mode 100644 index 0000000000..6a5d8e03ff --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+I have faith that you will remove the dark shadow which hides our Great Flame! + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java index a16ac0cb96..8303a5d872 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java @@ -16,221 +16,616 @@ */ package instances.PailakaInjuredDragon; -import java.util.HashMap; -import java.util.List; - -import com.l2jmobius.gameserver.ai.CtrlIntention; -import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.commons.util.CommonUtil; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.instancemanager.ZoneManager; +import com.l2jmobius.gameserver.model.L2World; +import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.Id; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; +import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.QuestState; -import com.l2jmobius.gameserver.model.spawns.SpawnGroup; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone; +import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera; import instances.AbstractInstance; import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon; /** - * @author Mathael + * Pailaka (Varka Silenos Barracks) Instance zone. + * @author Sdw */ -public class PailakaInjuredDragon extends AbstractInstance +public final class PailakaInjuredDragon extends AbstractInstance { // NPCs - private static final int KETRA_ORC_SUPPORTER_END = 32512; - // Monsters - private static final int RECRUIT = 18635; - private static final int FOOTMAN = 18636; - private static final int WARRIOR = 18642; - private static final int OFFICER = 18646; - private static final int GREAT_MAGUS = 18649; - private static final int GENERAL = 18650; - private static final int ELITE_GUARD = 18653; - private static final int COMMANDER = 18654; - private static final int HEAD_GUARD = 18655; - private static final int PROPHET_GUARD = 18657; - private static final int PROPHET = 18659; - private static final int SHAMAN = 18640; - private static final int CHIEF_PRIEST = 18648; - private static final int GRAND_PRIEST = 18652; + private static final int KETRA_ORC_SHAMAN = 32499; + private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; + private static final int KETRA_ORC_SUPPORTER = 32512; private static final int LATANA = 18660; - private static final int ANTELOPE1 = 18637; - private static final int ANTELOPE2 = 18643; - private static final int ANTELOPE3 = 18651; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Walls - private static final HashMap ZONES_TELEPORTS = new HashMap<>(); - static + private static final int DRAGON_CAMERA_1 = 18603; + private static final int DRAGON_CAMERA_2 = 18604; + private static final int DRAGON_TARGET = 18605; + private static final int LATANA_SKILL_USE = 18661; + private static final int TELEPORT_TRAP = 18663; + //@formatter:off + private static final int[] WARRIORS = { - ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981)); - ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641)); - ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636)); - ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544)); - ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707)); - ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265)); - ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380)); - ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271)); - ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001)); - } - // Skill - private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1); + 18635, 18636, 18638, + 18642, 18646, 18649, + 18650, 18653, 18654, + 18655, 18657, + }; + private static final int[] WIZARDS = + { + 18639, 18640, 18641, + 18644, 18645, 18648, + 18652, 18656, 18658, + 18659, + }; + private static final int[] ANIMALS = + { + 18637, 18643, + 18647, 18651, + }; + // Skills + private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3); + private static final SkillHolder HEAL = new SkillHolder(4065, 7); + private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1); + private static final SkillHolder STUN = new SkillHolder(5716, 1); + private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1); + private static final SkillHolder ANGER = new SkillHolder(5719, 1); + private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1); + private static final int[] REJECTED_SKILLS = + { + 28, 680, 51, + 511, 15, 254, + 1069, 1097, 1042, + 1072, 1170, 352, + 358, 1394, 695, + 115, 1083, 1160, + 1164, 1201, 1206, + 1222, 1223, 1224, + 1092, 65, 106, + 122, 127, 1049, + 1064, 1071, 1074, + 1169, 1263, 1269, + 352, 353, 1336, + 1337, 1338, 1358, + 1359, 402, 403, + 412, 1386, 1394, + 1396, 485, 501, + 1445, 1446, 1447, + 522, 531, 1481, + 1482, 1483, 1484, + 1485, 1486, 695, + 696, 716, 775, + 1511, 792, 1524, + 1529, + }; + //@formatter:on + // Items + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; // Misc private static final int TEMPLATE_ID = 45; public PailakaInjuredDragon() { super(TEMPLATE_ID); - addInstanceEnterId(TEMPLATE_ID); - addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA); - addSpawnId(LATANA); - addAggroRangeEnterId(LATANA); - addEnterZoneId(ZONES_TELEPORTS.keySet()); - addInstanceCreatedId(TEMPLATE_ID); + addStartNpc(KETRA_ORC_SHAMAN); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER); + addAttackId(WARRIORS); + addAttackId(WIZARDS); + addAttackId(LATANA); + addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2); + addSpawnId(WIZARDS); + setCreatureSeeId(this::onCreatureSee, WIZARDS); + setCreatureSeeId(this::onCreatureSee, LATANA); + addKillId(ANIMALS); + addKillId(LATANA); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - switch (event) + String htmltext = null; + final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) { - case "enter": + switch (event) { - enterInstance(player, npc, TEMPLATE_ID); - break; - } - case "camera_start": - { - specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0); - break; // TODO: Need retail values - } - case "camera_end": - { - specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0); - break; // TODO: Need retail values - } - } - return super.onAdvEvent(event, npc, player); - } - - @Override - protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter) - { - super.onEnter(player, instance, firstEnter); - if (firstEnter) - { - final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); - if ((qs != null) && qs.isCond(1)) - { - qs.setCond(2, true); - showHtmlFile(player, "32499-09.html"); - } - } - } - - @Override - public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon) - { - if (npc.isScriptValue(0)) - { - npc.setScriptValue(1); - startQuestTimer("camera_start", 300, npc, player); - npc.doCast(LATANA_PRESENTATION_SKILL.getSkill()); - } - return super.onAggroRangeEnter(npc, player, isSummon); - } - - @Override - public void onInstanceCreated(Instance instance, L2PcInstance player) - { - for (int i = 0; i < 9; i++) - { - final int zoneId = 200000 + (i + 1); - final List npcs = instance.spawnGroup("wall_" + zoneId); - npcs.forEach(k -> k.setScriptValue(zoneId)); - instance.getParameters().set("wall_" + zoneId, npcs.size()); - } - - super.onInstanceCreated(instance, player); - } - - @Override - public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) - { - final int npcId = npc.getId(); - if (npcId == LATANA) - { - startQuestTimer("camera_end", 1000, npc, killer); - addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId()); - } - else - { - switch (getRandom(1, 3)) - { - case 1: + case "enterInstance": { - npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8)); + enterInstance(player, npc, TEMPLATE_ID); + qs.setCond(2, true); + htmltext = "32499-01.html"; break; } - case 2: + case "reEnterInstance": { - npc.dropItem(killer, HEAL_POTION, getRandom(1, 4)); + enterInstance(player, npc, TEMPLATE_ID); + htmltext = "32499-02.html"; + break; + } + case "exitInstance": + { + finishInstance(player, 0); break; } } - - if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST)) + } + return htmltext; + } + + @Override + public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (event) { - final Instance world = npc.getInstanceWorld(); - final int zoneId = npc.getScriptValue(); - int killcount = world.getParameters().getInt("wall_" + zoneId); - killcount--; - world.setParameter("wall_" + zoneId, killcount); - - if (killcount <= 0) + case "SET_VISIBLE": { - world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll); - world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll); - } - else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false)) - { - world.setParameter("wall_" + zoneId + "_add", true); - world.spawnGroup("wall_" + zoneId + "_add").forEach(mage -> + if (!npc.getVariables().getBoolean("visible", false)) { - mage.setTarget(killer); - mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer); + npc.setInvisible(false); + npc.getVariables().set("visible", true); + getTimers().addTimer("CAST_SKILL", 5000, npc, player); + } + break; + } + case "CAST_SKILL": + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, player, holder, 500000); + } + getTimers().addTimer("CAST_SKILL", 10000, npc, player); + break; + } + case "LOOK_NEIGHBOR": + { + L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs -> + { + if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10)) + { + addSkillCastDesire(npc, npcs, HEAL, 1000000); + } }); + getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null); + break; + } + case "CHECK_FOR_DROP": + { + if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty()) + { + final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class); + if (zone != null) + { + zone.setEnabled(false, world.getId()); + } + npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1); + npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1); + switch (npc.getParameters().getInt("GM_ID", 0)) + { + case 2316001: + case 2316002: + case 2316003: + { + if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + case 2316007: + case 2316008: + { + if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + } + npc.deleteMe(); + } + else + { + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + } + break; + } + case "SCE_RATANA_CAMERA_START_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_4": + { + npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_5": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_6": + { + npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_7": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player); + break; + } + case "SUICIDE_DRAGON": + { + npc.deleteMe(); + break; + } + case "LATANA_ANGER_RESET": + { + npc.setScriptValue(0); + break; + } + case "SPAWN_DRAGON_TARGET": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "SOCIAL_ACTION": + { + npc.broadcastSocialAction(0); + getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player); + break; + } + case "DISPLAY_SKILL": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000); + } + getTimers().addTimer("LATANA_CAST", 9700, npc, player); + break; + } + case "LATANA_CAST": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, STUN, 5000); + } + getTimers().addTimer("ATTACK", 11030, npc, player); + break; + } + case "ATTACK": + { + if (npc.calculateDistance(player, false, false) < 100) + { + if (getRandom(100) < 30) + { + addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000); + } + else + { + addAttackDesire(npc, player); + } + } + else if (getRandomBoolean()) + { + addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId()); + } + else + { + addSkillCastDesire(npc, player, FIRE_BREATH, 500000); + } + getTimers().addTimer("ATTACK", 6000, npc, player); + break; + } + case "SPAWN_DRAGON_TARGET2": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "LATANA_ATTACK": + { + addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000); + getTimers().addTimer("LATANA_CAST", 3000, npc, player); + break; + } + case "SPAWN_REWARD_NPC": + { + addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId()); + npc.deleteMe(); + break; + } + case "DRAGON_CAMERA_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0)); + getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null); + break; + } + case "DRAGON_CAMERA_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0)); + getTimers().addTimer("SUICIDE", 10000, npc, null); + break; } } } - return super.onKill(npc, killer, isSummon); } @Override public String onSpawn(L2Npc npc) { - npc.setIsImmobilized(true); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (npc.getId()) + { + case TELEPORT_TRAP: + { + world.getParameters().set(npc.getParameters().getString("GM_ID"), 1); + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + break; + } + case DRAGON_TARGET: + { + getTimers().addTimer("SUICIDE", 60000, npc, null); + break; + } + case LATANA_SKILL_USE: + { + final L2Npc latana = world.getNpc(LATANA); + final L2PcInstance player = world.getFirstPlayer(); + if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900)) + { + addSkillCastDesire(npc, player, STUN, 500000); + } + getTimers().addTimer("SUICIDE", 5000, npc, null); + break; + } + case DRAGON_CAMERA_2: + { + npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1)); + getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null); + break; + } + default: + { + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + npc.setInvisible(true); + getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null); + } + npc.initSeenCreatures(); + } + } + } return super.onSpawn(npc); } - @Override - public String onEnterZone(L2Character character, L2ZoneType zone) + private void onCreatureSee(OnCreatureSee event) { - if (!character.isPlayer() || (character.getInstanceId() == 0)) + final L2Character creature = event.getSeen(); + final L2Npc npc = (L2Npc) event.getSeer(); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - return super.onEnterZone(character, zone); + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + if (creature.isPlayer() && npc.isScriptValue(0)) + { + npc.setScriptValue(1); + getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer()); + } + } + else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer()) + { + final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer()); + npc.setScriptValue(1); + } + else + { + playSound(creature.getActingPlayer(), QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer()); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer()); + npc.getVariables().set("creatureSeen", true); + } + } + + } } - - final Instance world = character.getInstanceWorld(); - if (world.getParameters().getInt("wall_" + zone.getId()) > 0) + } + + @Override + public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - character.teleToLocation(ZONES_TELEPORTS.get(zone.getId())); + if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId())) + { + final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1); + if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId()))) + { + if (npc.calculateDistance(attacker, false, false) > 150) + { + if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate)) + { + addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000); + } + } + else + { + npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL); + } + } + if (CommonUtil.contains(WARRIORS, npc.getId())) + { + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + } + else if ((npc.getId() == LATANA)) + { + if (!npc.getVariables().getBoolean("creatureSeen", false)) + { + final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker); + npc.setScriptValue(1); + } + else + { + playSound(attacker, QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker); + npc.getVariables().set("creatureSeen", true); + } + } + } + + if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0)) + { + addSkillCastDesire(npc, npc, ANGER, 50000000); + npc.setScriptValue(1); + getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker); + } + } } - - return super.onEnterZone(character, zone); + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + // @formatter:off + @RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL) + @RegisterType(ListenerRegisterType.NPC) + @Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657}) + // @formatter:on + public void onAttackableFactionCall(OnAttackableFactionCall event) + { + final L2Npc npc = event.getNpc(); + final L2PcInstance attacker = event.getAttacker(); + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + if (CommonUtil.contains(ANIMALS, npc.getId())) + { + npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1); + } + else if (npc.getId() == LATANA) + { + addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId()); + addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId()); + } + } + return super.onKill(npc, killer, isSummon); } public static void main(String[] args) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..edce7961ea --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html @@ -0,0 +1,5 @@ +Ketra Orc Shaman:
+I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.
+He summons us to return him to his rightful place of glory, but...
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html new file mode 100644 index 0000000000..b2a09cdee0 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...
+(Only characters level 77 or below may undertake this quest.) \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html new file mode 100644 index 0000000000..cfe8d7c95c --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html @@ -0,0 +1,6 @@ +Ketra Orc Shaman:
+The Ketra believe we are children of the Fire Spirit.
+We worship the Red Dragon, who wields the strongest fire in all Goddard.
+Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html new file mode 100644 index 0000000000..5edd1281dc --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+It is a darkness without shape or substance.
+It came from across the sea, and now spreads its black shadow over our land as well.
+The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!
+We must summon all our strength to defeat the darkness!
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html new file mode 100644 index 0000000000..429909ab5e --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html @@ -0,0 +1,8 @@ +Ketra Orc Shaman:
+Warrior, I ask for your aid!
+We are of Ketra descent, so we cannot enter the Shadow of Darkness.
+But I believe that an adventurer like you can enter and remove this foul curse from us.
+Will you do it?
+(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html new file mode 100644 index 0000000000..ca055cf23b --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.
+They will help you.
+When you are prepared, I will send you to the Shadow World, Pailaka!
+ + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html new file mode 100644 index 0000000000..a8afa84a24 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+Warrior, do you wish to enter the Shadow World, Pailaka?
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html index 8b6e98c940..c3567a11e9 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html @@ -1,4 +1,4 @@ Ketra Orc Shaman:
The darkness still exists! Will you enter Pailaka again?
- + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html index 96342171ff..06e78f427f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html @@ -1,3 +1,3 @@ Ketra Orc Shaman:
-I have faith that you will remove the dark shadow which hides our Great Flame! +Very well, I shall wait here until you are ready. \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html new file mode 100644 index 0000000000..db773f938b --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html @@ -0,0 +1,4 @@ +Ketra Orc Supporter:
+Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this Spear of Silenos, which we captured from our enemy. Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html index bd64070189..ff0ce54146 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html @@ -1,9 +1,9 @@ -Ketra Orc Intelligence Officer:
+Ketra Orc Intelligence Officer:
Dejakar Oroka!
You hold the Spear of Silenos! Your coming was foretold.
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!
- + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html index bde2867c90..0a8f57be50 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-You still need an Enchant Scroll. Acquire one by slaying more Silenos! +This spear has already been enhanced to its full potential. It is stronger than any other power in this place! \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html index 0a8f57be50..bde2867c90 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-This spear has already been enhanced to its full potential. It is stronger than any other power in this place! +You still need an Enchant Scroll. Acquire one by slaying more Silenos! \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html index 9a10cf5470..439b00cff0 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html @@ -1,3 +1,16 @@ Ketra Orc Intelligence Officer:
-The fifth and final enhancement is complete! +We possess several types of enhancement magic. I can grant you at most 5 spells.
+Select them from the list below:
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html index ebfcb44c6d..9a10cf5470 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html @@ -1,15 +1,3 @@ Ketra Orc Intelligence Officer:
-Please select the next spell you wish to receive.
- - - - - - - - - - - - +The fifth and final enhancement is complete! \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html index a63f31ad32..485a51c7cb 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html @@ -1,16 +1,15 @@ Ketra Orc Intelligence Officer:
-We possess several types of enhancement magic. I can grant you at most 5 spells.
-Select them from the list below:
- - - - - - - - - - - - +Please select the next spell you wish to receive.
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html index 4e03ffb61f..8498d30f5a 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html @@ -1,4 +1,6 @@ Ketra Orc Supporter:
-Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.
- +Dejakar Oroka!
+Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.
+Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.
+ \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html index af9607b574..4046d77b7f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html @@ -1,6 +1,5 @@ Ketra Orc Supporter:
-You have done it!
-You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!
-Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...
-Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. - +What happened here has not affected your world, but it may help you in the future...
+Now you must return to where you belong.
+Use the Scroll of Escape to leave Pailaka and return to your world! + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html index 1ee6d7027f..56f82938b2 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html @@ -1,3 +1,6 @@ Ketra Orc Supporter:
-Use the Scroll of Escape that I gave you to return to your world. - +You have done it!
+You have lifted the curse! I no longer feel the taint of darkness upon our Altar of Fire!
+Warrior, I wish you could stay here with us, but our shaman decrees that you must leave...
+Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java index 4cd38419a1..38ef374e42 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java @@ -16,43 +16,39 @@ */ package quests.Q00144_PailakaInjuredDragon; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.State; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** - * @author Mathael + * @author Sdw */ public class Q00144_PailakaInjuredDragon extends Quest { // NPCs private static final int KETRA_ORC_SHAMAN = 32499; private static final int KETRA_ORC_SUPPORTER = 32502; - private static final int KETRA_ORC_SUPPORTER_END = 32512; private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; - // Monsters + private static final int KETRA_ORC_SUPPORTER_2 = 32512; private static final int LATANA = 18660; - private static final int[] MONSTERS = - { - 18635, - 18636, - 18642, - 18646, - 18649, - 18650, - 18653, - 18654, - 18655, - 18657, - 18659 - }; - // Buffs + // Items + private static final int SPEAR_OF_SILENOS = 13052; + private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; + private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int SCROLL_OF_ESCAPE = 736; + private static final ItemHolder PAILAKA_SHIRT = new ItemHolder(13296, 1); + // Skills private static final SkillHolder[] BUFFS = { new SkillHolder(1086, 2), @@ -68,61 +64,56 @@ public class Q00144_PailakaInjuredDragon extends Quest new SkillHolder(1268, 4), new SkillHolder(1045, 6), }; - // Quest Items - private static final int SPEAR_OF_SILENOS = 13052; - private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; - private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; - private static final int WEAPON_UPGRADE_STAGE_1 = 13056; - private static final int WEAPON_UPGRADE_STAGE_2 = 13057; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Rewards - private static final long REWARD_EXP = 24570000; - private static final int REWARD_SP = 5896; - private static final int REWARD_PAILAKA_SHIRT = 13296; - private static final int REWARD_ADENA = 798840; - private static final int SCROLL_OF_ESCAPE = 736; // Misc private static final int MIN_LEVEL = 73; private static final int MAX_LEVEL = 77; - private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false; - private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false; - private int BUFF_COUNT = 0; public Q00144_PailakaInjuredDragon() { super(144); addStartNpc(KETRA_ORC_SHAMAN); - addFirstTalkId(KETRA_ORC_SUPPORTER_END); - addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END); + addFirstTalkId(KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_2); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER); addKillId(LATANA); - addKillId(MONSTERS); addCondMinLevel(MIN_LEVEL, "32499-03.html"); - addCondMaxLevel(MAX_LEVEL, "32499-04z.html"); - registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION); + addCondMinLevel(MAX_LEVEL, "32499-04.html"); + registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, PAILAKA_INSTANT_SHIELD, QUICK_HEALING_POTION); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (npc.getId() == KETRA_ORC_INTELLIGENCE_OFFICIER) + { + return "32509-01.html"; + } + else if (npc.getId() == KETRA_ORC_SUPPORTER_2) + { + final QuestState qs = getQuestState(player, false); + if (qs != null) + { + return qs.isCompleted() ? "32512-02.html" : "32512-01.html"; + } + } + return null; } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = getNoQuestMsg(player); final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } - final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event; - switch (request) + String htmltext = null; + switch (event) { - case "32499-04.htm": - case "32499-05.htm": - case "32499-06.htm": - case "32499-08a.html": - case "32499-08.htm": - case "32499-09.htm": - case "32502-01.html": + case "32499-05.html": + case "32499-06.html": + case "32499-07.html": + case "32499-11.html": case "32502-02.html": case "32502-03.html": case "32502-04.html": @@ -131,73 +122,54 @@ public class Q00144_PailakaInjuredDragon extends Quest htmltext = event; break; } - case "32499-07.htm": - { - qs.startQuest(); - htmltext = event; - break; - } case "32502-05.html": { if (qs.isCond(2)) { qs.setCond(3, true); - giveItems(player, SPEAR_OF_SILENOS, 1, true); + giveItems(player, SPEAR_OF_SILENOS, 1); htmltext = event; } break; } - case "32512-02.html": + case "32499-08.html": { - final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); - if ((inst != null) && qs.isCond(4)) - { - takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1); - rewardItems(player, 57, REWARD_ADENA); - rewardItems(player, REWARD_PAILAKA_SHIRT, 1); - addExpAndSp(player, REWARD_EXP, REWARD_SP); - giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. - qs.exitQuest(false, true); - inst.finishInstance(); - htmltext = event; - } + qs.startQuest(); + htmltext = event; break; } case "upgrade_weapon": { - if (qs.isCond(3) || qs.isCond(4)) + if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) { - if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) + htmltext = "32509-06.html"; + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) { - htmltext = "32509-06.html"; + takeItems(player, SPEAR_OF_SILENOS, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); + giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); + htmltext = "32509-02.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + else { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) - { - takeItems(player, SPEAR_OF_SILENOS, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); - giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); - htmltext = "32509-02.html"; - } - else - { - htmltext = "32509-04.html"; - } + htmltext = "32509-05.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) - { - takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); - giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); - htmltext = "32509-08.html"; - } - else - { - htmltext = "32509-04.html"; - } + takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); + giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); + htmltext = "32509-08.html"; + } + else + { + htmltext = "32509-04.html"; } } else @@ -206,141 +178,125 @@ public class Q00144_PailakaInjuredDragon extends Quest } break; } - case "enhancement_page": + case "ask_buff": { - htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html"; + htmltext = npc.isScriptValue(1) ? "32509-07.html" : "32509-08.html"; break; } - case "enhancement": + case "32512-03.html": { - if (BUFF_COUNT < 5) + if (qs.isCond(4)) { - final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1; - SkillCaster.triggerCast(npc, player, BUFFS[key].getSkill()); - BUFF_COUNT++; - if (BUFF_COUNT < 5) + if (player.getLevel() >= MIN_LEVEL) { - htmltext = "32509-09.html"; + addExpAndSp(player, 24570000, 5896); + giveAdena(player, 798840, true); + giveItems(player, PAILAKA_SHIRT); + giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. + qs.exitQuest(false, true); + htmltext = event; } else { - htmltext = "32509-08.html"; + htmltext = getNoQuestLevelRewardMsg(player); + } + final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); + if (inst != null) + { + inst.finishInstance(); + } + } + break; + } + } + if (event.startsWith("buff")) + { + if (npc.isScriptValue(0)) + { + final int currentBuffCount = npc.getVariables().getInt("buff_count"); + if (currentBuffCount < 5) + { + final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, BUFFS.length); + npc.setTarget(player); + npc.doCast(BUFFS[buffOffset].getSkill()); + npc.getVariables().set("buff_count", currentBuffCount + 1); + htmltext = "32509-10.html"; + if ((currentBuffCount + 1) >= 5) + { + htmltext = "32509-09.html"; + npc.setScriptValue(1); } } else { htmltext = "32509-07.html"; + npc.setScriptValue(1); } - break; } } - return htmltext; + } @Override - public String onTalk(L2Npc npc, L2PcInstance talker) + public String onTalk(L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(talker, true); - String htmltext = getNoQuestMsg(talker); + final QuestState qs = getQuestState(player, true); + String htmltext = null; - switch (npc.getId()) + switch (qs.getState()) { - case KETRA_ORC_SHAMAN: + case State.CREATED: { - switch (qs.getState()) + if (npc.getId() == KETRA_ORC_SHAMAN) { - case State.CREATED: + htmltext = "32499-01.html"; + } + break; + } + case State.STARTED: + { + if (npc.getId() == KETRA_ORC_SHAMAN) + { + if (qs.isCond(1)) { - htmltext = "32499-01.htm"; - break; + htmltext = "32499-09.html"; } - case State.COMPLETED: - { - htmltext = "32499-02.html"; - break; - } - case State.STARTED: + else { htmltext = "32499-10.html"; - break; } } - break; - } - case KETRA_ORC_SUPPORTER: - { - switch (qs.getCond()) + else if (npc.getId() == KETRA_ORC_SUPPORTER) { - case 3: - { - htmltext = "32502-07.html"; - break; - } - case 4: - { - htmltext = "32502-06.html"; - break; - } - default: + if (qs.isCond(2)) { htmltext = "32502-01.html"; - break; + } + else + { + htmltext = "32502-06.html"; } } break; } - case KETRA_ORC_INTELLIGENCE_OFFICIER: + case State.COMPLETED: { - htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html"; + htmltext = "32499-02.html"; break; } - case KETRA_ORC_SUPPORTER_END: - { - htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html"; - } } + return htmltext; } - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - final QuestState qs = getQuestState(player, false); - if (qs == null) - { - return getNoQuestMsg(player); - } - return qs.getState() == State.COMPLETED ? "32512-03.html" : "32512-01.html"; - } - @Override public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { - final int npcId = npc.getId(); - if (npcId != LATANA) + final QuestState qs = getQuestState(killer, false); + if (qs != null) { - if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS)) - { - if (getRandom(1, 6) > 2) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true); - WEAPON_UPGRADE_STAGE_1_DROPED = true; - } - } - if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED)) - { - if (getRandom(1, 6) > 4) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true); - WEAPON_UPGRADE_STAGE_2_DROPED = true; - } - } - } - else - { - final QuestState qs = getQuestState(killer, false); - if (qs != null) + if (qs.isCond(3) && (npc.calculateDistance(killer, false, false) <= 1500)) { qs.setCond(4, true); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/xsd/zones.xsd b/L2J_Mobius_2.5_Underground/dist/game/data/xsd/zones.xsd index 0096877cfa..4d485a70fe 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/xsd/zones.xsd +++ b/L2J_Mobius_2.5_Underground/dist/game/data/xsd/zones.xsd @@ -68,6 +68,26 @@
+ + + + + + + + + + + + + + + + + + + + @@ -101,7 +121,7 @@ - + @@ -151,6 +171,7 @@ + diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_2.5_Underground/dist/game/data/zones/teleportzones.xml new file mode 100644 index 0000000000..243abe1a42 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/zones/teleportzones.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 87321a430e..5a0cf8db97 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.OptionalInt; import java.util.logging.Level; import java.util.logging.Logger; @@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader return null; } + /** + * Get zone by name. + * @param name the zone name + * @return the zone by name + */ + public L2ZoneType getZoneByName(String name) + { + for (Map map : _classZones.values()) + { + final Optional zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zoneType.isPresent()) + { + return zoneType.get(); + } + } + return null; + } + /** * Get zone by ID and zone class. * @param the generic type @@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader return (T) _classZones.get(zoneType).get(id); } + /** + * Get zone by name. + * @param the generic type + * @param name the zone name + * @param zoneType the zone type + * @return + */ + @SuppressWarnings("unchecked") + public T getZoneByName(String name, Class zoneType) + { + final Optional zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zone.isPresent()) + { + return (T) zone.get(); + } + return null; + } + /** * Returns all zones from where the object is located. * @param locational the locational diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java index 3138b311ae..3beea85891 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java @@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher; import com.l2jmobius.gameserver.model.events.ListenersContainer; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit; +import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; @@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer private final int _id; protected L2ZoneForm _zone; + protected List _blockedZone; protected Map _characterList = new ConcurrentHashMap<>(); /** Parameters to affect specific characters */ @@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer private boolean _allowStore; protected boolean _enabled; private AbstractZoneSettings _settings; + private int _instanceTemplateId; + private Map _enabledInInstance; protected L2ZoneType(int id) { @@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer { _enabled = Boolean.parseBoolean(value); } + else if (name.equals("instanceId")) + { + _instanceTemplateId = Integer.parseInt(value); + } else { _log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId()); @@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer */ private boolean isAffected(L2Character character) { + // Check instance + final Instance world = character.getInstanceWorld(); + if (world != null) + { + if (world.getTemplateId() != getInstanceTemplateId()) + { + return false; + } + if (!isEnabled(character.getInstanceId())) + { + return false; + } + } + else if (getInstanceTemplateId() > 0) + { + return false; + } + // Check lvl if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl)) { @@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer return _zone; } + public void setBlockedZones(List blockedZones) + { + if (_blockedZone != null) + { + throw new IllegalStateException("Blocked zone already set"); + } + _blockedZone = blockedZones; + } + + public List getBlockedZones() + { + return _blockedZone; + } + /** * Set the zone name. * @param name @@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer return _name; } + /** + * Checks if the given coordinates are within the zone, ignores instanceId check + * @param x + * @param y + * @param z + * @return + */ + public boolean isInsideZone(int x, int y, int z) + { + return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z); + } + + /** + * @param x + * @param y + * @param z + * @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise + */ + public boolean isInsideBannedZone(int x, int y, int z) + { + return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z)); + } + /** * Checks if the given coordinates are within zone's plane * @param x @@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(int x, int y) { - return _zone.isInsideZone(x, y, _zone.getHighZ()); + return isInsideZone(x, y, _zone.getHighZ()); } /** @@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(ILocational loc) { - return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ()); - } - - /** - * Checks if the given coordinates are within the zone, ignores instanceId check - * @param x - * @param y - * @param z - * @return - */ - public boolean isInsideZone(int x, int y, int z) - { - return _zone.isInsideZone(x, y, z); + return isInsideZone(loc.getX(), loc.getY(), loc.getZ()); } /** @@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer public void revalidateInZone(L2Character character) { - // If the character can't be affected by this zone return - if (_checkAffected) - { - if (!isAffected(character)) - { - return; - } - } - // If the object is inside the zone... if (isInsideZone(character)) { - // Was the character not yet inside this zone? - if (!_characterList.containsKey(character.getObjectId())) + // If the character can't be affected by this zone return + if (_checkAffected) + { + if (!isAffected(character)) + { + return; + } + } + + if (_characterList.putIfAbsent(character.getObjectId(), character) == null) { // Notify to scripts. EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this); - - // Register player. - _characterList.put(character.getObjectId(), character); - // Notify Zone implementation. onEnter(character); } @@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer return _allowStore; } + public int getInstanceTemplateId() + { + return _instanceTemplateId; + } + @Override public String toString() { @@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer return _enabled; } + public void setEnabled(boolean state, int instanceId) + { + if (_enabledInInstance == null) + { + synchronized (this) + { + if (_enabledInInstance == null) + { + _enabledInInstance = new ConcurrentHashMap<>(); + } + } + } + + _enabledInInstance.put(instanceId, state); + } + + public boolean isEnabled(int instanceId) + { + if (_enabledInInstance != null) + { + return _enabledInInstance.getOrDefault(instanceId, isEnabled()); + } + + return isEnabled(); + } + public void oustAllPlayers() { //@formatter:off diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java index 55f2f70d6b..94b5594d11 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java @@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn private final List _doors = new ArrayList<>(2); private final List _buffers = new ArrayList<>(2); private final List _spectatorLocations = new ArrayList<>(1); - private int _instanceTemplate = 0; public L2OlympiadStadiumZone(int id) { @@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn } } - @Override - public void setParameter(String name, String value) - { - if (name.equals("instanceTemplate")) - { - _instanceTemplate = Integer.parseInt(value); - } - else - { - super.setParameter(name, value); - } - } - public final void registerTask(OlympiadGameTask task) { getSettings().setTask(task); @@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn { return _spectatorLocations; } - - /** - * Returns zone instanceTemplate - * @return - */ - public int getInstanceTemplateId() - { - return _instanceTemplate; - } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java new file mode 100644 index 0000000000..4293f06b14 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java @@ -0,0 +1,74 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.model.zone.type; + +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.zone.L2ZoneType; + +/** + * @author Sdw + */ +public class L2TeleportZone extends L2ZoneType +{ + private int _x = -1; + private int _y = -1; + private int _z = -1; + + public L2TeleportZone(int id) + { + super(id); + } + + @Override + public void setParameter(String name, String value) + { + switch (name) + { + case "oustX": + { + _x = Integer.parseInt(value); + break; + } + case "oustY": + { + _y = Integer.parseInt(value); + break; + } + case "oustZ": + { + _z = Integer.parseInt(value); + break; + } + default: + { + super.setParameter(name, value); + } + } + } + + @Override + protected void onEnter(L2Character character) + { + character.teleToLocation(new Location(_x, _y, _z)); + } + + @Override + protected void onExit(L2Character character) + { + } +} \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml b/L2J_Mobius_3.0_Helios/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml index 9fdb71ba8d..191e977a9f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml @@ -1,129 +1,524 @@ - + + diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..896afc1a23 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest! + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html new file mode 100644 index 0000000000..6a5d8e03ff --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+I have faith that you will remove the dark shadow which hides our Great Flame! + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java index a16ac0cb96..8303a5d872 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java @@ -16,221 +16,616 @@ */ package instances.PailakaInjuredDragon; -import java.util.HashMap; -import java.util.List; - -import com.l2jmobius.gameserver.ai.CtrlIntention; -import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.commons.util.CommonUtil; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.instancemanager.ZoneManager; +import com.l2jmobius.gameserver.model.L2World; +import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.Id; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; +import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.QuestState; -import com.l2jmobius.gameserver.model.spawns.SpawnGroup; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone; +import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera; import instances.AbstractInstance; import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon; /** - * @author Mathael + * Pailaka (Varka Silenos Barracks) Instance zone. + * @author Sdw */ -public class PailakaInjuredDragon extends AbstractInstance +public final class PailakaInjuredDragon extends AbstractInstance { // NPCs - private static final int KETRA_ORC_SUPPORTER_END = 32512; - // Monsters - private static final int RECRUIT = 18635; - private static final int FOOTMAN = 18636; - private static final int WARRIOR = 18642; - private static final int OFFICER = 18646; - private static final int GREAT_MAGUS = 18649; - private static final int GENERAL = 18650; - private static final int ELITE_GUARD = 18653; - private static final int COMMANDER = 18654; - private static final int HEAD_GUARD = 18655; - private static final int PROPHET_GUARD = 18657; - private static final int PROPHET = 18659; - private static final int SHAMAN = 18640; - private static final int CHIEF_PRIEST = 18648; - private static final int GRAND_PRIEST = 18652; + private static final int KETRA_ORC_SHAMAN = 32499; + private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; + private static final int KETRA_ORC_SUPPORTER = 32512; private static final int LATANA = 18660; - private static final int ANTELOPE1 = 18637; - private static final int ANTELOPE2 = 18643; - private static final int ANTELOPE3 = 18651; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Walls - private static final HashMap ZONES_TELEPORTS = new HashMap<>(); - static + private static final int DRAGON_CAMERA_1 = 18603; + private static final int DRAGON_CAMERA_2 = 18604; + private static final int DRAGON_TARGET = 18605; + private static final int LATANA_SKILL_USE = 18661; + private static final int TELEPORT_TRAP = 18663; + //@formatter:off + private static final int[] WARRIORS = { - ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981)); - ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641)); - ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636)); - ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544)); - ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707)); - ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265)); - ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380)); - ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271)); - ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001)); - } - // Skill - private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1); + 18635, 18636, 18638, + 18642, 18646, 18649, + 18650, 18653, 18654, + 18655, 18657, + }; + private static final int[] WIZARDS = + { + 18639, 18640, 18641, + 18644, 18645, 18648, + 18652, 18656, 18658, + 18659, + }; + private static final int[] ANIMALS = + { + 18637, 18643, + 18647, 18651, + }; + // Skills + private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3); + private static final SkillHolder HEAL = new SkillHolder(4065, 7); + private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1); + private static final SkillHolder STUN = new SkillHolder(5716, 1); + private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1); + private static final SkillHolder ANGER = new SkillHolder(5719, 1); + private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1); + private static final int[] REJECTED_SKILLS = + { + 28, 680, 51, + 511, 15, 254, + 1069, 1097, 1042, + 1072, 1170, 352, + 358, 1394, 695, + 115, 1083, 1160, + 1164, 1201, 1206, + 1222, 1223, 1224, + 1092, 65, 106, + 122, 127, 1049, + 1064, 1071, 1074, + 1169, 1263, 1269, + 352, 353, 1336, + 1337, 1338, 1358, + 1359, 402, 403, + 412, 1386, 1394, + 1396, 485, 501, + 1445, 1446, 1447, + 522, 531, 1481, + 1482, 1483, 1484, + 1485, 1486, 695, + 696, 716, 775, + 1511, 792, 1524, + 1529, + }; + //@formatter:on + // Items + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; // Misc private static final int TEMPLATE_ID = 45; public PailakaInjuredDragon() { super(TEMPLATE_ID); - addInstanceEnterId(TEMPLATE_ID); - addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA); - addSpawnId(LATANA); - addAggroRangeEnterId(LATANA); - addEnterZoneId(ZONES_TELEPORTS.keySet()); - addInstanceCreatedId(TEMPLATE_ID); + addStartNpc(KETRA_ORC_SHAMAN); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER); + addAttackId(WARRIORS); + addAttackId(WIZARDS); + addAttackId(LATANA); + addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2); + addSpawnId(WIZARDS); + setCreatureSeeId(this::onCreatureSee, WIZARDS); + setCreatureSeeId(this::onCreatureSee, LATANA); + addKillId(ANIMALS); + addKillId(LATANA); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - switch (event) + String htmltext = null; + final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) { - case "enter": + switch (event) { - enterInstance(player, npc, TEMPLATE_ID); - break; - } - case "camera_start": - { - specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0); - break; // TODO: Need retail values - } - case "camera_end": - { - specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0); - break; // TODO: Need retail values - } - } - return super.onAdvEvent(event, npc, player); - } - - @Override - protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter) - { - super.onEnter(player, instance, firstEnter); - if (firstEnter) - { - final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); - if ((qs != null) && qs.isCond(1)) - { - qs.setCond(2, true); - showHtmlFile(player, "32499-09.html"); - } - } - } - - @Override - public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon) - { - if (npc.isScriptValue(0)) - { - npc.setScriptValue(1); - startQuestTimer("camera_start", 300, npc, player); - npc.doCast(LATANA_PRESENTATION_SKILL.getSkill()); - } - return super.onAggroRangeEnter(npc, player, isSummon); - } - - @Override - public void onInstanceCreated(Instance instance, L2PcInstance player) - { - for (int i = 0; i < 9; i++) - { - final int zoneId = 200000 + (i + 1); - final List npcs = instance.spawnGroup("wall_" + zoneId); - npcs.forEach(k -> k.setScriptValue(zoneId)); - instance.getParameters().set("wall_" + zoneId, npcs.size()); - } - - super.onInstanceCreated(instance, player); - } - - @Override - public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) - { - final int npcId = npc.getId(); - if (npcId == LATANA) - { - startQuestTimer("camera_end", 1000, npc, killer); - addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId()); - } - else - { - switch (getRandom(1, 3)) - { - case 1: + case "enterInstance": { - npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8)); + enterInstance(player, npc, TEMPLATE_ID); + qs.setCond(2, true); + htmltext = "32499-01.html"; break; } - case 2: + case "reEnterInstance": { - npc.dropItem(killer, HEAL_POTION, getRandom(1, 4)); + enterInstance(player, npc, TEMPLATE_ID); + htmltext = "32499-02.html"; + break; + } + case "exitInstance": + { + finishInstance(player, 0); break; } } - - if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST)) + } + return htmltext; + } + + @Override + public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (event) { - final Instance world = npc.getInstanceWorld(); - final int zoneId = npc.getScriptValue(); - int killcount = world.getParameters().getInt("wall_" + zoneId); - killcount--; - world.setParameter("wall_" + zoneId, killcount); - - if (killcount <= 0) + case "SET_VISIBLE": { - world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll); - world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll); - } - else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false)) - { - world.setParameter("wall_" + zoneId + "_add", true); - world.spawnGroup("wall_" + zoneId + "_add").forEach(mage -> + if (!npc.getVariables().getBoolean("visible", false)) { - mage.setTarget(killer); - mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer); + npc.setInvisible(false); + npc.getVariables().set("visible", true); + getTimers().addTimer("CAST_SKILL", 5000, npc, player); + } + break; + } + case "CAST_SKILL": + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, player, holder, 500000); + } + getTimers().addTimer("CAST_SKILL", 10000, npc, player); + break; + } + case "LOOK_NEIGHBOR": + { + L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs -> + { + if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10)) + { + addSkillCastDesire(npc, npcs, HEAL, 1000000); + } }); + getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null); + break; + } + case "CHECK_FOR_DROP": + { + if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty()) + { + final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class); + if (zone != null) + { + zone.setEnabled(false, world.getId()); + } + npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1); + npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1); + switch (npc.getParameters().getInt("GM_ID", 0)) + { + case 2316001: + case 2316002: + case 2316003: + { + if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + case 2316007: + case 2316008: + { + if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + } + npc.deleteMe(); + } + else + { + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + } + break; + } + case "SCE_RATANA_CAMERA_START_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_4": + { + npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_5": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_6": + { + npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_7": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player); + break; + } + case "SUICIDE_DRAGON": + { + npc.deleteMe(); + break; + } + case "LATANA_ANGER_RESET": + { + npc.setScriptValue(0); + break; + } + case "SPAWN_DRAGON_TARGET": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "SOCIAL_ACTION": + { + npc.broadcastSocialAction(0); + getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player); + break; + } + case "DISPLAY_SKILL": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000); + } + getTimers().addTimer("LATANA_CAST", 9700, npc, player); + break; + } + case "LATANA_CAST": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, STUN, 5000); + } + getTimers().addTimer("ATTACK", 11030, npc, player); + break; + } + case "ATTACK": + { + if (npc.calculateDistance(player, false, false) < 100) + { + if (getRandom(100) < 30) + { + addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000); + } + else + { + addAttackDesire(npc, player); + } + } + else if (getRandomBoolean()) + { + addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId()); + } + else + { + addSkillCastDesire(npc, player, FIRE_BREATH, 500000); + } + getTimers().addTimer("ATTACK", 6000, npc, player); + break; + } + case "SPAWN_DRAGON_TARGET2": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "LATANA_ATTACK": + { + addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000); + getTimers().addTimer("LATANA_CAST", 3000, npc, player); + break; + } + case "SPAWN_REWARD_NPC": + { + addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId()); + npc.deleteMe(); + break; + } + case "DRAGON_CAMERA_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0)); + getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null); + break; + } + case "DRAGON_CAMERA_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0)); + getTimers().addTimer("SUICIDE", 10000, npc, null); + break; } } } - return super.onKill(npc, killer, isSummon); } @Override public String onSpawn(L2Npc npc) { - npc.setIsImmobilized(true); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (npc.getId()) + { + case TELEPORT_TRAP: + { + world.getParameters().set(npc.getParameters().getString("GM_ID"), 1); + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + break; + } + case DRAGON_TARGET: + { + getTimers().addTimer("SUICIDE", 60000, npc, null); + break; + } + case LATANA_SKILL_USE: + { + final L2Npc latana = world.getNpc(LATANA); + final L2PcInstance player = world.getFirstPlayer(); + if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900)) + { + addSkillCastDesire(npc, player, STUN, 500000); + } + getTimers().addTimer("SUICIDE", 5000, npc, null); + break; + } + case DRAGON_CAMERA_2: + { + npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1)); + getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null); + break; + } + default: + { + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + npc.setInvisible(true); + getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null); + } + npc.initSeenCreatures(); + } + } + } return super.onSpawn(npc); } - @Override - public String onEnterZone(L2Character character, L2ZoneType zone) + private void onCreatureSee(OnCreatureSee event) { - if (!character.isPlayer() || (character.getInstanceId() == 0)) + final L2Character creature = event.getSeen(); + final L2Npc npc = (L2Npc) event.getSeer(); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - return super.onEnterZone(character, zone); + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + if (creature.isPlayer() && npc.isScriptValue(0)) + { + npc.setScriptValue(1); + getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer()); + } + } + else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer()) + { + final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer()); + npc.setScriptValue(1); + } + else + { + playSound(creature.getActingPlayer(), QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer()); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer()); + npc.getVariables().set("creatureSeen", true); + } + } + + } } - - final Instance world = character.getInstanceWorld(); - if (world.getParameters().getInt("wall_" + zone.getId()) > 0) + } + + @Override + public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - character.teleToLocation(ZONES_TELEPORTS.get(zone.getId())); + if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId())) + { + final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1); + if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId()))) + { + if (npc.calculateDistance(attacker, false, false) > 150) + { + if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate)) + { + addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000); + } + } + else + { + npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL); + } + } + if (CommonUtil.contains(WARRIORS, npc.getId())) + { + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + } + else if ((npc.getId() == LATANA)) + { + if (!npc.getVariables().getBoolean("creatureSeen", false)) + { + final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker); + npc.setScriptValue(1); + } + else + { + playSound(attacker, QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker); + npc.getVariables().set("creatureSeen", true); + } + } + } + + if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0)) + { + addSkillCastDesire(npc, npc, ANGER, 50000000); + npc.setScriptValue(1); + getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker); + } + } } - - return super.onEnterZone(character, zone); + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + // @formatter:off + @RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL) + @RegisterType(ListenerRegisterType.NPC) + @Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657}) + // @formatter:on + public void onAttackableFactionCall(OnAttackableFactionCall event) + { + final L2Npc npc = event.getNpc(); + final L2PcInstance attacker = event.getAttacker(); + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + if (CommonUtil.contains(ANIMALS, npc.getId())) + { + npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1); + } + else if (npc.getId() == LATANA) + { + addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId()); + addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId()); + } + } + return super.onKill(npc, killer, isSummon); } public static void main(String[] args) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..edce7961ea --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html @@ -0,0 +1,5 @@ +Ketra Orc Shaman:
+I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.
+He summons us to return him to his rightful place of glory, but...
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html new file mode 100644 index 0000000000..b2a09cdee0 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...
+(Only characters level 77 or below may undertake this quest.) \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html new file mode 100644 index 0000000000..cfe8d7c95c --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html @@ -0,0 +1,6 @@ +Ketra Orc Shaman:
+The Ketra believe we are children of the Fire Spirit.
+We worship the Red Dragon, who wields the strongest fire in all Goddard.
+Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html new file mode 100644 index 0000000000..5edd1281dc --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+It is a darkness without shape or substance.
+It came from across the sea, and now spreads its black shadow over our land as well.
+The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!
+We must summon all our strength to defeat the darkness!
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html new file mode 100644 index 0000000000..429909ab5e --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html @@ -0,0 +1,8 @@ +Ketra Orc Shaman:
+Warrior, I ask for your aid!
+We are of Ketra descent, so we cannot enter the Shadow of Darkness.
+But I believe that an adventurer like you can enter and remove this foul curse from us.
+Will you do it?
+(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html new file mode 100644 index 0000000000..ca055cf23b --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.
+They will help you.
+When you are prepared, I will send you to the Shadow World, Pailaka!
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html new file mode 100644 index 0000000000..a8afa84a24 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+Warrior, do you wish to enter the Shadow World, Pailaka?
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html index 8b6e98c940..c3567a11e9 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html @@ -1,4 +1,4 @@ Ketra Orc Shaman:
The darkness still exists! Will you enter Pailaka again?
- + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html index 96342171ff..06e78f427f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html @@ -1,3 +1,3 @@ Ketra Orc Shaman:
-I have faith that you will remove the dark shadow which hides our Great Flame! +Very well, I shall wait here until you are ready. \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html new file mode 100644 index 0000000000..db773f938b --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html @@ -0,0 +1,4 @@ +Ketra Orc Supporter:
+Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this Spear of Silenos, which we captured from our enemy. Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html index bd64070189..ff0ce54146 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html @@ -1,9 +1,9 @@ -Ketra Orc Intelligence Officer:
+Ketra Orc Intelligence Officer:
Dejakar Oroka!
You hold the Spear of Silenos! Your coming was foretold.
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!
- + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html index bde2867c90..0a8f57be50 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-You still need an Enchant Scroll. Acquire one by slaying more Silenos! +This spear has already been enhanced to its full potential. It is stronger than any other power in this place! \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html index 0a8f57be50..bde2867c90 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-This spear has already been enhanced to its full potential. It is stronger than any other power in this place! +You still need an Enchant Scroll. Acquire one by slaying more Silenos! \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html index 9a10cf5470..439b00cff0 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html @@ -1,3 +1,16 @@ Ketra Orc Intelligence Officer:
-The fifth and final enhancement is complete! +We possess several types of enhancement magic. I can grant you at most 5 spells.
+Select them from the list below:
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html index ebfcb44c6d..9a10cf5470 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html @@ -1,15 +1,3 @@ Ketra Orc Intelligence Officer:
-Please select the next spell you wish to receive.
- - - - - - - - - - - - +The fifth and final enhancement is complete! \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html index a63f31ad32..485a51c7cb 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html @@ -1,16 +1,15 @@ Ketra Orc Intelligence Officer:
-We possess several types of enhancement magic. I can grant you at most 5 spells.
-Select them from the list below:
- - - - - - - - - - - - +Please select the next spell you wish to receive.
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html index 4e03ffb61f..8498d30f5a 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html @@ -1,4 +1,6 @@ Ketra Orc Supporter:
-Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.
- +Dejakar Oroka!
+Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.
+Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.
+ \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html index af9607b574..4046d77b7f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html @@ -1,6 +1,5 @@ Ketra Orc Supporter:
-You have done it!
-You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!
-Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...
-Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. - +What happened here has not affected your world, but it may help you in the future...
+Now you must return to where you belong.
+Use the Scroll of Escape to leave Pailaka and return to your world! + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html index 1ee6d7027f..56f82938b2 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html @@ -1,3 +1,6 @@ Ketra Orc Supporter:
-Use the Scroll of Escape that I gave you to return to your world. - +You have done it!
+You have lifted the curse! I no longer feel the taint of darkness upon our Altar of Fire!
+Warrior, I wish you could stay here with us, but our shaman decrees that you must leave...
+Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java index 4cd38419a1..38ef374e42 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java @@ -16,43 +16,39 @@ */ package quests.Q00144_PailakaInjuredDragon; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.State; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** - * @author Mathael + * @author Sdw */ public class Q00144_PailakaInjuredDragon extends Quest { // NPCs private static final int KETRA_ORC_SHAMAN = 32499; private static final int KETRA_ORC_SUPPORTER = 32502; - private static final int KETRA_ORC_SUPPORTER_END = 32512; private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; - // Monsters + private static final int KETRA_ORC_SUPPORTER_2 = 32512; private static final int LATANA = 18660; - private static final int[] MONSTERS = - { - 18635, - 18636, - 18642, - 18646, - 18649, - 18650, - 18653, - 18654, - 18655, - 18657, - 18659 - }; - // Buffs + // Items + private static final int SPEAR_OF_SILENOS = 13052; + private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; + private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int SCROLL_OF_ESCAPE = 736; + private static final ItemHolder PAILAKA_SHIRT = new ItemHolder(13296, 1); + // Skills private static final SkillHolder[] BUFFS = { new SkillHolder(1086, 2), @@ -68,61 +64,56 @@ public class Q00144_PailakaInjuredDragon extends Quest new SkillHolder(1268, 4), new SkillHolder(1045, 6), }; - // Quest Items - private static final int SPEAR_OF_SILENOS = 13052; - private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; - private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; - private static final int WEAPON_UPGRADE_STAGE_1 = 13056; - private static final int WEAPON_UPGRADE_STAGE_2 = 13057; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Rewards - private static final long REWARD_EXP = 24570000; - private static final int REWARD_SP = 5896; - private static final int REWARD_PAILAKA_SHIRT = 13296; - private static final int REWARD_ADENA = 798840; - private static final int SCROLL_OF_ESCAPE = 736; // Misc private static final int MIN_LEVEL = 73; private static final int MAX_LEVEL = 77; - private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false; - private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false; - private int BUFF_COUNT = 0; public Q00144_PailakaInjuredDragon() { super(144); addStartNpc(KETRA_ORC_SHAMAN); - addFirstTalkId(KETRA_ORC_SUPPORTER_END); - addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END); + addFirstTalkId(KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_2); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER); addKillId(LATANA); - addKillId(MONSTERS); addCondMinLevel(MIN_LEVEL, "32499-03.html"); - addCondMaxLevel(MAX_LEVEL, "32499-04z.html"); - registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION); + addCondMinLevel(MAX_LEVEL, "32499-04.html"); + registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, PAILAKA_INSTANT_SHIELD, QUICK_HEALING_POTION); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (npc.getId() == KETRA_ORC_INTELLIGENCE_OFFICIER) + { + return "32509-01.html"; + } + else if (npc.getId() == KETRA_ORC_SUPPORTER_2) + { + final QuestState qs = getQuestState(player, false); + if (qs != null) + { + return qs.isCompleted() ? "32512-02.html" : "32512-01.html"; + } + } + return null; } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = getNoQuestMsg(player); final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } - final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event; - switch (request) + String htmltext = null; + switch (event) { - case "32499-04.htm": - case "32499-05.htm": - case "32499-06.htm": - case "32499-08a.html": - case "32499-08.htm": - case "32499-09.htm": - case "32502-01.html": + case "32499-05.html": + case "32499-06.html": + case "32499-07.html": + case "32499-11.html": case "32502-02.html": case "32502-03.html": case "32502-04.html": @@ -131,73 +122,54 @@ public class Q00144_PailakaInjuredDragon extends Quest htmltext = event; break; } - case "32499-07.htm": - { - qs.startQuest(); - htmltext = event; - break; - } case "32502-05.html": { if (qs.isCond(2)) { qs.setCond(3, true); - giveItems(player, SPEAR_OF_SILENOS, 1, true); + giveItems(player, SPEAR_OF_SILENOS, 1); htmltext = event; } break; } - case "32512-02.html": + case "32499-08.html": { - final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); - if ((inst != null) && qs.isCond(4)) - { - takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1); - rewardItems(player, 57, REWARD_ADENA); - rewardItems(player, REWARD_PAILAKA_SHIRT, 1); - addExpAndSp(player, REWARD_EXP, REWARD_SP); - giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. - qs.exitQuest(false, true); - inst.finishInstance(); - htmltext = event; - } + qs.startQuest(); + htmltext = event; break; } case "upgrade_weapon": { - if (qs.isCond(3) || qs.isCond(4)) + if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) { - if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) + htmltext = "32509-06.html"; + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) { - htmltext = "32509-06.html"; + takeItems(player, SPEAR_OF_SILENOS, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); + giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); + htmltext = "32509-02.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + else { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) - { - takeItems(player, SPEAR_OF_SILENOS, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); - giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); - htmltext = "32509-02.html"; - } - else - { - htmltext = "32509-04.html"; - } + htmltext = "32509-05.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) - { - takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); - giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); - htmltext = "32509-08.html"; - } - else - { - htmltext = "32509-04.html"; - } + takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); + giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); + htmltext = "32509-08.html"; + } + else + { + htmltext = "32509-04.html"; } } else @@ -206,141 +178,125 @@ public class Q00144_PailakaInjuredDragon extends Quest } break; } - case "enhancement_page": + case "ask_buff": { - htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html"; + htmltext = npc.isScriptValue(1) ? "32509-07.html" : "32509-08.html"; break; } - case "enhancement": + case "32512-03.html": { - if (BUFF_COUNT < 5) + if (qs.isCond(4)) { - final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1; - SkillCaster.triggerCast(npc, player, BUFFS[key].getSkill()); - BUFF_COUNT++; - if (BUFF_COUNT < 5) + if (player.getLevel() >= MIN_LEVEL) { - htmltext = "32509-09.html"; + addExpAndSp(player, 24570000, 5896); + giveAdena(player, 798840, true); + giveItems(player, PAILAKA_SHIRT); + giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. + qs.exitQuest(false, true); + htmltext = event; } else { - htmltext = "32509-08.html"; + htmltext = getNoQuestLevelRewardMsg(player); + } + final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); + if (inst != null) + { + inst.finishInstance(); + } + } + break; + } + } + if (event.startsWith("buff")) + { + if (npc.isScriptValue(0)) + { + final int currentBuffCount = npc.getVariables().getInt("buff_count"); + if (currentBuffCount < 5) + { + final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, BUFFS.length); + npc.setTarget(player); + npc.doCast(BUFFS[buffOffset].getSkill()); + npc.getVariables().set("buff_count", currentBuffCount + 1); + htmltext = "32509-10.html"; + if ((currentBuffCount + 1) >= 5) + { + htmltext = "32509-09.html"; + npc.setScriptValue(1); } } else { htmltext = "32509-07.html"; + npc.setScriptValue(1); } - break; } } - return htmltext; + } @Override - public String onTalk(L2Npc npc, L2PcInstance talker) + public String onTalk(L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(talker, true); - String htmltext = getNoQuestMsg(talker); + final QuestState qs = getQuestState(player, true); + String htmltext = null; - switch (npc.getId()) + switch (qs.getState()) { - case KETRA_ORC_SHAMAN: + case State.CREATED: { - switch (qs.getState()) + if (npc.getId() == KETRA_ORC_SHAMAN) { - case State.CREATED: + htmltext = "32499-01.html"; + } + break; + } + case State.STARTED: + { + if (npc.getId() == KETRA_ORC_SHAMAN) + { + if (qs.isCond(1)) { - htmltext = "32499-01.htm"; - break; + htmltext = "32499-09.html"; } - case State.COMPLETED: - { - htmltext = "32499-02.html"; - break; - } - case State.STARTED: + else { htmltext = "32499-10.html"; - break; } } - break; - } - case KETRA_ORC_SUPPORTER: - { - switch (qs.getCond()) + else if (npc.getId() == KETRA_ORC_SUPPORTER) { - case 3: - { - htmltext = "32502-07.html"; - break; - } - case 4: - { - htmltext = "32502-06.html"; - break; - } - default: + if (qs.isCond(2)) { htmltext = "32502-01.html"; - break; + } + else + { + htmltext = "32502-06.html"; } } break; } - case KETRA_ORC_INTELLIGENCE_OFFICIER: + case State.COMPLETED: { - htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html"; + htmltext = "32499-02.html"; break; } - case KETRA_ORC_SUPPORTER_END: - { - htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html"; - } } + return htmltext; } - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - final QuestState qs = getQuestState(player, false); - if (qs == null) - { - return getNoQuestMsg(player); - } - return qs.getState() == State.COMPLETED ? "32512-03.html" : "32512-01.html"; - } - @Override public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { - final int npcId = npc.getId(); - if (npcId != LATANA) + final QuestState qs = getQuestState(killer, false); + if (qs != null) { - if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS)) - { - if (getRandom(1, 6) > 2) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true); - WEAPON_UPGRADE_STAGE_1_DROPED = true; - } - } - if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED)) - { - if (getRandom(1, 6) > 4) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true); - WEAPON_UPGRADE_STAGE_2_DROPED = true; - } - } - } - else - { - final QuestState qs = getQuestState(killer, false); - if (qs != null) + if (qs.isCond(3) && (npc.calculateDistance(killer, false, false) <= 1500)) { qs.setCond(4, true); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/xsd/zones.xsd b/L2J_Mobius_3.0_Helios/dist/game/data/xsd/zones.xsd index 0096877cfa..4d485a70fe 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/xsd/zones.xsd +++ b/L2J_Mobius_3.0_Helios/dist/game/data/xsd/zones.xsd @@ -68,6 +68,26 @@
+ + + + + + + + + + + + + + + + + + + + @@ -101,7 +121,7 @@ - + @@ -151,6 +171,7 @@ + diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_3.0_Helios/dist/game/data/zones/teleportzones.xml new file mode 100644 index 0000000000..243abe1a42 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/zones/teleportzones.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 87321a430e..5a0cf8db97 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.OptionalInt; import java.util.logging.Level; import java.util.logging.Logger; @@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader return null; } + /** + * Get zone by name. + * @param name the zone name + * @return the zone by name + */ + public L2ZoneType getZoneByName(String name) + { + for (Map map : _classZones.values()) + { + final Optional zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zoneType.isPresent()) + { + return zoneType.get(); + } + } + return null; + } + /** * Get zone by ID and zone class. * @param the generic type @@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader return (T) _classZones.get(zoneType).get(id); } + /** + * Get zone by name. + * @param the generic type + * @param name the zone name + * @param zoneType the zone type + * @return + */ + @SuppressWarnings("unchecked") + public T getZoneByName(String name, Class zoneType) + { + final Optional zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zone.isPresent()) + { + return (T) zone.get(); + } + return null; + } + /** * Returns all zones from where the object is located. * @param locational the locational diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java index 3138b311ae..3beea85891 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java @@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher; import com.l2jmobius.gameserver.model.events.ListenersContainer; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit; +import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; @@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer private final int _id; protected L2ZoneForm _zone; + protected List _blockedZone; protected Map _characterList = new ConcurrentHashMap<>(); /** Parameters to affect specific characters */ @@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer private boolean _allowStore; protected boolean _enabled; private AbstractZoneSettings _settings; + private int _instanceTemplateId; + private Map _enabledInInstance; protected L2ZoneType(int id) { @@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer { _enabled = Boolean.parseBoolean(value); } + else if (name.equals("instanceId")) + { + _instanceTemplateId = Integer.parseInt(value); + } else { _log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId()); @@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer */ private boolean isAffected(L2Character character) { + // Check instance + final Instance world = character.getInstanceWorld(); + if (world != null) + { + if (world.getTemplateId() != getInstanceTemplateId()) + { + return false; + } + if (!isEnabled(character.getInstanceId())) + { + return false; + } + } + else if (getInstanceTemplateId() > 0) + { + return false; + } + // Check lvl if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl)) { @@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer return _zone; } + public void setBlockedZones(List blockedZones) + { + if (_blockedZone != null) + { + throw new IllegalStateException("Blocked zone already set"); + } + _blockedZone = blockedZones; + } + + public List getBlockedZones() + { + return _blockedZone; + } + /** * Set the zone name. * @param name @@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer return _name; } + /** + * Checks if the given coordinates are within the zone, ignores instanceId check + * @param x + * @param y + * @param z + * @return + */ + public boolean isInsideZone(int x, int y, int z) + { + return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z); + } + + /** + * @param x + * @param y + * @param z + * @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise + */ + public boolean isInsideBannedZone(int x, int y, int z) + { + return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z)); + } + /** * Checks if the given coordinates are within zone's plane * @param x @@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(int x, int y) { - return _zone.isInsideZone(x, y, _zone.getHighZ()); + return isInsideZone(x, y, _zone.getHighZ()); } /** @@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(ILocational loc) { - return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ()); - } - - /** - * Checks if the given coordinates are within the zone, ignores instanceId check - * @param x - * @param y - * @param z - * @return - */ - public boolean isInsideZone(int x, int y, int z) - { - return _zone.isInsideZone(x, y, z); + return isInsideZone(loc.getX(), loc.getY(), loc.getZ()); } /** @@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer public void revalidateInZone(L2Character character) { - // If the character can't be affected by this zone return - if (_checkAffected) - { - if (!isAffected(character)) - { - return; - } - } - // If the object is inside the zone... if (isInsideZone(character)) { - // Was the character not yet inside this zone? - if (!_characterList.containsKey(character.getObjectId())) + // If the character can't be affected by this zone return + if (_checkAffected) + { + if (!isAffected(character)) + { + return; + } + } + + if (_characterList.putIfAbsent(character.getObjectId(), character) == null) { // Notify to scripts. EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this); - - // Register player. - _characterList.put(character.getObjectId(), character); - // Notify Zone implementation. onEnter(character); } @@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer return _allowStore; } + public int getInstanceTemplateId() + { + return _instanceTemplateId; + } + @Override public String toString() { @@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer return _enabled; } + public void setEnabled(boolean state, int instanceId) + { + if (_enabledInInstance == null) + { + synchronized (this) + { + if (_enabledInInstance == null) + { + _enabledInInstance = new ConcurrentHashMap<>(); + } + } + } + + _enabledInInstance.put(instanceId, state); + } + + public boolean isEnabled(int instanceId) + { + if (_enabledInInstance != null) + { + return _enabledInInstance.getOrDefault(instanceId, isEnabled()); + } + + return isEnabled(); + } + public void oustAllPlayers() { //@formatter:off diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java index 55f2f70d6b..94b5594d11 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java @@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn private final List _doors = new ArrayList<>(2); private final List _buffers = new ArrayList<>(2); private final List _spectatorLocations = new ArrayList<>(1); - private int _instanceTemplate = 0; public L2OlympiadStadiumZone(int id) { @@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn } } - @Override - public void setParameter(String name, String value) - { - if (name.equals("instanceTemplate")) - { - _instanceTemplate = Integer.parseInt(value); - } - else - { - super.setParameter(name, value); - } - } - public final void registerTask(OlympiadGameTask task) { getSettings().setTask(task); @@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn { return _spectatorLocations; } - - /** - * Returns zone instanceTemplate - * @return - */ - public int getInstanceTemplateId() - { - return _instanceTemplate; - } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java new file mode 100644 index 0000000000..4293f06b14 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java @@ -0,0 +1,74 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.model.zone.type; + +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.zone.L2ZoneType; + +/** + * @author Sdw + */ +public class L2TeleportZone extends L2ZoneType +{ + private int _x = -1; + private int _y = -1; + private int _z = -1; + + public L2TeleportZone(int id) + { + super(id); + } + + @Override + public void setParameter(String name, String value) + { + switch (name) + { + case "oustX": + { + _x = Integer.parseInt(value); + break; + } + case "oustY": + { + _y = Integer.parseInt(value); + break; + } + case "oustZ": + { + _z = Integer.parseInt(value); + break; + } + default: + { + super.setParameter(name, value); + } + } + } + + @Override + protected void onEnter(L2Character character) + { + character.teleToLocation(new Location(_x, _y, _z)); + } + + @Override + protected void onExit(L2Character character) + { + } +} \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml index 9fdb71ba8d..191e977a9f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml @@ -1,129 +1,524 @@ - + + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html index 2290c9073b..d65b5e7143 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html @@ -1,4 +1,4 @@ [Desk]:
-You've found The War of Gods and Giants. -Found It! +The War of Gods and Giants... +Found it! \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..896afc1a23 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-01.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html new file mode 100644 index 0000000000..6a5d8e03ff --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-02.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+I have faith that you will remove the dark shadow which hides our Great Flame! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java index a16ac0cb96..8303a5d872 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java @@ -16,221 +16,616 @@ */ package instances.PailakaInjuredDragon; -import java.util.HashMap; -import java.util.List; - -import com.l2jmobius.gameserver.ai.CtrlIntention; -import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.commons.util.CommonUtil; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.instancemanager.ZoneManager; +import com.l2jmobius.gameserver.model.L2World; +import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; +import com.l2jmobius.gameserver.model.events.ListenerRegisterType; +import com.l2jmobius.gameserver.model.events.annotations.Id; +import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; +import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.QuestState; -import com.l2jmobius.gameserver.model.spawns.SpawnGroup; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone; +import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera; import instances.AbstractInstance; import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon; /** - * @author Mathael + * Pailaka (Varka Silenos Barracks) Instance zone. + * @author Sdw */ -public class PailakaInjuredDragon extends AbstractInstance +public final class PailakaInjuredDragon extends AbstractInstance { // NPCs - private static final int KETRA_ORC_SUPPORTER_END = 32512; - // Monsters - private static final int RECRUIT = 18635; - private static final int FOOTMAN = 18636; - private static final int WARRIOR = 18642; - private static final int OFFICER = 18646; - private static final int GREAT_MAGUS = 18649; - private static final int GENERAL = 18650; - private static final int ELITE_GUARD = 18653; - private static final int COMMANDER = 18654; - private static final int HEAD_GUARD = 18655; - private static final int PROPHET_GUARD = 18657; - private static final int PROPHET = 18659; - private static final int SHAMAN = 18640; - private static final int CHIEF_PRIEST = 18648; - private static final int GRAND_PRIEST = 18652; + private static final int KETRA_ORC_SHAMAN = 32499; + private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; + private static final int KETRA_ORC_SUPPORTER = 32512; private static final int LATANA = 18660; - private static final int ANTELOPE1 = 18637; - private static final int ANTELOPE2 = 18643; - private static final int ANTELOPE3 = 18651; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Walls - private static final HashMap ZONES_TELEPORTS = new HashMap<>(); - static + private static final int DRAGON_CAMERA_1 = 18603; + private static final int DRAGON_CAMERA_2 = 18604; + private static final int DRAGON_TARGET = 18605; + private static final int LATANA_SKILL_USE = 18661; + private static final int TELEPORT_TRAP = 18663; + //@formatter:off + private static final int[] WARRIORS = { - ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981)); - ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641)); - ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636)); - ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544)); - ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707)); - ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265)); - ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380)); - ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271)); - ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001)); - } - // Skill - private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1); + 18635, 18636, 18638, + 18642, 18646, 18649, + 18650, 18653, 18654, + 18655, 18657, + }; + private static final int[] WIZARDS = + { + 18639, 18640, 18641, + 18644, 18645, 18648, + 18652, 18656, 18658, + 18659, + }; + private static final int[] ANIMALS = + { + 18637, 18643, + 18647, 18651, + }; + // Skills + private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3); + private static final SkillHolder HEAL = new SkillHolder(4065, 7); + private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1); + private static final SkillHolder STUN = new SkillHolder(5716, 1); + private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1); + private static final SkillHolder ANGER = new SkillHolder(5719, 1); + private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1); + private static final int[] REJECTED_SKILLS = + { + 28, 680, 51, + 511, 15, 254, + 1069, 1097, 1042, + 1072, 1170, 352, + 358, 1394, 695, + 115, 1083, 1160, + 1164, 1201, 1206, + 1222, 1223, 1224, + 1092, 65, 106, + 122, 127, 1049, + 1064, 1071, 1074, + 1169, 1263, 1269, + 352, 353, 1336, + 1337, 1338, 1358, + 1359, 402, 403, + 412, 1386, 1394, + 1396, 485, 501, + 1445, 1446, 1447, + 522, 531, 1481, + 1482, 1483, 1484, + 1485, 1486, 695, + 696, 716, 775, + 1511, 792, 1524, + 1529, + }; + //@formatter:on + // Items + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; // Misc private static final int TEMPLATE_ID = 45; public PailakaInjuredDragon() { super(TEMPLATE_ID); - addInstanceEnterId(TEMPLATE_ID); - addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA); - addSpawnId(LATANA); - addAggroRangeEnterId(LATANA); - addEnterZoneId(ZONES_TELEPORTS.keySet()); - addInstanceCreatedId(TEMPLATE_ID); + addStartNpc(KETRA_ORC_SHAMAN); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER); + addAttackId(WARRIORS); + addAttackId(WIZARDS); + addAttackId(LATANA); + addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2); + addSpawnId(WIZARDS); + setCreatureSeeId(this::onCreatureSee, WIZARDS); + setCreatureSeeId(this::onCreatureSee, LATANA); + addKillId(ANIMALS); + addKillId(LATANA); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - switch (event) + String htmltext = null; + final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) { - case "enter": + switch (event) { - enterInstance(player, npc, TEMPLATE_ID); - break; - } - case "camera_start": - { - specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0); - break; // TODO: Need retail values - } - case "camera_end": - { - specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0); - break; // TODO: Need retail values - } - } - return super.onAdvEvent(event, npc, player); - } - - @Override - protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter) - { - super.onEnter(player, instance, firstEnter); - if (firstEnter) - { - final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); - if ((qs != null) && qs.isCond(1)) - { - qs.setCond(2, true); - showHtmlFile(player, "32499-09.html"); - } - } - } - - @Override - public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon) - { - if (npc.isScriptValue(0)) - { - npc.setScriptValue(1); - startQuestTimer("camera_start", 300, npc, player); - npc.doCast(LATANA_PRESENTATION_SKILL.getSkill()); - } - return super.onAggroRangeEnter(npc, player, isSummon); - } - - @Override - public void onInstanceCreated(Instance instance, L2PcInstance player) - { - for (int i = 0; i < 9; i++) - { - final int zoneId = 200000 + (i + 1); - final List npcs = instance.spawnGroup("wall_" + zoneId); - npcs.forEach(k -> k.setScriptValue(zoneId)); - instance.getParameters().set("wall_" + zoneId, npcs.size()); - } - - super.onInstanceCreated(instance, player); - } - - @Override - public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) - { - final int npcId = npc.getId(); - if (npcId == LATANA) - { - startQuestTimer("camera_end", 1000, npc, killer); - addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId()); - } - else - { - switch (getRandom(1, 3)) - { - case 1: + case "enterInstance": { - npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8)); + enterInstance(player, npc, TEMPLATE_ID); + qs.setCond(2, true); + htmltext = "32499-01.html"; break; } - case 2: + case "reEnterInstance": { - npc.dropItem(killer, HEAL_POTION, getRandom(1, 4)); + enterInstance(player, npc, TEMPLATE_ID); + htmltext = "32499-02.html"; + break; + } + case "exitInstance": + { + finishInstance(player, 0); break; } } - - if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST)) + } + return htmltext; + } + + @Override + public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (event) { - final Instance world = npc.getInstanceWorld(); - final int zoneId = npc.getScriptValue(); - int killcount = world.getParameters().getInt("wall_" + zoneId); - killcount--; - world.setParameter("wall_" + zoneId, killcount); - - if (killcount <= 0) + case "SET_VISIBLE": { - world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll); - world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll); - } - else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false)) - { - world.setParameter("wall_" + zoneId + "_add", true); - world.spawnGroup("wall_" + zoneId + "_add").forEach(mage -> + if (!npc.getVariables().getBoolean("visible", false)) { - mage.setTarget(killer); - mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer); + npc.setInvisible(false); + npc.getVariables().set("visible", true); + getTimers().addTimer("CAST_SKILL", 5000, npc, player); + } + break; + } + case "CAST_SKILL": + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, player, holder, 500000); + } + getTimers().addTimer("CAST_SKILL", 10000, npc, player); + break; + } + case "LOOK_NEIGHBOR": + { + L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs -> + { + if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10)) + { + addSkillCastDesire(npc, npcs, HEAL, 1000000); + } }); + getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null); + break; + } + case "CHECK_FOR_DROP": + { + if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty()) + { + final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class); + if (zone != null) + { + zone.setEnabled(false, world.getId()); + } + npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1); + npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1); + switch (npc.getParameters().getInt("GM_ID", 0)) + { + case 2316001: + case 2316002: + case 2316003: + { + if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + case 2316007: + case 2316008: + { + if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1)) + { + giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true); + world.getParameters().set(npc.getParameters().getString("GM_ID"), 0); + } + break; + } + } + npc.deleteMe(); + } + else + { + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + } + break; + } + case "SCE_RATANA_CAMERA_START_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_4": + { + npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_5": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_6": + { + npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_1_7": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0)); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player); + break; + } + case "SCE_RATANA_CAMERA_START_2_3": + { + npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0)); + getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player); + break; + } + case "SUICIDE_DRAGON": + { + npc.deleteMe(); + break; + } + case "LATANA_ANGER_RESET": + { + npc.setScriptValue(0); + break; + } + case "SPAWN_DRAGON_TARGET": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "SOCIAL_ACTION": + { + npc.broadcastSocialAction(0); + getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player); + break; + } + case "DISPLAY_SKILL": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000); + } + getTimers().addTimer("LATANA_CAST", 9700, npc, player); + break; + } + case "LATANA_CAST": + { + final L2Npc target = world.getNpc(DRAGON_TARGET); + if (target != null) + { + addSkillCastDesire(npc, target, STUN, 5000); + } + getTimers().addTimer("ATTACK", 11030, npc, player); + break; + } + case "ATTACK": + { + if (npc.calculateDistance(player, false, false) < 100) + { + if (getRandom(100) < 30) + { + addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000); + } + else + { + addAttackDesire(npc, player); + } + } + else if (getRandomBoolean()) + { + addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId()); + } + else + { + addSkillCastDesire(npc, player, FIRE_BREATH, 500000); + } + getTimers().addTimer("ATTACK", 6000, npc, player); + break; + } + case "SPAWN_DRAGON_TARGET2": + { + addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId()); + getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player); + break; + } + case "LATANA_ATTACK": + { + addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000); + getTimers().addTimer("LATANA_CAST", 3000, npc, player); + break; + } + case "SPAWN_REWARD_NPC": + { + addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId()); + npc.deleteMe(); + break; + } + case "DRAGON_CAMERA_2_1": + { + npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0)); + getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null); + break; + } + case "DRAGON_CAMERA_2_2": + { + npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0)); + getTimers().addTimer("SUICIDE", 10000, npc, null); + break; } } } - return super.onKill(npc, killer, isSummon); } @Override public String onSpawn(L2Npc npc) { - npc.setIsImmobilized(true); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (npc.getId()) + { + case TELEPORT_TRAP: + { + world.getParameters().set(npc.getParameters().getString("GM_ID"), 1); + getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null); + break; + } + case DRAGON_TARGET: + { + getTimers().addTimer("SUICIDE", 60000, npc, null); + break; + } + case LATANA_SKILL_USE: + { + final L2Npc latana = world.getNpc(LATANA); + final L2PcInstance player = world.getFirstPlayer(); + if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900)) + { + addSkillCastDesire(npc, player, STUN, 500000); + } + getTimers().addTimer("SUICIDE", 5000, npc, null); + break; + } + case DRAGON_CAMERA_2: + { + npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1)); + getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null); + break; + } + default: + { + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + npc.setInvisible(true); + getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null); + } + npc.initSeenCreatures(); + } + } + } return super.onSpawn(npc); } - @Override - public String onEnterZone(L2Character character, L2ZoneType zone) + private void onCreatureSee(OnCreatureSee event) { - if (!character.isPlayer() || (character.getInstanceId() == 0)) + final L2Character creature = event.getSeen(); + final L2Npc npc = (L2Npc) event.getSeer(); + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - return super.onEnterZone(character, zone); + if (CommonUtil.contains(WIZARDS, npc.getId())) + { + if (creature.isPlayer() && npc.isScriptValue(0)) + { + npc.setScriptValue(1); + getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer()); + } + } + else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer()) + { + final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer()); + npc.setScriptValue(1); + } + else + { + playSound(creature.getActingPlayer(), QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer()); + getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer()); + npc.getVariables().set("creatureSeen", true); + } + } + + } } - - final Instance world = character.getInstanceWorld(); - if (world.getParameters().getInt("wall_" + zone.getId()) > 0) + } + + @Override + public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) { - character.teleToLocation(ZONES_TELEPORTS.get(zone.getId())); + if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId())) + { + final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1); + if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId()))) + { + if (npc.calculateDistance(attacker, false, false) > 150) + { + if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate)) + { + addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000); + } + } + else + { + npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL); + } + } + if (CommonUtil.contains(WARRIORS, npc.getId())) + { + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + } + else if ((npc.getId() == LATANA)) + { + if (!npc.getVariables().getBoolean("creatureSeen", false)) + { + final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if (qs != null) + { + if (qs.getCond() == 4) + { + getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker); + npc.setScriptValue(1); + } + else + { + playSound(attacker, QuestSound.BS08_A); + getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker); + getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker); + npc.getVariables().set("creatureSeen", true); + } + } + } + + if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0)) + { + addSkillCastDesire(npc, npc, ANGER, 50000000); + npc.setScriptValue(1); + getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker); + } + } } - - return super.onEnterZone(character, zone); + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + // @formatter:off + @RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL) + @RegisterType(ListenerRegisterType.NPC) + @Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657}) + // @formatter:on + public void onAttackableFactionCall(OnAttackableFactionCall event) + { + final L2Npc npc = event.getNpc(); + final L2PcInstance attacker = event.getAttacker(); + if (npc.calculateDistance(attacker, false, false) < 40) + { + addAttackPlayerDesire(npc, attacker, 1000); + } + else if (getRandom(100) < 33) + { + final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID"); + if (holder != null) + { + addSkillCastDesire(npc, attacker, holder, 500000); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + if (CommonUtil.contains(ANIMALS, npc.getId())) + { + npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1); + } + else if (npc.getId() == LATANA) + { + addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId()); + addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId()); + } + } + return super.onKill(npc, killer, isSummon); } public static void main(String[] args) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-01.html index 3c62336a78..31f2d3a458 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-01.html @@ -2,5 +2,5 @@ Are you an Inspector?
Ah! I don't know how long it has been since I saw one who has mastered all the Kamael battle skills and reached the summit of our natural abilities.
Since you've opted to become an Inspector, I suspect you have a healthy curiosity. Good! It will serve you well as you discover more about your new abilities...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-02.html index 0b11483a62..5a34ecf86a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-02.html @@ -1,5 +1,5 @@ Kekropus:
Before speak of that, I must ask you if you already know the origins and purpose of the Kamael.
- - + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-03.html index 0b860a2976..70cf057ff8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-03.html @@ -3,5 +3,5 @@ Ah, then we shall begin.
As you know, the 3 Spiculas -- the 3 Heroes -- were the progenitors of our race, and the reason for our skill in battle.
During the war against the gods, they fought valiantly, even slaying some of the daughters of Einhasad. Though they fell in that war, their power was handed down through magical sword, shield and cannon, eventually becoming the basis for the three current classes of Kamael.
For more than ten thousand years, we have followed the path that they laid out for us...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-04.html index b2761d16d5..ca686f5e53 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-04.html @@ -1,5 +1,6 @@ Kekropus:
-Before the advent of the 3 Heroes, we were created with certain unrealized spiritual potential, but no particular physical or martial abilities. Our creators, the Giants, had little need of protection from ordinary physical threats -- we were an interesting experiment they conducted, little more.
-We did, however, possess a special ability to use the soul as a medium. This is due to the fact that we were created using Mimir's Spring Water and as a result were closer to souls than other beings, not because the Giants intentionally bestowed that skill on us.
- +Hmm, you have advanced this far without learning the truth of our people's origin?
+You have never heard of the 3 Heroes, then.
+All our martial skill is rooted in their tale...
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-05.html index b6d7cc5f2d..372cff5ea5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-05.html @@ -1,4 +1,6 @@ Kekropus:
-Because our natural powers were so weak, we were forced to develop other skills. Over time, and in order to inherit the abilities of the 3 Heroes, we learned the skill of manipulating souls. In doing so, however, we were confronted with a new question: why did we in fact possess this skill when the 3 Heroes did not?
- +Before the new heroes appeared, what were the Kamael?
+Our founders had no interest in combat skills. With their strength, there was no one to threaten them, and when they fought among themselves, they fought for their own amusement. The sealed beings were growing in numbers and organizing, but they could not defeat the giants.
+So the first Kamael had the ability but not the technology. The medium we use currently for souls can be used because we are made of Mimir's Elixir. Because of this we can become more close to a soul. The giants did not give us the technology to be close to souls.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-06.html index 796d26c4ca..eeed1def1b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-06.html @@ -1,5 +1,4 @@ Kekropus:
-Yes. However, Inspectors are not the only ones adept at manipulating soul energy.
-The Kamael Nostra -- a genius born of time and chaos -- was the most skilled of all of us at manipulating soul energy. He realized that the skills of the 3 Heroes were fundamentally incompatible, and that only those who possessed certain predispositions could learn them. Accordingly, he established the skill system we now use, three patterns of development for male and female.
- +Because our natural powers were so weak, we were forced to develop other skills. Over time, and in order to inherit the abilities of the 3 Heroes, we learned the skill of manipulating souls. In doing so, however, we were confronted with a new question: why did we in fact possess this skill when the 3 Heroes did not?
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-07.html index 1cbcf1d0ae..57825fdb18 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-07.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-07.html @@ -1,5 +1,6 @@ Kekropus:
-As I just said, he was a genius produced by time and chaos. He was not a Spicula like myself or the 3 Heroes, but a Metucela Kamael like you...
-No one knows what became of him. Certainly a Metucela Kamael's life span is long by the standards of other races, but even he must be long dead by now.
- +Yes. However, Inspectors are not the only ones adept at manipulating soul energy.
+The Kamael Nostra -- a genius born of time and chaos -- was the most skilled of all of us at manipulating soul energy.
+He realized that the skills of the 3 Heroes were fundamentally incompatible, and that only those who possessed certain predispositions could learn them. Accordingly, he established the skill system we now use, three patterns of development for male and female.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-08.html index b5d7cb9169..3268f2d0cb 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-08.html @@ -1,4 +1,5 @@ Kekropus:
-Occasionally a Kamael is born who inherits his advanced skills. These individuals are very rare, but when they appear we honor his memory by granting them a position in the Hierarchy.
-These are Metucela Kamael, of course, not Spicula -- in other words, Inspectors just like yourself. To learn more, go speak with Vice Hierarch Eindburgh at the end of stairs behind you. +As I just said, he was a genius produced by time and chaos. He was not a Spicula like myself or the 3 Heroes, but a Metucela Kamael like you...
+No one knows what became of him. Certainly a Metucela Kamael's life span is long by the standards of other races, but even he must be long dead by now.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-09.html index 06f834a9f6..8d8330f2b2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-09.html @@ -1,6 +1,4 @@ Kekropus:
-Hmm, you have advanced this far without learning the truth of our people's origin?
-You have never heard of the 3 Heroes, then.
-All our martial skill is rooted in their tale...
- +We typically have a very straight forward, hierarchical system for moving up through the ranks; however, every now and then, someone comes along who is so incredibly skilled, they practically fly through the ranks.
+These savants have been known to completely bypass Spicula and jump straight to Methusela Kamael! Impressive, no? I'd like you to go visit one such master, the inspector Vice Hierarch Eindburgh. You'll find him on the Talking Island. When you arrive, please give him my regards. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-10.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-10.html index ece1528d87..1993c414b5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-10.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32138-10.html @@ -1,3 +1,3 @@ Kekropus:
-Speak with Vice Hierarch Eindburgh, who himself learned the ultimate skill of an Inspector and became a Soulmaster. He is at the end of the stairs behind you. +Go visit Vice Hierarch Eindburgh. He's the one who specialized in the inspector's skills. He's a master of souls! You can usually find him over on the Talking Island. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-01.htm index eff90dfa71..dda7267a52 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-01.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-01.htm @@ -1,6 +1,6 @@ Grand Master Liane:
-Ah, %name%, you are here.
+Ah, %playername%, you are here.
You know, then, that a new power has been revealed in the Kamael. You must be curious about the nature of that power and why it was hidden for so long.
Your curiosity is entirely natural! The fact of the matter is that it was not originally envisioned that a warrior race like the Kamael would ever possess such a supportive power...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-02.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-02.htm index 80777acb60..8e5852f4bc 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-02.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-02.htm @@ -1,6 +1,4 @@ Grand Master Liane:
-As you know, Kamael skills and abilities were designed for battle.
-Inspectors' powers are very different, however. An Inspector who understands his nature and devotes himself to developing them can advance further.
-At the apex stands the executer of laws himself: the Judicator.

- +The Kamael are a warrior race, born and bred for battle. However, from time to time, some Kamael are born with a mysterious power unrelated to their martial origins. These individuals are called Inspectors.
+(Only Inspectors who are Level 76 or higher may undertake this quest.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-03.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-03.htm index 5306443109..9cd2f05a8e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-03.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-03.htm @@ -1,4 +1,4 @@ Grand Master Liane:
-I know very little about him.
-If you wish to learn more, I advise you to visit Hierarch Kekropus, who has ruled the Kamael for ages and possesses much wisdom about such matters. +Unlike your other abilities, this power does not originate with the Three Heroes present at the Kamael's creation. Perhaps I will be able to tell you more someday...
+(Only Inspectors who are Level 76 or higher may undertake this quest.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-04.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-04.htm index 8e5852f4bc..b48d416ca3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-04.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-04.htm @@ -1,4 +1,6 @@ Grand Master Liane:
-The Kamael are a warrior race, born and bred for battle. However, from time to time, some Kamael are born with a mysterious power unrelated to their martial origins. These individuals are called Inspectors.
-(Only Inspectors who are Level 76 or higher may undertake this quest.) +As you know, Kamael skills and abilities were designed for battle.
+Inspectors' powers are very different, however. An Inspector who understands his nature and devotes himself to developing them can advance further.
+At the apex stands the executer of laws himself: the Judicator.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-05.html new file mode 100644 index 0000000000..ab47866470 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-05.html @@ -0,0 +1,3 @@ +Grand Master Liane:
+Sorry, I know nothing about him either. Perhaps you should talk to our Elder and administrator? He knows much more about it, and might have some useful information. I hear that he's spending a lot of time on Talking Island, in the museum in the village there. + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-06.html index 719083f45b..d63a180770 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32222-06.html @@ -1,3 +1,3 @@ Grand Master Liane:
-If you wish to learn more about the Judicator, visit Hierarch Kekropus. +If you want to know about the Judicator, go talk to Kekropus. I hear that he's spending a lot of time on Talking Island, in the museum in the village there. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-01.html index 8f4efc2449..00c00a0c46 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-01.html @@ -1,5 +1,5 @@ Vice Hierarch Eindburgh:
-%name%, are you the next Judicator?
+%playername%, are you the next Judicator?
Do you wish to be an executor of Kamael law?
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-03.html index 269d7d068b..d977c3df2a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-03.html @@ -1,6 +1,6 @@ Vice Hierarch Eindburgh:
I thought so. Since the Seeds of Chaos contain order out of chaos, only one child in a generation is born with the power.
It is similar to a Magic Sword or Blood Sword...
-But now, with the expansion of our race's power and its spread throughout the continent, that power may likewise be spreading.
- +But now, with the expansion of our race's power and its spread throughout the continent, that power may likewise be spreading.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-04.html index 498316a45b..72f63312e6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-04.html @@ -1,7 +1,5 @@ Vice Hierarch Eindburgh:
The Seeds of Chaos were planted by the King of Chaos to enable their recipients to overcome the restrictions imposed on mortals by the gods.
-This is why the wielders of Enuma Elish can still live, despite being cursed by the gods.
-If this power is manifested, we Kamael can finally free ourselves from our fate as warriors who live only for battle. One who walks this other path is the Inspector.
-It is a possibility that even our creators couldn't imagine.
- +This is why the wielders of Enuma Elish can still live, despite being cursed by the gods.
If this power is manifested, we Kamael can finally free ourselves from our fate as warriors who live only for battle. One who walks this other path is the Inspector.
It is a possibility that even our creators couldn't imagine.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-05.html index 3d5687cfb3..602f6d891e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-05.html @@ -2,5 +2,5 @@ Kamael Warriors. Perfect soldiers! But even the sharpest sword is useless without a skilled wielder.
I know Kekropus has said, in the hopes that our power will not be abused, that the blade is enough for us -- but a sword is of no use unless someone draws it. We need more than simply a leader who keeps the blade sharp for some undetermined future -- we need one unafraid to lead us into that future.
Only through decisive action can we finally become the blade of chaos our creators intended us to be, and achieve our true destiny.
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-06.html index cc06262554..04fca1db30 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-06.html @@ -1,7 +1,6 @@ Vice Hierarch Eindburgh:
I think you know -- it is what we Kamael were created to fight against: the gods themselves.
-The power of today's adventurers is not even remotely comparable to their power. Even the strongest race on the earth, the Giants, who once controlled all the creatures and even unlocked the secrets of life, suffered defeated at their hands.
-Nornil set his last hope on us, but... Can we really hope to fight the gods and win?
-I do not think so, and I speak with all the knowledge and insight inherited by the Hierarchs of Metucela since the time of Nostra, the father of the Inspectors. We Kamael were created to achieve an inherently impossible proposition. But what if, as Nostra theorized, something completely unexpected were to happen?
- +The power of today's adventurers is not even remotely comparable to their power. Even the strongest race on the earth, the Giants, who once controlled all the creatures and even unlocked the secrets of life, suffered defeated at their hands.
Nornil set his last hope on us, but... Can we really hope to fight the gods and win?
+I do not think so, and I speak with all the knowledge and insight inherited by the Hierarchs of Metucela since the time of Nostra, the father of the Inspectors. We Kamael were created to achieve an inherently impossible proposition. But what if, as Nostra theorized, something completely unexpected were to happen?
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-07.html index 870621992d..a727edd041 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-07.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32469-07.html @@ -1,8 +1,7 @@ Vice Hierarch Eindburgh:
-Yes. An Inspector searches and judges, but a Judicator is required to make an unexpected leap in judgment. In so doing, he opens the path to the future development of the Kamael.
-In the past, when this island was sealed, it was enough for us merely to maintain the edge of the sword, but now that sword has been unsheathed and we must decide where and how to wield it.
+Yes. An Inspector searches and judges, but a Judicator is required to make an unexpected leap in judgment. In so doing, he opens the path to the future development of the Kamael.
In the past, when this island was sealed, it was enough for us merely to maintain the edge of the sword, but now that sword has been unsheathed and we must decide where and how to wield it.
To lead our race effectively, our powermust now be spread throughout the world. rallying, leading, advising, helping.
The true strength of our power is not our skill with the blade or ability in battle. It is, rather, the self-awareness to transcend the limits imposed on us so long ago. Do you understand?
- - + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32972-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32972-01.html new file mode 100644 index 0000000000..4caca398b2 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/32972-01.html @@ -0,0 +1,4 @@ +Pantheon:
+Are you looking for Kamael's Tetrarch Kekropus? He's inside of Museum, and I am the only one who can let you in...
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/Q00061_LawEnforcement.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/Q00061_LawEnforcement.java index dabb148d5b..fb35f9a678 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/Q00061_LawEnforcement.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00061_LawEnforcement/Q00061_LawEnforcement.java @@ -16,30 +16,42 @@ */ package quests.Q00061_LawEnforcement; +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.Race; +import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; +import com.l2jmobius.gameserver.util.Util; /** * Law Enforcement (61) - * @author Adry_85 + * @author Gladicek */ public final class Q00061_LawEnforcement extends Quest { // NPCs private static final int LIANE = 32222; + private static final int PANTHEON = 32972; private static final int KEKROPUS = 32138; private static final int EINDBURGH = 32469; + // Location + private static final Location MUSEUM = new Location(-114711, 243911, -7968); // Misc private static final int MIN_LEVEL = 76; + private static final int JUDICATOR = 136; public Q00061_LawEnforcement() { super(61); addStartNpc(LIANE); - addTalkId(LIANE, KEKROPUS, EINDBURGH); + addTalkId(LIANE, PANTHEON, KEKROPUS, EINDBURGH); + addCondMinLevel(MIN_LEVEL, "32222-03.htm"); + addCondRace(Race.KAMAEL, "32222-02.htm"); + addCondClassId(ClassId.INSPECTOR, "32222-03.htm"); } @Override @@ -54,98 +66,74 @@ public final class Q00061_LawEnforcement extends Quest String htmltext = null; switch (event) { - case "32222-02.htm": - { - htmltext = event; - break; - } - case "32222-03.htm": - { - qs.setMemoState(1); - qs.startQuest(); - htmltext = event; - break; - } - case "32138-01.html": + case "32222-04.htm": case "32138-02.html": - { - if (qs.isMemoState(1)) - { - htmltext = event; - } - break; - } case "32138-03.html": - { - if (qs.isMemoState(1)) - { - qs.setMemoState(2); - htmltext = event; - } - break; - } case "32138-04.html": case "32138-05.html": case "32138-06.html": case "32138-07.html": - { - if (qs.isMemoState(2) || qs.isMemoState(3)) - { - htmltext = event; - } - break; - } case "32138-08.html": - { - if (qs.isMemoState(2) || qs.isMemoState(3)) - { - qs.setMemoState(4); - qs.setCond(2, true); - htmltext = event; - } - break; - } - case "32138-09.html": - { - if (qs.isMemoState(1)) - { - qs.setMemoState(3); - htmltext = event; - } - break; - } case "32469-02.html": - { - if (qs.isMemoState(4)) - { - qs.setMemoState(5); - htmltext = event; - } - break; - } case "32469-03.html": case "32469-04.html": case "32469-05.html": case "32469-06.html": case "32469-07.html": { - if (qs.isMemoState(5)) + htmltext = event; + break; + } + case "32222-05.html": + { + qs.startQuest(); + htmltext = event; + break; + } + case "teleport": + { + if (qs.isCond(1)) { - htmltext = event; + qs.setCond(2, true); + player.teleToLocation(MUSEUM); + } + break; + } + case "32138-09.html": + { + if (qs.isCond(2)) + { + qs.setCond(3, true); } break; } case "32469-08.html": case "32469-09.html": { - if (qs.isMemoState(5)) + if (qs.isCond(3)) { - player.setClassId(136); - // SystemMessage and cast skill is done by setClassId - player.broadcastUserInfo(); - giveAdena(player, 26000, true); - qs.exitQuest(false, true); - htmltext = event; + if ((player.getLevel() >= MIN_LEVEL)) + { + final ClassId newClassId = player.getClassId().getNextClassIds().stream().findFirst().orElse(null); + if (newClassId != null) + { + final ClassId currentClassId = player.getClassId(); + + if (!newClassId.childOf(currentClassId)) + { + Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to cheat class transfer for Judicator!", Config.DEFAULT_PUNISH); + } + player.setClassId(JUDICATOR); + player.broadcastUserInfo(); + giveAdena(player, 26000, true); + qs.exitQuest(false, true); + htmltext = event; + } + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } } break; } @@ -156,78 +144,66 @@ public final class Q00061_LawEnforcement extends Quest @Override public String onTalk(L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, true); + QuestState qs = getQuestState(player, true); String htmltext = getNoQuestMsg(player); - if (qs.isCompleted() && (npc.getId() == LIANE)) + + switch (qs.getState()) { - htmltext = getAlreadyCompletedMsg(player); - } - else if (qs.isCreated()) - { - if (player.getLevel() >= MIN_LEVEL) + case State.CREATED: { - if (player.getClassId() == ClassId.INSPECTOR) + if (npc.getId() == LIANE) { - return getHtm(player.getHtmlPrefix(), "32222-01.htm").replace("%name%", player.getName()); + htmltext = "32222-01.htm"; } - htmltext = "32222-04.htm"; + break; } - else + case State.STARTED: { - htmltext = "32222-05.htm"; - } - } - else if (qs.isStarted()) - { - switch (npc.getId()) - { - case LIANE: + switch (npc.getId()) { - if (qs.isMemoState(1)) + case LIANE: { - htmltext = "32222-06.html"; + if (qs.isCond(1)) + { + htmltext = "32222-06.html"; + } + break; } - break; - } - case KEKROPUS: - { - switch (qs.getMemoState()) + case PANTHEON: { - case 1: + if (qs.isCond(1)) + { + htmltext = "32972-01.html"; + } + break; + } + case KEKROPUS: + { + if (qs.isCond(2)) { htmltext = "32138-01.html"; - break; } - case 2: - { - htmltext = "32138-03.html"; - break; - } - case 3: + else if (qs.isCond(3)) { htmltext = "32138-10.html"; - break; } - case 4: + break; + } + case EINDBURGH: + { + if (qs.isCond(3)) { - htmltext = "32138-10.html"; - break; + htmltext = "32469-01.html"; } + break; } - break; - } - case EINDBURGH: - { - if (qs.isMemoState(4)) - { - return getHtm(player.getHtmlPrefix(), "32469-01.html").replace("%name%", player.getName()); - } - if (qs.isMemoState(5)) - { - htmltext = "32469-02.html"; - } - break; } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; } } return htmltext; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-01.htm new file mode 100644 index 0000000000..94c47f0c87 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-01.htm @@ -0,0 +1,5 @@ +Mercenary Captain Pierce:
+I'm glad to have you on the force! Makes me more optimistic about our chances...
+Anyway, I called you here to ask you a favor. I sent a group of scouts into the Swamp of Screams to investigate the ongoing conflict there, but we've lost contact with one of them. I need someone to find out what happened. Are you up to the task?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-02.html new file mode 100644 index 0000000000..03be0b9b35 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-02.html @@ -0,0 +1,5 @@ +Mercenary Captain Pierce:
+Excellent! I hate to throw you into the fire on your first mission, but it's vital that we find out what happened to our scout!
+Cool your heels a minute and I'll tell you where to focus your search.
+We lost contact with him inside the Swamp of Screams. If you follow the path you can't miss it. I also marked it on your map, so don't get lost! Last thing I need is another missing person. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-03.html new file mode 100644 index 0000000000..c46dd6cacf --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-03.html @@ -0,0 +1,4 @@ +Mercenary Captain Pierce:
+What's the hold up?
+We lost contact with the scout inside the Swamp of Screams. Follow the path and you can't miss it. I marked it on the map so you shouldn't get lost. Remember, countless lives are at stake here! We need to find that scout! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-04.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-04.htm new file mode 100644 index 0000000000..d8e40768d3 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-04.htm @@ -0,0 +1,4 @@ +Mercenary Captain Pierce:
+We have no use for someone so inexperienced. Get some more training and we'll see what we can do for you...
+(Only characters who are level 81 or above may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-05.html new file mode 100644 index 0000000000..5da8b71202 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-05.html @@ -0,0 +1,5 @@ +Mercenary Captain Pierce:
+I can tell by your looks that you found something. Well? Is my scout OK?
+Spit it out, soldier! What do you know?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-06.html new file mode 100644 index 0000000000..10a0aac163 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-06.html @@ -0,0 +1,5 @@ +Mercenary Captain Pierce:
+I see... It is as I feared... He's dead.
+Well, thank you for risking your neck to track him down. We'll learn a lot from the intel he left behind. I'm sure that's what he would've wanted.
+I'll keep my eye out for you from now on. For now, your work here is done. Speak with Kahman over there. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-07.html new file mode 100644 index 0000000000..64bec220b3 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31553-07.html @@ -0,0 +1,3 @@ +Mercenary Captain Pierce:
+You've done your part, and I thank you for it. Go to see Kahman over there for your reward. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-01.html new file mode 100644 index 0000000000..db42f3342d --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-01.html @@ -0,0 +1,4 @@ +Mercenary Kahman:
+State your business here! We received no order.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-02.html new file mode 100644 index 0000000000..23eb85006c --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/31554-02.html @@ -0,0 +1,3 @@ +Mercenary Kahman:
+Oh, yeah! It's you! Right, then. Here you go! Don't be too disappointed if it's less than you'd like. Come back later and there'll be more work for you. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-01.html new file mode 100644 index 0000000000..db98705a4a --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-01.html @@ -0,0 +1,4 @@ +
+The corpse of Pierce's scout, who came here looking for the entrance. Search for any clues he might have left.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-02.html new file mode 100644 index 0000000000..51a1bbe1a6 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-02.html @@ -0,0 +1,3 @@ +
+(Beneath the corpse you find a memo. You should take it to Mercenary Captain Pierce.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-03.html new file mode 100644 index 0000000000..f587d3b5a7 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/32015-03.html @@ -0,0 +1,3 @@ +
+(There's nothing else here. Take the memo to Mercenary Captain Pierce.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/Q00109_InSearchOfTheNest.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/Q00109_InSearchOfTheNest.java index 542b8c49e9..46ea53a511 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/Q00109_InSearchOfTheNest.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00109_InSearchOfTheNest/Q00109_InSearchOfTheNest.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.quest.State; /** * In Search of the Nest (109) - * @author Adry_85 + * @author Adry_85, Gladicek */ public class Q00109_InSearchOfTheNest extends Quest { @@ -34,125 +34,143 @@ public class Q00109_InSearchOfTheNest extends Quest private static final int KAHMAN = 31554; // Items private static final int SCOUTS_NOTE = 14858; + // Misc + private static final int MIN_LEVEL = 81; public Q00109_InSearchOfTheNest() { super(109); addStartNpc(PIERCE); addTalkId(PIERCE, SCOUTS_CORPSE, KAHMAN); + addCondMinLevel(MIN_LEVEL, "31553-04.htm"); registerQuestItems(SCOUTS_NOTE); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, false); - if (qs == null) + QuestState st = getQuestState(player, false); + if (st == null) { return getNoQuestMsg(player); } + String htmltext = null; + switch (event) { - case "31553-0.htm": + case "31553-02.html": { - qs.startQuest(); + st.startQuest(); break; } - case "32015-2.html": + case "32015-02.html": { - giveItems(player, SCOUTS_NOTE, 1); - qs.setCond(2, true); - break; - } - case "31553-3.html": - { - takeItems(player, SCOUTS_NOTE, -1); - qs.setCond(3, true); - break; - } - case "31554-2.html": - { - giveAdena(player, 161500, true); - addExpAndSp(player, 701500, 50000); - qs.exitQuest(false, true); - break; - } - } - return event; - } - - @Override - public String onTalk(L2Npc npc, L2PcInstance player) - { - String htmltext = getNoQuestMsg(player); - final QuestState qs = getQuestState(player, true); - - switch (npc.getId()) - { - case PIERCE: - { - switch (qs.getState()) + if (st.isCond(1)) { - case State.CREATED: - { - htmltext = (player.getLevel() < 81) ? "31553-0a.htm" : "31553-0b.htm"; - break; - } - case State.STARTED: - { - switch (qs.getCond()) - { - case 1: - { - htmltext = "31553-1.html"; - break; - } - case 2: - { - htmltext = "31553-2.html"; - break; - } - case 3: - { - htmltext = "31553-3a.html"; - break; - } - } - break; - } - case State.COMPLETED: - { - htmltext = getAlreadyCompletedMsg(player); - break; - } + giveItems(player, SCOUTS_NOTE, 1); + st.setCond(2, true); } break; } - case SCOUTS_CORPSE: + case "31553-06.html": { - if (qs.isStarted()) + if (st.isCond(2)) { - if (qs.isCond(1)) - { - htmltext = "32015-1.html"; - } - else if (qs.isCond(2)) - { - htmltext = "32015-3.html"; - } + takeItems(player, SCOUTS_NOTE, -1); + st.setCond(3, true); } break; } - case KAHMAN: + case "31554-02.html": { - if (qs.isStarted() && qs.isCond(3)) + if (st.isCond(3)) { - htmltext = "31554-1.html"; + giveAdena(player, 900990, true); + addExpAndSp(player, 8550000, 2052); + st.exitQuest(false, true); } break; } } return htmltext; } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState st = getQuestState(player, true); + if (st == null) + { + return htmltext; + } + + switch (st.getState()) + { + case State.CREATED: + { + if (npc.getId() == PIERCE) + { + htmltext = "31553-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case PIERCE: + { + switch (st.getCond()) + { + case 1: + { + htmltext = "31553-03.html"; + break; + } + case 2: + { + htmltext = "31553-05.html"; + break; + } + case 3: + { + htmltext = "31553-07.html"; + break; + } + } + break; + } + case SCOUTS_CORPSE: + { + if (st.isCond(1)) + { + htmltext = "32015-01.html"; + } + else if (st.isCond(2)) + { + htmltext = "32015-03.html"; + } + break; + } + case KAHMAN: + { + if (st.isCond(3)) + { + htmltext = "31554-01.html"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-01.htm new file mode 100644 index 0000000000..02df8fa878 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-01.htm @@ -0,0 +1,5 @@ +Spellbook Seller Anton:
+Have you heard of the book entitled "Traces of Living Beings in Ancient Times?" While clearing out the library's underground warehouse one day, I discovered a very old, very worn-out book filled with snatches of some ancient language. Believe me when I tell you that my years of working here have made me pretty familiar with most of the ancient tongues, but this language is totally strange to me. I hope to be able to eventually translate it, but right now it has me completely stymied!
+In any event, I placed it on my shelf and, to my chagrin, eventually forgot about it. But recently I have heard that it may be a very valuable tome -- very valuable indeed!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-02.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-02.htm new file mode 100644 index 0000000000..4f61bbd8c7 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-02.htm @@ -0,0 +1,4 @@ +Spellbook Seller Anton:
+While clearing out the library's underground warehouse one day, I discovered a very old, very worn-out book filled with snatches of some unkown ancient language. I have tried to translate it without success, but I recently learned that this book is very valuable. I am looking for an adventurer who can transport it to Primeval Isle, but I don't think that you're the right person for the job. No offense! I know it sounds like an easy task, but the island is a place filled with peril. I need someone with more...experience to undertake this mission.
+(You must be level 75 or above to start this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-03.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-03.htm new file mode 100644 index 0000000000..12b4ac2838 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-03.htm @@ -0,0 +1,4 @@ +Spellbook Seller Anton:
+A few days ago, Clark -- the most avid reader in all Rune Town -- stopped by and asked to see all the books I had cleared out from the underground warehouse. He seemed to be knowledgeable about the subject, so I showed this ancient book to him.
You should have seen Clark's face! He cried out and grasped the book to him as though he was embracing a long-lost friend. He told me that, long ago, he was a member of the original Primeval Isle Expedition and a close friend of the expedition's leader, Captain Marquez. This book, he told me, is the only one of its kind. It contains much of the mythology and history of the Primeval Isle. Marquez himself has searched for it for years, but had all but given up hope of ever finding it.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-04.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-04.htm new file mode 100644 index 0000000000..41ebc92539 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-04.htm @@ -0,0 +1,5 @@ +Spellbook Seller Anton:
+You're right. It is amazing, isn't it?
Clark told Marquez about my discovery, and Marquez wrote to me asking that he be allowed to obtain the book to assist the writing of his own history of the island. In its wisdom, the fathers of our library decided that the interests of scholarship would be best served by loaning the book to Marquez. But we need someone, preferably an adventurer, willing to transport it to him on Primeval Isle.
+I don't think the task should be especially difficult, but of course anything so unique and valuable is bound to attract the attention of...well, less savory sorts of people. That's why we want someone with the skill to handle any trouble that may come along. What do you think? Would you like to do it?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-05.html new file mode 100644 index 0000000000..e5a7859b6b --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-05.html @@ -0,0 +1,4 @@ +Spellbook Seller Anton:
+Excellent! Excellent! Marquez will be so pleased! Let me fetch the book for you so you can take it to Marquez. You will find him in the front area of the wharf on Primeval Isle. Obviously, you'll need to take a ship from Rune Port to reach the island.
+May your journey be uneventful! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-06.html new file mode 100644 index 0000000000..0ba6222035 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/31338-06.html @@ -0,0 +1,4 @@ +Spellbook Seller Anton:
+Please take that book to Marquez at the wharf on Primeval Isle.
+I know that you'll enjoy meeting him. An old adventurer himself, he always has time to talk to a young up-and-comer such as yourself. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-01.html new file mode 100644 index 0000000000..b282832614 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-01.html @@ -0,0 +1,4 @@ +Marquez:
+It doesn't look as though you are here to travel. Do you have anything else to say to me?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-02.html new file mode 100644 index 0000000000..c5e863fbf9 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-02.html @@ -0,0 +1,5 @@ +Marquez:
+Oh, you're the gutsy one Anton mentioned! Ha-ha-ha! Perhaps you haven't heard of me, though? At first, my sole purpose in founding this place was to obtain freedom and wealth. But I was soon attracted to the innocence and mystery of the island itself. I led an expedition deep into the island's interior, fascinated by all we encountered.
+It was not without its perils, though -- we were attacked by those powerful dinosaurs and the Elrokians themselves. Many of our group lost their lives. But some good did come from our efforts -- we established ties of friendship with the Elrokians.
I know that I am too old now to venture again into the wild interior, but the island's mystery still quickens my heart.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-03.html new file mode 100644 index 0000000000..384ebafaef --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-03.html @@ -0,0 +1,5 @@ +Marquez:
+Ha ha! Thank you for saying so. But my aching body knows the truth; those days have ended for me. Lately I have at least tried to pass my knowledge on to younger adventurers by writing an account of my experiences on the island.
I started by recounting both my own personal experiences and various stories I learned from the natives. But then I heard of a ancient book that recounts the history of Primeval Isle, and I have searched for it for years now without success. I was ready to give up...until Clark sent me a message saying that he found it. And here it is...
I see by your expression that you are as curious about its contents as I am! The ancient language is no doubt foreign to you, but I can translate a few passages if you are interested in hearing them. Shall I do so?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-04.html new file mode 100644 index 0000000000..8ac6062319 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-04.html @@ -0,0 +1,5 @@ +Marquez:
+Excellent! I see in you the spirit of my younger days! Very well, let me begin:
+In the days of old, when the circle of the gods was broken, countless races were spawned from that circle. The greatest of them were the gods themselves; the next greatest were the Giants. And the gods gave the Giants authority to rule over the world. All scholars know this story, but in these latter days men wonder what has become of all the creatures brought forth into the world at the breaking of the circle.
+An interesting beginning, eh? Clearly this was a learned author; perhaps I will discover in its pages new knowledge about the ancient Primeval Isle. I can hardly wait to begin my translation! Thank you for bringing this prize to me. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-05.html new file mode 100644 index 0000000000..9924c52e88 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/32113-05.html @@ -0,0 +1,4 @@ +Marquez:
+I see. Obviously, the book has greater value for me than for others; I'm sure you understand. In any case, thank you for bringing it to me.
+If you ever decide to explore the Primeval Isle for yourself, I may be of service to you. Until that day, farewell! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/Q00110_ToThePrimevalIsle.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/Q00110_ToThePrimevalIsle.java index 97dc71b494..87f41bf4d2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/Q00110_ToThePrimevalIsle.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00110_ToThePrimevalIsle/Q00110_ToThePrimevalIsle.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.quest.State; /** * To the Primeval Isle (110) - * @author Adry_85 + * @author Adry_85, Gladicek */ public class Q00110_ToThePrimevalIsle extends Quest { @@ -33,83 +33,112 @@ public class Q00110_ToThePrimevalIsle extends Quest private static final int MARQUEZ = 32113; // Item private static final int ANCIENT_BOOK = 8777; + // Misc + private static final int MIN_LEVEL = 75; public Q00110_ToThePrimevalIsle() { super(110); addStartNpc(ANTON); addTalkId(ANTON, MARQUEZ); + addCondMinLevel(MIN_LEVEL, ""); registerQuestItems(ANCIENT_BOOK); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, false); - if (qs == null) + QuestState st = getQuestState(player, false); + if (st == null) { return getNoQuestMsg(player); } + String htmltext = null; + switch (event) { - case "31338-1.html": + case "31338-03.htm": + case "31338-04.htm": + case "32113-02.html": + case "32113-03.html": + { + htmltext = event; + break; + } + case "31338-05.html": { giveItems(player, ANCIENT_BOOK, 1); - qs.startQuest(); + st.startQuest(); break; } - case "32113-2.html": - case "32113-2a.html": + case "32113-04.html": + case "32113-05.html": { - giveAdena(player, 191678, true); - addExpAndSp(player, 251602, 25245); - qs.exitQuest(false, true); - break; - } - } - return event; - } - - @Override - public String onTalk(L2Npc npc, L2PcInstance player) - { - String htmltext = getNoQuestMsg(player); - final QuestState qs = getQuestState(player, true); - - switch (npc.getId()) - { - case ANTON: - { - switch (qs.getState()) + if (st.isCond(1)) { - case State.CREATED: + if ((player.getLevel() >= MIN_LEVEL)) { - htmltext = (player.getLevel() < 75) ? "31338-0a.htm" : "31338-0b.htm"; - break; + giveAdena(player, 189208, true); + addExpAndSp(player, 887732, 213); + st.exitQuest(false, true); } - case State.STARTED: + else { - htmltext = "31338-1a.html"; - break; + htmltext = getNoQuestLevelRewardMsg(player); } - case State.COMPLETED: - { - htmltext = getAlreadyCompletedMsg(player); - break; - } - } - break; - } - case MARQUEZ: - { - if (qs.isCond(1)) - { - htmltext = "32113-1.html"; + break; } break; } } return htmltext; } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState st = getQuestState(player, true); + if (st == null) + { + return htmltext; + } + + switch (st.getState()) + { + case State.CREATED: + { + if (npc.getId() == ANTON) + { + htmltext = "31338-01.htm"; + } + break; + } + case State.STARTED: + { + if (npc.getId() == ANTON) + { + if (st.isCond(1)) + { + htmltext = "32113-06.html"; + } + } + else if (npc.getId() == MARQUEZ) + { + if (st.isCond(1)) + { + htmltext = "32113-01.html"; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-01.htm index d73bafe598..382b2bbcd2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-01.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-01.htm @@ -1,4 +1,4 @@ Marquez:
Ah, my young adventurer... So, did you have a look around this Primeval Isle? As you probably know already, there are many unique creatures on this island. There is also an ancient race of men, the Elroki tribe. Though they may seem primitive to your eyes in some respects, do not underestimate them! Theirs is a culture rich in history and tradition, and they have skills unknown to more "civilized" races. How else could they have survived all these years surrounded by these vicious dinosaurs?
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-02.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-02.htm index 68649099a9..0dc121e169 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-02.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-02.htm @@ -1,5 +1,6 @@ Marquez:
-Once, I accompanied the Elrokians on a dinosaur hunt... It was a remarkable experience!
The Elrokhians first weaken the creatures by wielding a strange-looking device unique to their tribe. Are you by chance interested in learning the skill?
- - +Once, I accompanied the Elrokians on a dinosaur hunt... It was a remarkable experience!
+The Elrokians first weaken the creatures by wielding a strange-looking device unique to their tribe. Are you by chance interested in learning the skill?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-03.html index a67cb9aa16..8584ab9d17 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-03.html @@ -1,4 +1,4 @@ Marquez:
Ah, then you must seek out the leader of the Elroki tribe, Chief Mushika, who once explored with me. Tell him that I sent you and perhaps he will more readily accept you.
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-06.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-06.htm new file mode 100644 index 0000000000..fd86876c8a --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-06.htm @@ -0,0 +1,4 @@ +Marquez:
+Ah, my young adventurer... So, did you have a look around this Primeval Isle? As you probably know already, there are many unique creatures on this island. There is also an ancient race of men, the Elroki tribe. Though they may seem primitive to your eyes in some respects, do not underestimate them! Theirs is a culture rich in history and tradition, and they have skills unknown to more "civilized" races. How else could they have survived all these years surrounded by these vicious dinosaurs? We could learn much from them...
+(You must be level 75 or above to start this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-07.html index fe52a05d17..e8e1131d62 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-07.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-07.html @@ -1,4 +1,4 @@ Marquez:
Hurry, then, and visit Mushika, chief of the Elroki tribe.
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-09.html index 7ba2ff3266..8dfce11250 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-09.html @@ -1,4 +1,4 @@ Marquez:
Did you meet Mushika? Did you discover something about the mysterious skill I told you about?
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-10.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-10.html index fc18a3ee4a..59fa94d083 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-10.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-10.html @@ -1,7 +1,7 @@ Marquez:
-Hmmm, perhaps this will help you forge a bond with the Elrokians... During my explorations of the island, I was gravely wounded -- if not for Mushika, I would have died. He took me back to the Elrokian village, where I stayed while I recovered.
-During my time there, I heard of a song called the "Warrior's Song" that supposedly contains all the Elroki tribe's pride, pain and sadness.
-They sing this song in both victory and mourning.
+Hmmm, perhaps this will help you forge a bond with the Elrokians... During my explorations of the island, I was gravely wounded -- if not for Mushika, I would have died.
+He took me back to the Elrokian village, where I stayed while I recovered.
+During my time there, I heard of a song called the "Warrior's Song" that supposedly contains all the Elroki tribe's pride, pain and sadness.
They sing this song in both victory and mourning.
If you can learn the song and its meaning, perhaps you can earn the tribe's trust...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-11.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-11.html index 94bb069ecf..fd59a5933a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-11.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-11.html @@ -1,4 +1,4 @@ Marquez:
Hmmm... A member of my expedition used to speak about an old Elrokian hunter friend of his who knew the song.
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-12.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-12.html index 3ca32684e0..1758b144b6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-12.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-12.html @@ -2,5 +2,5 @@ Sadly, he was killed by a Velociraptor not long ago.
...
How unfortunate!
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-13.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-13.html index 9da82ef6c5..016f391adb 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-13.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-13.html @@ -1,5 +1,5 @@ Marquez:
You know, now that I think of it, I remember that he kept a journal...
-Perhaps it will contain some clue.
- +Perhaps it contains some clue.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-14.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-14.html index 825600265a..40685d4d8c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-14.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-14.html @@ -1,6 +1,4 @@ Marquez:
-The Velociraptor destroyed his belongings at the time of the attack. Perhaps it carried away his journal as well...
-If you can defeat the Velociraptor, we may be able to get the journal back.
-Do you feel you could find his journal -- or whatever remains of it?
- +The Velociraptor destroyed his belongings at the time of the attack. Perhaps it carried away his journal as well...
If you can defeat the Velociraptor, we may be able to get the journal back.
Do you feel you could find his journal -- or whatever remains of it?
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-17.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-17.html index 2d421a9ae3..4a67ee7ccc 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-17.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-17.html @@ -1,4 +1,5 @@ Marquez:
-Good work! You've brought all the journal pieces!
Now I can return this to his family; perhaps it will comfort them to have a memento of my brave friend...
- +Good work! You've brought all the journal pieces!
+Now I can return this to his family; perhaps it will comfort them to have a memento of my brave friend...
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-18.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-18.html index b0ad133ab5..4fdd618edd 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-18.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-18.html @@ -10,5 +10,5 @@ These creatures are not described in any other books I have ever read... Today, We are lost in the jungle.
How will I return to the camp?
...(omitted)...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-19.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-19.html index 48b5c76874..73ab7ae819 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-19.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-19.html @@ -4,5 +4,5 @@ Is this to be our fate? Lost, pursued by these vicious creatures?
We were attacked by more strange creatures, smaller than the others we have seen. These new ones seem to hunt in packs!
I have become separated from my group...
Will I survive?
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-20.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-20.html index ba73d3103a..ed4c84e3b9 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-20.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-20.html @@ -1,7 +1,7 @@ Marquez:
-I met a friend today.
-He looks just like the creatures living here but he walks upright and seems to possess intelligence.
-He used a strange skill to save my life, and he shared water and food with me.
-If it were not for him, I would not have been able to write these words.
He saved my life.
- +I met a friend today.
He looks just like the creatures living here but he walks upright and seems to possess intelligence.
+He used a strange skill to save my life,
and he shared water and food with me.
+If it were not for him, I would not have been able to write these words.
+He saved my life.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-21.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-21.html index 8112f984ba..08bfcc7e4c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-21.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-21.html @@ -1,6 +1,4 @@ Marquez:
-(According to the journal, it seems like the writer of this diary spent about a year with the native who saved his life.) The native's name is Kirikachin. A skillful hunter, he is respected by all the natives.
-For some reason, however, Kirikachin cannot live in the native village or freely contact his people.
-(Was this the result of some sort of duty? Or was it some kind of punishment? It seems as though there is some story concerned with it.)
- +(According to the journal, it seems like the writer of this diary spent about a year with the native who saved his life.) The native's name is Kirikachin. A skillful hunter, he is respected by all the natives.
For some reason, however, Kirikachin cannot live in the native village or freely contact his people.
(Was this the result of some sort of duty? Or was it some kind of punishment? It seems as though there is some story concerned with it.)
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-22.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-22.html index 5193161a9c..18b279a696 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-22.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-22.html @@ -1,5 +1,5 @@ Marquez:
(It looks like lonely Kirikachin and the writer of this diary became close friends during their time together, and shared much of their knowledge with each other. My friend taught Kirikachin the famous children's song of Aden, "10 Little Midgets" and learned the "Warrior Song" from Kirikachin.
One time, he even repaid his debt to Kirikachin by saving his life using a healing technique of Aden. It seems the two men became as close as brothers...)
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-23.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-23.html index 629a8b7ba1..dd4bb4ba82 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-23.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-23.html @@ -1,4 +1,4 @@ Marquez:
(Even after he was found by the expedition, he traveled back and forth to Kirikachin's camp. In fact, it seems like he stayed with Kirikachin more frequently than he did with his fellow explorers.)
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-24.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-24.html index dbe3589b49..8fa6d3ba37 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-24.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-24.html @@ -1,4 +1,4 @@ Marquez:
(The last page is so blood-stained and damaged that its words are illegible. But there appears to be something stuck between the pages: an envelope.)
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-26.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-26.html index 10f5ceef9b..003923d46b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-26.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32113-26.html @@ -1,4 +1,5 @@ Marquez:
-Good work! You've brought all the journal pieces!
Please take this as a small token of my appreciation.
Now I can give return this to his family.
- +Good work! You've brought all the journal pieces!
Please take this as a small token of my appreciation.
+Now I can give return this to his family.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-02.html index 54429cc581..7cfe71ade4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-02.html @@ -1,5 +1,5 @@ Asamah:
Marquez sent you?
Why?
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-05.html index f9a6a57e22..dcad68771d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-05.html @@ -1,4 +1,4 @@ Asamah:
-Stubborn, aren't you? I still have nothing to say to you about those skills!
- +Stubborn, aren't you? I still have nothing to say to you about those skills! +
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-07.html index 08a06bff3a..7bc0653135 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-07.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-07.html @@ -1,6 +1,5 @@ Asamah:
-Where did you learn this song?
-It seems like you not only know the melody of it, but that you also understand the spirit and meaning of the song.
+Where did you learn this song?
It seems like you not only know the melody of it, but that you also understand the spirit and meaning of the song.
When I hear you sing, in fact, it's plain to me that you understand!
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-08.html index 916a33180b..e50c9863ce 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32115-08.html @@ -2,5 +2,5 @@ Oh, that's what happened... I am truly sorry about Kirikachin's friend.
On a happier note... by understanding that song you have shown yourself a true friend of the Elroki tribe.
How can we help you further my friend?
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-02.html index 136e11b656..b307451845 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-02.html @@ -1,5 +1,5 @@ Kirikachin:
Oh, outsider... Are there any of your race who know me, Kirikachin? I once had a friend in one such as you, but I can no longer locate him. Have you news of his whereabouts?
(Give him the letter.)
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-03.html index b987899aec..f4488a84e1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-03.html @@ -1,4 +1,4 @@ Kirikachin:
(As he reads the letter, Kirikachin's hands begin to shake and tears fall onto the page. He sobs softly.)
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-05.html index b987899aec..f4488a84e1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-05.html @@ -1,4 +1,4 @@ Kirikachin:
(As he reads the letter, Kirikachin's hands begin to shake and tears fall onto the page. He sobs softly.)
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-06.html index 88076fecb0..fb9e87355c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-06.html @@ -1,5 +1,5 @@ Kirikachin:
My heart is saddened, but I know he has gone to his rightful reward. My thanks to you for bringing me this letter -- now I know the truth, and that is some comfort.
-How can I repay you for your trouble?
- +How can I repay you for your trouble?
Anything I can do for you?
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-09.html index b27c43d883..8d962361fe 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/32116-09.html @@ -1,5 +1,5 @@ Kirikachin:
What do you need? Ah, you wish to learn a skill? This is not something that just anyone can learn...
And you are an outsider, after all...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/Q00111_ElrokianHuntersProof.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/Q00111_ElrokianHuntersProof.java index db3c5409f9..ae27851453 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/Q00111_ElrokianHuntersProof.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00111_ElrokianHuntersProof/Q00111_ElrokianHuntersProof.java @@ -51,6 +51,7 @@ public final class Q00111_ElrokianHuntersProof extends Quest private static final int MIN_LEVEL = 75; // Mobs private static final Map MOBS_DROP_CHANCES = new HashMap<>(); + static { MOBS_DROP_CHANCES.put(22196, new ItemChanceHolder(DIARY_FRAGMENT, 0.51, 4)); // velociraptor_leader @@ -81,6 +82,7 @@ public final class Q00111_ElrokianHuntersProof extends Quest addStartNpc(MARQUEZ); addTalkId(MARQUEZ, MUSHIKA, ASAMAH, KIRIKACHIN); addKillId(MOBS_DROP_CHANCES.keySet()); + addCondMinLevel(MIN_LEVEL, "32113-06.htm"); registerQuestItems(DIARY_FRAGMENT, EXPEDITION_MEMBERS_LETTER, ORNITHOMINUS_CLAW, DEINONYCHUS_BONE, PACHYCEPHALOSAURUS_SKIN, PRACTICE_ELROKIAN_TRAP); } @@ -200,13 +202,21 @@ public final class Q00111_ElrokianHuntersProof extends Quest { if (qs.isMemoState(12) && hasQuestItems(player, PRACTICE_ELROKIAN_TRAP)) { - takeItems(player, PRACTICE_ELROKIAN_TRAP, -1); - giveItems(player, ELROKIAN_TRAP, 1); - giveItems(player, TRAP_STONE, 100); - giveAdena(player, 1071691, true); - addExpAndSp(player, 553524, 55538); - qs.exitQuest(false, true); - htmltext = event; + if ((player.getLevel() >= MIN_LEVEL)) + { + takeItems(player, PRACTICE_ELROKIAN_TRAP, -1); + giveItems(player, ELROKIAN_TRAP, 1); + giveItems(player, TRAP_STONE, 100); + giveAdena(player, 1702800, true); + addExpAndSp(player, 19973970, 4793); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; } break; } @@ -223,13 +233,22 @@ public final class Q00111_ElrokianHuntersProof extends Quest final ItemChanceHolder item = MOBS_DROP_CHANCES.get(npc.getId()); if (item.getCount() == qs.getMemoState()) { - if (qs.isCond(4) && giveItemRandomly(qs.getPlayer(), npc, item.getId(), 1, 50, item.getChance(), true)) + if (qs.isCond(4)) { - qs.setCond(5); + if (giveItemRandomly(qs.getPlayer(), npc, item.getId(), 1, 50, item.getChance(), true)) + { + qs.setCond(5); + } } - else if (qs.isCond(10) && giveItemRandomly(qs.getPlayer(), npc, item.getId(), 1, 10, item.getChance(), true) && (getQuestItemsCount(qs.getPlayer(), ORNITHOMINUS_CLAW) >= 10) && (getQuestItemsCount(qs.getPlayer(), DEINONYCHUS_BONE) >= 10) && (getQuestItemsCount(qs.getPlayer(), PACHYCEPHALOSAURUS_SKIN) >= 10)) + else if (qs.isCond(10)) { - qs.setCond(11); + if (giveItemRandomly(qs.getPlayer(), npc, item.getId(), 1, 10, item.getChance(), true) // + && (getQuestItemsCount(qs.getPlayer(), ORNITHOMINUS_CLAW) >= 10) // + && (getQuestItemsCount(qs.getPlayer(), DEINONYCHUS_BONE) >= 10) // + && (getQuestItemsCount(qs.getPlayer(), PACHYCEPHALOSAURUS_SKIN) >= 10)) + { + qs.setCond(11); + } } } } @@ -239,8 +258,12 @@ public final class Q00111_ElrokianHuntersProof extends Quest @Override public String onTalk(L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, true); + QuestState qs = getQuestState(player, true); String htmltext = getNoQuestMsg(player); + if (qs == null) + { + return htmltext; + } switch (qs.getState()) { @@ -256,7 +279,7 @@ public final class Q00111_ElrokianHuntersProof extends Quest { if (npc.getId() == MARQUEZ) { - htmltext = (player.getLevel() >= MIN_LEVEL) ? "32113-01.htm" : "32113-06.html"; + htmltext = "32113-01.htm"; } break; } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-01.html index dd3b91447b..d248e7b76e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-01.html @@ -1,10 +1,4 @@ Misa:
-Do you have anything to say to me?
-What? Rafforty sent you?
-Well, he doesn't want to see me, I guarantee you that!
-....
-Would you give this letter to Rafforty? I need him to read it immediately!
-But please, do not read it yourself!
-This is none of your business!
-Oh, Rafforty... - \ No newline at end of file +You say that Rafforty sent you? I see...
+Rafforty... he still won't talk to me. But would you be so kind as to give him this letter for me? Please, I'm desperate. + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-03.html index fd309e859e..a19396254e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-03.html @@ -1,4 +1,4 @@ Misa:
-Is there anything you want to say to me?
-Well, I don't have anything to say to you! I just want to enjoy this beautiful night view. +What brought you here?
+Just enjoy the view, and be on your way. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-04.html index 4bdd0cee54..cb4e9f504b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-04.html @@ -1,4 +1,4 @@ Misa:
-Why are you here again? I don't have anything to say to you.
- +What do you want? I have nothing to say to you.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-05.html index 2252b841a8..1b14e4fba5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-05.html @@ -1,6 +1,5 @@ Misa:
-Oh! You're going to work with us! Welcome aboard!
-I'll tell you what I just found out. We lost touch with a large party of our Guild members who had been dispatched to investigate the recent activities of the Ice Queen.
-We recently got lucky and found out where they might be...
-It seems that the Ice Queen put a curse on them and turned them into ice sculptures! I think we should find out if there are any remnants of their investigation. The ice sculptures can be found on the plains north of the entrance of the Ice Queen's castle. Please, help us! +Hey! You'll join! Let me start by wishing you good luck... I always start with that.
+Now to get you up to speed. Guild informants have disappeared, one by one, while gathering information on the Queen...
+We just learned why.
Or at least what. The Ice Queen transformed them... into ice. I just KNOW they were hot on the trail of something important! Can you pick up where the trail leaves off? Our associates were found in their cursed state on the plain above the North corner from the Ice Queen's castle entrance. You'll have to be careful. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-06.html index 0ad67dcef3..d1ff4d5928 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32018-06.html @@ -1,3 +1,3 @@ -Misa:
-We accidently found out where the lost Guild members might be! They were turned into ice sculptures! Do you think you could go and see if there are any remnants of their investigation? You can find the ice sculptures on the plains north of the entrance of the Ice Queen's castle. Please, help us! +Misa:
+We learned where the informants are. Our people say they were turned into ice... Please investigate further. The place is the plain on the corner, North from the entrance to the Ice Queen's castle. Please! \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-01.htm index 7947473109..6185c00df7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-01.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-01.htm @@ -1,5 +1,5 @@ Rafforty:
-Have you recovered your strength? You certainly look a lot better. Would you like to go for a walk?
-Walk down the road to the lake, meet a person and come back.
- +Feeling better? You don't look quite so pale. How about a walk?
+This road leads to the lake, good fresh air and exercise. There's someone you should meet there, then maybe you could come back here.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-02.html index a7d5e44d77..58431c037e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-02.html @@ -1,5 +1,5 @@ Rafforty:
-I want you to meet a woman!
-Why are you blushing? You know how it is... I just can't refuse her! So I want you to go there to refuse for me! That's it!
-It should be easy for you since you haven't met her before. Follow the road to the northwest until you get to Frost Lake and meet a woman named Misa there. I promised to meet her at night, so go after dark. Thank you so much for doing this for me! +You need to meet a girl.
+Why is your face red? It's hard for me to say no, you can do it for me.
+It will be easy for you since you aren't emotionally involved. Take a look at the map, see this place called Frost Lake in the north west? You will meet a woman called Misa there. She is expecting me to meet her at night. I'm counting on you. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-03.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-03.htm new file mode 100644 index 0000000000..61bd5b2cdf --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-03.htm @@ -0,0 +1,3 @@ +Rafforty:
+Don't think about going here right now. You'll just end up dead. (Only character with level 53 or above can take on this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-04.html index f54f27f9d0..239fe10143 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-04.html @@ -1,4 +1,3 @@ Rafforty:
-What are you still doing here? Don't keep her waiting too long! Your task will be over once you've met her at Frost Lake and come back.
-Be careful! Don't fool around and get yourself hurt! +Well?? Never keep a lady waiting! Go see her at Frost Lake and come back. And stay out of trouble! \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-06.html index 1690a81f5f..f6ed327785 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-06.html @@ -1,6 +1,6 @@ Rafforty:
-Didn't she say to give me the letter? Then give it to me!
-Hmm.. Are you sure you didn't open it? The seal looks broken...
- - +She sent you to deliver this letter? Let me see it.
+It's already open... Did you open this?!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-07.html index c418ed89f9..02154af0aa 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-07.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-07.html @@ -1,8 +1,8 @@ Rafforty:
-Hey, don't be so touchy!
-I was just asking!
-I'm sorry if I hurt your feelings.
-It's hard to trust anyone these days, you know?
- - +Don't be upset!
+I just saw the seal was broken.. forgive me, I did jump to conclusions. Some manners, huh?
+Please forgive me.
+It's just hard to trust people these days.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-08.html index 426a6202e4..fc404e7db5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-08.html @@ -1,4 +1,4 @@ Rafforty:
-Hmmm.. It's just wrong to read someone else's mail! I didn't think you'd do such a thing... I'm really disappointed in you!
-I'm through talking to you! Get out as soon as you've recovered! +Reading someone's personal mail is rude! My mother taught me good manners, too bad yours didn't.
+I don't want to be angry with you. When you are well enough you should leave. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-09.html index c3274e30ee..0c3b685cdf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-09.html @@ -1,5 +1,5 @@ Rafforty:
-Well, I'll just come out with it then! What kind of relationship do you have with Queen Freya?
- - - \ No newline at end of file +Speak, and do not lie to me. What's your relationship with Queen Freya?
+ + + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-10.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-10.html index b732aae545..9d2da86a4f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-10.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-10.html @@ -1,9 +1,8 @@ Rafforty:
-Thank you for understanding.
-Oh, yes! Don't let my accent fool you!
-I'm Rafforty, from the Zinnia Guild!
I actually tested you a while back, and you're not involved with Queen Freya. I'd like to ask for a favor... -
Or would you like to hear about the current situation?
- - - +You are most understanding.
+I feel I can relax around you a little.
+I'm Rafforty, I work in the Jinia guild.
I'm sorry for testing you like that, I wouldn't have if it wasn't necessary. I really do have better manners than that. You're not related to Queen Freya. So now we'd like to ask for your help. Will you lend us your considerable strength?
Or should I tell you more first?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-11.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-11.html index 78d4448be0..0ecacfbd42 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-11.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-11.html @@ -1,9 +1,9 @@ Rafforty:
-You don't know about Queen Freya? She rules this whole area!
-You must not be related to Freya if you don't even know who she is!
-I'm sorry I didn't trust you! The situation here has just gotten to the point...
-Well, I'll just come out with it... Would you like to join the Zinnia Guild? I can tell you more about us if you want...
- - - +Never heard of Freya, governor of this region?
+You're clearly not related to her.
+I wasn't up front with you, I'm sorry. In this business, it's better than trusting the wrong person.
+Let me be up front with you now: Jinia guild wants your help. I know we've had a rough start, why don't I tell you more to win you over?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-12.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-12.html index 0d16f4f3a5..8c71d28718 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-12.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-12.html @@ -1,5 +1,5 @@ Rafforty:
-Well, honestly, you're acting kind of shifty!
-We obviously don't trust each other, so let's just end it now.
-Please get out as soon as you're recovered. +Well... you're stuttering, so there is something... .
+Are you just wasting my time?
+I'm not going to play games. If we don't trust each other then you ought to leave when you are well enough to do so. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-13.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-13.html index dc56e46ace..628e4e4f9f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-13.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-13.html @@ -1,6 +1,6 @@ Rafforty:
-We of the Zinnia Guild maintain the Order of Canna Knights that guarded Queen Freya before she became the Ice Queen.
-We've long sought a way to restore her to her original self. But as the sacrifices of our guild members have increased, we must now look to the outside for help.
- - +Jinia guild keeps the tradition of the Kana Knights, once proud guardians to Freya Queen before she became the Ice Queen.
+Now we seek a return to her original self. Many guild members have given their last breath to this aim, and still we fail. We need a new approach before we don't have a guild left.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-14.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-14.html index c2d9fe704e..dcf23586bb 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-14.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-14.html @@ -1,6 +1,6 @@ Rafforty:
-The Ice Queen Freya rules this territory. She was not always like this... One day she just changed into a cruel, ice-cold person!
-You'd do well to avoid her!
- - +Ice Queen Freya is the one who governs here. She wasn't always an Ice Queen.
+For your sake, I hope you don't meet her.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-15.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-15.html index 29d8c08201..db118992da 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-15.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-15.html @@ -1,4 +1,4 @@ Rafforty:
-Our guild's goal is to restore Queen Freya to her original self. Misa, who you met a while ago, is also a guild member. I'd like you to investigate the information we've collected so far.
-Hmmmm....? I have a meeting, would you please come back later? +The Jinia Guild wants to return Freya Queen to her original form. Misa is one such guild member. We'd like you to investigate, using information our brothers and sisters have died collecting.
+Hm. I just received an urgent message. Come back later? \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-16.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-16.html index d538da0d02..3fe740aa4f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-16.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-16.html @@ -1,8 +1,6 @@ Rafforty:
-Hey, don't be so touchy!
-I was just asking!
-I'm sorry if I hurt your feelings.
-It's hard to trust anyone these days, you know?
- - +No offense, but the seal does look a bit strange.
+It's a different world we live in. Please understand.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-17.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-17.html index da02a353f6..eaf7b24817 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-17.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-17.html @@ -1,7 +1,7 @@ Rafforty:
-You were thinking about something else... I'll say it again. Would you like to work with the Zinnia Guild? You have nothing to lose!
-If it is difficult for you to decide, perhaps you have some questions?
- - - +Were you daydreaming? Once more. Will you help the Jinia Guild?
+If you can't decide, I can flip a coin for you. Or perhaps you'd like to know more?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-18.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-18.html index be8b920890..6febcdd1de 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-18.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-18.html @@ -1,5 +1,5 @@ Rafforty:
-I've heard that Misa has some very good information! You've already met her, so you shouldn't have any trouble finding her again. Would you check and see if it's true?
-She never comes out during the day, you'll need to meet her at night at Frost Lake.
-Give this letter to her, she'll take it from there. +Misa sent word that she has important information. You know her face, you won't have trouble finding her. We need to confirm her information.
+She is only available at night. Remember, she's at Lake Frost.
+Deliver this letter, she'll handle the rest. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-19.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-19.html index add8f9a67c..a4c1022fb3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-19.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-19.html @@ -1,3 +1,3 @@ Rafforty:
-You haven't left yet? Go see Misa at Frost Lake tonight and check the information. I'll rely on your judgment. +Lost? Just go meet her at the Frost Lake and confirm our information. The rest I leave to your best judgement. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-20.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-20.html index 8a728dd74a..c8941448ff 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-20.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-20.html @@ -1,4 +1,4 @@ Rafforty:
-Where is the letter? You just can't keep losing it! Help us keep the faith.
-Give the letter to Misa. +Did you misplace the letter? You are testing my good nature...
+Here. Give THIS letter to Misa. Seriously.. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-21.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-21.html index eda1c5ffe1..0777b5d018 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-21.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-21.html @@ -1,3 +1,3 @@ Rafforty:
-Misa tells me that you've been investigating. I'm anticipating good results. +Misa says you're hard at work. I won't slow you down with idle chit chat. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-22.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-22.html index 28b89cd27a..f23eb04fdf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-22.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-22.html @@ -1,5 +1,4 @@ Rafforty:
-Thank you! So, you've found the whereabouts of Kierre? What an accomplishment! My guild will be overjoyed! Your hard work has really paid off!
-Did you find anything useful when you found Kierre?
- +Thank you, your help is most appreciated. So you found Kier's whereabouts? Our guild is one step closer to our goal now. And it's because of you. Again, thanks.
When you found Kier, did you discover anything else that may be of importance?
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-23.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-23.html index f10ba52a4e..feb6a75689 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-23.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-23.html @@ -1,4 +1,4 @@ Rafforty:
-It appears to be one of our cryptograms... But it's very old! It will take some time to decrypt it...
-Would you mind coming back later? +Well I definitely recognize the code, it's similar to what we use. This code is very old though...
+Can you come back later? \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-24.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-24.html index b9563bac81..c69aaddcc0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-24.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-24.html @@ -1,6 +1,7 @@ Rafforty:
-Good timing! We've decrypted the report, and it was very interesting!
It says that we still need some Tablet Fragments to obtain the information.
-Did you happen to see any Tablet Fragments during your investigation?
- - +Perfect timing, adventurer. We decoded the report you gave us, it really shed light on a few things.
+The report said that a piece of tablet is required to find the information...
+Is there any chance you saw something like that, a piece of tablet while you were questing?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-26.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-26.html index b1c4fb78bb..29f0a0a347 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-26.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-26.html @@ -1,5 +1,3 @@ Rafforty:
-What am I supposed to do when you show me empty hands like that?
-It seems you've seen something like a Tablet Fragment...
-Would you please look for it? +You can't be too far off, I'm sure you can find that piece. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-27.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-27.html index 77ccdd3a26..09bac5b3e5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-27.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-27.html @@ -1,7 +1,7 @@ Rafforty:
-Uh...
-What's that in your pocket? Can I see it?
+Hey...
+Why the silly grin??
...
-I think this may be the right one! I must start an investigation at once!
-Thank you for all your help. Please accept this reward. It's not much, but it is a token of our appreciation for your hard work. +Is it what I think it is? Ha! You found it! I'll start investigating right away!
+You did an excellent job, thanks! You definitely deserve this... here. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-28.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-28.html index 9d0ffc8077..4511d34be0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-28.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-28.html @@ -1,3 +1,5 @@ Rafforty:
-You look like you saw something. Please try to find the Tablet Fragment. +We are lost without that tablet.
+You've probably already seen a few pieces of tablet...
+Think back on what you saw... maybe that will help? \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-29.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-29.html index b2e807e242..574991bd73 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-29.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-29.html @@ -1,3 +1,3 @@ Rafforty:
-Please try to find the Tablet Fragment. +Can you do us a favor? Can you find the piece of tablet, it's somewhere nearby. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-30.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-30.html index f6d2e94e79..a413bde3b0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-30.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32020-30.html @@ -1,3 +1,3 @@ Rafforty:
-Ah.... Yes, this is it. I must start an investigation at once! Thank you for your help. Please accept this reward. It's not much, but it is a token of our appreciation for your hard work. +Hey... you really did it! That really helps us out, and I think we can take it from here. I think you've earned this, I wish it was more but take it nonetheless. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-01.html index d5c07dd680..2c51cb8dd4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-01.html @@ -1,5 +1,5 @@ -I thought there was nothing there, but... I think there's something under the sculpture. What is it?
- - +(I thought it wasn't time...)
But it seems something fell under the sculpture. What could it be?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-02.html index 97790dbfee..c97b84314b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-02.html @@ -1,3 +1,3 @@ -I don't know how to use this object, but I should take it with me; it might be a clue. There's nothing else worth searching here. I'll search the other sculptures now. +(We looked around the sculpture and its surroundings, but there were no distinctive marks. Let's keep looking.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-03.html index 3b66480c65..33f340f047 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-03.html @@ -1,3 +1,3 @@ - -Whatever it is, I doubt it's useful to me... I'll search some other sculptures now. + +(I can't tell what they might be used for, but I'll keep them just in case one is a clue. There is nothing else strange about them. Let's keep looking.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-05.html index 2f62f841a1..231973eb7b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-05.html @@ -1,4 +1,4 @@ - -Is there something here? Yes, I think I see something written under the sculpture.
- + +(There is something about this sculpture...
There are words written under the sculpture.)
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-06.html index fdc26d13a4..882f7b9223 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-06.html @@ -1,5 +1,7 @@ -Finally I have the fragment! Unfortunately, the Ice Queen has discovered what I've been doing.
-Kierre's whereabouts have at last been discovered. It seems that Freya keeps him in her territory, but it's a place far away from the haunts of men, southwest of the Labyrinth...
-Finding him is our last hope. +The sculpture, at last! But I'm being tracked by the Queen...
+...
+I found Kier... what's left of him. Freya kept it hidden, somewhere never visited...
+Southwest of the Labyrinth... her trace...
+our last hope... \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-08.html index fdc26d13a4..0abd6df35c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32021-08.html @@ -1,5 +1,7 @@ -Finally I have the fragment! Unfortunately, the Ice Queen has discovered what I've been doing.
-Kierre's whereabouts have at last been discovered. It seems that Freya keeps him in her territory, but it's a place far away from the haunts of men, southwest of the Labyrinth...
-Finding him is our last hope. +The sculpture... finally! But the Queen is tracking me...
+...
+I found Kier... kept in Freya's own territory, a spot unfrequented...
+southwest of the Labyrinth... her trace...
+our last hope... \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-01.html index 69125b088c..b8508aaccc 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-01.html @@ -1,4 +1,4 @@ -I've found something on the ice sculpture: it seems to be holding a piece of paper in its hand.
- +(Looking around the ice sculpture, I found something. A piece of paper in his hands...
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-02.html index bb5104d9db..0b4faa1037 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-02.html @@ -1,4 +1,4 @@ -( "%$&@#$, ~!@@#$%#@ @#@ @$^&*@! @#$..."
-This report is written in an unknown language. It must be a code of some kind... I should show it to Rafforty. +(%$&@#$, ~!@@#$%#@ @#@ @$^&*@! @#$...
+It's gibberish. Could be a code. Rafforty may know more.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-03.html index be771a33da..a0a006ca07 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-03.html @@ -1,3 +1,3 @@ -I shall go back to Rafforty and report what I've found. +(Let's go visit Rafforty with this piece of paper. It could be important.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-04.html index ad3d8df1cf..590db57727 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-04.html @@ -1,3 +1,3 @@ -There is a piece of paper near the sculpture. I should be careful not to lose it and take it with me. +(A piece of paper is on the ground. Be careful picking it up.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-05.html index 07abf86e7b..07a0bad6ae 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/32022-05.html @@ -1,3 +1,3 @@ -I have not seen any tablet fragments around here. I'll search somewhere else. +(I haven't seen a tablet piece here. Let's go find another place.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/Q00115_TheOtherSideOfTruth.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/Q00115_TheOtherSideOfTruth.java index 438a86ea56..ccc4c06671 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/Q00115_TheOtherSideOfTruth.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00115_TheOtherSideOfTruth/Q00115_TheOtherSideOfTruth.java @@ -50,14 +50,15 @@ public class Q00115_TheOtherSideOfTruth extends Quest super(115); addStartNpc(RAFFORTY); addTalkId(RAFFORTY, MISA, KIER, ICE_SCULPTURE1, ICE_SCULPTURE2, ICE_SCULPTURE3, ICE_SCULPTURE4); + addCondMinLevel(MIN_LEVEL, "32020-03.htm"); registerQuestItems(MISAS_LETTER, RAFFORTYS_LETTER, PIECE_OF_TABLET, REPORT_PIECE); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, false); - if (qs == null) + final QuestState st = getQuestState(player, false); + if (st == null) { return null; } @@ -67,53 +68,53 @@ public class Q00115_TheOtherSideOfTruth extends Quest { case "32020-02.html": { - qs.startQuest(); + st.startQuest(); htmltext = event; break; } case "32020-07.html": { - if (qs.isCond(2)) + if (st.isCond(2)) { takeItems(player, MISAS_LETTER, -1); - qs.setCond(3, true); + st.setCond(3, true); htmltext = event; } break; } case "32020-05.html": { - if (qs.isCond(2)) + if (st.isCond(2)) { takeItems(player, MISAS_LETTER, -1); - qs.exitQuest(true, true); + st.exitQuest(true, true); htmltext = event; } break; } case "32020-10.html": { - if (qs.isCond(3)) + if (st.isCond(3)) { - qs.setCond(4, true); + st.setCond(4, true); htmltext = event; } break; } case "32020-11.html": { - if (qs.isCond(3)) + if (st.isCond(3)) { - qs.setCond(4, true); + st.setCond(4, true); htmltext = event; } break; } case "32020-12.html": { - if (qs.isCond(3)) + if (st.isCond(3)) { - qs.exitQuest(true, true); + st.exitQuest(true, true); htmltext = event; } break; @@ -128,9 +129,9 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case "32020-15.html": { - if (qs.isCond(4)) + if (st.isCond(4)) { - qs.setCond(5, true); + st.setCond(5, true); playSound(player, QuestSound.AMBSOUND_WINGFLAP); htmltext = event; } @@ -138,27 +139,34 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case "32020-23.html": { - if (qs.isCond(9)) + if (st.isCond(9)) { - qs.setCond(10, true); + st.setCond(10, true); htmltext = event; } break; } case "finish": { - if (qs.isCond(10)) + if (st.isCond(10)) { if (hasQuestItems(player, PIECE_OF_TABLET)) { - giveAdena(player, 115673, true); - addExpAndSp(player, 493595, 40442); - qs.exitQuest(false, true); - htmltext = "32020-25.html"; + if (player.getLevel() >= MIN_LEVEL) + { + giveAdena(player, 193350, true); + addExpAndSp(player, 956590, 229); + st.exitQuest(false, true); + htmltext = "32020-25.html"; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } } else { - qs.setCond(11, true); + st.setCond(11, true); htmltext = "32020-26.html"; playSound(player, QuestSound.AMBSOUND_THUNDER); } @@ -167,18 +175,25 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case "finish2": { - if (qs.isCond(10)) + if (st.isCond(10)) { if (hasQuestItems(player, PIECE_OF_TABLET)) { - giveAdena(player, 115673, true); - addExpAndSp(player, 493595, 40442); - qs.exitQuest(false, true); - htmltext = "32020-27.html"; + if ((player.getLevel() >= MIN_LEVEL)) + { + giveAdena(player, 193350, true); + addExpAndSp(player, 956590, 229); + st.exitQuest(false, true); + htmltext = "32020-27.html"; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } } else { - qs.setCond(11, true); + st.setCond(11, true); htmltext = "32020-28.html"; playSound(player, QuestSound.AMBSOUND_THUNDER); } @@ -187,20 +202,20 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case "32018-05.html": { - if (qs.isCond(6) && hasQuestItems(player, RAFFORTYS_LETTER)) + if (st.isCond(6) && (hasQuestItems(player, RAFFORTYS_LETTER))) { takeItems(player, RAFFORTYS_LETTER, -1); - qs.setCond(7, true); + st.setCond(7, true); htmltext = event; } break; } case "32022-02.html": { - if (qs.isCond(8)) + if (st.isCond(8)) { giveItems(player, REPORT_PIECE, 1); - qs.setCond(9, true); + st.setCond(9, true); htmltext = event; } break; @@ -211,13 +226,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest { case ICE_SCULPTURE1: { - if (qs.isCond(7) && ((qs.getInt("ex") % 2) <= 1)) + if (st.isCond(7) && ((st.getInt("ex") % 2) <= 1)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 6) || (ex == 10) || (ex == 12)) { ex++; - qs.set("ex", ex); + st.set("ex", ex); giveItems(player, PIECE_OF_TABLET, 1); htmltext = event; } @@ -226,13 +241,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE2: { - if (qs.isCond(7) && ((qs.getInt("ex") % 4) <= 1)) + if (st.isCond(7) && ((st.getInt("ex") % 4) <= 1)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 5) || (ex == 9) || (ex == 12)) { ex += 2; - qs.set("ex", ex); + st.set("ex", ex); giveItems(player, PIECE_OF_TABLET, 1); htmltext = event; } @@ -241,13 +256,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE3: { - if (qs.isCond(7) && ((qs.getInt("ex") % 8) <= 3)) + if (st.isCond(7) && ((st.getInt("ex") % 8) <= 3)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 3) || (ex == 9) || (ex == 10)) { ex += 4; - qs.set("ex", ex); + st.set("ex", ex); giveItems(player, PIECE_OF_TABLET, 1); htmltext = event; } @@ -256,13 +271,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE4: { - if (qs.isCond(7) && (qs.getInt("ex") <= 7)) + if (st.isCond(7) && (st.getInt("ex") <= 7)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 3) || (ex == 5) || (ex == 6)) { ex += 8; - qs.set("ex", ex); + st.set("ex", ex); giveItems(player, PIECE_OF_TABLET, 1); htmltext = event; } @@ -278,13 +293,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest { case ICE_SCULPTURE1: { - if (qs.isCond(7) && ((qs.getInt("ex") % 2) <= 1)) + if (st.isCond(7) && ((st.getInt("ex") % 2) <= 1)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 6) || (ex == 10) || (ex == 12)) { ex++; - qs.set("ex", ex); + st.set("ex", ex); htmltext = event; } } @@ -292,13 +307,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE2: { - if (qs.isCond(7) && ((qs.getInt("ex") % 4) <= 1)) + if (st.isCond(7) && ((st.getInt("ex") % 4) <= 1)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 5) || (ex == 9) || (ex == 12)) { ex += 2; - qs.set("ex", ex); + st.set("ex", ex); htmltext = event; } } @@ -306,13 +321,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE3: { - if (qs.isCond(7) && ((qs.getInt("ex") % 8) <= 3)) + if (st.isCond(7) && ((st.getInt("ex") % 8) <= 3)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 3) || (ex == 9) || (ex == 12)) { ex += 4; - qs.set("ex", ex); + st.set("ex", ex); htmltext = event; } } @@ -320,13 +335,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE4: { - if (qs.isCond(7) && (qs.getInt("ex") <= 7)) + if (st.isCond(7) && (st.getInt("ex") <= 7)) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 3) || (ex == 5) || (ex == 6)) { ex += 8; - qs.set("ex", ex); + st.set("ex", ex); htmltext = event; } } @@ -341,36 +356,36 @@ public class Q00115_TheOtherSideOfTruth extends Quest { case ICE_SCULPTURE1: { - if (qs.isCond(7) && (qs.getInt("ex") == 14)) + if (st.isCond(7) && (st.getInt("ex") == 14)) { - qs.setCond(8); + st.setCond(8); htmltext = event; } break; } case ICE_SCULPTURE2: { - if (qs.isCond(7) && (qs.getInt("ex") == 13)) + if (st.isCond(7) && (st.getInt("ex") == 13)) { - qs.setCond(8); + st.setCond(8); htmltext = event; } break; } case ICE_SCULPTURE3: { - if (qs.isCond(7) && (qs.getInt("ex") == 11)) + if (st.isCond(7) && (st.getInt("ex") == 11)) { - qs.setCond(8); + st.setCond(8); htmltext = event; } break; } case ICE_SCULPTURE4: { - if (qs.isCond(7) && (qs.getInt("ex") == 7)) + if (st.isCond(7) && (st.getInt("ex") == 7)) { - qs.setCond(8); + st.setCond(8); htmltext = event; } break; @@ -385,10 +400,14 @@ public class Q00115_TheOtherSideOfTruth extends Quest @Override public String onTalk(L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, true); + final QuestState st = getQuestState(player, true); String htmltext = getNoQuestMsg(player); + if (st == null) + { + return htmltext; + } - switch (qs.getState()) + switch (st.getState()) { case State.COMPLETED: { @@ -400,7 +419,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case State.CREATED: { - htmltext = (player.getLevel() >= MIN_LEVEL) ? "32020-01.htm" : "32020-03.html"; + htmltext = "32020-01.htm"; break; } case State.STARTED: @@ -409,7 +428,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest { case RAFFORTY: { - switch (qs.getCond()) + switch (st.getCond()) { case 1: { @@ -418,7 +437,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case 2: { - htmltext = !hasQuestItems(player, MISAS_LETTER) ? "32020-05.html" : "32020-06.html"; + htmltext = (!hasQuestItems(player, MISAS_LETTER)) ? "32020-05.html" : "32020-06.html"; break; } case 3: @@ -434,7 +453,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest case 5: { giveItems(player, RAFFORTYS_LETTER, 1); - qs.setCond(6, true); + st.setCond(6, true); htmltext = "32020-18.html"; break; } @@ -478,9 +497,18 @@ public class Q00115_TheOtherSideOfTruth extends Quest } else { - giveAdena(player, 115673, true); - addExpAndSp(player, 493595, 40442); - qs.exitQuest(false, true); + if ((player.getLevel() >= MIN_LEVEL)) + { + giveAdena(player, 193350, true); + addExpAndSp(player, 956590, 229); + st.exitQuest(false, true); + htmltext = "32020-30.html"; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + break; + } htmltext = "32020-30.html"; } break; @@ -490,12 +518,12 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case MISA: { - switch (qs.getCond()) + switch (st.getCond()) { case 1: { giveItems(player, MISAS_LETTER, 1); - qs.setCond(2, true); + st.setCond(2, true); htmltext = "32018-01.html"; break; } @@ -532,7 +560,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case KIER: { - switch (qs.getCond()) + switch (st.getCond()) { case 8: { @@ -565,13 +593,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE1: { - switch (qs.getCond()) + switch (st.getCond()) { case 7: { - if ((qs.getInt("ex") % 2) <= 1) + if ((st.getInt("ex") % 2) <= 1) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 6) || (ex == 10) || (ex == 12)) { htmltext = "32021-01.html"; @@ -583,7 +611,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest else { ex++; - qs.set("ex", ex); + st.set("ex", ex); htmltext = "32021-07.html"; } } @@ -616,13 +644,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE2: { - switch (qs.getCond()) + switch (st.getCond()) { case 7: { - if ((qs.getInt("ex") % 4) <= 1) + if ((st.getInt("ex") % 4) <= 1) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 5) || (ex == 9) || (ex == 12)) { htmltext = "32021-01.html"; @@ -634,7 +662,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest else { ex += 2; - qs.set("ex", ex); + st.set("ex", ex); htmltext = "32021-07.html"; } } @@ -667,13 +695,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE3: { - switch (qs.getCond()) + switch (st.getCond()) { case 7: { - if ((qs.getInt("ex") % 8) <= 3) + if ((st.getInt("ex") % 8) <= 3) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 3) || (ex == 9) || (ex == 10)) { htmltext = "32021-01.html"; @@ -685,7 +713,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest else { ex += 4; - qs.set("ex", ex); + st.set("ex", ex); htmltext = "32021-07.html"; } } @@ -718,13 +746,13 @@ public class Q00115_TheOtherSideOfTruth extends Quest } case ICE_SCULPTURE4: { - switch (qs.getCond()) + switch (st.getCond()) { case 7: { - if (qs.getInt("ex") <= 7) + if (st.getInt("ex") <= 7) { - int ex = qs.getInt("ex"); + int ex = st.getInt("ex"); if ((ex == 3) || (ex == 5) || (ex == 6)) { htmltext = "32021-01.html"; @@ -736,7 +764,7 @@ public class Q00115_TheOtherSideOfTruth extends Quest else { ex += 8; - qs.set("ex", ex); + st.set("ex", ex); htmltext = "32021-07.html"; } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-01.htm index 015c41f7af..c7a0b914f8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-01.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-01.htm @@ -2,5 +2,5 @@ You have now become both the Hands and the Feet of the Temple of Einhasad.
Before you can carry out even more important missions, however, you must achieve the title of the Limbs of the Temple.
To do so, you must pass a simple oral exam.
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-03.html index fec6294b08..3be9404049 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-03.html @@ -1,7 +1,7 @@ High Priest Sylvain:
Who established the Temple after receiving the goddess' message, sent through an angel with three wings during the early years of the Elmoreden Empire?
- - - - + + + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-05.html index 16c7af9a24..a2118e3080 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-05.html @@ -2,8 +2,8 @@ Correct.
Let us move on to the next question.
Einhasad is the patron goddess of which race?
- - - - + + + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-06.html index c3c5f3454f..f9f12c8d4f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-06.html @@ -2,8 +2,8 @@ Correct!
We will move on to the final question.
How should political and military power, currently fragmented throughout this chaotic continent, best be concentrated and used?
- - + + - + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-07.html index a7cae97403..fb13c83f62 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-07.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-07.html @@ -3,8 +3,8 @@ Excellent!
Your knowledge of the history, traditions and aims of the Temple of Einhasad is impressive.

I now confer upon you the title of the Limbs of the Temple.
...
-You have now entered the inner circle of our order and will report directy to me as High Priest.
+You have now entered the inner circle of our order and will report directly to me as High Priest.
I will assign you missions of vital importance to the preservation and success of our Temple...
I already have a mission in mind for you. Listen carefully...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-08.html index 5b0f8703a8..64ef86e294 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-08.html @@ -1,7 +1,7 @@ High Priest Sylvain:
Many of our regional temples have recently reported certain signs and omens that we cannot ignore...
We dispatched an inspector to investigate, but apparently something befell his party near the Execution Grounds.
-He was carrying the final report on his discoveries when, we suspect, he and his companions were attacked.

-Defeat monsters at the Dion Hills -- Hobgoblin, Dion Grizzly, Dire Wolf, Ol Mahum Ranger, Monster Eye Searcher, Monster Eye Gazer, Enku Orc Champion and Enku Orc Shaman -- and bring me the pieces of the inspector's report.
-It should be approximately 30 pages altogether... +He was carrying the final report on his discoveries
when, we suspect, he and his companions were attacked.

+Defeat monsters at the Execution Grounds -- Hobgoblin, Dion Grizzly, Dire Wolf, Ol Mahum Ranger, Monster Eye Searcher, Monster Eye Gazer, Enku Orc Champion, and Enku Orc Shaman -- and bring me the pieces of the inspector's report.
+It should be approximately 30 pages altogether... \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-09.html index b23dd67050..f2c82f57af 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-09.html @@ -1,6 +1,7 @@ High Priest Sylvain:
Ah...
You have recovered the remains of the inspector's report? Good.
-We will piece it back together and analyze its contents.
This may take some time; please take some refreshment and make yourself comfortable.
- +We will piece it back together and analyze its contents.
+This may take some time; please take some refreshment and make yourself comfortable.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-10.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-10.html index e8bb09b358..677ce0f215 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-10.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-10.html @@ -1,7 +1,8 @@ High Priest Sylvain:
Hmm... This is unbelievable...
The signs reported by many of our brethren signify the advent of an angel!
-Our man was investigating when and where the angel would come down to earth.
Apparently, he found an eyewitness who claims to have actually seen the angel...
-If true, this means that Einhasad may be sending us another message, just as she did to Emperor Schuneimann long ago...
- +Our man was investigating when and where the angel would come down to earth.
+Apparently, he found an eyewitness who claims to have actually seen the angel...
+If true, this means that Einhasad may be sending us another message, just as she did to Emperor Shunaiman long ago...
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-11.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-11.html index bf3fcc600c..ca9eef5016 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-11.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-11.html @@ -1,5 +1,5 @@ High Priest Sylvain:
-During the reign of Emperor Schuneimann, you remember, an angel appeared and gave the emperor some of the goddess' power so that he might destroy his enemies and establish Einhasad's Temple.
+During the reign of Emperor Shunaiman, you remember, an angel appeared and gave the emperor some of the goddess' power so that he might destroy his enemies and establish Einhasad's Temple.
It can be no accident that another angel has appeared at this particular time.
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-12.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-12.html index 1ff2b1a295..fbb4fca091 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-12.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-12.html @@ -1,8 +1,8 @@ High Priest Sylvain:
-Emperor Schuneimann established our Temple in accordance with the goddess' instructions relayed through the angel with three wings. Now, though, we are besieged on all sides.
+Emperor Shunaiman established our Temple in accordance with the goddess' instructions relayed through the angel with three wings. Now, though, we are besieged on all sides.
Some say that Einhasad is not the goddess of the people, and I am sad to say that this heresy has taken root and spread.
Others, many of whom were once members of this Temple, have forsaken us by claiming that truth cannot be found with us, but rather in the desert and among the people...
Some of our brethren have been misled, and we earnestly desire that they return to fellowship with us.
But those false prophets will be punished harshly by Einhasad, cast into the eternal dark...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-13.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-13.html index 8f20da222d..c21fa78628 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-13.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-13.html @@ -1,5 +1,5 @@ High Priest Sylvain:
-These false prophets are planning to cause chaos by instigating the Revolutionaries of Dusk to rebel against the rightful Rulers of Dawn, who respect order and justice.
+These false prophets are planning to cause chaos by instigating the Revolutionaries of Dusk to rebel against the rightful Lords of Dawn, who respect order and justice.
Many of their followers, however, are still faithful children of the goddess who have simply been misled. We must persuade them to repent and return to us before it is too late...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-14.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-14.html index 8da8df3acd..a786d4a801 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-14.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-14.html @@ -1,6 +1,6 @@ High Priest Sylvain:
Even those who challenge the authority of the Temple must give heed to this momentous event, the advent of the angel...
It is obvious the angel has appeared at this time in order to confirm the legitimacy and authority of the Temple.
-We must make contact with the angel and, as Schuneimann did long ago, receive power from the goddess in order to make our foes quake with fear!
- +We must make contact with the angel and, as Shunaiman did long ago, receive power from the goddess in order to make our foes quake with fear!
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-16.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-16.html index 3ce4f34903..9d87b64c08 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-16.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-16.html @@ -1,5 +1,5 @@ High Priest Sylvain:
(After saying goodbye, you hear the High Priest muttering softly to himself.)
It will be very difficult to disseminate the manifesto to each group -- many lie in dangerous areas and many more will suspect a trick and refuse to meet with any representative we send...
-Perhaps an experienced adventurer would offer advantages on both counts... +Perhaps an experienced adventurer would offer advantages on both counts... \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-17.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-17.html new file mode 100644 index 0000000000..ecff29dfe3 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-17.html @@ -0,0 +1,5 @@ +High Priest Sylvain:
+When you are more experienced, you will be able to carry out important missions on behalf of the Temple of Einhasad.
+Train hard and return to me when you are ready.
+(Only characters level 35 or above are permitted to undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-18.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-18.html new file mode 100644 index 0000000000..ad81de4f42 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/30070-18.html @@ -0,0 +1,7 @@ +High Priest Sylvain:
+You are neither the Hands nor the Feet of the Temple of Einhasad....
+I'm a bit uncomfortable entrusting you with an important mission for the Temple.
+There is some classified information about the Temple involved here, you see... Please understand...
+You may ask Priest Shegfield about becoming the Hands of the Temple, and you can speak with Priest Glyvka about becoming the Feet of the Temple...
+(Only characters who have completed the Feet of the Temple and Hands of the Temple quests are permitted to take on this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/Q00137_TempleChampionPart1.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/Q00137_TempleChampionPart1.java index 556da9f623..a645a75d2e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/Q00137_TempleChampionPart1.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00137_TempleChampionPart1/Q00137_TempleChampionPart1.java @@ -21,10 +21,14 @@ import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +import quests.Q00134_TempleMissionary.Q00134_TempleMissionary; +import quests.Q00135_TempleExecutor.Q00135_TempleExecutor; /** * Temple Champion - 1 (137) - * @author nonom + * @author nonom, Gladicek */ public class Q00137_TempleChampionPart1 extends Quest { @@ -32,19 +36,20 @@ public class Q00137_TempleChampionPart1 extends Quest private static final int SYLVAIN = 30070; private static final int MOBS[] = { - 20147, // Hobgoblin - 20203, // Dion Grizzly - 20205, // Dire Wolf - 20224, // Ol Mahum Ranger - 20265, // Monster Eye Searcher - 20266, // Monster Eye Gazer - 20291, // Enku Orc Hero - 20292, // Enku Orc Shaman + 20083, // Granite Golem + 20144, // Hangman Tree + 20199, // Amber Basilisk + 20200, // Strain + 20201, // Ghoul + 20202, // Dead Seeker }; // Items private static final int FRAGMENT = 10340; private static final int EXECUTOR = 10334; private static final int MISSIONARY = 10339; + // Misc + private static final int MIN_LEVEL = 35; + private static final int MAX_LEVEL = 41; public Q00137_TempleChampionPart1() { @@ -52,69 +57,84 @@ public class Q00137_TempleChampionPart1 extends Quest addStartNpc(SYLVAIN); addTalkId(SYLVAIN); addKillId(MOBS); + addCondMinLevel(MIN_LEVEL, "30070-17.html"); + addCondCompletedQuest(Q00134_TempleMissionary.class.getSimpleName(), "30070-18.html"); + addCondCompletedQuest(Q00135_TempleExecutor.class.getSimpleName(), "30070-18.html"); registerQuestItems(FRAGMENT); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, false); - if (qs == null) + final QuestState st = getQuestState(player, false); + if (st == null) { return getNoQuestMsg(player); } + + String htmltext = event; switch (event) { case "30070-02.htm": { - qs.startQuest(); + st.startQuest(); break; } case "30070-05.html": { - qs.set("talk", "1"); + st.set("talk", "1"); break; } case "30070-06.html": { - qs.set("talk", "2"); + st.set("talk", "2"); break; } case "30070-08.html": { - qs.unset("talk"); - qs.setCond(2, true); + if (st.isCond(1)) + { + st.unset("talk"); + st.setCond(2, true); + } break; } case "30070-16.html": { - if (qs.isCond(3) && hasQuestItems(player, EXECUTOR) && hasQuestItems(player, MISSIONARY)) + if (st.isCond(3) && (hasQuestItems(player, EXECUTOR) && hasQuestItems(player, MISSIONARY))) { - takeItems(player, EXECUTOR, -1); - takeItems(player, MISSIONARY, -1); - giveAdena(player, 69146, true); - if (player.getLevel() < 41) + if (player.getLevel() >= MIN_LEVEL) { - addExpAndSp(player, 219975, 13047); + takeItems(player, EXECUTOR, -1); + takeItems(player, MISSIONARY, -1); + giveAdena(player, 69146, true); + if (player.getLevel() < MAX_LEVEL) + { + addExpAndSp(player, 219975, 20); + } + st.exitQuest(false, true); + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); } - qs.exitQuest(false, true); } break; } } - return event; + return htmltext; } @Override public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) { - final QuestState qs = getQuestState(player, false); - if ((qs != null) && qs.isStarted() && qs.isCond(2) && (getQuestItemsCount(player, FRAGMENT) < 30)) + final QuestState st = getQuestState(player, false); + if ((st != null) && st.isCond(2) && (getQuestItemsCount(player, FRAGMENT) < 30)) { giveItems(player, FRAGMENT, 1); if (getQuestItemsCount(player, FRAGMENT) >= 30) { - qs.setCond(3, true); + st.setCond(3, true); } else { @@ -128,58 +148,70 @@ public class Q00137_TempleChampionPart1 extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(player); - final QuestState qs = getQuestState(player, true); - - if (qs.isCompleted()) + final QuestState st = getQuestState(player, true); + if (st == null) { - return getAlreadyCompletedMsg(player); + return htmltext; } - switch (qs.getCond()) + + switch (st.getState()) { - case 1: + case State.CREATED: { - switch (qs.getInt("talk")) + htmltext = "30070-01.htm"; + break; + } + case State.STARTED: + { + switch (st.getCond()) { case 1: { - htmltext = "30070-05.html"; + switch (st.getInt("talk")) + { + case 1: + { + htmltext = "30070-05.html"; + break; + } + case 2: + { + htmltext = "30070-06.html"; + break; + } + default: + { + htmltext = "30070-03.html"; + break; + } + } break; } case 2: { - htmltext = "30070-06.html"; + htmltext = "30070-08.html"; break; } - default: + case 3: { - htmltext = "30070-03.html"; + if (st.getInt("talk") == 1) + { + htmltext = "30070-10.html"; + } + else if (getQuestItemsCount(player, FRAGMENT) >= 30) + { + st.set("talk", "1"); + htmltext = "30070-09.html"; + takeItems(player, FRAGMENT, -1); + } break; } } break; } - case 2: + case State.COMPLETED: { - htmltext = "30070-08.html"; - break; - } - case 3: - { - if (qs.getInt("talk") == 1) - { - htmltext = "30070-10.html"; - } - else if (getQuestItemsCount(player, FRAGMENT) >= 30) - { - qs.set("talk", "1"); - htmltext = "30070-09.html"; - takeItems(player, FRAGMENT, -1); - } - break; - } - default: - { - htmltext = ((player.getLevel() >= 35) && hasQuestItems(player, EXECUTOR, MISSIONARY)) ? "30070-01.htm" : "30070-00.html"; + htmltext = getAlreadyCompletedMsg(player); break; } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-01.htm index c9a78aa7fc..59c6600b96 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-01.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-01.htm @@ -1,10 +1,9 @@ High Priest Sylvain:
Ah, the Limbs of the Temple...
-...
We wish to distribute our manifesto -- which argues that the advent of the angel proves the Temple's legitimacy and authority -- to the various breakaway groups.
This will give them a final chance to repent of their apostasy and return to our loving fold, and in so doing escape eternal punishment.
But it will be very difficult to disseminate the manifesto to each group -- many lie in dangerous areas and many more will suspect a trick and refuse to meet with any representative we send...
However, an experienced adventurer might be able to both reach these groups and convince them to hear him out.
Will you help us?
- \ No newline at end of file + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-02.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-02.htm index 0193481295..58d3bd9856 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-02.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-02.htm @@ -3,6 +3,6 @@ Thanks to your efforts, we were able to recreate the missing inspector's report. Based on his findings, we have written a manifesto showing that the advent of the angel proves the authority and legitimacy of the Temple.
We wish to distribute this document to the groups who have broken ties with us.
If you give this to Preacher Sla, he will be able to disseminate it to those groups.
-But...

+But...
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-04.html index 3376bc7960..99ac72d5b5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-04.html @@ -1,9 +1,8 @@ High Priest Sylvain:
-(Tell him that you met Preacher Sla and gave him the manifesto, and have returned with a message from him.)
+(Tell him that you met Preacher Sla and gave her the manifesto, and have returned with a message from her.)
Only a strong and unified Temple can bring peace to this continent, and only concentrated power can protect the people.
Besides, the angel of Einhasad has obviously come down to empower us in our holy mission. What else would it mean?
But even with this clear evidence, I see they will not accept the truth. I just do not understand them...
-We are now attempting to determine the angel's exact whereabouts.
-Once we contact the angel, surely even the apostates must accept our authority.
+We are now attempting to determine the angel's exact whereabouts.
Once we contact the angel, surely even the apostates must accept our authority.
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-10.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-10.htm new file mode 100644 index 0000000000..78b9117010 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-10.htm @@ -0,0 +1,5 @@ +High Priest Sylvain:
+Ah... Although I have no doubt that you are an experienced adventurer, I don't think you are ready for this mission.
+Come back after you have had more training...
+(Only characters level 36 or above are permitted to undertake this quest.) + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-11.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-11.htm new file mode 100644 index 0000000000..76d368e1b2 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30070-11.htm @@ -0,0 +1,6 @@ +High Priest Sylvain:
+You, adventurer, are not one of the Temple Champions.
+That means that you cannot carry out certain important missions.
+There is classified information involved... You understand, I'm sure?
+(Only characters who have completed the first Temple Champion quest may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-01.html index d6d6c7b0d8..78d12c842b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-01.html @@ -1,8 +1,8 @@ Priestess Pupina:
Greetings, adventurer who carries out the mission of the Temple!
-Do you wish to meet Preacher Sla?
-As you know, the preachers' goals differ somewhat from the goals of the Temple priests.
-Preachers believe that the Temple's rigid rules and ceremonies often serve as a barrier to a true understanding of and relationship with the goddess.
-And given the Temple's close association with the aristocracy, many preachers are critical that the priests are more concerned with personal status and wealth than true service.
+Do you wish to meet Prophet Sla?
+As you know, the prophets' goals differ somewhat from the goals of the Temple priests.
+Prophets believe that the Temple's rigid rules and ceremonies often serve as a barrier to a true understanding of and relationship with the goddess.
+And given the Temple's close association with the aristocracy, many prophets are critical that the priests are more concerned with personal status and wealth than true service.
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-02.html index 978be937e7..67443c95e6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-02.html @@ -1,7 +1,8 @@ Priestess Pupina:
I believe that the Temple is a vital part of our religion, but that it also is in need of reform.
As you can guess, such a view has cast me into some disfavor with my superiors.
-I also maintain friendly relations with many preachers, something else that is in practice frowned upon.
-Since you occupy a high position in the service of the Temple, if you wish to speak with Preacher Sla you will need to prove that your views are not those of the conservative Temple hierarchy.
+I also maintain friendly relations with many prophets, something else that is in practice frowned upon.
+Since you occupy a high position in the service of the Temple, if you wish to speak with Prophet Sla,
+you will need to prove that your views are not those of the conservative Temple hierarchy.
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-04.html index ed6d4d30b3..d409b13426 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-04.html @@ -2,7 +2,7 @@ Grand Master Angus in the Town of Giran is charged with the raising of Dark Elves.
We have heard word that one of the Dark Elven trainees was involved in a serious accident.
I think Angus may need help to deal with it. I will ask him for more information, but I must warn you that in rendering him aid you will almost certainly be violating the rules of your order.
-Angus knows Preacher Sla well, however, and if you help him I am sure that he will write a letter of recommendation on your behalf.
Knowing that you may be asked to break the Temple code, do you still want to undertake this task?
+Angus knows Prophet Sla well, however, and if you help him I am sure that he will write a letter of recommendation on your behalf.
Knowing that you may be asked to break the Temple code, do you still want to undertake this task?
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-08.html index fff890cd23..d67d27ebbf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-08.html @@ -1,5 +1,6 @@ Priestess Pupina:
-Ah, I see you have brought me a letter from Angus...
Let me see...
+Ah, I see you have brought me a letter from Angus...
+Let me see...
Hmm...according to this, you assisted in a ritual to Shilen, whom Einhasad imprisoned long ago. There can be no doubt that you have violated the rules of the Temple in this matter -- and gravely.
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-09.html index 73a9e2593b..3b284471da 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30118-09.html @@ -1,5 +1,5 @@ Priestess Pupina:
-That is well and wisely said! Both your actions and your words prove that you are very different from those arrogant Temple priests, obessed with the letter of the law rather than its spirit.
+That is well and wisely said! Both your actions and your words prove that you are very different from those arrogant Temple priests, obsessed with the letter of the law rather than its spirit.
You have proved that you are indeed a reasonable person.
I will write you the letter of recommendation. Show it to Preacher Sla in the wilderness, and perhaps he will treat you as a friend.
May the light of Einhasad shine upon your journey and guard you from every danger... diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-01.html index 710136f296..ecd9b131f2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-01.html @@ -6,7 +6,6 @@ Well then... One of the Dark Elven trainees was accidentally killed during an ac I am preparing a ritual that will permit his soul to return to Shilen in peace.
I do this in accord with the customs of his people...
To perform the ritual, however, we will need his belongings, which were lost in Death Pass.
-You belong to the Temple of Einhasad, do you not?
-Are you sure that you wish to provide aid to a follower of Shilen?
+You belong to the Temple of Einhasad, do you not?
Are you sure that you wish to provide aid to a follower of Shilen?
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-04.html index 6072608c76..bfd2e02a3b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30474-04.html @@ -1,6 +1,5 @@ Grand Master Angus:
-You have returned with all of this belongings! -Shilen be praised!
+You have returned with all of his belongings! Shilen be praised!
Thanks to your help, we will be able to send the soul of the dead Dark Elven trainee to rest with Shilen.
We are in your debt.
I will write you a letter of recommendation so that others of my faith will not treat you like one of those arrogant priests of the Temple of Einhasad. diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-01.html index a0249ca48b..8ae50b3cc9 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-01.html @@ -1,6 +1,6 @@ -Preacher Sla:
+Prophet Sla:
Hmmph! By the look of you, you must be associated with the Temple of Einhasad.
I have nothing to say to such a person.
Even if we were to talk, I know how it would end...
- - \ No newline at end of file + + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-02.html index e96357d12d..9c483eb815 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-02.html @@ -1,6 +1,6 @@ -Preacher Sla:
+Prophet Sla:
What's this, then? Hmm...
-(Preacher Sla reads Pupina's letter of recommendation.)
-Well, well. You might be a person I can civilly converse with after all. Tell me, stranger, why are you here?
- +(She reads Pupina's letter of recommendation.)
+Well, well. You might be a person worth talking to after all. Very well, stranger, tell me: why are you here?
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-03.html index bc87c1c440..22279557b1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-03.html @@ -1,5 +1,5 @@ -Preacher Sla:
-(Preacher Sla reads the manifesto.)
+Prophet Sla:
+(Prophet Sla reads the manifesto.)
So...the angel of Einhasad has fallen to earth... Amazing...
\ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-04.html index fb7616e7cb..9b80979046 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-04.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-04.html @@ -1,9 +1,9 @@ -Preacher Sla:
+Prophet Sla:
See here...
According to my studies, there is a distinct possibility that Einhasad is not the creator of the Humans after all...
-I have uncovered certain ancient sources that predate the Elmoreden period and survived Emperor Schuneimann's purges. They suggest that humanity was in fact created in another fashion altogether.
+I have uncovered certain ancient sources that predate the Elmoreden period and survived Emperor Shunaiman's purges. They suggest that humanity was in fact created in another fashion altogether.
In my opinion, the Humans who conquered this continent needed a myth in order to dignify themselves and secure their control over the empire...
The Temple of Einhasad was accordingly formed chiefly for political reasons.
-Think about it. It certainly explains why the Temple has fostered such an intimate relationship with the Rulers of Dawn, the ones with secular power.
- +Think about it. It certainly explains why the Temple has fostered such an intimate relationship with the Lords of Dawn, the ones with secular power.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-05.html index 85bbec09ba..86287339f4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-05.html @@ -1,8 +1,8 @@ -Preacher Sla:
+Prophet Sla:
Yes, I admit that miracle actually happened.
-Much of Emperor Schuneimann's recorded actions and abilities cannot be explained apart from whatever power he received from Einhasad.
+Much of Emperor Shunaiman's recorded actions and abilities cannot be explained apart from whatever power he received from Einhasad.
But I think the deal went both ways. I have discovered that Einhasad possibly required some kind of assistance from this Human who had conquered the continent.
-In his turn, Schuneimann needed legitimacy, which he gained through performing miracles.
+In his turn, Shunaiman needed legitimacy, which he gained through performing miracles.
I think the two of them concluded some sort of contract with each other...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-06.html index c615809c21..32494d260d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-06.html @@ -1,7 +1,7 @@ -Preacher Sla:
+Prophet Sla:
It seems that Einhasad desperately wants to stop something...what exactly, we still don't know.
Perhaps it has to do with the elimination of the followers of Shilen and the monsters spawned by the dark goddess...
-That makes sense, considering how harshly Emperor Schuneimann persecuted Dark Wizards, Shilen's disciples and the followers of Gran Kain. Interestingly, by the way, those persecutions began after his first miracle... Coincidence? I'm inclined to think not.
+That makes sense, considering how harshly Emperor Shunaiman persecuted Dark Wizards, Shilen's disciples and the followers of Gran Kain. Interestingly, by the way, those persecutions began after his first miracle... Coincidence? I'm inclined to think not.
My research is still in progress, so there are still many questions.
But I was able to find some evidence that may show a linkage...
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-07.html index 69e24974ce..e9f4891ee8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-07.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-07.html @@ -1,9 +1,8 @@ -Preacher Sla:
+Prophet Sla:
Since the beginning, the Temple has been deeply involved in politics, even as it continues to stubbornly insist on its divine legitimacy.
But look closer at this manifesto...
The possible presence of the angel here could either support their claims or be their ruin.
-What if the angel offers a glimpse of the divine that is vastly different than what the Temple has maintained is the truth?
-Its entire foundation will collapse...
+What if the angel offers a glimpse of the divine that is vastly different than what the Temple has maintained is the truth?
Its entire foundation will collapse...
The only way to be sure, of course, is to find this angel and learn why he has come...
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-08.html index 9ef765b4ef..851ebb98d7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-08.html @@ -1,7 +1,7 @@ -Preacher Sla:
-I can see your confusion.
-Despite what you may have heard me say, don't lose your faith in the goddess. Regardless of race or rank, Einhasad's light and healing magic is still very much present in our world.
-I do not know what happened between Einhasad and Emperor Schuneimann, but...
-It is my belief that it is not the goddess who is at fault for the misfortunes that have befallen her people; it is rather the fault of those who exploit her name for their own power and advancement.
-Go tell High Priest Sylvain what I just told you. +Prophet Sla:
+I can see you're confused...
+That's understandable, but take care that you don't lose faith! Remember that the healing power of Einhasad is everywhere, regardless of rank or race.
+I don't know what happened between Einhasad and Emperor Shunaiman, but...
+I refuse to believe that the goddess is somehow in error -- it must be those mortals who pervert her good name for their own advancement that are to blame.
+Now go tell High Priest Sylvain what I just told you! \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-09.html index 2292377a5d..ed5c3e91e7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/30666-09.html @@ -1,6 +1,6 @@ -Preacher Sla:
+Prophet Sla:
Don't lose your faith in the goddess. Regardless of race or rank, Einhasad's light and healing magic is still very much present in our world.
-I do not know what happened between Einhasad and Emperor Schuneimann, but...
+I do not know what happened between Einhasad and Emperor Shunaiman, but...
It is my belief that it is not the goddess who is at fault for the misfortunes that have befallen her people; it is rather the fault of those who exploit her name for their own power and advancement.
Go tell High Priest Sylvain what I just told you. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/Q00138_TempleChampionPart2.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/Q00138_TempleChampionPart2.java index 557711055a..0947889a4f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/Q00138_TempleChampionPart2.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00138_TempleChampionPart2/Q00138_TempleChampionPart2.java @@ -21,12 +21,13 @@ import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; import quests.Q00137_TempleChampionPart1.Q00137_TempleChampionPart1; /** * Temple Champion - 2 (138) - * @author nonom + * @author nonom, Gladicek */ public class Q00138_TempleChampionPart2 extends Quest { @@ -47,6 +48,9 @@ public class Q00138_TempleChampionPart2 extends Quest private static final int RELICS_OF_THE_DARK_ELF_TRAINEE = 10342; private static final int ANGUS_RECOMMENDATION = 10343; private static final int PUPINAS_RECOMMENDATION = 10344; + // Misc + private static final int MIN_LEVEL = 36; + private static final int MAX_LEVEL = 42; public Q00138_TempleChampionPart2() { @@ -54,61 +58,85 @@ public class Q00138_TempleChampionPart2 extends Quest addStartNpc(SYLVAIN); addTalkId(SYLVAIN, PUPINA, ANGUS, SLA); addKillId(MOBS); + addCondMinLevel(MIN_LEVEL, "30070-10.htm"); + addCondCompletedQuest(Q00137_TempleChampionPart1.class.getSimpleName(), "30070-11.htm"); registerQuestItems(TEMPLE_MANIFESTO, RELICS_OF_THE_DARK_ELF_TRAINEE, ANGUS_RECOMMENDATION, PUPINAS_RECOMMENDATION); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(player, false); - if (qs == null) + final QuestState st = getQuestState(player, false); + if (st == null) { return getNoQuestMsg(player); } + + String htmltext = event; + switch (event) { case "30070-02.htm": { - qs.startQuest(); + st.startQuest(); giveItems(player, TEMPLE_MANIFESTO, 1); break; } case "30070-05.html": { - giveAdena(player, 84593, true); - if (player.getLevel() < 42) + if (player.getLevel() >= MIN_LEVEL) { - addExpAndSp(player, 187062, 11307); + giveAdena(player, 84593, true); + if ((player.getLevel() < MAX_LEVEL)) + { + addExpAndSp(player, 187062, 20); + } + st.exitQuest(false, true); + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); } - qs.exitQuest(false, true); break; } case "30070-03.html": { - qs.setCond(2, true); + if (st.isCond(1)) + { + st.setCond(2, true); + } break; } case "30118-06.html": { - qs.setCond(3, true); + if (st.isCond(2)) + { + st.setCond(3, true); + } break; } case "30118-09.html": { - qs.setCond(6, true); - giveItems(player, PUPINAS_RECOMMENDATION, 1); + if (st.isCond(5)) + { + st.setCond(6, true); + giveItems(player, PUPINAS_RECOMMENDATION, 1); + } break; } case "30474-02.html": { - qs.setCond(4, true); + if (st.isCond(3)) + { + st.setCond(4, true); + } break; } case "30666-02.html": { if (hasQuestItems(player, PUPINAS_RECOMMENDATION)) { - qs.set("talk", "1"); + st.setMemoState(1); takeItems(player, PUPINAS_RECOMMENDATION, -1); } break; @@ -117,26 +145,29 @@ public class Q00138_TempleChampionPart2 extends Quest { if (hasQuestItems(player, TEMPLE_MANIFESTO)) { - qs.set("talk", "2"); + st.setMemoState(2); takeItems(player, TEMPLE_MANIFESTO, -1); } break; } case "30666-08.html": { - qs.setCond(7, true); - qs.unset("talk"); + if (st.isCond(6)) + { + st.setCond(7, true); + st.setMemoState(0); + } break; } } - return event; + return htmltext; } @Override public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) { - final QuestState qs = getQuestState(player, false); - if ((qs != null) && qs.isStarted() && qs.isCond(4) && (getQuestItemsCount(player, RELICS_OF_THE_DARK_ELF_TRAINEE) < 10)) + final QuestState st = getQuestState(player, false); + if ((st != null) && st.isCond(4) && (getQuestItemsCount(player, RELICS_OF_THE_DARK_ELF_TRAINEE) < 10)) { giveItems(player, RELICS_OF_THE_DARK_ELF_TRAINEE, 1); if (getQuestItemsCount(player, RELICS_OF_THE_DARK_ELF_TRAINEE) >= 10) @@ -155,144 +186,134 @@ public class Q00138_TempleChampionPart2 extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(player); - final QuestState qs = getQuestState(player, true); - - switch (npc.getId()) + final QuestState st = getQuestState(player, true); + if (st == null) { - case SYLVAIN: + return htmltext; + } + + switch (st.getState()) + { + case State.CREATED: { - switch (qs.getCond()) + if (npc.getId() == SYLVAIN) { - case 1: - { - htmltext = "30070-02.htm"; - break; - } - case 2: - case 3: - case 4: - case 5: - case 6: - { - htmltext = "30070-03.html"; - break; - } - case 7: - { - htmltext = "30070-04.html"; - break; - } - default: - { - if (qs.isCompleted()) - { - return getAlreadyCompletedMsg(player); - } - final QuestState qst = player.getQuestState(Q00137_TempleChampionPart1.class.getSimpleName()); - htmltext = (player.getLevel() >= 36) ? ((qst != null) && qst.isCompleted()) ? "30070-01.htm" : "30070-00a.htm" : "30070-00.htm"; - break; - } + htmltext = "30070-01.htm"; } break; } - case PUPINA: + case State.STARTED: { - switch (qs.getCond()) + switch (npc.getId()) { - case 2: + case SYLVAIN: { - htmltext = "30118-01.html"; - break; - } - case 3: - case 4: - { - htmltext = "30118-07.html"; - break; - } - case 5: - { - htmltext = "30118-08.html"; - if (hasQuestItems(player, ANGUS_RECOMMENDATION)) - { - takeItems(player, ANGUS_RECOMMENDATION, -1); - } - break; - } - case 6: - { - htmltext = "30118-10.html"; - break; - } - } - break; - } - case ANGUS: - { - switch (qs.getCond()) - { - case 3: - { - htmltext = "30474-01.html"; - break; - } - case 4: - { - if (getQuestItemsCount(player, RELICS_OF_THE_DARK_ELF_TRAINEE) >= 10) - { - takeItems(player, RELICS_OF_THE_DARK_ELF_TRAINEE, -1); - giveItems(player, ANGUS_RECOMMENDATION, 1); - qs.setCond(5, true); - htmltext = "30474-04.html"; - } - else - { - htmltext = "30474-03.html"; - } - break; - } - case 5: - { - htmltext = "30474-05.html"; - break; - } - } - break; - } - case SLA: - { - switch (qs.getCond()) - { - case 6: - { - switch (qs.getInt("talk")) + switch (st.getCond()) { case 1: - { - htmltext = "30666-02.html"; + htmltext = "30070-02.htm"; break; - } case 2: - { - htmltext = "30666-03.html"; + case 3: + case 4: + case 5: + case 6: + htmltext = "30070-03.html"; break; - } - default: - { - htmltext = "30666-01.html"; + case 7: + htmltext = "30070-04.html"; break; - } } break; } - case 7: + case PUPINA: { - htmltext = "30666-09.html"; + switch (st.getCond()) + { + case 2: + htmltext = "30118-01.html"; + break; + case 3: + case 4: + htmltext = "30118-07.html"; + break; + case 5: + { + if (hasQuestItems(player, ANGUS_RECOMMENDATION)) + { + takeItems(player, ANGUS_RECOMMENDATION, -1); + htmltext = "30118-08.html"; + } + break; + } + case 6: + htmltext = "30118-10.html"; + break; + } + break; + } + case ANGUS: + { + switch (st.getCond()) + { + case 3: + htmltext = "30474-01.html"; + break; + case 4: + { + if (getQuestItemsCount(player, RELICS_OF_THE_DARK_ELF_TRAINEE) >= 10) + { + takeItems(player, RELICS_OF_THE_DARK_ELF_TRAINEE, -1); + giveItems(player, ANGUS_RECOMMENDATION, 1); + st.setCond(5, true); + htmltext = "30474-04.html"; + } + else + { + htmltext = "30474-03.html"; + } + break; + } + case 5: + htmltext = "30474-05.html"; + break; + } + break; + } + case SLA: + { + switch (st.getCond()) + { + case 6: + { + switch (st.getMemoState()) + { + case 1: + htmltext = "30666-02.html"; + break; + case 2: + htmltext = "30666-03.html"; + break; + default: + htmltext = "30666-01.html"; + break; + } + break; + } + case 7: + htmltext = "30666-09.html"; + break; + } break; } } break; } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } } return htmltext; } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html new file mode 100644 index 0000000000..edce7961ea --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.html @@ -0,0 +1,5 @@ +Ketra Orc Shaman:
+I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.
+He summons us to return him to his rightful place of glory, but...
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html new file mode 100644 index 0000000000..b2a09cdee0 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...
+(Only characters level 77 or below may undertake this quest.) \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html new file mode 100644 index 0000000000..cfe8d7c95c --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html @@ -0,0 +1,6 @@ +Ketra Orc Shaman:
+The Ketra believe we are children of the Fire Spirit.
+We worship the Red Dragon, who wields the strongest fire in all Goddard.
+Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html new file mode 100644 index 0000000000..5edd1281dc --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+It is a darkness without shape or substance.
+It came from across the sea, and now spreads its black shadow over our land as well.
+The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!
+We must summon all our strength to defeat the darkness!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html new file mode 100644 index 0000000000..429909ab5e --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html @@ -0,0 +1,8 @@ +Ketra Orc Shaman:
+Warrior, I ask for your aid!
+We are of Ketra descent, so we cannot enter the Shadow of Darkness.
+But I believe that an adventurer like you can enter and remove this foul curse from us.
+Will you do it?
+(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html new file mode 100644 index 0000000000..ca055cf23b --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.
+They will help you.
+When you are prepared, I will send you to the Shadow World, Pailaka!
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html new file mode 100644 index 0000000000..a8afa84a24 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+Warrior, do you wish to enter the Shadow World, Pailaka?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html index 8b6e98c940..c3567a11e9 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html @@ -1,4 +1,4 @@ Ketra Orc Shaman:
The darkness still exists! Will you enter Pailaka again?
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html index 96342171ff..06e78f427f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html @@ -1,3 +1,3 @@ Ketra Orc Shaman:
-I have faith that you will remove the dark shadow which hides our Great Flame! +Very well, I shall wait here until you are ready. \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html new file mode 100644 index 0000000000..db773f938b --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html @@ -0,0 +1,4 @@ +Ketra Orc Supporter:
+Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this Spear of Silenos, which we captured from our enemy. Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html index bd64070189..ff0ce54146 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html @@ -1,9 +1,9 @@ -Ketra Orc Intelligence Officer:
+Ketra Orc Intelligence Officer:
Dejakar Oroka!
You hold the Spear of Silenos! Your coming was foretold.
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html index bde2867c90..0a8f57be50 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-You still need an Enchant Scroll. Acquire one by slaying more Silenos! +This spear has already been enhanced to its full potential. It is stronger than any other power in this place! \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html index 0a8f57be50..bde2867c90 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html @@ -1,3 +1,3 @@ Ketra Orc Intelligence Officer:
-This spear has already been enhanced to its full potential. It is stronger than any other power in this place! +You still need an Enchant Scroll. Acquire one by slaying more Silenos! \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html index 9a10cf5470..439b00cff0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html @@ -1,3 +1,16 @@ Ketra Orc Intelligence Officer:
-The fifth and final enhancement is complete! +We possess several types of enhancement magic. I can grant you at most 5 spells.
+Select them from the list below:
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html index ebfcb44c6d..9a10cf5470 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html @@ -1,15 +1,3 @@ Ketra Orc Intelligence Officer:
-Please select the next spell you wish to receive.
- - - - - - - - - - - - +The fifth and final enhancement is complete! \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html index a63f31ad32..485a51c7cb 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html @@ -1,16 +1,15 @@ Ketra Orc Intelligence Officer:
-We possess several types of enhancement magic. I can grant you at most 5 spells.
-Select them from the list below:
- - - - - - - - - - - - +Please select the next spell you wish to receive.
+ + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html index 4e03ffb61f..8498d30f5a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html @@ -1,4 +1,6 @@ Ketra Orc Supporter:
-Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.
- +Dejakar Oroka!
+Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.
+Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html index af9607b574..4046d77b7f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html @@ -1,6 +1,5 @@ Ketra Orc Supporter:
-You have done it!
-You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!
-Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...
-Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. - +What happened here has not affected your world, but it may help you in the future...
+Now you must return to where you belong.
+Use the Scroll of Escape to leave Pailaka and return to your world! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html index 1ee6d7027f..56f82938b2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html @@ -1,3 +1,6 @@ Ketra Orc Supporter:
-Use the Scroll of Escape that I gave you to return to your world. - +You have done it!
+You have lifted the curse! I no longer feel the taint of darkness upon our Altar of Fire!
+Warrior, I wish you could stay here with us, but our shaman decrees that you must leave...
+Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java index 4cd38419a1..38ef374e42 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java @@ -16,43 +16,39 @@ */ package quests.Q00144_PailakaInjuredDragon; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.ItemHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.State; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** - * @author Mathael + * @author Sdw */ public class Q00144_PailakaInjuredDragon extends Quest { // NPCs private static final int KETRA_ORC_SHAMAN = 32499; private static final int KETRA_ORC_SUPPORTER = 32502; - private static final int KETRA_ORC_SUPPORTER_END = 32512; private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; - // Monsters + private static final int KETRA_ORC_SUPPORTER_2 = 32512; private static final int LATANA = 18660; - private static final int[] MONSTERS = - { - 18635, - 18636, - 18642, - 18646, - 18649, - 18650, - 18653, - 18654, - 18655, - 18657, - 18659 - }; - // Buffs + // Items + private static final int SPEAR_OF_SILENOS = 13052; + private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; + private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; + private static final int PAILAKA_INSTANT_SHIELD = 13032; + private static final int QUICK_HEALING_POTION = 13033; + private static final int SCROLL_OF_ESCAPE = 736; + private static final ItemHolder PAILAKA_SHIRT = new ItemHolder(13296, 1); + // Skills private static final SkillHolder[] BUFFS = { new SkillHolder(1086, 2), @@ -68,61 +64,56 @@ public class Q00144_PailakaInjuredDragon extends Quest new SkillHolder(1268, 4), new SkillHolder(1045, 6), }; - // Quest Items - private static final int SPEAR_OF_SILENOS = 13052; - private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; - private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; - private static final int WEAPON_UPGRADE_STAGE_1 = 13056; - private static final int WEAPON_UPGRADE_STAGE_2 = 13057; - // Usable Quest Items - private static final int SHIELD_POTION = 13032; - private static final int HEAL_POTION = 13033; - // Rewards - private static final long REWARD_EXP = 24570000; - private static final int REWARD_SP = 5896; - private static final int REWARD_PAILAKA_SHIRT = 13296; - private static final int REWARD_ADENA = 798840; - private static final int SCROLL_OF_ESCAPE = 736; // Misc private static final int MIN_LEVEL = 73; private static final int MAX_LEVEL = 77; - private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false; - private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false; - private int BUFF_COUNT = 0; public Q00144_PailakaInjuredDragon() { super(144); addStartNpc(KETRA_ORC_SHAMAN); - addFirstTalkId(KETRA_ORC_SUPPORTER_END); - addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END); + addFirstTalkId(KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_2); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER); addKillId(LATANA); - addKillId(MONSTERS); addCondMinLevel(MIN_LEVEL, "32499-03.html"); - addCondMaxLevel(MAX_LEVEL, "32499-04z.html"); - registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION); + addCondMinLevel(MAX_LEVEL, "32499-04.html"); + registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, PAILAKA_INSTANT_SHIELD, QUICK_HEALING_POTION); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (npc.getId() == KETRA_ORC_INTELLIGENCE_OFFICIER) + { + return "32509-01.html"; + } + else if (npc.getId() == KETRA_ORC_SUPPORTER_2) + { + final QuestState qs = getQuestState(player, false); + if (qs != null) + { + return qs.isCompleted() ? "32512-02.html" : "32512-01.html"; + } + } + return null; } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - String htmltext = getNoQuestMsg(player); final QuestState qs = getQuestState(player, false); if (qs == null) { - return htmltext; + return null; } - final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event; - switch (request) + String htmltext = null; + switch (event) { - case "32499-04.htm": - case "32499-05.htm": - case "32499-06.htm": - case "32499-08a.html": - case "32499-08.htm": - case "32499-09.htm": - case "32502-01.html": + case "32499-05.html": + case "32499-06.html": + case "32499-07.html": + case "32499-11.html": case "32502-02.html": case "32502-03.html": case "32502-04.html": @@ -131,73 +122,54 @@ public class Q00144_PailakaInjuredDragon extends Quest htmltext = event; break; } - case "32499-07.htm": - { - qs.startQuest(); - htmltext = event; - break; - } case "32502-05.html": { if (qs.isCond(2)) { qs.setCond(3, true); - giveItems(player, SPEAR_OF_SILENOS, 1, true); + giveItems(player, SPEAR_OF_SILENOS, 1); htmltext = event; } break; } - case "32512-02.html": + case "32499-08.html": { - final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); - if ((inst != null) && qs.isCond(4)) - { - takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1); - rewardItems(player, 57, REWARD_ADENA); - rewardItems(player, REWARD_PAILAKA_SHIRT, 1); - addExpAndSp(player, REWARD_EXP, REWARD_SP); - giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. - qs.exitQuest(false, true); - inst.finishInstance(); - htmltext = event; - } + qs.startQuest(); + htmltext = event; break; } case "upgrade_weapon": { - if (qs.isCond(3) || qs.isCond(4)) + if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) { - if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) + htmltext = "32509-06.html"; + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) { - htmltext = "32509-06.html"; + takeItems(player, SPEAR_OF_SILENOS, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); + giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); + htmltext = "32509-02.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + else { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) - { - takeItems(player, SPEAR_OF_SILENOS, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); - giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); - htmltext = "32509-02.html"; - } - else - { - htmltext = "32509-04.html"; - } + htmltext = "32509-05.html"; } - else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) { - if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) - { - takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); - takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); - giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); - htmltext = "32509-08.html"; - } - else - { - htmltext = "32509-04.html"; - } + takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); + giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); + htmltext = "32509-08.html"; + } + else + { + htmltext = "32509-04.html"; } } else @@ -206,141 +178,125 @@ public class Q00144_PailakaInjuredDragon extends Quest } break; } - case "enhancement_page": + case "ask_buff": { - htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html"; + htmltext = npc.isScriptValue(1) ? "32509-07.html" : "32509-08.html"; break; } - case "enhancement": + case "32512-03.html": { - if (BUFF_COUNT < 5) + if (qs.isCond(4)) { - final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1; - SkillCaster.triggerCast(npc, player, BUFFS[key].getSkill()); - BUFF_COUNT++; - if (BUFF_COUNT < 5) + if (player.getLevel() >= MIN_LEVEL) { - htmltext = "32509-09.html"; + addExpAndSp(player, 24570000, 5896); + giveAdena(player, 798840, true); + giveItems(player, PAILAKA_SHIRT); + giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. + qs.exitQuest(false, true); + htmltext = event; } else { - htmltext = "32509-08.html"; + htmltext = getNoQuestLevelRewardMsg(player); + } + final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); + if (inst != null) + { + inst.finishInstance(); + } + } + break; + } + } + if (event.startsWith("buff")) + { + if (npc.isScriptValue(0)) + { + final int currentBuffCount = npc.getVariables().getInt("buff_count"); + if (currentBuffCount < 5) + { + final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, BUFFS.length); + npc.setTarget(player); + npc.doCast(BUFFS[buffOffset].getSkill()); + npc.getVariables().set("buff_count", currentBuffCount + 1); + htmltext = "32509-10.html"; + if ((currentBuffCount + 1) >= 5) + { + htmltext = "32509-09.html"; + npc.setScriptValue(1); } } else { htmltext = "32509-07.html"; + npc.setScriptValue(1); } - break; } } - return htmltext; + } @Override - public String onTalk(L2Npc npc, L2PcInstance talker) + public String onTalk(L2Npc npc, L2PcInstance player) { - final QuestState qs = getQuestState(talker, true); - String htmltext = getNoQuestMsg(talker); + final QuestState qs = getQuestState(player, true); + String htmltext = null; - switch (npc.getId()) + switch (qs.getState()) { - case KETRA_ORC_SHAMAN: + case State.CREATED: { - switch (qs.getState()) + if (npc.getId() == KETRA_ORC_SHAMAN) { - case State.CREATED: + htmltext = "32499-01.html"; + } + break; + } + case State.STARTED: + { + if (npc.getId() == KETRA_ORC_SHAMAN) + { + if (qs.isCond(1)) { - htmltext = "32499-01.htm"; - break; + htmltext = "32499-09.html"; } - case State.COMPLETED: - { - htmltext = "32499-02.html"; - break; - } - case State.STARTED: + else { htmltext = "32499-10.html"; - break; } } - break; - } - case KETRA_ORC_SUPPORTER: - { - switch (qs.getCond()) + else if (npc.getId() == KETRA_ORC_SUPPORTER) { - case 3: - { - htmltext = "32502-07.html"; - break; - } - case 4: - { - htmltext = "32502-06.html"; - break; - } - default: + if (qs.isCond(2)) { htmltext = "32502-01.html"; - break; + } + else + { + htmltext = "32502-06.html"; } } break; } - case KETRA_ORC_INTELLIGENCE_OFFICIER: + case State.COMPLETED: { - htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html"; + htmltext = "32499-02.html"; break; } - case KETRA_ORC_SUPPORTER_END: - { - htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html"; - } } + return htmltext; } - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - final QuestState qs = getQuestState(player, false); - if (qs == null) - { - return getNoQuestMsg(player); - } - return qs.getState() == State.COMPLETED ? "32512-03.html" : "32512-01.html"; - } - @Override public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { - final int npcId = npc.getId(); - if (npcId != LATANA) + final QuestState qs = getQuestState(killer, false); + if (qs != null) { - if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS)) - { - if (getRandom(1, 6) > 2) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true); - WEAPON_UPGRADE_STAGE_1_DROPED = true; - } - } - if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED)) - { - if (getRandom(1, 6) > 4) - { - giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true); - WEAPON_UPGRADE_STAGE_2_DROPED = true; - } - } - } - else - { - final QuestState qs = getQuestState(killer, false); - if (qs != null) + if (qs.isCond(3) && (npc.calculateDistance(killer, false, false) <= 1500)) { qs.setCond(4, true); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/zones.xsd b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/zones.xsd index 0096877cfa..4d485a70fe 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/zones.xsd +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/zones.xsd @@ -68,6 +68,26 @@
+ + + + + + + + + + + + + + + + + + + + @@ -101,7 +121,7 @@ - + @@ -151,6 +171,7 @@ + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/zones/teleportzones.xml new file mode 100644 index 0000000000..243abe1a42 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/zones/teleportzones.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 87321a430e..5a0cf8db97 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.OptionalInt; import java.util.logging.Level; import java.util.logging.Logger; @@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader return null; } + /** + * Get zone by name. + * @param name the zone name + * @return the zone by name + */ + public L2ZoneType getZoneByName(String name) + { + for (Map map : _classZones.values()) + { + final Optional zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zoneType.isPresent()) + { + return zoneType.get(); + } + } + return null; + } + /** * Get zone by ID and zone class. * @param the generic type @@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader return (T) _classZones.get(zoneType).get(id); } + /** + * Get zone by name. + * @param the generic type + * @param name the zone name + * @param zoneType the zone type + * @return + */ + @SuppressWarnings("unchecked") + public T getZoneByName(String name, Class zoneType) + { + final Optional zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zone.isPresent()) + { + return (T) zone.get(); + } + return null; + } + /** * Returns all zones from where the object is located. * @param locational the locational diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java index 3138b311ae..3beea85891 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java @@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher; import com.l2jmobius.gameserver.model.events.ListenersContainer; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit; +import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; @@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer private final int _id; protected L2ZoneForm _zone; + protected List _blockedZone; protected Map _characterList = new ConcurrentHashMap<>(); /** Parameters to affect specific characters */ @@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer private boolean _allowStore; protected boolean _enabled; private AbstractZoneSettings _settings; + private int _instanceTemplateId; + private Map _enabledInInstance; protected L2ZoneType(int id) { @@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer { _enabled = Boolean.parseBoolean(value); } + else if (name.equals("instanceId")) + { + _instanceTemplateId = Integer.parseInt(value); + } else { _log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId()); @@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer */ private boolean isAffected(L2Character character) { + // Check instance + final Instance world = character.getInstanceWorld(); + if (world != null) + { + if (world.getTemplateId() != getInstanceTemplateId()) + { + return false; + } + if (!isEnabled(character.getInstanceId())) + { + return false; + } + } + else if (getInstanceTemplateId() > 0) + { + return false; + } + // Check lvl if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl)) { @@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer return _zone; } + public void setBlockedZones(List blockedZones) + { + if (_blockedZone != null) + { + throw new IllegalStateException("Blocked zone already set"); + } + _blockedZone = blockedZones; + } + + public List getBlockedZones() + { + return _blockedZone; + } + /** * Set the zone name. * @param name @@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer return _name; } + /** + * Checks if the given coordinates are within the zone, ignores instanceId check + * @param x + * @param y + * @param z + * @return + */ + public boolean isInsideZone(int x, int y, int z) + { + return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z); + } + + /** + * @param x + * @param y + * @param z + * @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise + */ + public boolean isInsideBannedZone(int x, int y, int z) + { + return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z)); + } + /** * Checks if the given coordinates are within zone's plane * @param x @@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(int x, int y) { - return _zone.isInsideZone(x, y, _zone.getHighZ()); + return isInsideZone(x, y, _zone.getHighZ()); } /** @@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(ILocational loc) { - return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ()); - } - - /** - * Checks if the given coordinates are within the zone, ignores instanceId check - * @param x - * @param y - * @param z - * @return - */ - public boolean isInsideZone(int x, int y, int z) - { - return _zone.isInsideZone(x, y, z); + return isInsideZone(loc.getX(), loc.getY(), loc.getZ()); } /** @@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer public void revalidateInZone(L2Character character) { - // If the character can't be affected by this zone return - if (_checkAffected) - { - if (!isAffected(character)) - { - return; - } - } - // If the object is inside the zone... if (isInsideZone(character)) { - // Was the character not yet inside this zone? - if (!_characterList.containsKey(character.getObjectId())) + // If the character can't be affected by this zone return + if (_checkAffected) + { + if (!isAffected(character)) + { + return; + } + } + + if (_characterList.putIfAbsent(character.getObjectId(), character) == null) { // Notify to scripts. EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this); - - // Register player. - _characterList.put(character.getObjectId(), character); - // Notify Zone implementation. onEnter(character); } @@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer return _allowStore; } + public int getInstanceTemplateId() + { + return _instanceTemplateId; + } + @Override public String toString() { @@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer return _enabled; } + public void setEnabled(boolean state, int instanceId) + { + if (_enabledInInstance == null) + { + synchronized (this) + { + if (_enabledInInstance == null) + { + _enabledInInstance = new ConcurrentHashMap<>(); + } + } + } + + _enabledInInstance.put(instanceId, state); + } + + public boolean isEnabled(int instanceId) + { + if (_enabledInInstance != null) + { + return _enabledInInstance.getOrDefault(instanceId, isEnabled()); + } + + return isEnabled(); + } + public void oustAllPlayers() { //@formatter:off diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java index 55f2f70d6b..94b5594d11 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java @@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn private final List _doors = new ArrayList<>(2); private final List _buffers = new ArrayList<>(2); private final List _spectatorLocations = new ArrayList<>(1); - private int _instanceTemplate = 0; public L2OlympiadStadiumZone(int id) { @@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn } } - @Override - public void setParameter(String name, String value) - { - if (name.equals("instanceTemplate")) - { - _instanceTemplate = Integer.parseInt(value); - } - else - { - super.setParameter(name, value); - } - } - public final void registerTask(OlympiadGameTask task) { getSettings().setTask(task); @@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn { return _spectatorLocations; } - - /** - * Returns zone instanceTemplate - * @return - */ - public int getInstanceTemplateId() - { - return _instanceTemplate; - } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java new file mode 100644 index 0000000000..4293f06b14 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java @@ -0,0 +1,74 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.model.zone.type; + +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.zone.L2ZoneType; + +/** + * @author Sdw + */ +public class L2TeleportZone extends L2ZoneType +{ + private int _x = -1; + private int _y = -1; + private int _z = -1; + + public L2TeleportZone(int id) + { + super(id); + } + + @Override + public void setParameter(String name, String value) + { + switch (name) + { + case "oustX": + { + _x = Integer.parseInt(value); + break; + } + case "oustY": + { + _y = Integer.parseInt(value); + break; + } + case "oustZ": + { + _z = Integer.parseInt(value); + break; + } + default: + { + super.setParameter(name, value); + } + } + } + + @Override + protected void onEnter(L2Character character) + { + character.teleToLocation(new Location(_x, _y, _z)); + } + + @Override + protected void onExit(L2Character character) + { + } +} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/xsd/zones.xsd b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/xsd/zones.xsd index 0096877cfa..4d485a70fe 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/xsd/zones.xsd +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/xsd/zones.xsd @@ -68,6 +68,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -101,7 +121,7 @@ - + @@ -151,6 +171,7 @@ + diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 87321a430e..5a0cf8db97 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.OptionalInt; import java.util.logging.Level; import java.util.logging.Logger; @@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader return null; } + /** + * Get zone by name. + * @param name the zone name + * @return the zone by name + */ + public L2ZoneType getZoneByName(String name) + { + for (Map map : _classZones.values()) + { + final Optional zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zoneType.isPresent()) + { + return zoneType.get(); + } + } + return null; + } + /** * Get zone by ID and zone class. * @param the generic type @@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader return (T) _classZones.get(zoneType).get(id); } + /** + * Get zone by name. + * @param the generic type + * @param name the zone name + * @param zoneType the zone type + * @return + */ + @SuppressWarnings("unchecked") + public T getZoneByName(String name, Class zoneType) + { + final Optional zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny(); + if (zone.isPresent()) + { + return (T) zone.get(); + } + return null; + } + /** * Returns all zones from where the object is located. * @param locational the locational diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java index 3138b311ae..3beea85891 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java @@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher; import com.l2jmobius.gameserver.model.events.ListenersContainer; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit; +import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; @@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer private final int _id; protected L2ZoneForm _zone; + protected List _blockedZone; protected Map _characterList = new ConcurrentHashMap<>(); /** Parameters to affect specific characters */ @@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer private boolean _allowStore; protected boolean _enabled; private AbstractZoneSettings _settings; + private int _instanceTemplateId; + private Map _enabledInInstance; protected L2ZoneType(int id) { @@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer { _enabled = Boolean.parseBoolean(value); } + else if (name.equals("instanceId")) + { + _instanceTemplateId = Integer.parseInt(value); + } else { _log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId()); @@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer */ private boolean isAffected(L2Character character) { + // Check instance + final Instance world = character.getInstanceWorld(); + if (world != null) + { + if (world.getTemplateId() != getInstanceTemplateId()) + { + return false; + } + if (!isEnabled(character.getInstanceId())) + { + return false; + } + } + else if (getInstanceTemplateId() > 0) + { + return false; + } + // Check lvl if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl)) { @@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer return _zone; } + public void setBlockedZones(List blockedZones) + { + if (_blockedZone != null) + { + throw new IllegalStateException("Blocked zone already set"); + } + _blockedZone = blockedZones; + } + + public List getBlockedZones() + { + return _blockedZone; + } + /** * Set the zone name. * @param name @@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer return _name; } + /** + * Checks if the given coordinates are within the zone, ignores instanceId check + * @param x + * @param y + * @param z + * @return + */ + public boolean isInsideZone(int x, int y, int z) + { + return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z); + } + + /** + * @param x + * @param y + * @param z + * @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise + */ + public boolean isInsideBannedZone(int x, int y, int z) + { + return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z)); + } + /** * Checks if the given coordinates are within zone's plane * @param x @@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(int x, int y) { - return _zone.isInsideZone(x, y, _zone.getHighZ()); + return isInsideZone(x, y, _zone.getHighZ()); } /** @@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer */ public boolean isInsideZone(ILocational loc) { - return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ()); - } - - /** - * Checks if the given coordinates are within the zone, ignores instanceId check - * @param x - * @param y - * @param z - * @return - */ - public boolean isInsideZone(int x, int y, int z) - { - return _zone.isInsideZone(x, y, z); + return isInsideZone(loc.getX(), loc.getY(), loc.getZ()); } /** @@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer public void revalidateInZone(L2Character character) { - // If the character can't be affected by this zone return - if (_checkAffected) - { - if (!isAffected(character)) - { - return; - } - } - // If the object is inside the zone... if (isInsideZone(character)) { - // Was the character not yet inside this zone? - if (!_characterList.containsKey(character.getObjectId())) + // If the character can't be affected by this zone return + if (_checkAffected) + { + if (!isAffected(character)) + { + return; + } + } + + if (_characterList.putIfAbsent(character.getObjectId(), character) == null) { // Notify to scripts. EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this); - - // Register player. - _characterList.put(character.getObjectId(), character); - // Notify Zone implementation. onEnter(character); } @@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer return _allowStore; } + public int getInstanceTemplateId() + { + return _instanceTemplateId; + } + @Override public String toString() { @@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer return _enabled; } + public void setEnabled(boolean state, int instanceId) + { + if (_enabledInInstance == null) + { + synchronized (this) + { + if (_enabledInInstance == null) + { + _enabledInInstance = new ConcurrentHashMap<>(); + } + } + } + + _enabledInInstance.put(instanceId, state); + } + + public boolean isEnabled(int instanceId) + { + if (_enabledInInstance != null) + { + return _enabledInInstance.getOrDefault(instanceId, isEnabled()); + } + + return isEnabled(); + } + public void oustAllPlayers() { //@formatter:off diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java index 55f2f70d6b..94b5594d11 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2OlympiadStadiumZone.java @@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn private final List _doors = new ArrayList<>(2); private final List _buffers = new ArrayList<>(2); private final List _spectatorLocations = new ArrayList<>(1); - private int _instanceTemplate = 0; public L2OlympiadStadiumZone(int id) { @@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn } } - @Override - public void setParameter(String name, String value) - { - if (name.equals("instanceTemplate")) - { - _instanceTemplate = Integer.parseInt(value); - } - else - { - super.setParameter(name, value); - } - } - public final void registerTask(OlympiadGameTask task) { getSettings().setTask(task); @@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn { return _spectatorLocations; } - - /** - * Returns zone instanceTemplate - * @return - */ - public int getInstanceTemplateId() - { - return _instanceTemplate; - } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java new file mode 100644 index 0000000000..4293f06b14 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/type/L2TeleportZone.java @@ -0,0 +1,74 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.model.zone.type; + +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.zone.L2ZoneType; + +/** + * @author Sdw + */ +public class L2TeleportZone extends L2ZoneType +{ + private int _x = -1; + private int _y = -1; + private int _z = -1; + + public L2TeleportZone(int id) + { + super(id); + } + + @Override + public void setParameter(String name, String value) + { + switch (name) + { + case "oustX": + { + _x = Integer.parseInt(value); + break; + } + case "oustY": + { + _y = Integer.parseInt(value); + break; + } + case "oustZ": + { + _z = Integer.parseInt(value); + break; + } + default: + { + super.setParameter(name, value); + } + } + } + + @Override + protected void onEnter(L2Character character) + { + character.teleToLocation(new Location(_x, _y, _z)); + } + + @Override + protected void onExit(L2Character character) + { + } +} \ No newline at end of file