mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-21 09:02:07 -07:00
Final tweaks
This commit is contained in:
parent
11c97e2daf
commit
8512dc503d
3 changed files with 28 additions and 22 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -91,11 +91,23 @@ public class PestControlTestBot extends PvMBots {
|
|||
List<Entity> 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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue