Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void findTarget(Client player) {
- if (player.getTargetIndex() > 0)
- return;
- // System.out.println("we got here.");
- for (int indices = 0; indices < PlayerHandler.players.length; indices++) {
- Client entities = (Client) PlayerHandler.players[indices];
- if (entities == null) {
- continue;
- }
- if (entities.inWild()) {
- int random = PlayerHandler.players[indices].getId();
- Client os = (Client) PlayerHandler.players[random];
- // System.out.println("we got here 2");
- if (os == null)
- continue;
- System.out.println("we got here 3.");
- if (os.getTargetIndex() > 0)
- continue;
- if (os.playerId == player.getId())
- continue;
- int target = os.getId();
- os.setTargetIndex(player.getId());
- player.setTargetIndex(target);
- player.getPA().createPlayerHints(10, target);
- os.getPA().createPlayerHints(10, player.getId());
- player.sendMessage("You have been assigned to kill "
- + os.playerName);
- ((Client) os).sendMessage("You have been assigned to kill "
- + player.playerName);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement