Implemented The Grand Tree quest
This commit is contained in:
@@ -60,6 +60,10 @@ public class BookreadOption extends OptionHandler {
|
||||
return 49610760;
|
||||
case Items.SLASHED_BOOK_9715:
|
||||
return 49610761;
|
||||
case Items.GLOUGHS_JOURNAL_785:
|
||||
return 49610762;
|
||||
case Items.TRANSLATION_BOOK_784:
|
||||
return 49610763;
|
||||
/*case 9004:
|
||||
return 423943;*/
|
||||
case 11710:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package content.global.travel.glider;
|
||||
|
||||
import content.region.kandarin.quest.grandtree.TheGrandTree;
|
||||
import core.game.component.Component;
|
||||
import core.game.dialogue.DialoguePlugin;
|
||||
import core.game.dialogue.FacialExpression;
|
||||
@@ -7,6 +8,10 @@ import core.game.node.entity.npc.NPC;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.player.Player;
|
||||
|
||||
import static core.api.ContentAPIKt.isQuestComplete;
|
||||
import static core.api.ContentAPIKt.questStage;
|
||||
import static core.tools.DialogueConstKt.END_DIALOGUE;
|
||||
|
||||
/**
|
||||
* Represents the dialogue plugin used for the captain dalbur npc.
|
||||
* @author 'Vexia
|
||||
@@ -54,12 +59,14 @@ public final class CaptainDalburDialogue extends DialoguePlugin {
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
npc("If you wish.");
|
||||
stage++;
|
||||
/*
|
||||
* interpreter.sendDialogues(npc, FacialExpression.NORMAL,
|
||||
* "I only fly friends of the gnomes!"); stage = 2;
|
||||
*/
|
||||
if(!isQuestComplete(player, TheGrandTree.questName)){
|
||||
interpreter.sendDialogues(npc, FacialExpression.ANNOYED, "I only fly friends of the gnomes!");
|
||||
stage = END_DIALOGUE;
|
||||
}
|
||||
else {
|
||||
npc("If you wish.");
|
||||
stage++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package content.global.travel.glider;
|
||||
|
||||
import content.region.kandarin.quest.grandtree.TheGrandTree;
|
||||
import core.api.ContentAPIKt;
|
||||
import core.cache.def.impl.NPCDefinition;
|
||||
import core.game.component.Component;
|
||||
import content.global.travel.glider.Gliders;
|
||||
import core.game.interaction.OptionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import static core.api.ContentAPIKt.isQuestComplete;
|
||||
|
||||
/**
|
||||
* Represents the plugin used for gliders.
|
||||
@@ -29,8 +31,12 @@ public final class GliderPlugin extends OptionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
player.getInterfaceManager().open(new Component(138));
|
||||
Gliders.sendConfig(node.asNpc(), player);
|
||||
if(isQuestComplete(player, TheGrandTree.questName)){
|
||||
player.getInterfaceManager().open(new Component(138));
|
||||
Gliders.sendConfig(node.asNpc(), player);
|
||||
} else {
|
||||
ContentAPIKt.sendMessage(player,"You must complete The Grand Tree Quest to access the gnome glider.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user