Skip to content

Commit

Permalink
Begin creating quest An Old Man's wish
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Nov 1, 2022
1 parent 835b84f commit 0d2e7fb
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/games/stendhal/server/core/rp/StendhalQuestSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public void init() {
//loadQuest(new AdMemoriaInPortfolio());
loadQuest(new AdosDeathmatch());
loadQuest(new AmazonPrincess());
//loadQuest(new AnOldMansWish());
loadQuest(new AntivenomRing());
loadQuest(new ArmorForDagobert());
loadQuest(new BalloonForBobby());
Expand Down
83 changes: 83 additions & 0 deletions src/games/stendhal/server/maps/quests/AnOldMansWish.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/***************************************************************************
* Copyright © 2003-2022 - Arianne *
***************************************************************************
***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.maps.quests;

import java.util.ArrayList;
import java.util.List;

import games.stendhal.server.entity.npc.ConversationPhrases;
import games.stendhal.server.entity.npc.ConversationStates;
import games.stendhal.server.entity.npc.SpeakerNPC;
import games.stendhal.server.entity.npc.condition.QuestNotStartedCondition;
import games.stendhal.server.entity.player.Player;
import games.stendhal.server.maps.Region;

public class AnOldMansWish extends AbstractQuest {

public static final String QUEST_SLOT = "an_old_mans_wish";

private final SpeakerNPC elias = npcs.get("Elias Breland");


@Override
public String getSlotName() {
return QUEST_SLOT;
}

@Override
public String getName() {
return "AnOldMansWish";
}

@Override
public String getRegion() {
return Region.DENIRAN;
}

@Override
public String getNPCName() {
return elias.getName();
}

@Override
public List<String> getHistory(final Player player) {
final List<String> res = new ArrayList<>();
return res;
}

@Override
public void addToWorld() {
fillQuestInfo(
"An Old Man's Wish",
elias.getName() + " is grieved over the loss of his grandson.",
false
);
prepareRequestStep();
prepareCompleteStep();
}

private void prepareRequestStep() {
elias.add(
ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new QuestNotStartedCondition(QUEST_SLOT),
ConversationStates.QUEST_OFFERED,
"My grandson disappeared a year ago. I fear the worst and have"
+ " nearly given up all hope. What I would give to just"
+ " know what happened to him! If you learn anything will"
+ " you bring me the news?",
null);
}

private void prepareCompleteStep() {
}
}

0 comments on commit 0d2e7fb

Please sign in to comment.