diff --git a/2006Redone Server/src/redone/game/bots/BotHandler.java b/2006Redone Server/src/redone/game/bots/BotHandler.java index 2986d10e..1940a2d1 100644 --- a/2006Redone Server/src/redone/game/bots/BotHandler.java +++ b/2006Redone Server/src/redone/game/bots/BotHandler.java @@ -102,6 +102,13 @@ public class BotHandler return null; } + public static void closeShop(Client player){ + Client shop = getPlayerShop(player); + if (shop == null) return; + shop.disconnected = true; + shop.logout(true); + } + public static void addCoins(int shop_id, int amount){ Client shop = getPlayerShop(shop_id); if (shop == null) return; diff --git a/2006Redone Server/src/redone/game/players/Client.java b/2006Redone Server/src/redone/game/players/Client.java index 728af9de..c3488bec 100644 --- a/2006Redone Server/src/redone/game/players/Client.java +++ b/2006Redone Server/src/redone/game/players/Client.java @@ -820,7 +820,8 @@ public class Client extends Player { getSummon().pickUpClean(this, summonId); } if (forceLogout || System.currentTimeMillis() - logoutDelay > 2500) { - outStream.createFrame(109); + if (!isBot) + outStream.createFrame(109); properLogout = true; } else { getActionSender().sendMessage("You must wait a few seconds from being out of combat to logout."); diff --git a/2006Redone Server/src/redone/net/ConnectionHandler.java b/2006Redone Server/src/redone/net/ConnectionHandler.java index 9b136a87..e8c39957 100644 --- a/2006Redone Server/src/redone/net/ConnectionHandler.java +++ b/2006Redone Server/src/redone/net/ConnectionHandler.java @@ -34,8 +34,7 @@ public class ConnectionHandler implements IoHandler { public void sessionClosed(IoSession arg0) throws Exception { if (arg0.getAttachment() != null) { Client plr = (Client) arg0.getAttachment(); - if (!plr.isBot) - plr.disconnected = true; + plr.disconnected = true; } HostList.getHostList().remove(arg0); } diff --git a/2006Redone Server/src/redone/net/packets/impl/Commands.java b/2006Redone Server/src/redone/net/packets/impl/Commands.java index 516701ba..b9a2071b 100644 --- a/2006Redone Server/src/redone/net/packets/impl/Commands.java +++ b/2006Redone Server/src/redone/net/packets/impl/Commands.java @@ -96,9 +96,14 @@ public class Commands implements PacketType { case "shop": BotHandler.playerShop(player); break; + case "withdrawshop": case "wshop": BotHandler.takeCoins(player); break; + case "closeshop": + case "cshop": + BotHandler.closeShop(player); + break; case "wealth": int totalWealth = player.getPlayerAssistant().totalGold(); player.getActionSender().sendMessage("You currently have " + totalWealth + "gp."); @@ -137,7 +142,7 @@ public class Commands implements PacketType { player.getPlayerAssistant().closeAllWindows(); break; case "commands": - player.getActionSender().sendMessage("::players, ::highscores, ::loc, ::stuck, ::randomtoggle, ::debug, ::togglegfx, ::shop, ::wshop"); + player.getActionSender().sendMessage("::players, ::highscores, ::loc, ::stuck, ::randomtoggle, ::debug, ::togglegfx, ::shop, ::withdrawshop, ::closeshop"); break; case "loc": player.getActionSender().sendMessage(player.absX + "," + player.absY); diff --git a/2006Redone Server/src/redone/net/packets/impl/IdleLogout.java b/2006Redone Server/src/redone/net/packets/impl/IdleLogout.java index fbd0a118..73767b42 100644 --- a/2006Redone Server/src/redone/net/packets/impl/IdleLogout.java +++ b/2006Redone Server/src/redone/net/packets/impl/IdleLogout.java @@ -15,7 +15,6 @@ public class IdleLogout implements PacketType { return; } else { player.logout(); - //Misc.println(player.playerName + " is idle, kicked."); } } } diff --git a/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class b/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class index 463b335c..120a8e5e 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class and b/CompiledServer/production/2006rebotted/redone/game/bots/BotHandler.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Client$1.class b/CompiledServer/production/2006rebotted/redone/game/players/Client$1.class index 7577026b..43df45af 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Client$1.class and b/CompiledServer/production/2006rebotted/redone/game/players/Client$1.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Client$2.class b/CompiledServer/production/2006rebotted/redone/game/players/Client$2.class index fc02061c..c311cca8 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Client$2.class and b/CompiledServer/production/2006rebotted/redone/game/players/Client$2.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Client$3.class b/CompiledServer/production/2006rebotted/redone/game/players/Client$3.class index 47973e79..697406fa 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Client$3.class and b/CompiledServer/production/2006rebotted/redone/game/players/Client$3.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Client$4.class b/CompiledServer/production/2006rebotted/redone/game/players/Client$4.class index 68eff099..7f240f63 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Client$4.class and b/CompiledServer/production/2006rebotted/redone/game/players/Client$4.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Client.class b/CompiledServer/production/2006rebotted/redone/game/players/Client.class index a83e9661..f2d0dc67 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Client.class and b/CompiledServer/production/2006rebotted/redone/game/players/Client.class differ diff --git a/CompiledServer/production/2006rebotted/redone/net/ConnectionHandler.class b/CompiledServer/production/2006rebotted/redone/net/ConnectionHandler.class index 7bdece02..d16c8c7b 100644 Binary files a/CompiledServer/production/2006rebotted/redone/net/ConnectionHandler.class and b/CompiledServer/production/2006rebotted/redone/net/ConnectionHandler.class differ diff --git a/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class b/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class index 40488a45..df2315ef 100644 Binary files a/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class and b/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class differ diff --git a/CompiledServer/production/2006rebotted/redone/net/packets/impl/IdleLogout.class b/CompiledServer/production/2006rebotted/redone/net/packets/impl/IdleLogout.class index 7c8641c9..f7aeba67 100644 Binary files a/CompiledServer/production/2006rebotted/redone/net/packets/impl/IdleLogout.class and b/CompiledServer/production/2006rebotted/redone/net/packets/impl/IdleLogout.class differ