From 1a7b79b8204fbc216ec70422b4b397a7750d0daa Mon Sep 17 00:00:00 2001
From: Zoey76 <zoey_76@msn.com>
Date: Thu, 17 Jul 2014 00:26:12 +0000
Subject: [PATCH] BETA: Quest Path of the Elven Scout (407) in Java.

Patch by: ivantotov
Reviewed by: xban1x, jurchiks, Zoey76
---
 .../dist/game/data/html/default/30426.htm     |   4 +-
 L2J_DataPack_BETA/dist/game/data/scripts.cfg  |   1 -
 .../quests/407_PathToElvenScout/30328-02.htm  |   9 -
 .../quests/407_PathToElvenScout/30328-02a.htm |   9 -
 .../quests/407_PathToElvenScout/30328-03.htm  |   3 -
 .../quests/407_PathToElvenScout/30328-04.htm  |   9 -
 .../quests/407_PathToElvenScout/30328-06.htm  |   9 -
 .../quests/407_PathToElvenScout/30328-07.htm  |  10 -
 .../quests/407_PathToElvenScout/30337-05.htm  |   9 -
 .../quests/407_PathToElvenScout/30337-08.htm  |   9 -
 .../quests/407_PathToElvenScout/30426-04.htm  |   9 -
 .../quests/407_PathToElvenScout/__init__.py   | 201 ----------
 .../30328-01.htm                              |   2 +-
 .../Q00407_PathOfTheElvenScout/30328-02.htm   |   3 +
 .../Q00407_PathOfTheElvenScout/30328-02a.htm  |   3 +
 .../Q00407_PathOfTheElvenScout/30328-03.htm   |   3 +
 .../Q00407_PathOfTheElvenScout/30328-04.htm   |   3 +
 .../30328-05.htm                              |   0
 .../Q00407_PathOfTheElvenScout/30328-06.html  |   3 +
 .../Q00407_PathOfTheElvenScout/30328-07.html  |   4 +
 .../30328-08.html}                            |  10 +-
 .../30334-01.html}                            |  12 +-
 .../30337-01.html}                            |  12 +-
 .../30337-02.html}                            |  16 +-
 .../30337-03.html}                            |  14 +-
 .../30337-04.html}                            |  12 +-
 .../Q00407_PathOfTheElvenScout/30337-05.html  |   4 +
 .../30337-06.html}                            |  19 +-
 .../30337-07.html}                            |   0
 .../Q00407_PathOfTheElvenScout/30337-08.html  |   3 +
 .../30337-09.html}                            |  13 +-
 .../30426-01.html}                            |  12 +-
 .../30426-02.html}                            |  12 +-
 .../Q00407_PathOfTheElvenScout/30426-04.html  |   3 +
 .../Q00407_PathOfTheElvenScout.java           | 343 ++++++++++++++++++
 .../scripts/quests/QuestMasterHandler.java    |   2 +
 .../dist/sql/game/updates/20140716update.sql  |   1 +
 37 files changed, 410 insertions(+), 381 deletions(-)
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02a.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-03.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-04.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-06.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-07.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-05.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-08.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-04.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/__init__.py
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout => Q00407_PathOfTheElvenScout}/30328-01.htm (78%)
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02.htm
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02a.htm
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-03.htm
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-04.htm
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout => Q00407_PathOfTheElvenScout}/30328-05.htm (100%)
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-06.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-07.html
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30328-08.htm => Q00407_PathOfTheElvenScout/30328-08.html} (55%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30334-01.htm => Q00407_PathOfTheElvenScout/30334-01.html} (70%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30337-01.htm => Q00407_PathOfTheElvenScout/30337-01.html} (63%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30337-02.htm => Q00407_PathOfTheElvenScout/30337-02.html} (73%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30337-03.htm => Q00407_PathOfTheElvenScout/30337-03.html} (56%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30337-04.htm => Q00407_PathOfTheElvenScout/30337-04.html} (60%)
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-05.html
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30337-06.htm => Q00407_PathOfTheElvenScout/30337-06.html} (73%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30337-07.htm => Q00407_PathOfTheElvenScout/30337-07.html} (100%)
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-08.html
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30337-09.htm => Q00407_PathOfTheElvenScout/30337-09.html} (81%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30426-01.htm => Q00407_PathOfTheElvenScout/30426-01.html} (69%)
 rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{407_PathToElvenScout/30426-02.htm => Q00407_PathOfTheElvenScout/30426-02.html} (82%)
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-04.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/Q00407_PathOfTheElvenScout.java
 create mode 100644 L2J_DataPack_BETA/dist/sql/game/updates/20140716update.sql

diff --git a/L2J_DataPack_BETA/dist/game/data/html/default/30426.htm b/L2J_DataPack_BETA/dist/game/data/html/default/30426.htm
index 70221e4a0b..45cd8bc093 100644
--- a/L2J_DataPack_BETA/dist/game/data/html/default/30426.htm
+++ b/L2J_DataPack_BETA/dist/game/data/html/default/30426.htm
@@ -1,4 +1,4 @@
-<html><body>Pippen:<br>
-Hey, pretend you haven't seen me and quickly walk past. I beg you. By any chance ... no, nothing.<br>
+<html><body>Prias:<br>
+Please, don't even start.<br>
 <a action="bypass -h npc_%objectId%_Quest">Quest</a>
 </body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg
index cc7c1a091e..c840ab48e4 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg
+++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg
@@ -286,7 +286,6 @@ quests/403_PathToRogue/__init__.py
 quests/404_PathToWizard/__init__.py
 quests/405_PathToCleric/__init__.py
 quests/406_PathToElvenKnight/__init__.py
-quests/407_PathToElvenScout/__init__.py
 quests/408_PathToElvenwizard/__init__.py
 quests/409_PathToOracle/__init__.py
 quests/410_PathToPalusKnight/__init__.py
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02.htm
deleted file mode 100644
index 99c52c1d82..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-
-<body>
-Master Reisa:<br>
-I'm sorry, but you are not qualified to take the test to become an to Elven Ranger. Try to find the path that is right for you.
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02a.htm
deleted file mode 100644
index 5cca80f82b..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-02a.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-
-<body>
-Master Reisa:<br>
-You have already changed profession to Elven Ranger, so there is no need for you to reaffirm your skills. You are not needed in villages like these, but in the vast plains. Travel wide and far and increase the dignity of our Elven race.
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-03.htm
deleted file mode 100644
index 8cdd776bac..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-03.htm
+++ /dev/null
@@ -1,3 +0,0 @@
-<html><body>Master Reisa:<br>
-Becoming an Elven Ranger ... I appreciate your enthusiasm, but you do not have enough skill. Enthusiasm alone is not enough to become an Elven Ranger.
-</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-04.htm
deleted file mode 100644
index 6ff89713dd..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-04.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-
-<body>
-Master Reisa:<br>
-Now, go to<font color="LEVEL"> Grand Master Rains</font> to change your profession to Elven Ranger. If you take my recommendation, you will be permitted to change profession to Elven Ranger. And friend, I hope you raise the dignity of our race ever higher with your steadfast manner.
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-06.htm
deleted file mode 100644
index e16e8906fb..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-06.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-
-<body>
-Master Reisa:<br>
-Haven't you met<font color="LEVEL"> Guard Moretti</font> yet? You can learn the details from him. Moretti stands guard at the east entrance of the village where you can see the bridge.
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-07.htm
deleted file mode 100644
index c26f020b67..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-07.htm
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-
-<body>
-Master Reisa:<br>
-I see you have received an honorary guard certificate. I have already heard of your achievements. Guard Moretti highly praised you. Now I can gladly recommend you as an Elven Ranger. Who but a skilled Elf like you could become an Elven Ranger?<br>
-In the future, I hope you train still further, to become a magnificent Stealth Sentinel or Silver Ranger. Now take my recommendation and go to<font color="LEVEL"> Grand Master Rains</font>. He will change your profession to Elven Ranger. May the power of Eva be with you.
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-05.htm
deleted file mode 100644
index d822de4714..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-05.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-
-<body>
-
-Guard Moretti:<br>
-Oh, what is this? Prias's Letter! Ah... seeing that it is torn, I'm sure he tore it up while he was writing us a message because he was discovered.<br>
-Unfortunately, the letter is so badly torn that I cannot tell exactly what he wanted to say
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-08.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-08.htm
deleted file mode 100644
index f5fba29a5d..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-08.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-
-<body>
-Guard Moretti:<br>
-Ah, you haven't gone to Reisa yet? Go on now and see Reisa. I hear you want to be an Elven Ranger. I'm sure everything will turn out well. I am busy, so please excuse me.
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-04.htm
deleted file mode 100644
index c1736ec066..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-04.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-
-<body>
-Prias:<br>
-Elven friend, do not worry about me but<font color="LEVEL"> please take my letter to Moretti.</font> I will have to scout some more.
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/__init__.py
deleted file mode 100644
index af51973f8b..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/__init__.py
+++ /dev/null
@@ -1,201 +0,0 @@
-# Made by Mr. Have fun! Version 0.2
-# Shadow Weapon Coupons contributed by BiTi for the Official L2J Datapack Project
-# Visit http://www.l2jdp.com/forum/ for more details
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest import Quest as JQuest
-from com.l2jserver.gameserver.network.serverpackets import SocialAction
-
-qn = "407_PathToElvenScout"
-
-REORIA_LETTER2 = 1207
-PRIGUNS_TEAR_LETTER1 = 1208
-PRIGUNS_TEAR_LETTER2 = 1209
-PRIGUNS_TEAR_LETTER3 = 1210
-PRIGUNS_TEAR_LETTER4 = 1211
-MORETTIS_HERB = 1212
-MORETTIS_LETTER = 1214
-PRIGUNS_LETTER = 1215
-HONORARY_GUARD = 1216
-REORIA_RECOMMENDATION = 1217
-RUSTED_KEY = 1293
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = range(1207,1217)+[RUSTED_KEY]
-
- def onEvent (self,event,st) :
-    htmltext = event
-    player = st.getPlayer()
-    if event == "1" :
-      st.set("id","0")
-      if player.getClassId().getId() == 0x12 :
-        if player.getLevel() >= 18 :
-          if st.getQuestItemsCount(REORIA_RECOMMENDATION)>0 :
-            htmltext = "30328-04.htm"
-          else:
-            htmltext = "30328-05.htm"
-            st.giveItems(REORIA_LETTER2,1)
-            st.set("cond","1")
-            st.setState(State.STARTED)
-            st.playSound("ItemSound.quest_accept")
-        else :
-          htmltext = "30328-03.htm"
-      else:
-        if player.getClassId().getId() == 0x16 :
-          htmltext = "30328-02a.htm"
-        else:
-          htmltext = "30328-02.htm"
-    elif event == "30337_1" :
-          st.takeItems(REORIA_LETTER2,1)
-          st.set("cond","2")
-          st.playSound("ItemSound.quest_middle")
-          htmltext = "30337-03.htm"
-    return htmltext
-
-
- def onTalk (self,npc,player):
-   htmltext = Quest.getNoQuestMsg(player)
-   st = player.getQuestState(qn)
-   if not st : return htmltext
-
-   npcId = npc.getId()
-   id = st.getState()
-   if npcId != 30328 and id != State.STARTED : return htmltext
-
-   if npcId == 30328 and st.getInt("cond")==0 :
-      htmltext = "30328-01.htm"
-      return htmltext
-   elif npcId == 30328 and st.getInt("cond") and st.getQuestItemsCount(REORIA_LETTER2)>0 :
-        htmltext = "30328-06.htm"
-   elif npcId == 30328 and st.getInt("cond") and st.getQuestItemsCount(REORIA_LETTER2)==0 and st.getQuestItemsCount(HONORARY_GUARD)==0 :
-        htmltext = "30328-08.htm"
-   elif npcId == 30337 and st.getInt("cond") and st.getQuestItemsCount(REORIA_LETTER2)>0 and st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4)==0 :
-        htmltext = "30337-01.htm"
-   elif npcId == 30337 and st.getQuestItemsCount(MORETTIS_LETTER)<1 and st.getQuestItemsCount(PRIGUNS_LETTER)==0 and st.getQuestItemsCount(HONORARY_GUARD)==0 :
-        if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4)<1 :
-          htmltext = "30337-04.htm"
-        elif st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4)>0 and st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4)<4 :
-          htmltext = "30337-05.htm"
-        else:
-          htmltext = "30337-06.htm"
-          st.takeItems(PRIGUNS_TEAR_LETTER1,1)
-          st.takeItems(PRIGUNS_TEAR_LETTER2,1)
-          st.takeItems(PRIGUNS_TEAR_LETTER3,1)
-          st.takeItems(PRIGUNS_TEAR_LETTER4,1)
-          st.giveItems(MORETTIS_HERB,1)
-          st.giveItems(MORETTIS_LETTER,1)
-          st.set("cond","4")
-          st.playSound("ItemSound.quest_middle")
-   elif npcId == 30334 and st.getInt("cond") :
-        htmltext = "30334-01.htm"
-   elif npcId == 30426 and st.getInt("cond") and st.getQuestItemsCount(MORETTIS_LETTER) and st.getQuestItemsCount(MORETTIS_HERB) :
-        if st.getQuestItemsCount(RUSTED_KEY)<1 :
-          htmltext = "30426-01.htm"
-          st.set("cond","5")
-          st.playSound("ItemSound.quest_middle")
-        else:
-          htmltext = "30426-02.htm"
-          st.takeItems(RUSTED_KEY,1)
-          st.takeItems(MORETTIS_HERB,1)
-          st.takeItems(MORETTIS_LETTER,1)
-          st.giveItems(PRIGUNS_LETTER,1)
-          st.set("cond","7")
-          st.playSound("ItemSound.quest_middle")
-   elif npcId == 30426 and st.getInt("cond") and st.getQuestItemsCount(PRIGUNS_LETTER) :
-        htmltext = "30426-04.htm"
-   elif npcId == 30337 and st.getInt("cond") and st.getQuestItemsCount(PRIGUNS_LETTER)>0 :
-        if st.getQuestItemsCount(MORETTIS_HERB) :
-          htmltext = "30337-09.htm"
-        else:
-          htmltext = "30337-07.htm"
-          st.takeItems(PRIGUNS_LETTER,1)
-          st.giveItems(HONORARY_GUARD,1)
-          st.set("cond","8")
-          st.playSound("ItemSound.quest_middle")
-   elif npcId == 30337 and st.getInt("cond") and st.getQuestItemsCount(HONORARY_GUARD)>0 :
-        htmltext = "30337-08.htm"
-   elif npcId == 30328 and st.getInt("cond") and st.getQuestItemsCount(HONORARY_GUARD)>0 :
-        htmltext = "30328-07.htm"
-        st.takeItems(HONORARY_GUARD,1)
-        st.giveItems(REORIA_RECOMMENDATION,1)
-        isFinished = st.getGlobalQuestVar("1ClassQuestFinished")
-        if isFinished == "" : 
-          if player.getLevel() >= 20 :
-            st.addExpAndSp(320534, 19932)
-          elif player.getLevel() == 19 :
-            st.addExpAndSp(456128, 26630)
-          else:
-            st.addExpAndSp(591724, 33328)
-          st.giveItems(57, 163800)
-        player.sendPacket(SocialAction(player.getObjectId(),3))
-        st.set("cond","0")
-        st.exitQuest(False)
-        st.saveGlobalQuestVar("1ClassQuestFinished","1")
-        st.playSound("ItemSound.quest_finish")
-   return htmltext
-
- def onKill(self,npc,player,isPet):
-   st = player.getQuestState(qn)
-   if not st : return 
-   if st.getState() != State.STARTED : return 
-   
-   npcId = npc.getId()
-   if npcId == 20053 :
-      st.set("id","0")
-      if st.getInt("cond") :
-        if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4) < 4 :
-          if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)<1 :
-            st.giveItems(PRIGUNS_TEAR_LETTER1,1)
-            if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4) == 4 :
-              st.playSound("ItemSound.quest_middle")
-              st.set("cond","3")
-            else:
-              st.playSound("ItemSound.quest_itemget")
-          else:
-            if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)<1 :
-              st.giveItems(PRIGUNS_TEAR_LETTER2,1)
-              if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4) == 4 :
-                st.playSound("ItemSound.quest_middle")
-                st.set("cond","3")
-              else:
-                st.playSound("ItemSound.quest_itemget")
-            else:
-              if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)<1 :
-                st.giveItems(PRIGUNS_TEAR_LETTER3,1)
-                if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4) == 4 :
-                  st.playSound("ItemSound.quest_middle")
-                  st.set("cond","3")
-                else:
-                  st.playSound("ItemSound.quest_itemget")
-              else:
-                if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4)<1 :
-                  st.giveItems(PRIGUNS_TEAR_LETTER4,1)
-                  if st.getQuestItemsCount(PRIGUNS_TEAR_LETTER1)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER2)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER3)+st.getQuestItemsCount(PRIGUNS_TEAR_LETTER4) == 4 :
-                    st.playSound("ItemSound.quest_middle")
-                    st.set("cond","3")
-                  else:
-                    st.playSound("ItemSound.quest_itemget")
-   elif npcId == 27031 :
-      st.set("id","0")
-      if st.getInt("cond") and st.getQuestItemsCount(MORETTIS_HERB) == 1 and st.getQuestItemsCount(MORETTIS_LETTER) == 1 and st.getQuestItemsCount(RUSTED_KEY) == 0 and self.getRandom(10)<6 :
-        st.giveItems(RUSTED_KEY,1)
-        st.playSound("ItemSound.quest_middle")
-        st.set("cond","6")
-   return
-
-QUEST       = Quest(407,qn,"Path of the Elven Scout")
-
-QUEST.addStartNpc(30328)
-
-QUEST.addTalkId(30328)
-
-QUEST.addTalkId(30334)
-QUEST.addTalkId(30337)
-QUEST.addTalkId(30426)
-
-QUEST.addKillId(27031)
-QUEST.addKillId(20053)
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-01.htm
similarity index 78%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-01.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-01.htm
index e0d4d05265..0b02f7c52e 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-01.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-01.htm
@@ -1,4 +1,4 @@
 <html><body>Master Reisa:<br>
 So you want to be an Elven Scout? Hmm ... it is not my place to recommend you as an Elven Scout without reason, so I would like to see your skills first. By chance, there is a task you may be perfect for. Prove your skills as an Elven Fighter through this task. What do you say, will you accept the assignment?<br>
-<a action="bypass -h Quest 407_PathToElvenScout 1">Say you will accept the task</a>
+<a action="bypass -h Quest Q00407_PathOfTheElvenScout ACCEPT">Say you will accept the task</a>
 </body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02.htm
new file mode 100644
index 0000000000..08c19a6f46
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02.htm
@@ -0,0 +1,3 @@
+<html><body>Master Reisa:<br>
+I'm sorry, but you are not qualified to take the test to become an to Elven Scout. Try to find the path that is right for you.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02a.htm
new file mode 100644
index 0000000000..2657a8aa40
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-02a.htm
@@ -0,0 +1,3 @@
+<html><body>Master Reisa:<br>
+You have already changed profession to Elven Scout, so there is no need for you to reaffirm your skills. You are not needed in villages like these, but in the vast plains. Travel wide and far and increase the dignity of our Elven race.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-03.htm
new file mode 100644
index 0000000000..a0bd00051d
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-03.htm
@@ -0,0 +1,3 @@
+<html><body>Master Reisa:<br>
+Class transfer to Elven Scout... I admire your ambition, but you are not yet ready. Ambition alone cannot make you an Elven Scout! Return here after you have received additional training and I will reconsider your request.<br>
+(Only characters level 18 and above may undertake this quest.)</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-04.htm
new file mode 100644
index 0000000000..7553349cfb
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-04.htm
@@ -0,0 +1,3 @@
+<html><body>Master Reisa:<br>
+Now, go to <font color="LEVEL">Grand Master Rains</font> to change your profession to Elven Scout. If you take my Recommendation, you will be permitted to change profession to Elven Scout. And friend, I hope you raise the dignity of our race ever higher with your steadfast manner.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-05.htm
similarity index 100%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-05.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-05.htm
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-06.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-06.html
new file mode 100644
index 0000000000..dd665d3668
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-06.html
@@ -0,0 +1,3 @@
+<html><body>Master Reisa:<br>
+Haven't you met <font color="LEVEL">Guard Moretti</font> yet? You can learn the details from him. Moretti stands guard at the east entrance of the village where you can see the bridge.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-07.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-07.html
new file mode 100644
index 0000000000..a3aa77d85f
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-07.html
@@ -0,0 +1,4 @@
+<html><body>Master Reisa:<br>
+I see you have received an Honorary Guard certificate. I have already heard of your achievements. Guard Moretti highly praised you. Now I can gladly recommend you as an Elven Scout. Who but a skilled Elf like you could become an Elven Scout?<br>
+In the future, I hope you train still further, to become a magnificent Plainswalker or Silver Ranger. Now take my Recommendation and go to <font color="LEVEL">Grand Master Rains</font>. He will change your profession to Elven Scout. May the power of Eva be with you.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-08.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-08.html
similarity index 55%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-08.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-08.html
index 8183eea51f..70da2e1c67 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30328-08.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30328-08.html
@@ -1,9 +1,3 @@
-<html>
-
-<body>
-Master Reisa:<br>
+<html><body>Master Reisa:<br>
 I see you have not solved the matter yet. Go now and help Guard Moretti.
-
-
-</body>
-</html>
\ No newline at end of file
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30334-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30334-01.html
similarity index 70%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30334-01.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30334-01.html
index dd734fc584..d95e25cf09 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30334-01.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30334-01.html
@@ -1,10 +1,4 @@
-<html>
-
-<body>
-Guard Babenco:<br>
-I have heard from Moretti. You must be the one who took charge of investigating this case. You must be going to the ol mahum's campgrounds. If you follow this road west, you will arrive at a fork in the road. Follow the road that heads southwest and you will reach the campgrounds. It used to be a place where the Gracian army made its camp, but it was abandoned for some time before the remaining army of ol mahums settled down there.<br>
+<html><body>Guard Babenco:<br>
+I have heard from Moretti. You must be the one who took charge of investigating this case. You must be going to the Ol Mahum's campgrounds. If you follow this road west, you will arrive at a fork in the road. Follow the road that heads southwest and you will reach the campgrounds. It used to be a place where the Gracian army made its camp, but it was abandoned for some time before the remaining army of Ol Mahums settled down there.<br>
 Prias and I were classmates, so please find out where he is. I hope nothing has happened to him ... Pray, be careful.
-
-
-</body>
-</html>
\ No newline at end of file
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-01.html
similarity index 63%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-01.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-01.html
index fb0811f20e..30c5f493b4 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-01.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-01.html
@@ -1,11 +1,5 @@
-<html>
-
-<body>
-Guard Moretti:<br>
+<html><body>Guard Moretti:<br>
 Ah, you were sent by Reisa. Greetings. In this letter, Reisa says that you will complete this task without fail.<br>
 Very well, then let me explain to you exactly what is required. I hope we can find the whereabouts of Prias as soon as possible ...<br>
-<a action="bypass -h Quest 407_PathToElvenScout 30337-02.htm">Listen to details</a>
-
-
-</body>
-</html>
\ No newline at end of file
+<a action="bypass -h Quest Q00407_PathOfTheElvenScout 30337-02.html">Listen to details</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-02.html
similarity index 73%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-02.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-02.html
index bcf3fba6ad..c02266e31e 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-02.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-02.html
@@ -1,12 +1,6 @@
-<html>
-
-<body>
-Guard Moretti:<br>
+<html><body>Guard Moretti:<br>
 All right, It's time to tell you what is going on.<br>
-A fortnight ago, I set off on a regular patrol of the ruins with a few of my colleagues. However, while we were looking around the reconstruction site, a group of<font color="LEVEL"> ol mahum patrollers</font> suddenly attacked us! In our experience, they usually don't appear at the ruins, but for some reason they suddenly showed up and attacked us. During the surprise attack, we were unable to keep our formation and fought back as best we could to make our escape. It was total chaos as we continued to try and fight our way free of the trap ... I still get shivers when I think of it!<br>
-When we had won free and regrouped, we discovered our problem. One of our party, Prias, was nowhere to be seen. We didn't know what to do, since he had vanished while we were preoccupied. So we returned to the village as quickly as we could, gathered more of our colleagues and returned to the ruins. But no matter how much we searched, we could not find a clue to his whereabouts. Since then, we are continuing our investigations, but we still have not found a clue to his whereabouts. So in the end, I requested the help of Reisa. Poor Prias ... I am really worried.<br>
-<a action="bypass -h Quest 407_PathToElvenScout 30337_1">Say you will begin the search</a>
-
-
-</body>
-</html>
\ No newline at end of file
+A fortnight ago, I set off on a regular patrol of the ruins with a few of my colleagues. However, while we were looking around the reconstruction site, a group of <font color="LEVEL">Ol Mahum patrollers</font> suddenly attacked us! In our experience, they usually don't appear at the ruins, but for some reason they suddenly showed up and attacked us. During the surprise attack, we were unable to keep our formation and fought back as best we could to make our escape. It was total chaos as we continued to try and fight our way free of the trap... I still get shivers when I think of it!<br>
+When we had won free and regrouped, we discovered our problem. One of our party, Prias, was nowhere to be seen. We didn't know what to do, since he had vanished while we were preoccupied. So we returned to the village as quickly as we could, gathered more of our colleagues and returned to the ruins. But no matter how much we searched, we could not find a clue to his whereabouts. Since then, we are continuing our investigations, but we still have not found a clue to his whereabouts. So in the end, I requested the help of Reisa. Poor Prias... I am really worried.<br>
+<a action="bypass -h Quest Q00407_PathOfTheElvenScout 30337-03.html">Say you will begin the search</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-03.html
similarity index 56%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-03.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-03.html
index 7c4329e2a0..7921b0301d 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-03.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-03.html
@@ -1,10 +1,4 @@
-<html>
-
-<body>
-Guard Moretti:<br>
-Thank you for your decision to help us in our task.<font color="LEVEL"> My colleagues traced the footsteps of the ol mahum patrols, and it seems that they are staying in the abandoned camp. I think that would be the best place to start searching. </font><br>
-If you are not familiar with the geography around here, ask Guard Babenco at the western entrance of the village. He will tell you how to find the abandoned camp. It is a place where a large group of ol mahums have established a settlement, so you must be careful.
-
-
-</body>
-</html>
\ No newline at end of file
+<html><body>Guard Moretti:<br>
+Thank you for your decision to help us in our task. <font color="LEVEL">My colleagues traced the footsteps of the Ol Mahum patrols, and it seems that they are staying in the abandoned camp. I think that would be the best place to start searching. </font><br>
+If you are not familiar with the geography around here, ask Guard Babenco at the western entrance of the village. He will tell you how to find the abandoned camp. It is a place where a large group of Ol Mahums have established a settlement, so you must be careful.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-04.html
similarity index 60%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-04.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-04.html
index 2ffa4a5fa7..a049fbe12b 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-04.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-04.html
@@ -1,9 +1,3 @@
-<html>
-
-<body>
-Guard Moretti:<br>
-You haven't found the<font color="LEVEL"> ol mahum patrols</font> yet? I think it would be best to go to the Abandoned Camp first. If you don't know how to go there, ask Guard Babenco. He is at the west entrance of the village. Thank you in advance.
-
-
-</body>
-</html>
\ No newline at end of file
+<html><body>Guard Moretti:<br>
+You haven't found the <font color="LEVEL">Ol Mahum patrols</font> yet? I think it would be best to go to the Abandoned Camp first. If you don't know how to go there, ask Guard Babenco. He is at the west entrance of the village. Thank you in advance.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-05.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-05.html
new file mode 100644
index 0000000000..87c20a4c73
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-05.html
@@ -0,0 +1,4 @@
+<html><body>Guard Moretti:<br>
+Oh, what is this? Prias's Letter! Ah... seeing that it is torn, I'm sure he tore it up while he was writing us a message because he was discovered.<br>
+Unfortunately, the letter is so badly torn that I cannot tell exactly what he wanted to say... 'Ol Mahum... Urgent... Attack... Elves...' I wonder what the Elves have to do with this... anyway, I cannot read any more. Do you have any other torn letter pieces? Since this is the only clue that we have, I think it would be best to collect the remaining torn letter pieces.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-06.html
similarity index 73%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-06.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-06.html
index ed4cc3365b..5f3be674f9 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-06.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-06.html
@@ -1,17 +1,6 @@
-<html>
-
-<body>
-
-Guard Moretti:<br>
+<html><body>Guard Moretti:<br>
 Why, this is a letter Prias left behind! And it is torn into pieces... I am sure he ripped it up while he was trying to leave us a message. Anyway, let's quickly assemble the pieces and read the letter.<br>
-Hmm... If I put this one on top... Ah! At last, I can read it.<font color="LEVEL"> "I write in haste. Emergency! They have kidnapped me and are planning to attack Gludin. The Ol Mahum scouts are taking me to the Neutral Zone in the Elven Forest. It's an emergency..."</font> The letter ends here.<br>
+Hmm... If I put this one on top... Ah! At last, I can read it. <font color="LEVEL">"I write in haste. Emergency! They have kidnapped me and are planning to attack Gludin. The Ol Mahum scouts are taking me to the Neutral Zone in the Elven Forest. It's an emergency..."</font> The letter ends here.<br>
 Now I know... The reason the Ol Mahum showed up in the ruins... The reason they kidnapped Prias... At least now we know where he is so there is a slight hope, but can we save him? I must ask you another favor. We must prepare for the upcoming attack, so please go and save Prias...<br>
-
-Every moment is critical! If you meet Prias, give him this. This is a letter that explains the circumstances and a medicinal herb that will cure his wounds. To go to the<font color="LEVEL"> Neutral Zone</font>, cross this bridge in front of you and follow the road north. It is where Dark Elven and Elven soldiers stand face to face against each other. 
-
-
-
-
-
-</body>
-</html>
\ No newline at end of file
+Every moment is critical! If you meet Prias, give him this. This is a letter that explains the circumstances and a Medicinal Herb that will cure his wounds. To go to the <font color="LEVEL">Neutral Zone</font>, cross this bridge in front of you and follow the road north. It is where Dark Elven and Elven soldiers stand face to face against each other. 
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-07.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-07.html
similarity index 100%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-07.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-07.html
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-08.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-08.html
new file mode 100644
index 0000000000..265fe46a20
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-08.html
@@ -0,0 +1,3 @@
+<html><body>Guard Moretti:<br>
+Ah, you haven't gone to Reisa yet? Go on now and see Reisa. I hear you want to be an Elven Scout. I'm sure everything will turn out well. I am busy, so please excuse me.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-09.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-09.html
similarity index 81%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-09.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-09.html
index ca296b6b18..8b4e47cc48 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30337-09.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30337-09.html
@@ -1,12 +1,3 @@
-<html>
-
-<body>
-
-Guard Moretti:<br>
-
+<html><body>Guard Moretti:<br>
 Please find my friend Prias somewhere in the Neutral Zone, and give him the herb and letter that I gave you. The Neutral Zone is to the north of our village, across the bridge and along the road. It is the region where Dark Elven and Elven soldiers stand face to face with one another.
-
-
-
-</body>
-</html>
\ No newline at end of file
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-01.html
similarity index 69%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-01.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-01.html
index 4259a2020d..b0665c5ae4 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-01.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-01.html
@@ -1,10 +1,4 @@
-<html>
-
-<body>
-Prias:<br>
+<html><body>Prias:<br>
 Has Moretti sent you? I cannot move because my feet are in shackles. Please free me!<br>
-Do you see those<font color="LEVEL"> ol mahum sentries</font> over there? One of them has the key to the shackles on my feet! It seems they haven't noticed you yet. Lure them now and get rid of them. There is no time to hesitate. Hurry!
-
-
-</body>
-</html>
\ No newline at end of file
+Do you see those <font color="LEVEL">Ol Mahum sentries</font> over there? One of them has the key to the shackles on my feet! It seems they haven't noticed you yet. Lure them now and get rid of them. There is no time to hesitate. Hurry!
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-02.html
similarity index 82%
rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-02.htm
rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-02.html
index 93b100b859..fbbe3f4170 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/407_PathToElvenScout/30426-02.htm
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-02.html
@@ -1,12 +1,6 @@
-<html>
-
-<body>
-Prias:<br>
+<html><body>Prias:<br>
 You are very lucky. You came just when the others had left and only the sentries remained ... Anyway, I am free, thanks to you. Thank you very much. Ah, Moretti sent me a letter? And an herb as well ... he is a wonderful friend. I begin to feel faint just by thinking about my captivity, and the torments I've had to endure.<br>
 The scoundrels here just now were scouts of the group that was going to attack our village. They were planning to do their work in the Elven Forest where Humans cannot enter easily. Since you arrived at the right time, we can alert the people of the danger.<br>
 Take this to Moretti and tell him that it will be hard for me to return immediately ... Tell him I will take a closer look at the situation here and join the guards later.<br>
-I am entirely in your debt. Thank you very much. To think that I would receive help from the Elves in my lifetime!<font color="LEVEL"> On your way back, please take this letter to Moretti.</font> I beg you!
-
-
-</body>
-</html>
\ No newline at end of file
+I am entirely in your debt. Thank you very much. To think that I would receive help from the Elves in my lifetime! <font color="LEVEL">On your way back, please take this letter to Moretti.</font> I beg you!
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-04.html
new file mode 100644
index 0000000000..e11dc2888e
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/30426-04.html
@@ -0,0 +1,3 @@
+<html><body>Prias:<br>
+Elven friend, do not worry about me but <font color="LEVEL">please take my letter to Moretti</font>. I will have to scout some more.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/Q00407_PathOfTheElvenScout.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/Q00407_PathOfTheElvenScout.java
new file mode 100644
index 0000000000..e0e9a1f013
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00407_PathOfTheElvenScout/Q00407_PathOfTheElvenScout.java
@@ -0,0 +1,343 @@
+/*
+ * Copyright (C) 2004-2014 L2J DataPack
+ * 
+ * This file is part of L2J DataPack.
+ * 
+ * L2J DataPack 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.
+ * 
+ * L2J DataPack 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 <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00407_PathOfTheElvenScout;
+
+import com.l2jserver.gameserver.enums.QuestSound;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.base.ClassId;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.network.serverpackets.SocialAction;
+import com.l2jserver.gameserver.util.Util;
+
+/**
+ * Path of the Elven Scout (407)
+ * @author ivantotov
+ */
+public final class Q00407_PathOfTheElvenScout extends Quest
+{
+	// NPCs
+	private static final int MASTER_REORIA = 30328;
+	private static final int GUARD_BABENCO = 30334;
+	private static final int GUARD_MORETTI = 30337;
+	private static final int PRIAS = 30426;
+	// Items
+	private static final int REISAS_LETTER = 1207;
+	private static final int PRIASS_1ND_TORN_LETTER = 1208;
+	private static final int PRIASS_2ND_TORN_LETTER = 1209;
+	private static final int PRIASS_3ND_TORN_LETTER = 1210;
+	private static final int PRIASS_4ND_TORN_LETTER = 1211;
+	private static final int MORETTIES_HERB = 1212;
+	private static final int MORETTIS_LETTER = 1214;
+	private static final int PRIASS_LETTER = 1215;
+	private static final int HONORARY_GUARD = 1216;
+	private static final int REISAS_RECOMMENDATION = 1217;
+	private static final int RUSTED_KEY = 1293;
+	// Monster
+	private static final int OL_MAHUM_PATROL = 20053;
+	// Quest Monster
+	private static final int OL_MAHUM_SENTRY = 27031;
+	// Misc
+	private static final int MIN_LEVEL = 18;
+	
+	public Q00407_PathOfTheElvenScout()
+	{
+		super(407, Q00407_PathOfTheElvenScout.class.getSimpleName(), "Path of the Elven Scout");
+		addStartNpc(MASTER_REORIA);
+		addTalkId(MASTER_REORIA, GUARD_BABENCO, GUARD_MORETTI, PRIAS);
+		addKillId(OL_MAHUM_PATROL, OL_MAHUM_SENTRY);
+		addAttackId(OL_MAHUM_PATROL, OL_MAHUM_SENTRY);
+		registerQuestItems(REISAS_LETTER, PRIASS_1ND_TORN_LETTER, PRIASS_2ND_TORN_LETTER, PRIASS_3ND_TORN_LETTER, PRIASS_4ND_TORN_LETTER, MORETTIES_HERB, MORETTIS_LETTER, PRIASS_LETTER, HONORARY_GUARD, RUSTED_KEY);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState qs = getQuestState(player, false);
+		if (qs == null)
+		{
+			return null;
+		}
+		
+		String htmltext = null;
+		switch (event)
+		{
+			case "ACCEPT":
+			{
+				if (player.getClassId() == ClassId.elvenFighter)
+				{
+					if (player.getLevel() >= MIN_LEVEL)
+					{
+						if (hasQuestItems(player, REISAS_RECOMMENDATION))
+						{
+							htmltext = "30328-04.htm";
+						}
+						else
+						{
+							qs.startQuest();
+							qs.unset("variable");
+							giveItems(player, REISAS_LETTER, 1);
+							htmltext = "30328-05.htm";
+						}
+					}
+					else
+					{
+						htmltext = "30328-03.htm";
+					}
+				}
+				else if (player.getClassId() == ClassId.elvenScout)
+				{
+					htmltext = "30328-02a.htm";
+				}
+				else
+				{
+					htmltext = "30328-02.htm";
+				}
+				break;
+			}
+			case "30337-02.html":
+			{
+				htmltext = event;
+				break;
+			}
+			case "30337-03.html":
+			{
+				if (hasQuestItems(player, REISAS_LETTER))
+				{
+					takeItems(player, REISAS_LETTER, -1);
+					qs.set("variable", 1);
+					qs.setCond(2, true);
+					htmltext = event;
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
+	{
+		final QuestState qs = getQuestState(attacker, false);
+		
+		if ((qs != null) && qs.isStarted())
+		{
+			npc.setScriptValue(attacker.getObjectId());
+		}
+		return super.onAttack(npc, attacker, damage, isSummon);
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+	{
+		if (npc.isScriptValue(killer.getObjectId()) && Util.checkIfInRange(1500, npc, killer, false))
+		{
+			final QuestState qs = getQuestState(killer, false);
+			if (qs == null)
+			{
+				return null;
+			}
+			
+			if (npc.getId() == OL_MAHUM_SENTRY)
+			{
+				if (qs.isCond(5) && (getRandom(10) < 6))
+				{
+					if (hasQuestItems(qs.getPlayer(), MORETTIES_HERB, MORETTIS_LETTER) && !hasQuestItems(qs.getPlayer(), RUSTED_KEY))
+					{
+						giveItems(qs.getPlayer(), RUSTED_KEY, 1);
+						qs.setCond(6, true);
+					}
+				}
+			}
+			else if (qs.isCond(2))
+			{
+				final boolean has1stLetter = hasQuestItems(qs.getPlayer(), PRIASS_1ND_TORN_LETTER);
+				final boolean has2ndLetter = hasQuestItems(qs.getPlayer(), PRIASS_2ND_TORN_LETTER);
+				final boolean has3rdLetter = hasQuestItems(qs.getPlayer(), PRIASS_3ND_TORN_LETTER);
+				final boolean has4thLetter = hasQuestItems(qs.getPlayer(), PRIASS_4ND_TORN_LETTER);
+				
+				if (!(has1stLetter && has2ndLetter && has3rdLetter && has4thLetter))
+				{
+					if (!has1stLetter)
+					{
+						giveLetterAndCheckState(PRIASS_1ND_TORN_LETTER, qs);
+					}
+					else if (!has2ndLetter)
+					{
+						giveLetterAndCheckState(PRIASS_2ND_TORN_LETTER, qs);
+					}
+					else if (!has3rdLetter)
+					{
+						giveLetterAndCheckState(PRIASS_3ND_TORN_LETTER, qs);
+					}
+					else if (!has4thLetter)
+					{
+						giveLetterAndCheckState(PRIASS_4ND_TORN_LETTER, qs);
+					}
+				}
+			}
+		}
+		return super.onKill(npc, killer, isSummon);
+	}
+	
+	private void giveLetterAndCheckState(int letterId, QuestState qs)
+	{
+		giveItems(qs.getPlayer(), letterId, 1);
+		
+		if (getQuestItemsCount(qs.getPlayer(), PRIASS_1ND_TORN_LETTER, PRIASS_2ND_TORN_LETTER, PRIASS_3ND_TORN_LETTER, PRIASS_4ND_TORN_LETTER) >= 4)
+		{
+			qs.setCond(3, true);
+		}
+		else
+		{
+			playSound(qs.getPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
+		}
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState qs = getQuestState(player, true);
+		String htmltext = getNoQuestMsg(player);
+		if (qs.isCreated() || qs.isCompleted())
+		{
+			if (npc.getId() == MASTER_REORIA)
+			{
+				htmltext = "30328-01.htm";
+			}
+		}
+		else if (qs.isStarted())
+		{
+			switch (npc.getId())
+			{
+				case MASTER_REORIA:
+				{
+					if (hasQuestItems(player, REISAS_LETTER))
+					{
+						htmltext = "30328-06.html";
+					}
+					else if ((qs.getInt("variable") == 1) && !hasAtLeastOneQuestItem(player, REISAS_LETTER, HONORARY_GUARD))
+					{
+						htmltext = "30328-08.html";
+					}
+					else if (hasQuestItems(player, HONORARY_GUARD))
+					{
+						takeItems(player, HONORARY_GUARD, -1);
+						giveItems(player, REISAS_RECOMMENDATION, 1);
+						final int level = player.getLevel();
+						if (level >= 20)
+						{
+							addExpAndSp(player, 320534, 19932);
+						}
+						else if (level == 19)
+						{
+							addExpAndSp(player, 456128, 26630);
+						}
+						else
+						{
+							addExpAndSp(player, 591724, 33328);
+						}
+						giveAdena(player, 163800, true);
+						qs.exitQuest(false, true);
+						player.sendPacket(new SocialAction(player.getObjectId(), 3));
+						qs.saveGlobalQuestVar("1ClassQuestFinished", "1");
+						htmltext = "30328-07.html";
+					}
+					break;
+				}
+				case GUARD_BABENCO:
+				{
+					if (qs.getInt("variable") == 1)
+					{
+						htmltext = "30334-01.html";
+					}
+					break;
+				}
+				case GUARD_MORETTI:
+				{
+					final long letterCount = getQuestItemsCount(player, PRIASS_1ND_TORN_LETTER, PRIASS_2ND_TORN_LETTER, PRIASS_3ND_TORN_LETTER, PRIASS_4ND_TORN_LETTER);
+					if (hasQuestItems(player, REISAS_LETTER) && (letterCount == 0))
+					{
+						htmltext = "30337-01.html";
+					}
+					else if ((qs.getInt("variable") == 1) && !hasAtLeastOneQuestItem(player, MORETTIS_LETTER, PRIASS_LETTER, HONORARY_GUARD))
+					{
+						if (letterCount == 0)
+						{
+							htmltext = "30337-04.html";
+						}
+						else if (letterCount < 4)
+						{
+							htmltext = "30337-05.html";
+						}
+						else
+						{
+							takeItems(player, -1, PRIASS_1ND_TORN_LETTER, PRIASS_2ND_TORN_LETTER, PRIASS_3ND_TORN_LETTER, PRIASS_4ND_TORN_LETTER);
+							giveItems(player, MORETTIES_HERB, 1);
+							giveItems(player, MORETTIS_LETTER, 1);
+							qs.setCond(4, true);
+							htmltext = "30337-06.html";
+						}
+					}
+					else if (hasQuestItems(player, PRIASS_LETTER))
+					{
+						takeItems(player, PRIASS_LETTER, -1);
+						giveItems(player, HONORARY_GUARD, 1);
+						qs.setCond(8, true);
+						htmltext = "30337-07.html";
+					}
+					else if (hasQuestItems(player, MORETTIES_HERB, MORETTIS_LETTER))
+					{
+						htmltext = "30337-09.html";
+					}
+					else if (hasQuestItems(player, HONORARY_GUARD))
+					{
+						htmltext = "30337-08.html";
+					}
+					break;
+				}
+				case PRIAS:
+				{
+					if (hasQuestItems(player, MORETTIS_LETTER, MORETTIES_HERB))
+					{
+						if (!hasQuestItems(player, RUSTED_KEY))
+						{
+							qs.setCond(5, true);
+							htmltext = "30426-01.html";
+						}
+						else
+						{
+							takeItems(player, -1, RUSTED_KEY, MORETTIES_HERB, MORETTIS_LETTER);
+							giveItems(player, PRIASS_LETTER, 1);
+							qs.setCond(7, true);
+							htmltext = "30426-02.html";
+						}
+					}
+					else if (hasQuestItems(player, PRIASS_LETTER))
+					{
+						htmltext = "30426-04.html";
+					}
+					break;
+				}
+			}
+		}
+		return htmltext;
+	}
+}
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java
index 437a8d569b..3ccece7fac 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java
@@ -252,6 +252,7 @@ import quests.Q00381_LetsBecomeARoyalMember.Q00381_LetsBecomeARoyalMember;
 import quests.Q00382_KailsMagicCoin.Q00382_KailsMagicCoin;
 import quests.Q00385_YokeOfThePast.Q00385_YokeOfThePast;
 import quests.Q00401_PathToWarrior.Q00401_PathToWarrior;
+import quests.Q00407_PathOfTheElvenScout.Q00407_PathOfTheElvenScout;
 import quests.Q00416_PathOfTheOrcShaman.Q00416_PathOfTheOrcShaman;
 import quests.Q00420_LittleWing.Q00420_LittleWing;
 import quests.Q00421_LittleWingsBigAdventure.Q00421_LittleWingsBigAdventure;
@@ -618,6 +619,7 @@ public class QuestMasterHandler
 		Q00382_KailsMagicCoin.class,
 		Q00385_YokeOfThePast.class,
 		Q00401_PathToWarrior.class,
+		Q00407_PathOfTheElvenScout.class,
 		Q00416_PathOfTheOrcShaman.class,
 		Q00420_LittleWing.class,
 		Q00421_LittleWingsBigAdventure.class,
diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20140716update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20140716update.sql
new file mode 100644
index 0000000000..f8955b18b9
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/sql/game/updates/20140716update.sql
@@ -0,0 +1 @@
+UPDATE character_quests SET name='407_PathToElvenScout' WHERE name='Q00407_PathOfTheElvenScout';
\ No newline at end of file
-- 
GitLab