Varrock Museum Curator Haig Hele no longer gets stuck in endless "please waiting"
Achievement diary no longer gets completed on every repeated interaction with the Varrock Museum Curator Grammar fixes for shield of arrav quest
This commit is contained in:
+17
-17
@@ -10,8 +10,6 @@ import content.region.desert.quest.thegolem.CuratorHaigHalenGolemDialogue;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the curator haig halen dialogue.
|
* Represents the curator haig halen dialogue.
|
||||||
* @author 'Vexia
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
*/
|
||||||
public final class CuratorHaigHalenDialogue extends DialoguePlugin {
|
public final class CuratorHaigHalenDialogue extends DialoguePlugin {
|
||||||
|
|
||||||
@@ -40,29 +38,31 @@ public final class CuratorHaigHalenDialogue extends DialoguePlugin {
|
|||||||
@Override
|
@Override
|
||||||
public boolean open(Object... args) {
|
public boolean open(Object... args) {
|
||||||
npc = (NPC) args[0];
|
npc = (NPC) args[0];
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Welcome to the museum of Varrock.");
|
interpreter.sendDialogues(npc, FacialExpression.HAPPY, "Welcome to the museum of Varrock.");
|
||||||
|
if (player.getQuestRepository().getPoints() >= 50 && !player.getAchievementDiaryManager().hasCompletedTask(DiaryType.VARROCK, 0 ,12)) {
|
||||||
if (player.getQuestRepository().getPoints() >= 50) {
|
|
||||||
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 0, 12);
|
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 0, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
stage = 0;
|
stage = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
public boolean handle(int interfaceId, int buttonId) {
|
||||||
switch(stage) {
|
switch(stage) {
|
||||||
case 0:
|
case 0:
|
||||||
showTopics(
|
boolean fallthrough = showTopics(
|
||||||
new IfTopic("I have the Shield of Arrav", new CuratorHaigHalenSOADialogue(),
|
new IfTopic("I have the Shield of Arrav", new CuratorHaigHalenSOADialogue(),
|
||||||
player.getQuestRepository().getQuest("Shield of Arrav").getStage(player) == 70
|
player.getQuestRepository().getQuest("Shield of Arrav").getStage(player) == 70
|
||||||
, false),
|
, false),
|
||||||
new IfTopic("I'm looking for a statuette recovered from the city of Uzer.", new CuratorHaigHalenGolemDialogue(),
|
new IfTopic("I'm looking for a statuette recovered from the city of Uzer.", new CuratorHaigHalenGolemDialogue(),
|
||||||
player.getQuestRepository().getQuest("The Golem").getStage(player) >= 3
|
player.getQuestRepository().getQuest("The Golem").getStage(player) == 3
|
||||||
, false)
|
, false)
|
||||||
);
|
);
|
||||||
break;
|
if(fallthrough) { stage = 1; handle(interfaceId, buttonId); }
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
end();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -94,7 +94,7 @@ public class ShieldofArrav extends Quest {
|
|||||||
line(player, "<str>I read about a valuable shield stolen long ago by a gang of", 4+ 7);
|
line(player, "<str>I read about a valuable shield stolen long ago by a gang of", 4+ 7);
|
||||||
line(player, "<str>thieves with an outstanding reward upon it.", 5+ 7);
|
line(player, "<str>thieves with an outstanding reward upon it.", 5+ 7);
|
||||||
line(player, BLUE + "Baraek told me that the " + RED + "'Phoenix Gang' " + BLUE + "have a hideout in", 6+ 7);
|
line(player, BLUE + "Baraek told me that the " + RED + "'Phoenix Gang' " + BLUE + "have a hideout in", 6+ 7);
|
||||||
line(player, BLUE + "the " + RED + "south-eastern part of Varrock" + BLUE + ", disgusing themselves", 7+ 7);
|
line(player, BLUE + "the " + RED + "south-eastern part of Varrock" + BLUE + ", disguising themselves", 7+ 7);
|
||||||
line(player, BLUE + "as the " + RED + "VTAM Corporation" + BLUE + ". I should find them and join.", 8+ 7);
|
line(player, BLUE + "as the " + RED + "VTAM Corporation" + BLUE + ". I should find them and join.", 8+ 7);
|
||||||
break;
|
break;
|
||||||
case 50:
|
case 50:
|
||||||
@@ -124,14 +124,14 @@ public class ShieldofArrav extends Quest {
|
|||||||
line(player, "<str>According to him there is a criminal organisation known as", 9+ 7);
|
line(player, "<str>According to him there is a criminal organisation known as", 9+ 7);
|
||||||
line(player, "<str>the " + RED + "'Black Arm Gang'" + BLUE + "down the alley near to him.", 10+ 7);
|
line(player, "<str>the " + RED + "'Black Arm Gang'" + BLUE + "down the alley near to him.", 10+ 7);
|
||||||
line(player, BLUE + "If I want to join the " + RED + "Phoenix Gang " + BLUE + "I need to kill" + RED + " Jonny The", 11+ 7);
|
line(player, BLUE + "If I want to join the " + RED + "Phoenix Gang " + BLUE + "I need to kill" + RED + " Jonny The", 11+ 7);
|
||||||
line(player, RED + "Beard " + BLUE + "in the " + RED + "Blue Moon Inn " + BLUE + "and retreive his " + RED + "report.", 12+ 7);
|
line(player, RED + "Beard " + BLUE + "in the " + RED + "Blue Moon Inn " + BLUE + "and retrieve his " + RED + "report.", 12+ 7);
|
||||||
line(player, RED + "Katrine " + BLUE + "said if I wanted to join the " + RED + "Black Arm Gang," + BLUE + " I'd", 13+ 7);
|
line(player, RED + "Katrine " + BLUE + "said if I wanted to join the " + RED + "Black Arm Gang," + BLUE + " I'd", 13+ 7);
|
||||||
line(player, BLUE + "have to steal " + RED + "two Phoenix crossbows " + BLUE + "from the rival gang.", 14+ 7);
|
line(player, BLUE + "have to steal " + RED + "two Phoenix crossbows " + BLUE + "from the rival gang.", 14+ 7);
|
||||||
line(player, BLUE + "Maybe " + RED + "Charlie the tramp " + BLUE + "can give me some ideas about", 15+ 7);
|
line(player, BLUE + "Maybe " + RED + "Charlie the tramp " + BLUE + "can give me some ideas about", 15+ 7);
|
||||||
line(player, BLUE + "how to do this.", 16+ 7);
|
line(player, BLUE + "how to do this.", 16+ 7);
|
||||||
} else if (isPhoenixMission(player)) {
|
} else if (isPhoenixMission(player)) {
|
||||||
line(player, BLUE + "If I want to join the " + RED + "Phoenix Gang " + BLUE + "I need to kill" + RED + " Jonny The", 10+ 7);
|
line(player, BLUE + "If I want to join the " + RED + "Phoenix Gang " + BLUE + "I need to kill" + RED + " Jonny The", 10+ 7);
|
||||||
line(player, RED + "Beard " + BLUE + "in the " + RED + "Blue Moon Inn " + BLUE + "and retreive his " + RED + "report.", 11+ 7);
|
line(player, RED + "Beard " + BLUE + "in the " + RED + "Blue Moon Inn " + BLUE + "and retrieve his " + RED + "report.", 11+ 7);
|
||||||
line(player, BLUE + "Alternatively, if I want to join the " + RED + "Blackarm gang " + BLUE + "I should", 12+ 7);
|
line(player, BLUE + "Alternatively, if I want to join the " + RED + "Blackarm gang " + BLUE + "I should", 12+ 7);
|
||||||
line(player, BLUE + "speak to their " + RED + "leader, Katrine, " + BLUE + "about joining.", 13+ 7);
|
line(player, BLUE + "speak to their " + RED + "leader, Katrine, " + BLUE + "about joining.", 13+ 7);
|
||||||
} else if (isBlackArmMission(player)) {
|
} else if (isBlackArmMission(player)) {
|
||||||
@@ -178,7 +178,7 @@ public class ShieldofArrav extends Quest {
|
|||||||
line(player, "<str>Crossbows from the Phoenix Gang's weapons store, and", 9+ 7);
|
line(player, "<str>Crossbows from the Phoenix Gang's weapons store, and", 9+ 7);
|
||||||
line(player, "<str>Katrine welcomes me as a Black Arm Gang member.", 10+ 7);
|
line(player, "<str>Katrine welcomes me as a Black Arm Gang member.", 10+ 7);
|
||||||
line(player, "<str>With the help of my friend in the rival gang, I was able to", 12+ 7);
|
line(player, "<str>With the help of my friend in the rival gang, I was able to", 12+ 7);
|
||||||
line(player, "<str>retreive both parts of the fabled Shield of Arrav and", 13+ 7);
|
line(player, "<str>retrieve both parts of the fabled Shield of Arrav and", 13+ 7);
|
||||||
line(player, "<str>return it to the Museum of Varrock. In Recognition of my", 14+ 7);
|
line(player, "<str>return it to the Museum of Varrock. In Recognition of my", 14+ 7);
|
||||||
line(player, "<str>efforts, King Roald paid me the reward set by his", 15+ 7);
|
line(player, "<str>efforts, King Roald paid me the reward set by his", 15+ 7);
|
||||||
line(player, "<str>ancestor.", 16+ 7);
|
line(player, "<str>ancestor.", 16+ 7);
|
||||||
@@ -188,7 +188,7 @@ public class ShieldofArrav extends Quest {
|
|||||||
line(player, "<str>I killed Jonny the Beard and was welcomed into the Phoenix", 7+ 7);
|
line(player, "<str>I killed Jonny the Beard and was welcomed into the Phoenix", 7+ 7);
|
||||||
line(player, "<str>Gang. Straven gave me a key to the weapons room.", 8+ 7);
|
line(player, "<str>Gang. Straven gave me a key to the weapons room.", 8+ 7);
|
||||||
line(player, "<str>With the help of my friend in the rival gang, I was able to", 10+ 7);
|
line(player, "<str>With the help of my friend in the rival gang, I was able to", 10+ 7);
|
||||||
line(player, "<str>retreive both parts of the fabled Shield of Arrav and", 11+ 7);
|
line(player, "<str>retrieve both parts of the fabled Shield of Arrav and", 11+ 7);
|
||||||
line(player, "<str>return it to the Museum of Varrock. In Recognition of my", 12+ 7);
|
line(player, "<str>return it to the Museum of Varrock. In Recognition of my", 12+ 7);
|
||||||
line(player, "<str>efforts, King Roald paid me the reward set by his", 13+ 7);
|
line(player, "<str>efforts, King Roald paid me the reward set by his", 13+ 7);
|
||||||
line(player, "<str>ancestor.", 14+ 7);
|
line(player, "<str>ancestor.", 14+ 7);
|
||||||
|
|||||||
@@ -130,13 +130,16 @@ abstract class DialogueFile {
|
|||||||
player?.dialogueInterpreter?.sendDialogue(*messages)
|
player?.dialogueInterpreter?.sendDialogue(*messages)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun showTopics(vararg topics: Topic<*>) {
|
fun showTopics(vararg topics: Topic<*>): Boolean {
|
||||||
val validTopics = ArrayList<String>()
|
val validTopics = ArrayList<String>()
|
||||||
topics.filter { if(it is IfTopic) it.showCondition else true }.forEach {
|
topics.filter { if(it is IfTopic) it.showCondition else true }.forEach {
|
||||||
topic -> interpreter!!.activeTopics.add(topic)
|
topic -> interpreter!!.activeTopics.add(topic)
|
||||||
validTopics.add(topic.text)
|
validTopics.add(topic.text)
|
||||||
}
|
}
|
||||||
if (validTopics.size == 1) {
|
if(validTopics.size == 0) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
else if (validTopics.size == 1) {
|
||||||
val topic = topics[0]
|
val topic = topics[0]
|
||||||
if(topic.toStage is DialogueFile) {
|
if(topic.toStage is DialogueFile) {
|
||||||
val topicFile = topic.toStage as DialogueFile
|
val topicFile = topic.toStage as DialogueFile
|
||||||
@@ -146,7 +149,10 @@ abstract class DialogueFile {
|
|||||||
}
|
}
|
||||||
player(topic.text)
|
player(topic.text)
|
||||||
interpreter!!.activeTopics.clear()
|
interpreter!!.activeTopics.clear()
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
else { options(*validTopics.toTypedArray())
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
else options(*validTopics.toTypedArray())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ public abstract class DialoguePlugin implements Plugin<Player> {
|
|||||||
return player(expr, splitLines(msg, 54));
|
return player(expr, splitLines(msg, 54));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showTopics(Topic<?>... topics) {
|
public boolean showTopics(Topic<?>... topics) {
|
||||||
ArrayList<String> validTopics = new ArrayList<>();
|
ArrayList<String> validTopics = new ArrayList<>();
|
||||||
for(Topic<?> topic : topics)
|
for(Topic<?> topic : topics)
|
||||||
{
|
{
|
||||||
@@ -370,21 +370,25 @@ public abstract class DialoguePlugin implements Plugin<Player> {
|
|||||||
interpreter.activeTopics.add(topic);
|
interpreter.activeTopics.add(topic);
|
||||||
validTopics.add(topic.getText());
|
validTopics.add(topic.getText());
|
||||||
}
|
}
|
||||||
|
if(validTopics.size() == 0) {
|
||||||
if (validTopics.size() == 1) {
|
return true;
|
||||||
Topic topic = interpreter.activeTopics.get(0);
|
}
|
||||||
|
else if (validTopics.size() == 1) {
|
||||||
if(topic.getToStage() instanceof DialogueFile) {
|
Topic topic = interpreter.activeTopics.get(0);
|
||||||
DialogueFile topicFile = (DialogueFile) topic.getToStage();
|
if(topic.getToStage() instanceof DialogueFile) {
|
||||||
interpreter.getDialogue().loadFile(topicFile);
|
DialogueFile topicFile = (DialogueFile) topic.getToStage();
|
||||||
} else if(topic.getToStage() instanceof Integer) {
|
interpreter.getDialogue().loadFile(topicFile);
|
||||||
stage = (Integer) topic.getToStage();
|
}
|
||||||
}
|
else if(topic.getToStage() instanceof Integer) {
|
||||||
|
stage = (Integer) topic.getToStage();
|
||||||
player(topic.getText());
|
}
|
||||||
interpreter.activeTopics.clear();
|
player(topic.getText());
|
||||||
|
interpreter.activeTopics.clear();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
options(validTopics.toArray(new String[0]));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
options(validTopics.toArray(new String[0]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user