Skip to content

Commit

Permalink
Update FishermansLicenseQuiz.java
Browse files Browse the repository at this point in the history
There was an option to reset Collector progress by triggering Quest2 offer by saying exam
  • Loading branch information
twiernik authored Nov 15, 2023
1 parent 59b714a commit 5679be1
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import games.stendhal.server.entity.npc.ConversationStates;
import games.stendhal.server.entity.npc.EventRaiser;
import games.stendhal.server.entity.npc.SpeakerNPC;
import games.stendhal.server.entity.npc.action.SetQuestAction;
import games.stendhal.server.entity.npc.condition.NotCondition;
import games.stendhal.server.entity.npc.condition.TriggerInListCondition;
import games.stendhal.server.entity.player.Player;
Expand Down Expand Up @@ -136,7 +137,7 @@ private void putNextFishOnTable() {
.getItem(getCurrentSpecies());
fishOnTable.setDescription("You see a fish.");

fishOnTable.setPosition(7, 4);
fishOnTable.setPosition(7, 4);
zone.add(fishOnTable);
}

Expand Down Expand Up @@ -177,7 +178,9 @@ public void fire(final Player player, final Sentence sentence, final EventRaiser
@Override
public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
if (player.isQuestCompleted(FishermansLicenseCollector.QUEST_SLOT)) {
npc.say("You have already got your fisherman's license.");
npc.say("You have already got your fisherman's license.");
} else if(player.hasQuest(FishermansLicenseCollector.QUEST_SLOT)) {
npc.say("I hope you were not lazy and that you brought me some other fish #species.");
} else if (player.isQuestCompleted(QUEST_SLOT)) {
npc.say("Are you ready for the second part of your exam?");
npc.setCurrentState(ConversationStates.QUEST_2_OFFERED);
Expand All @@ -198,7 +201,7 @@ public void fire(final Player player, final Sentence sentence, final EventRaiser
fisherman.add(ConversationStates.QUEST_OFFERED,
ConversationPhrases.NO_MESSAGES, null,
ConversationStates.ATTENDING, "Come back when you're ready.",
null);
new SetQuestAction(QUEST_SLOT, "rejected"));

fisherman.add(ConversationStates.QUEST_OFFERED,
ConversationPhrases.YES_MESSAGES, null,
Expand Down

0 comments on commit 5679be1

Please sign in to comment.