From a5a206653e30dca1ec5d0dda090eaf44bd3361f6 Mon Sep 17 00:00:00 2001 From: jamix77 Date: Sun, 26 Jan 2020 17:41:13 +0000 Subject: [PATCH 1/4] Fixes + more What I've done this update: - Fixed tutorial island's chef giving infinite amounts of buckets and water to players - Fixed fishing without a tool. - Added the wilderness teleport lever to Edgeville south of the bank (as some have requested) - Added some useful tools for editing cache. Enjoy! --- Server/src/org/crandor/net/registry/AccountRegister.java | 2 ++ Server/src/plugin/tutorial/MasterChefDialogue.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Server/src/org/crandor/net/registry/AccountRegister.java b/Server/src/org/crandor/net/registry/AccountRegister.java index 9894fcb7b..0aa8e6f50 100644 --- a/Server/src/org/crandor/net/registry/AccountRegister.java +++ b/Server/src/org/crandor/net/registry/AccountRegister.java @@ -9,6 +9,7 @@ import java.sql.Timestamp; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.crandor.ServerConstants; import org.crandor.cache.misc.buffer.ByteBufferUtils; import org.crandor.game.node.entity.player.info.portal.PlayerSQLManager; import org.crandor.game.system.SystemManager; @@ -173,6 +174,7 @@ public class AccountRegister extends SQLEntryHandler { }else{ statement.setString(7,null); } + statement.executeUpdate(); SQLManager.close(statement.getConnection()); } diff --git a/Server/src/plugin/tutorial/MasterChefDialogue.java b/Server/src/plugin/tutorial/MasterChefDialogue.java index cf8d2166d..f86a89c1f 100644 --- a/Server/src/plugin/tutorial/MasterChefDialogue.java +++ b/Server/src/plugin/tutorial/MasterChefDialogue.java @@ -45,6 +45,11 @@ public class MasterChefDialogue extends DialoguePlugin { case 20: if (player.getInventory().containsAll(1933,1929)) { Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Mix together the flour and water to form a dough.")); + Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NO_EXPRESSION, "Mix together the flour and water to form a dough.")); + stage = 1; + + } else if (player.getInventory().containsItem(new Item(2307))) { + Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NO_EXPRESSION, "You already have some dough, no need", "to make more.")); stage = 1; } else if (player.getInventory().containsItem(new Item(2307))) { @@ -61,6 +66,7 @@ public class MasterChefDialogue extends DialoguePlugin { stage = 1; } else { Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more.")); + Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NO_EXPRESSION, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more.")); if (player.getInventory().freeSlots() >= 2) { player.getInventory().add(new Item(1933)); player.getInventory().add(new Item(1929)); From 5f6ab6fb4a2238855808e319343b38d3c009fe92 Mon Sep 17 00:00:00 2001 From: jamix77 Date: Mon, 27 Jan 2020 13:58:45 +0000 Subject: [PATCH 2/4] Important account register fix It appears I broke this in a previous update fixing other errors, without realisng this causes massive issues when registering accounts. Whoops. Here's the fix. --- Server/src/org/crandor/net/registry/AccountRegister.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Server/src/org/crandor/net/registry/AccountRegister.java b/Server/src/org/crandor/net/registry/AccountRegister.java index 0aa8e6f50..e37d58c49 100644 --- a/Server/src/org/crandor/net/registry/AccountRegister.java +++ b/Server/src/org/crandor/net/registry/AccountRegister.java @@ -175,6 +175,7 @@ public class AccountRegister extends SQLEntryHandler { statement.setString(7,null); } + statement.setString(7, "2009scape"); statement.executeUpdate(); SQLManager.close(statement.getConnection()); } From 85b00536db79a48747211fba0091bd649b9b97bb Mon Sep 17 00:00:00 2001 From: Jamix77 Date: Sun, 23 Feb 2020 14:49:18 +0000 Subject: [PATCH 3/4] Fixed an XP dupe. Can't be having an XP dupe lying around so yeah, all fixed :) --- Server/src/org/crandor/ServerConstants.java | 3 +++ Server/src/org/crandor/net/registry/AccountRegister.java | 1 - .../plugin/interaction/inter/ExperienceLampInterface.java | 2 ++ Server/src/plugin/interaction/item/LampPlugin.java | 1 + Server/src/plugin/tutorial/MasterChefDialogue.java | 6 +++--- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Server/src/org/crandor/ServerConstants.java b/Server/src/org/crandor/ServerConstants.java index 237b12f6f..bc8d00493 100644 --- a/Server/src/org/crandor/ServerConstants.java +++ b/Server/src/org/crandor/ServerConstants.java @@ -171,4 +171,7 @@ public final class ServerConstants { */ } + public static final Boolean NEW_PLAYER_DEFAULT_CLAN = true; + public static final String SERVER_NAME = "2009Scape"; + } diff --git a/Server/src/org/crandor/net/registry/AccountRegister.java b/Server/src/org/crandor/net/registry/AccountRegister.java index e37d58c49..5186858c1 100644 --- a/Server/src/org/crandor/net/registry/AccountRegister.java +++ b/Server/src/org/crandor/net/registry/AccountRegister.java @@ -19,7 +19,6 @@ import org.crandor.game.system.task.TaskExecutor; import org.crandor.net.Constants; import org.crandor.net.IoSession; import org.crandor.net.event.LoginReadEvent; -import org.keldagrim.ServerConstants; /** * Handles the registry of new accounts. diff --git a/Server/src/plugin/interaction/inter/ExperienceLampInterface.java b/Server/src/plugin/interaction/inter/ExperienceLampInterface.java index e26efa684..4e9ea21a9 100644 --- a/Server/src/plugin/interaction/inter/ExperienceLampInterface.java +++ b/Server/src/plugin/interaction/inter/ExperienceLampInterface.java @@ -75,6 +75,7 @@ public final class ExperienceLampInterface extends ComponentPlugin { player.getAudioManager().send(SOUND); player.getInventory().remove(lamp); player.getInterfaceManager().close(); + int skillLevel = player.getSkills().getStaticLevel(skillType.skill); int modifier = 10; double experience = skillLevel * modifier; @@ -89,6 +90,7 @@ public final class ExperienceLampInterface extends ComponentPlugin { player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (experience * (player.getSkills().experienceMutiplier)) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." }); } player.getSkills().addExperience(skillType.skill, experience, false); + player.getInterfaceManager().restoreTabs(); } return true; } diff --git a/Server/src/plugin/interaction/item/LampPlugin.java b/Server/src/plugin/interaction/item/LampPlugin.java index e27cfacda..d84b43c7a 100644 --- a/Server/src/plugin/interaction/item/LampPlugin.java +++ b/Server/src/plugin/interaction/item/LampPlugin.java @@ -28,6 +28,7 @@ public final class LampPlugin extends OptionHandler { public boolean handle(Player player, Node node, String option) { player.setAttribute("lamp", node); player.getInterfaceManager().open(new Component(134)); + player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13); return true; } diff --git a/Server/src/plugin/tutorial/MasterChefDialogue.java b/Server/src/plugin/tutorial/MasterChefDialogue.java index f86a89c1f..da1a51a0c 100644 --- a/Server/src/plugin/tutorial/MasterChefDialogue.java +++ b/Server/src/plugin/tutorial/MasterChefDialogue.java @@ -45,11 +45,11 @@ public class MasterChefDialogue extends DialoguePlugin { case 20: if (player.getInventory().containsAll(1933,1929)) { Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Mix together the flour and water to form a dough.")); - Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NO_EXPRESSION, "Mix together the flour and water to form a dough.")); + Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Mix together the flour and water to form a dough.")); stage = 1; } else if (player.getInventory().containsItem(new Item(2307))) { - Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NO_EXPRESSION, "You already have some dough, no need", "to make more.")); + Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "You already have some dough, no need", "to make more.")); stage = 1; } else if (player.getInventory().containsItem(new Item(2307))) { @@ -66,7 +66,7 @@ public class MasterChefDialogue extends DialoguePlugin { stage = 1; } else { Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more.")); - Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NO_EXPRESSION, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more.")); + Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more.")); if (player.getInventory().freeSlots() >= 2) { player.getInventory().add(new Item(1933)); player.getInventory().add(new Item(1929)); From ad345ac9561b34f4ded3b61b6bb0d4c61d78102f Mon Sep 17 00:00:00 2001 From: Jamix77 Date: Sun, 23 Feb 2020 14:51:59 +0000 Subject: [PATCH 4/4] Fixed spacebar issues I didn't think this one very far ahead, spacebar to continue must say its goodbyes as it's causing too many other issues. --- Client/src/org/runite/jagex/KeyboardListener.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Client/src/org/runite/jagex/KeyboardListener.java b/Client/src/org/runite/jagex/KeyboardListener.java index c5f41c2a9..0e531ab5d 100644 --- a/Client/src/org/runite/jagex/KeyboardListener.java +++ b/Client/src/org/runite/jagex/KeyboardListener.java @@ -76,10 +76,13 @@ final class KeyboardListener implements KeyListener, FocusListener { { Class73.method1308(RSString.createRSString("::shutdowninterface"), false); } - if (var1.getKeyCode() == KeyEvent.VK_SPACE) + + //causing issues when in other interfaces, such as GE interface. My quick thing impl didn't work - Jamix77 + + /**if (var1.getKeyCode() == KeyEvent.VK_SPACE) { Class2.method78(40, false, 0); - } + }**/ /**