Directly show quest dialog when a single quest is available.

This commit is contained in:
MobiusDevelopment
2022-09-16 23:42:35 +00:00
parent 9a6f1e1b76
commit dc6ee5ad05
24 changed files with 264 additions and 0 deletions

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {

View File

@@ -112,6 +112,8 @@ public class QuestLink implements IBypassHandler
questList = orderedQuests.values(); questList = orderedQuests.values();
} }
int startCount = 0;
String startQuest = null;
for (Quest quest : questList) for (Quest quest : questList)
{ {
final QuestState qs = player.getQuestState(quest.getScriptName()); final QuestState qs = player.getQuestState(quest.getScriptName());
@@ -124,6 +126,9 @@ public class QuestLink implements IBypassHandler
} }
else if (startingQuests.contains(quest) && quest.canStartQuest(player)) else if (startingQuests.contains(quest) && quest.canStartQuest(player))
{ {
startCount++;
startQuest = quest.getName();
sbCanStart.append("<font color=\"bbaa88\">"); sbCanStart.append("<font color=\"bbaa88\">");
sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">"); sbCanStart.append("<button icon=\"quest\" align=\"left\" action=\"bypass -h npc_" + npc.getObjectId() + "_Quest " + quest.getName() + "\">");
String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>"; String localisation = quest.isCustomQuest() ? quest.getPath() : "<fstring>" + quest.getNpcStringId() + "01</fstring>";
@@ -209,6 +214,12 @@ public class QuestLink implements IBypassHandler
} }
} }
if (sbStarted.isEmpty() && (startCount == 1))
{
showQuestWindow(player, npc, startQuest);
return;
}
String content; String content;
if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0)) if ((sbStarted.length() > 0) || (sbCanStart.length() > 0) || (sbCantStart.length() > 0) || (sbCompleted.length() > 0))
{ {