mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 16:49:07 +00:00
Fix old player shops not appearing (#409)
* Add check that players are over total level 50, but shop items check is broken * Bots now only appear when they meet reqs! Woot! * Fix old bots not appearing
This commit is contained in:
@@ -43,16 +43,16 @@ public class BotHandler {
|
|||||||
String playerName = child.getName().split("♥")[1];
|
String playerName = child.getName().split("♥")[1];
|
||||||
playerName = playerName.substring(0, playerName.length() - 4);
|
playerName = playerName.substring(0, playerName.length() - 4);
|
||||||
|
|
||||||
Client determineIfLoad = new Client(null);
|
Client determineIfLoadBasedOnShop = new Client(null);
|
||||||
determineIfLoad.playerName = getShopName(playerName);
|
determineIfLoadBasedOnShop.playerName = getShopName(playerName);
|
||||||
|
Client determineIfLoadBasedOnLevel = new Client(null); //supports legacy bots who's levels didn't update, rip
|
||||||
|
determineIfLoadBasedOnLevel.playerName = playerName;
|
||||||
|
|
||||||
loadPlayerInfo(determineIfLoad, getShopName(playerName), "bot_password", false);
|
loadPlayerInfo(determineIfLoadBasedOnShop, getShopName(playerName), "bot_password", false);
|
||||||
System.out.println(Arrays.toString(determineIfLoad.bankItemsN));
|
loadPlayerInfo(determineIfLoadBasedOnLevel, playerName, "bot_password", false);
|
||||||
System.out.println("Bot [" + playerName + "] has totalLevel, bankItems[0]" + determineIfLoad.getPlayerAssistant().getTotalLevel() + ", " + determineIfLoad.bankItemsN[0]);
|
if (determineIfLoadBasedOnLevel.getPlayerAssistant().getTotalLevel() < 50 || determineIfLoadBasedOnShop.bankItemsN[0] == 0) {
|
||||||
if (determineIfLoad.getPlayerAssistant().getTotalLevel() < 50 || determineIfLoad.bankItemsN[0] == 0) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
System.out.println("Loading bot " + playerName);
|
|
||||||
|
|
||||||
String shopName = getShopName(playerName);
|
String shopName = getShopName(playerName);
|
||||||
Bot bot = connectBot(shopName, null, null, null);
|
Bot bot = connectBot(shopName, null, null, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user