diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java index 023aa04ff..b726fdf73 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/LowestBot.java @@ -9,29 +9,29 @@ public class LowestBot extends PvMBots{ super(name, l); // TODO Auto-generated constructor stub } - + private int tick = 0; - + @Override public void tick(){ super.tick(); - + + this.tick++; + //Despawn if (this.getSkills().getLifepoints() == 0) //this.teleport(new Location(500, 500)); //Despawning not being delayed causes 3 errors in the console AIPlayer.deregister(this.getUid()); - + //Npc Combat - if (tick == 0) - { + if (this.tick % 10 == 0) { if (!this.inCombat()) AttackNpcsInRadius(this, 5); - this.tick = 10; } - else - this.tick--; - + + if (this.tick == 100) this.tick = 0; + this.eat(329); //this.getPrayer().toggle() } diff --git a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java index 06b83f128..2976be186 100644 --- a/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java +++ b/09HDscape-server/src/org/crandor/game/node/entity/player/ai/pvmbots/PvMBots.java @@ -90,7 +90,9 @@ public class PvMBots extends AIPlayer { @Override public void tick() { - super.tick(); + super.tick(); + + this.tick++; //Despawn if (this.getSkills().getLifepoints() == 0) @@ -99,12 +101,12 @@ public class PvMBots extends AIPlayer { AIPlayer.deregister(this.getUid()); //Npc Combat - if (tick == 0) { - if (!this.inCombat()) - AttackNpcsInRadius(this, 5); - this.tick = 10; - } else - this.tick--; + if (this.tick % 10 == 0) { + if (!this.inCombat()) + AttackNpcsInRadius(this, 5); + } + + if (this.tick == 100) this.tick = 0; //this.eat(); //this.getPrayer().toggle()