mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 05:20:22 -07:00
One more change to PC bots
This commit is contained in:
parent
13ebe6819a
commit
d5cda179d3
3 changed files with 14 additions and 5 deletions
|
|
@ -177,6 +177,7 @@ public final class SkillingBotsBuilder extends AIPlayer {
|
|||
bot.setInteractionRange(25);
|
||||
}
|
||||
|
||||
//These bots are disabled because they somehow break pets
|
||||
public static void immersiveSpawnsSkillingBots()
|
||||
{
|
||||
// Varrock Mine
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ import org.crandor.game.world.map.RegionManager;
|
|||
import org.crandor.game.world.update.flag.context.Animation;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Handles pest control objects.
|
||||
* @author Emperor
|
||||
|
|
@ -23,6 +25,7 @@ import org.crandor.plugin.Plugin;
|
|||
public final class PCObjectHandler extends OptionHandler {
|
||||
|
||||
public boolean pcbotsSpawned = false;
|
||||
public ArrayList<String> playersJoined = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
|
|
@ -94,12 +97,17 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
}
|
||||
switch (object.getId()) {
|
||||
case 14315: // Novice
|
||||
if (!pcbotsSpawned) {
|
||||
if (!pcbotsSpawned) { //First person to join gets bots to play with
|
||||
pcbotsSpawned = true;
|
||||
for (int pestBotsAmount = 0; pestBotsAmount < 20; pestBotsAmount++) {
|
||||
PvMBotsBuilder.createPestControlTestBot(new Location(2657, 2640));
|
||||
}
|
||||
}
|
||||
if (!playersJoined.contains(player.getUsername())) { //You also get +1 bot for every friend
|
||||
playersJoined.add(player.getUsername());
|
||||
PvMBotsBuilder.createPestControlTestBot(new Location(2657, 2640));
|
||||
}
|
||||
|
||||
startActivity(player, "pest control novice", Location.create(2661, 2639, 0));
|
||||
return true;
|
||||
case 25631: // Intermediate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue