diff --git a/2006Redone Server/src/redone/game/content/combat/magic/MagicTeleports.java b/2006Redone Server/src/redone/game/content/combat/magic/MagicTeleports.java index 3f173b33..8b93151b 100644 --- a/2006Redone Server/src/redone/game/content/combat/magic/MagicTeleports.java +++ b/2006Redone Server/src/redone/game/content/combat/magic/MagicTeleports.java @@ -416,8 +416,8 @@ public class MagicTeleports { return; } } - if (player.questPoints < QuestAssistant.MAXIMUM_QUESTPOINTS) { - player.getActionSender().sendMessage("You need " + QuestAssistant.MAXIMUM_QUESTPOINTS + " quest points to teleport here."); + if (player.questPoints < 19) { + player.getActionSender().sendMessage("You need " + 19 + " quest points to teleport here."); return; } if (MAGIC_LEVEL_REQUIRED) { diff --git a/2006Redone Server/src/redone/game/content/quests/QuestAssistant.java b/2006Redone Server/src/redone/game/content/quests/QuestAssistant.java index 8d294b75..079a6302 100644 --- a/2006Redone Server/src/redone/game/content/quests/QuestAssistant.java +++ b/2006Redone Server/src/redone/game/content/quests/QuestAssistant.java @@ -10,7 +10,7 @@ import redone.game.players.Client; public class QuestAssistant { - public static final int MAXIMUM_QUESTPOINTS = 19; + public static final int MAXIMUM_QUESTPOINTS = 22; public static void sendStages(Client client) { client.getPlayerAssistant().sendFrame126("QP: " + client.questPoints + " ", 3985); diff --git a/2006Redone Server/src/redone/game/content/quests/QuestRewards.java b/2006Redone Server/src/redone/game/content/quests/QuestRewards.java index 14b22716..73a7a683 100644 --- a/2006Redone Server/src/redone/game/content/quests/QuestRewards.java +++ b/2006Redone Server/src/redone/game/content/quests/QuestRewards.java @@ -32,123 +32,122 @@ public class QuestRewards { public static void knightsReward(Client client) { QuestReward(client, "Knight's Sword Quest", "1 Quest Point", "12,725 Smithing XP", "", "", "", "", 0); QUEST_NAME = "The Knight's Sword"; - client.getPlayerAssistant().addNormalExperienceRate(12725, client.playerSmithing); client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7346); - client.knightS = 9; + client.getPlayerAssistant().addNormalExperienceRate(12725, client.playerSmithing); client.questPoints ++; + client.knightS = 9; } public static void gertFinish(Client client) { QuestReward(client, "Gertrude's Cat", "1 Quest Point", "1,525 Cooking XP", "A kitten!", "Ability to raise cats", "A choclate cake", "A bowl of stew", 1897); QUEST_NAME = "Gertrude's Cat"; - client.questPoints++; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7360); - client.gertCat = 7; client.getItemAssistant().addItem(1897, 1); client.getItemAssistant().addItem(2003, 1); client.getItemAssistant().addItem(1560, 1); client.getPlayerAssistant().addNormalExperienceRate(1525, client.playerCooking); + client.questPoints++; + client.gertCat = 7; } public static void pirateFinish(Client client) { QuestReward(client, "Pirate's Treasure", "2 Quest Points", "One-Eyed Hector's Treasure", "", "", "", "", 2714); QUEST_NAME = "Pirate's Treasure"; - client.questPoints += 2; - client.pirateTreasure = 6; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7341); client.getItemAssistant().addItem(2714, 1); + client.questPoints += 2; + client.pirateTreasure = 6; } public static void witchFinish(Client client) { QuestReward(client, "Witch's Potion", "1 Quest Point", "325 Magic XP", "", "", "", "", 325); QUEST_NAME = "Witch's Potion"; - client.questPoints++; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7348); - client.getPlayerAssistant().addNormalExperienceRate(325, - client.playerMagic); + client.getPlayerAssistant().addNormalExperienceRate(325, client.playerMagic); + client.questPoints++; client.witchspot = 3; } public static void julietFinish(Client client) { QuestReward(client, "Romeo and Juliet", "5 Quest Points", "", "", "", "", "", 0); QUEST_NAME = "Romeo and Juliet"; - client.questPoints += 5; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7343); + client.questPoints += 5; client.romeojuliet = 9; } public static void restFinish(Client client) { QuestReward(client, "Restless Ghost", "1 Quest Point", "125 Prayer XP", "", "", "", "", 0); QUEST_NAME = "Restless Ghost"; - client.questPoints++; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7337); - client.restGhost = 5; client.getPlayerAssistant().addNormalExperienceRate(125, client.playerPrayer); + client.questPoints++; + client.restGhost = 5; } public static void vampFinish(Client client) { QuestReward(client, "Vampyre Slayer", "3 Quest Points", "4,825 Attack XP", "", "", "", "", 0); QUEST_NAME = "Vampyre Slayer"; - client.questPoints += 3; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7347); - client.vampSlayer = 5; client.getPlayerAssistant().addNormalExperienceRate(4825, client.playerAttack); + client.questPoints += 3; + client.vampSlayer = 5; } public static void runeFinish(Client client) { QuestReward(client, "Rune Mysteries", "1 Quest Points", "Air Talisman", "", "", "", "", 1438); QUEST_NAME = "Rune Mysteries"; - client.questPoints++; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7335); client.getItemAssistant().addItem(1438, 1); + client.questPoints++; client.runeMist = 4; } public static void sheepFinish(Client client) { QuestReward(client, "Sheep Shearer", "1 Quest Point", "150 Crafting Exp", "60 Coins", "", "", "", 995); QUEST_NAME = "Sheep Shearer"; - client.questPoints++; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7344); - client.sheepShear = 2; client.getItemAssistant().addItem(995, 60); client.getPlayerAssistant().addNormalExperienceRate(150, client.playerCrafting); + client.questPoints++; + client.sheepShear = 2; } public static void doricFinish(Client client) { QuestReward(client, "Doric's Quest", "1 Quest Point", "1,300 Mining XP", "180 Coins", "", "", "", 995); QUEST_NAME = "Doric's Quest"; - client.questPoints++; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7336); - client.doricQuest = 3; - client.getPlayerAssistant().addNormalExperienceRate(1300, client.playerMining); client.getItemAssistant().addItem(995, 180); + client.getPlayerAssistant().addNormalExperienceRate(1300, client.playerMining); + client.questPoints++; + client.doricQuest = 3; } public static void impFinish(Client client) { QuestReward(client, "Imp Catcher", "1 Quest Point", "875 Magic XP", "Amulet of Accuracy", "", "", "", 1478); QUEST_NAME = "Imp Catcher"; client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7340); + client.getItemAssistant().addItem(1478, 1); + client.getPlayerAssistant().addNormalExperienceRate(875, client.playerMagic); client.questPoints++; client.impsC = 2; - client.getPlayerAssistant().addNormalExperienceRate(875, client.playerMagic); - client.getItemAssistant().addItem(1478, 1); } public static void cookReward(Client client) { QuestReward(client, "Cook's Assistant", "1 Quest Point", "500 Coins", "300 Cooking XP", "", "", "", 326); QUEST_NAME = "Cook's Assistant"; + client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7333); client.getItemAssistant().addItem(995, 500); client.getPlayerAssistant().addNormalExperienceRate(300, client.playerCooking); client.questPoints++; - client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7333); client.cookAss = 3; } public static void blackKnightReward(Client client) { QuestReward(client, "Black Knights' Fortress", "3 Quest Point", "2500 Coins", "", "", "", "", 0); QUEST_NAME = "Black Knights' Fortress"; + client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7332); client.getItemAssistant().addItem(995, 2500); client.questPoints += 3; - client.getPlayerAssistant().sendFrame126("@gre@" + QUEST_NAME + "", 7332); client.blackKnight = 3; } } diff --git a/2006Redone Server/src/redone/game/content/quests/impl/BlackKnightsFortress.java b/2006Redone Server/src/redone/game/content/quests/impl/BlackKnightsFortress.java index 2aaffba6..0841ad58 100644 --- a/2006Redone Server/src/redone/game/content/quests/impl/BlackKnightsFortress.java +++ b/2006Redone Server/src/redone/game/content/quests/impl/BlackKnightsFortress.java @@ -21,37 +21,35 @@ public class BlackKnightsFortress { for (int i = 8144; i < 8195; i++) { client.getPlayerAssistant().sendFrame126("", i); } - client.getPlayerAssistant().sendFrame126("@dre@Black Knights' Fortress", 8144); - client.getPlayerAssistant().sendFrame126("", 8145); + client.getPlayerAssistant().sendFrame126("Black Knights' Fortress", 8144); if (client.blackKnight == 0) { - client.getPlayerAssistant().sendFrame126("Black Knights' Fortress", 8144); client.getPlayerAssistant().sendFrame126("I can start this quest by speaking to Sir Amik Varze in", 8147); client.getPlayerAssistant().sendFrame126("Falador Castle.", 8148); client.getPlayerAssistant().sendFrame126("", 8149); client.getPlayerAssistant().sendFrame126("QUEST REQUIREMENTS:", 8150); - client.getPlayerAssistant().sendFrame126("??12 Quest Points??", 8151); + client.getPlayerAssistant().sendFrame126("12 Quest Points", 8151); } else if (client.blackKnight == 1) { - client.getPlayerAssistant().sendFrame126("Black Knights' Fortress", 8144); client.getPlayerAssistant().sendFrame126("@str@I've Talked with Sir Amik Varze", 8147); client.getPlayerAssistant().sendFrame126("He wants me to kill 30 Black Knights and", 8148); client.getPlayerAssistant().sendFrame126("collect their notes.", 8149); - if (client.getItemAssistant().playerHasItem(NOTES, 30)) { - client.getPlayerAssistant().sendFrame126("@str@30 Black Knight notes", 8150); - } else { - client.getPlayerAssistant().sendFrame126("@red@30 Black Knight notes", 8150); - } + client.getPlayerAssistant().sendFrame126("", 8150); + client.getPlayerAssistant().sendFrame126("@red@30 Black Knight notes", 8151); } else if (client.blackKnight == 2) { - client.getPlayerAssistant().sendFrame126("Black Knights' Fortress", 8144); client.getPlayerAssistant().sendFrame126("@str@I talked to Sir Amik Varze.", 8147); - client.getPlayerAssistant().sendFrame126("@str@I gave Sir Amik Varze his items.", 8148); - client.getPlayerAssistant().sendFrame126("I should go speak to Sir Amik Varze.", 8149); + client.getPlayerAssistant().sendFrame126("@str@I've killed 30 Black Knights", 8148); + client.getPlayerAssistant().sendFrame126("@str@and given Sir Amik Varze his items.", 8149); + client.getPlayerAssistant().sendFrame126("I should go speak to Sir Amik Varze.", 8150); } else if (client.blackKnight == 3) { - client.getPlayerAssistant().sendFrame126("Black Knights' Fortress", 8144); client.getPlayerAssistant().sendFrame126("@str@I talked to Sir Amik Varze.", 8147); - client.getPlayerAssistant().sendFrame126("@str@I gave him his items.", 8148); - client.getPlayerAssistant().sendFrame126("@red@ QUEST COMPLETE", 8150); - client.getPlayerAssistant().sendFrame126("As a reward, 10k attack xp and 5k coins.", 8151); + client.getPlayerAssistant().sendFrame126("@str@I've killed 30 Black Knights", 8148); + client.getPlayerAssistant().sendFrame126("@str@and given Sir Amik Varze his items.", 8149); + client.getPlayerAssistant().sendFrame126("", 8150); + client.getPlayerAssistant().sendFrame126("@red@QUEST COMPLETE", 8151); + client.getPlayerAssistant().sendFrame126("", 8152); + client.getPlayerAssistant().sendFrame126("REWARDS:", 8153); + client.getPlayerAssistant().sendFrame126("2,500 coins", 8154); + client.getPlayerAssistant().sendFrame126("3 Quest Points", 8155); } client.getPlayerAssistant().showInterface(8134); } diff --git a/2006Redone Server/src/redone/game/dialogues/DialogueHandler.java b/2006Redone Server/src/redone/game/dialogues/DialogueHandler.java index 18a9dc87..e9447490 100644 --- a/2006Redone Server/src/redone/game/dialogues/DialogueHandler.java +++ b/2006Redone Server/src/redone/game/dialogues/DialogueHandler.java @@ -6592,9 +6592,7 @@ public class DialogueHandler { case 3513: sendNpcChat1("One last thing" + player.playerName + ", here is your reward.", player.talkingNpc, "Sir Amik Varze"); - player.blackKnight = 3; - player.getItemAssistant().addItem(995, 5000); - player.getPlayerAssistant().addSkillXP(10000, 0); + QuestRewards.blackKnightReward(player); player.nextChat = 0; break; diff --git a/2006Redone Server/src/redone/game/players/PlayerSave.java b/2006Redone Server/src/redone/game/players/PlayerSave.java index 0361b408..8dd778af 100644 --- a/2006Redone Server/src/redone/game/players/PlayerSave.java +++ b/2006Redone Server/src/redone/game/players/PlayerSave.java @@ -257,6 +257,9 @@ public class PlayerSave { case "doricQuest": player.doricQuest = Integer.parseInt(token2); break; + case "blackKnight": + player.blackKnight = Integer.parseInt(token2); + break; case "pirateTreasure": player.pirateTreasure = Integer.parseInt(token2); break; @@ -825,7 +828,7 @@ public class PlayerSave { characterfile.write(Integer.toString(player.runeMist), 0, Integer .toString(player.runeMist).length()); characterfile.newLine(); - characterfile.write("blackKnight = ", 0, 10); + characterfile.write("blackKnight = ", 0, 14); characterfile.write(Integer.toString(player.blackKnight), 0, Integer .toString(player.blackKnight).length()); characterfile.newLine();