Compare commits
No commits in common. "master" and "creeps-live-failjesus" have entirely different histories.
master
...
creeps-liv
1 changed files with 121 additions and 2 deletions
|
|
@ -61,6 +61,7 @@ public class Program {
|
||||||
logger.error("Cannot connect to the server. Aborting...");
|
logger.error("Cannot connect to the server. Aborting...");
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
// AsyncExec.justWait(0);
|
||||||
|
|
||||||
// Create account and get init infos
|
// Create account and get init infos
|
||||||
logger.info("Creating account");
|
logger.info("Creating account");
|
||||||
|
|
@ -73,11 +74,129 @@ public class Program {
|
||||||
Unit.getUnits().add(citizen1);
|
Unit.getUnits().add(citizen1);
|
||||||
Unit.getUnits().add(citizen2);
|
Unit.getUnits().add(citizen2);
|
||||||
|
|
||||||
// Et voilà, machtou pichtou
|
|
||||||
|
|
||||||
|
|
||||||
logger.info("Done");
|
|
||||||
|
|
||||||
|
|
||||||
|
// Gossip
|
||||||
|
// for (int i = 0; i < 60; i++) {
|
||||||
|
//// for (var player : statistics.players) {
|
||||||
|
// StatisticsResponse statistics = Basics.getStatistics();
|
||||||
|
//
|
||||||
|
// var player = statistics.players.getFirst();
|
||||||
|
// if (player.name == login) {
|
||||||
|
// i--;
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// citizen1.sendMessage(player.name, "Nicole");
|
||||||
|
// citizen2.sendMessage(player.name,"Ouvre");
|
||||||
|
// citizen1.sendMessage(player.name, "Nicole");
|
||||||
|
// citizen2.sendMessage(player.name, "MAIS MOI JE VEUX FAIRE L'AMOUUUUR");
|
||||||
|
//// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// timoutheou
|
||||||
|
while (true) {
|
||||||
|
StatisticsResponse statistics = Basics.getStatistics();
|
||||||
|
logger.debug(statistics.toString());
|
||||||
|
for (var player : statistics.players) {
|
||||||
|
|
||||||
|
if (player.name != login && player.name.contains("brainkel")) {
|
||||||
|
citizen1.sendMessage(player.name, "Nicole");
|
||||||
|
citizen1.sendMessage(player.name, "Ouvre");
|
||||||
|
citizen1.sendMessage(player.name, "MAIS MOI JE VEUX FAIRE L'AMOUUUUR");
|
||||||
|
citizen2.fetchMessages();
|
||||||
|
}
|
||||||
|
// citizen1.sendMessage(player.name, "Nicole");
|
||||||
|
// citizen2.sendMessage(player.name,"Ouvre");
|
||||||
|
// citizen1.sendMessage(player.name, "Nicole");
|
||||||
|
// citizen2.sendMessage(player.name, "MAIS MOI JE VEUX FAIRE L'AMOUUUUR");
|
||||||
|
// citizen1.sendMessage(player.name, "<3");
|
||||||
|
// citizen2.fetchMessages();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Negotiator
|
||||||
|
// citizen2.sendMessage("Hector", "Nique ta mère Hector").waitFinished();
|
||||||
|
|
||||||
|
// Kaboom & epic fail
|
||||||
|
// citizen1.spawn("bomber-bot").waitFinished();
|
||||||
|
// List<Unit> bomberos = BomberBot.getBomberBotUnits();
|
||||||
|
// BomberBot bomberau = (BomberBot) bomberos.getFirst();
|
||||||
|
//
|
||||||
|
//// bomberau.upgrade();
|
||||||
|
// bomberau.fire();
|
||||||
|
|
||||||
|
// =======================================================
|
||||||
|
// Stormtrooper
|
||||||
|
// citizen1.spawn("turret").waitFinished();
|
||||||
|
// List<Unit> tourelles = Turret.getTurretUnits();
|
||||||
|
// Turret unerelle = (Turret) tourelles.getFirst();
|
||||||
|
// for (int i = 0; i < 101; i++) {
|
||||||
|
// unerelle.fire(unerelle.getPosition().plus(new Point(0, 1)));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Gather resources
|
||||||
|
// while (true) {
|
||||||
|
// citizen1.move(Direction.RIGHT);
|
||||||
|
// citizen2.move(Direction.LEFT);
|
||||||
|
// citizen1.gather();
|
||||||
|
// citizen2.gather();
|
||||||
|
// citizen1.move(Direction.UP);
|
||||||
|
// citizen2.move(Direction.DOWN);
|
||||||
|
// citizen1.gather();
|
||||||
|
// citizen2.gather();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Country roads
|
||||||
|
// while (true) {
|
||||||
|
// citizen1.move(Direction.RIGHT);
|
||||||
|
// citizen2.move(Direction.LEFT);
|
||||||
|
// citizen1.build(Building.ROAD);
|
||||||
|
// citizen2.build(Building.ROAD);
|
||||||
|
// citizen1.move(Direction.UP);
|
||||||
|
// citizen2.move(Direction.DOWN);
|
||||||
|
// citizen1.build(Building.ROAD);
|
||||||
|
// citizen2.build(Building.ROAD);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// logger.info("Done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ### Get statistics
|
||||||
|
//GET http://localhost:1664/statistics
|
||||||
|
//
|
||||||
|
//### Get status
|
||||||
|
//GET http://localhost:1664/status
|
||||||
|
//
|
||||||
|
//### Get report
|
||||||
|
//GET http://localhost:1664/report/148997e9b
|
||||||
|
//
|
||||||
|
//### Login with user login_l
|
||||||
|
//POST http://localhost:1664/init/login_l
|
||||||
|
//
|
||||||
|
//> {%
|
||||||
|
//client.global.set("baseId", response.body.baseId);
|
||||||
|
//client.global.set("probeId", response.body.probeId);
|
||||||
|
//client.global.set("login", response.body.login);
|
||||||
|
//%}
|
||||||
|
//
|
||||||
|
//### Post noop commande
|
||||||
|
//POST http://localhost:1664/command/{{login}}/{{probeId}}/noop
|
||||||
|
//
|
||||||
|
//###
|
||||||
|
//POST http://localhost:1664/command/dumeig_a/8d87eea10/inspect
|
||||||
|
//
|
||||||
|
//###
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue