require all quest complete or 32 QP

This commit is contained in:
RedSparr0w
2019-10-25 17:46:49 +13:00
parent 04f474ed6d
commit 441ca60292
3 changed files with 16 additions and 12 deletions
@@ -115,8 +115,9 @@ public class Guilds {
public static boolean checkRequirments(Client c, int objectId) {
switch (objectId) {
case 1805: // Champions Guild
if (c.questPoints < 19) {
c.getDialogueHandler().sendStatement("You need 19 quest points to enter this guild!");
int requiredQP = Math.min(32, QuestAssistant.MAXIMUM_QUESTPOINTS);
if (c.questPoints < requiredQP) {
c.getDialogueHandler().sendStatement("You need " + requiredQP + " quest points to enter this guild!");
c.nextChat = 0;
return false;
}
@@ -90,11 +90,12 @@ public class NpcActions {
case 537:
case 536:
if (c.questPoints >= 19) {
int requiredQP = Math.min(32, QuestAssistant.MAXIMUM_QUESTPOINTS);
if (c.questPoints >= requiredQP) {
c.getDialogueHandler().sendDialogues(1373, npcType);
} else {
c.getActionSender().sendMessage(
"You need 19 quest points to open this shop.");
"You need " + requiredQP + " quest points to open this shop.");
}
break;
@@ -1004,11 +1005,12 @@ public class NpcActions {
case 537:
case 536:
if (c.questPoints >= 19) {
int requiredQP = Math.min(32, QuestAssistant.MAXIMUM_QUESTPOINTS);
if (c.questPoints >= requiredQP) {
c.getShopAssistant().openShop(npcType);
} else {
c.getActionSender().sendMessage(
"You need 19 quest points to open this shop.");
"You need " + requiredQP + " quest points to open this shop.");
}
break;
@@ -42,6 +42,7 @@ public class Climbing {
}
public static void processClimbing(Client client) {
int chapionsGuildRequiredQP = Math.min(32, QuestAssistant.MAXIMUM_QUESTPOINTS);
switch (client.objectId) {
case 9584:
if (client.objectX == 2932 && client.objectY == 3282) {
@@ -134,12 +135,12 @@ public class Climbing {
} else if (client.absY == 3445) {
client.getPlayerAssistant().movePlayer(3260, 3449, 1);
} else if (client.absY == 3358
&& client.questPoints >= 19) {
&& client.questPoints >= chapionsGuildRequiredQP) {
client.getPlayerAssistant().movePlayer(client.absX, 3354, 1);
} else if (client.absY == 3358
&& client.questPoints < 19) {
&& client.questPoints < chapionsGuildRequiredQP) {
client.getActionSender().sendMessage(
"You need 19 quest points to use these stairs.");
"You need " + chapionsGuildRequiredQP + " quest points to use these stairs.");
} else if (client.absX == 3180) {
client.getPlayerAssistant().movePlayer(3176, client.absY, 1);
} else if (client.absX == 3159) {
@@ -159,12 +160,12 @@ public class Climbing {
if (client.absX == 3102) {
client.getPlayerAssistant().movePlayer(3098, 3266, 0);
} else if (client.absY == 3354
&& client.questPoints >= 19) {
&& client.questPoints >= chapionsGuildRequiredQP) {
client.getPlayerAssistant().movePlayer(client.absX, 3358, 0);
} else if (client.absY == 3358
&& client.questPoints < 19) {
&& client.questPoints < chapionsGuildRequiredQP) {
client.getActionSender().sendMessage(
"You need 19 quest points to use these stairs");
"You need " + chapionsGuildRequiredQP + " quest points to use these stairs");
} else if (client.absY == 3449) {
client.getPlayerAssistant().movePlayer(3259, 3445, 0);
} else if (client.absX == 3155) {