Fixed Tutorial quest Ant build problem.

This commit is contained in:
MobiusDev
2015-05-07 20:12:38 +00:00
parent d85e8a6ece
commit 413c65f63a
6 changed files with 43 additions and 16 deletions

View File

@@ -18,13 +18,14 @@
*/ */
package quests.Q00255_Tutorial; package quests.Q00255_Tutorial;
import com.l2jserver.gameserver.enums.Race;
import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState; import com.l2jserver.gameserver.model.quest.QuestState;
/** /**
* Tutorial Quest (Placeholder) * Tutorial Quest
* @author Mobius * @author Mobius
*/ */
public class Q00255_Tutorial extends Quest public class Q00255_Tutorial extends Quest
@@ -47,9 +48,31 @@ public class Q00255_Tutorial extends Quest
String htmltext = null; String htmltext = null;
switch (event) switch (event)
{ {
case "tutorial_02.html":
{
htmltext = event;
break;
}
case "user_connected": case "user_connected":
{ {
// Do stuff on player login. // Start Newbie Tutorial
if ((player.getLevel() < 6) && !qs.isCompleted())
{
startQuestTimer("start_newbie_tutorial", 5000, null, player);
}
break;
}
case "start_newbie_tutorial":
{
if (player.getRace() == Race.ERTHEIA)
{
htmltext = "tutorial_01_ertheia.html";
}
else
{
htmltext = "tutorial_01.html";
}
qs.exitQuest(false, false); // TODO: Continue with the tutorial.
break; break;
} }
} }

View File

@@ -0,0 +1,4 @@
<html><title>Tutorial</title><body>
We are inside the museum in Talking Island Village. It seems that curator Pantheon would like to speak with you. I will tell you <font color="LEVEL">how to use the mouse to move</font> to Pantheon and speak with him.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00255_Tutorial tutorial_02.html">Movement Explanation</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><title>Tutorial</title><body>
This is Faeron Village. Queen Navari has something to say. Please pay attention to the instructions on <font color="LEVEL">using the mouse</font> in order to <font color="LEVEL">move</font>.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00255_Tutorial tutorial_02.html">How to Move</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><title>Tutorial</title><body>
<center><font color="LEVEL">[Movement]</font></center><br>
Move your mouse cursor to the spot to which you want to move and <font color="FF0000">left-click</font>. Then, you will be moved to that location.<img src="L2UI_CH3.tutorial_img01" width=64 height=64><img src="L2UI_CH3.tutorial_img021" width=64 height=64><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00255_Tutorial close_window">Exit the Tutorial</Button>
</body></html>

View File

@@ -18,8 +18,6 @@
*/ */
package com.l2jserver.gameserver.network.clientpackets; package com.l2jserver.gameserver.network.clientpackets;
import quests.Q00255_Tutorial.Q00255_Tutorial;
import com.l2jserver.Config; import com.l2jserver.Config;
import com.l2jserver.gameserver.LoginServerThread; import com.l2jserver.gameserver.LoginServerThread;
import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.cache.HtmCache;
@@ -431,7 +429,7 @@ public class EnterWorld extends L2GameClientPacket
} }
} }
if (Config.SERVER_CLASSIC_SUPPORT) if (!Config.DISABLE_TUTORIAL)
{ {
loadTutorial(activeChar); loadTutorial(activeChar);
} }
@@ -753,15 +751,10 @@ public class EnterWorld extends L2GameClientPacket
private void loadTutorial(L2PcInstance player) private void loadTutorial(L2PcInstance player)
{ {
if (Config.DISABLE_TUTORIAL) QuestState qs = player.getQuestState("Q00255_Tutorial");
{
return;
}
QuestState qs = player.getQuestState(Q00255_Tutorial.class.getSimpleName());
if (qs == null) if (qs == null)
{ {
qs = QuestManager.getInstance().getQuest(Q00255_Tutorial.class.getSimpleName()).newQuestState(player); qs = QuestManager.getInstance().getQuest("Q00255_Tutorial").newQuestState(player);
qs.setState(State.STARTED); qs.setState(State.STARTED);
} }
qs.getQuest().notifyEvent("user_connected", null, player); qs.getQuest().notifyEvent("user_connected", null, player);

View File

@@ -18,8 +18,6 @@
*/ */
package com.l2jserver.gameserver.network.clientpackets; package com.l2jserver.gameserver.network.clientpackets;
import quests.Q00255_Tutorial.Q00255_Tutorial;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.QuestState; import com.l2jserver.gameserver.model.quest.QuestState;
@@ -45,10 +43,10 @@ public class RequestTutorialClientEvent extends L2GameClientPacket
return; return;
} }
QuestState qs = player.getQuestState(Q00255_Tutorial.class.getSimpleName()); QuestState qs = player.getQuestState("Q00255_Tutorial");
if (qs != null) if (qs != null)
{ {
qs.getQuest().notifyEvent("CE" + eventId + "", null, player); qs.getQuest().notifyEvent("CE" + eventId, null, player);
} }
} }