diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/CombatState.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/CombatState.java index dee2791c6..94875e1eb 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/CombatState.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/CombatState.java @@ -33,23 +33,18 @@ public class CombatState { bot.movetimer = new Random().nextInt(7) + 6; return; } - if (gate != null && bot.randomType < 40 && (!bot.openedGate || new Random().nextInt(3) == 1)) + if (gate != null) { bot.setCustomState("Interacting gate ID " + gate.getId()); bot.interact(gate); bot.openedGate = true; - bot.movetimer = new Random().nextInt(2) + 4; - return; - } else if (gate != null) { - bot.setCustomState("Waiting for someone to open gate"); - bot.movetimer = new Random().nextInt(2) + 1; - if (new Random().nextInt(2) == 0) + if (Random.nextInt(4) == 1 && bot.randomType < 40) { - bot.randomWalkAroundPoint(gate.getLocation(), 5); + bot.movetimer = Random.nextInt(2) + 1; } return; } - if (portal.getLocation() != null) + if (portal != null) { bot.setCustomState("Walking to portals"); bot.randomWalkAroundPoint(portal.getLocation(), 5); diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/PestControlTestBot.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/PestControlTestBot.java index 34d4e9717..b5bae835f 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/PestControlTestBot.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/minigamebots/pestcontrol/PestControlTestBot.java @@ -91,11 +91,23 @@ public class PestControlTestBot extends PvMBots { List creatures = FindTargets(this, 15); if (creatures == null || creatures.isEmpty()) { - this.setCustomState("Going to portals"); - combathandler.goToPortals(); + if (randomType > 15) + { + this.setCustomState("Going to portals"); + combathandler.goToPortals(); + } else { + randomWalkAroundPoint(getMyPestControlSession(this).getSquire().getLocation(), 3); + movetimer = new Random().nextInt(15) + 6; + } } else { - this.setCustomState("Fighting NPCs"); - combathandler.fightNPCs(); + if (randomType < 15 && new Random().nextInt(5) == 0) + { + randomWalkAroundPoint(getMyPestControlSession(this).getSquire().getLocation(), 3); + movetimer = new Random().nextInt(15) + 6; + } else { + this.setCustomState("Fighting NPCs"); + combathandler.fightNPCs(); + } } /* @@ -139,7 +151,12 @@ public class PestControlTestBot extends PvMBots { { return; } - if (randomType > 20 && new Random().nextInt(4) == 0) //Idle outside ladder + if (new Random().nextInt(5) == 1) //Missclick the ladder + { + movetimer = new Random().nextInt(2); + this.walkToPosSmart(myBoat.outsideBoatBorder.getWeightedRandomLoc(2)); + } + if (randomType > 20 && new Random().nextInt(6) == 0) //Idle outside ladder { if (new Random().nextInt(16) == 0) { @@ -149,12 +166,6 @@ public class PestControlTestBot extends PvMBots { movetimer = RandomFunction.normalPlusWeightRandDist(100, 50); return; } - if (randomType < 60 && new Random().nextInt(6) == 1) //Missclick the ladder - { - movetimer = new Random().nextInt(2); - this.walkToPosSmart(myBoat.outsideBoatBorder.getWeightedRandomLoc(2)); - return; - } Node test = getClosestNodeWithEntry(15, myBoat.ladderId); InteractionPacket.handleObjectInteraction(this, 0, test.getLocation(), test.getId()); insideBoatWalks = 3; diff --git a/09HDscape-server/src/plugin/activity/pestcontrol/PestControlActivityPlugin.java b/09HDscape-server/src/plugin/activity/pestcontrol/PestControlActivityPlugin.java index 36a47f5db..2e9764798 100644 --- a/09HDscape-server/src/plugin/activity/pestcontrol/PestControlActivityPlugin.java +++ b/09HDscape-server/src/plugin/activity/pestcontrol/PestControlActivityPlugin.java @@ -78,9 +78,9 @@ public final class PestControlActivityPlugin extends ActivityPlugin { ticks++; if (waitingPlayers.size() >= MAX_TEAM_SIZE && ticks < 475) { - ticks = 485; + ticks = 495; } - if ((ticks < 450 && ticks % 100 == 0) || (ticks % 50 == 0) || ticks == 485) { + if ((ticks < 450 && ticks % 100 == 0) || (ticks % 50 == 0) || ticks == 495) { for (Player p : waitingPlayers) { updateTime(p); }