Skip to content
Snippets Groups Projects
Commit f0c85d34 authored by Zoey76's avatar Zoey76
Browse files

BETA: Quests in Java by nonom:

	* Secret Meeting With Ketra Orcs (11)
	* Secret Meeting With Varka Silenos (12)
	* Parcel Delivery (13)
	* Whereabouts of the Archaeologist (14)
	* Sweet Whispers (15)
	* The Coming Darkness (16)
	* Light and Darkness (17)
	* Meeting with the Golden Ram (18)
	* Added SQL update queries for quests that changed it's name.

Review, tests and fixes by me, thanks jurchiks for suggestions for improvements and typos.
parent 18babf72
No related branches found
No related tags found
No related merge requests found
Showing
with 282 additions and 6 deletions
<html><body>Ghost of Adventurer:<br>
Huh? You were asked to give me this letter? Who writes a letter to a dead person? Hmm...Let me see...<br>
Oh, it's from my mother! It's been so long since I've seen her! How is she?<br>
<a action="bypass -h Quest 14_WhereaboutsOfTheArchaeologist 31538-1.htm">Your mother is dead.</a>
<a action="bypass -h Quest 14_WhereaboutsOfTheArchaeologist 31538-01.html">Your mother is dead.</a>
</body></html>
\ No newline at end of file
<html><body>Ghost of Adventurer:<br>
You don't have the required items.<br>
</body></html>
\ No newline at end of file
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package quests.Q14_WhereaboutsOfTheArchaeologist;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
/**
* Where abouts Of The Archaeologist (14).<br>
* Original Jython script by disKret.
* @author nonom
*/
public class Q14_WhereaboutsOfTheArchaeologist extends Quest
{
private static final String qn = "14_WhereaboutsOfTheArchaeologist";
// NPCs
private static final int LIESEL = 31263;
private static final int GHOST_OF_ADVENTURER = 31538;
// Items
private static final int LETTER = 7253;
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState st = player.getQuestState(qn);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "31263-02.html":
st.set("cond", "1");
st.setState(State.STARTED);
st.giveItems(LETTER, 1);
st.playSound("ItemSound.quest_accept");
break;
case "31538-01.html":
if ((st.getInt("cond") == 1) && st.hasQuestItems(LETTER))
{
st.takeItems(LETTER, -1);
st.giveItems(57, 136928);
st.addExpAndSp(325881, 32524);
st.playSound("ItemSound.quest_finish");
st.exitQuest(false);
}
else
{
htmltext = "31538-02.html";
}
break;
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = player.getQuestState(qn);
if (st == null)
{
return htmltext;
}
final int npcId = npc.getNpcId();
switch (st.getState())
{
case State.COMPLETED:
htmltext = getAlreadyCompletedMsg(player);
break;
case State.CREATED:
if (npcId == LIESEL)
{
htmltext = (player.getLevel() < 74) ? "31263-01.html" : "31263-00.htm";
}
break;
case State.STARTED:
if (st.getInt("cond") == 1)
{
switch (npcId)
{
case LIESEL:
htmltext = "31263-02.html";
break;
case GHOST_OF_ADVENTURER:
htmltext = "31538-00.html";
break;
}
}
break;
}
return htmltext;
}
public Q14_WhereaboutsOfTheArchaeologist(int questId, String name, String descr)
{
super(questId, name, descr);
addStartNpc(LIESEL);
addTalkId(LIESEL);
addTalkId(GHOST_OF_ADVENTURER);
}
public static void main(String[] args)
{
new Q14_WhereaboutsOfTheArchaeologist(14, qn, "Whereabouts Of The Archaeologist");
}
}
<html><body>Trader Vladimir:<br>
The world is very unsettled these days. Would you be interested in a unique kind of power?<br>
<a action="bypass -h Quest 15_SweetWhisper 31302-1.htm">Quest</a>
<a action="bypass -h Quest 15_SweetWhispers 31302-01.html">Quest</a>
</body></html>
\ No newline at end of file
<html><body>Trader Vladimir:<br>
Find the<font color="LEVEL"> mysterious Necromancer</font> at the entrance to the<font color="LEVEL"> Valley of Saints</font>. He'll help you test your fate.
Find the <font color="LEVEL">mysterious Necromancer</font> at the entrance to the <font color="LEVEL">Valley of Saints</font>. He'll help you test your fate.
</body></html>
\ No newline at end of file
<html><body>Hierarch:<br>
What are you doing here? We don't let just anybody in here!<br>
<a action="bypass -h Quest 15_SweetWhisper 31517-1.htm">Vladimir sent me.</a>
<a action="bypass -h Quest 15_SweetWhispers 31517-01.html">Vladimir sent me.</a>
</body></html>
\ No newline at end of file
<html><body>Mysterious Necromancer:<br>
What business do you have here? What do you want from me?<br>
<a action="bypass -h Quest 15_SweetWhisper 31518-1.htm">I want to change my ways.</a>
<a action="bypass -h Quest 15_SweetWhispers 31518-01.html">I want to change my ways.</a>
</body></html>
\ No newline at end of file
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package quests.Q15_SweetWhispers;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
/**
* Sweet Whisper (15).<br>
* Original jython script by disKret.
* @author nonom
*/
public class Q15_SweetWhispers extends Quest
{
private static final String qn = "15_SweetWhispers";
// NPCs
private static final int VLADIMIR = 31302;
private static final int HIERARCH = 31517;
private static final int M_NECROMANCER = 31518;
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState st = player.getQuestState(qn);
if (st == null)
{
return htmltext;
}
final int cond = st.getInt("cond");
switch (event)
{
case "31302-01.html":
st.set("cond", "1");
st.setState(State.STARTED);
st.playSound("ItemSound.quest_accept");
break;
case "31518-01.html":
if (cond == 1)
{
st.set("cond", "2");
st.playSound("ItemSound.quest_middle");
}
break;
case "31517-01.html":
if (cond == 2)
{
st.addExpAndSp(350531, 28204);
st.playSound("ItemSound.quest_finish");
st.exitQuest(false);
}
break;
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = player.getQuestState(qn);
if (st == null)
{
return htmltext;
}
final int npcId = npc.getNpcId();
switch (st.getState())
{
case State.COMPLETED:
htmltext = getAlreadyCompletedMsg(player);
break;
case State.CREATED:
if (npcId == VLADIMIR)
{
htmltext = (player.getLevel() >= 60) ? "31302-00.htm" : "31302-00a.html";
}
break;
case State.STARTED:
final int cond = st.getInt("cond");
switch (npcId)
{
case VLADIMIR:
if (cond == 1)
{
htmltext = "31302-01a.html";
}
break;
case M_NECROMANCER:
switch (cond)
{
case 1:
htmltext = "31518-00.html";
break;
case 2:
htmltext = "31518-01a.html";
break;
}
break;
case HIERARCH:
if (cond == 2)
{
htmltext = "31517-00.html";
}
break;
}
break;
}
return htmltext;
}
public Q15_SweetWhispers(int questId, String name, String descr)
{
super(questId, name, descr);
addStartNpc(VLADIMIR);
addTalkId(VLADIMIR, HIERARCH, M_NECROMANCER);
}
public static void main(String[] args)
{
new Q15_SweetWhispers(15, qn, "Sweet Whispers");
}
}
<html><body>Evil Altar:<br>
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
<a action="bypass -h Quest 16_TheComingDarkness 31512-1.htm">Place the crystal in the space under the altar.</a>
<a action="bypass -h Quest 16_TheComingDarkness 31512-01.html">Place the crystal in the space under the altar.</a>
</body></html>
\ No newline at end of file
<html><body>Evil Altar:<br>
As with the previous altar, there is a space underneath where the crystal will easily fit.<br>
<a action="bypass -h Quest 16_TheComingDarkness 31513-1.htm">Place the crystal in the space under the altar.</a>
<a action="bypass -h Quest 16_TheComingDarkness 31513-01.html">Place the crystal in the space under the altar.</a>
</body></html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment