Queue up Sprint whenever spring is activated, in case Mythra is busy
This commit is contained in:
parent
ec103c4fab
commit
82cec1e8fb
146
sig/App.java
146
sig/App.java
@ -182,6 +182,10 @@ enum Target{
|
|||||||
MYTHRA
|
MYTHRA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum Rotation{
|
||||||
|
SCHOLAR
|
||||||
|
}
|
||||||
|
|
||||||
class Server
|
class Server
|
||||||
{
|
{
|
||||||
//initialize socket and input stream
|
//initialize socket and input stream
|
||||||
@ -265,6 +269,7 @@ class Server
|
|||||||
long whisperingDawnTimer=0;
|
long whisperingDawnTimer=0;
|
||||||
long feyIlluminationTimer=0;
|
long feyIlluminationTimer=0;
|
||||||
boolean allowedToAetherflow=false;
|
boolean allowedToAetherflow=false;
|
||||||
|
boolean queueUpSprint=false;
|
||||||
|
|
||||||
long lastFrame=System.currentTimeMillis();
|
long lastFrame=System.currentTimeMillis();
|
||||||
|
|
||||||
@ -294,6 +299,75 @@ class Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void run(Rotation rot){
|
||||||
|
switch (rot){
|
||||||
|
case SCHOLAR:{
|
||||||
|
if (nextActionTimer==0){
|
||||||
|
if (GetMythraMana()<80&&lucidDreamingTimer==0){
|
||||||
|
lucidDreamingTimer=60000;
|
||||||
|
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_6);
|
||||||
|
nextActionTimer=1000;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (allowedToAetherflow&&aetherflowTimer==0){
|
||||||
|
PressKeyWithModifier(KeyEvent.VK_ALT, KeyEvent.VK_2);
|
||||||
|
nextActionTimer=1000;
|
||||||
|
aetherflowStacks=3;
|
||||||
|
aetherflowTimer=60000;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
float ayaHealth=GetAyaHealth();
|
||||||
|
float mythraHealth=GetMythraHealth();
|
||||||
|
if (ayaHealth<40){
|
||||||
|
PressKey(KeyEvent.VK_F2);
|
||||||
|
r.delay(100);
|
||||||
|
Heal(Target.AYA);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ayaHealth<60){
|
||||||
|
if (whisperingDawnTimer==0&&feyIlluminationTimer<60000){
|
||||||
|
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_C);
|
||||||
|
whisperingDawnTimer=60000;
|
||||||
|
nextActionTimer=1000;
|
||||||
|
return;
|
||||||
|
} else
|
||||||
|
if (feyIlluminationTimer==0&&whisperingDawnTimer<30000){
|
||||||
|
PressKey(KeyEvent.VK_X);
|
||||||
|
feyIlluminationTimer=120000;
|
||||||
|
nextActionTimer=1000;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mythraHealth<40){
|
||||||
|
PressKey(KeyEvent.VK_F1);
|
||||||
|
r.delay(100);
|
||||||
|
Heal(Target.MYTHRA);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//Looks like we're attacking.
|
||||||
|
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_8);
|
||||||
|
float targetHealth=GetTargetHealth();
|
||||||
|
if (!MultipleTargets()){
|
||||||
|
if (targetHealth>50&&bioTimer==0){
|
||||||
|
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_2);
|
||||||
|
bioTimer=30000;
|
||||||
|
nextActionTimer=2500;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_1);
|
||||||
|
nextActionTimer=2500;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_Z);
|
||||||
|
nextActionTimer=2500;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// constructor with port
|
// constructor with port
|
||||||
public Server(int port)
|
public Server(int port)
|
||||||
{
|
{
|
||||||
@ -369,7 +443,11 @@ class Server
|
|||||||
System.out.println("Target's Health: "+GetTargetHealth()+"%");
|
System.out.println("Target's Health: "+GetTargetHealth()+"%");
|
||||||
}break;
|
}break;
|
||||||
case "SPRINT":{
|
case "SPRINT":{
|
||||||
PressKey(KeyEvent.VK_N);
|
if (nextActionTimer==0){
|
||||||
|
PressKey(KeyEvent.VK_N);
|
||||||
|
} else {
|
||||||
|
queueUpSprint=true;
|
||||||
|
}
|
||||||
}break;
|
}break;
|
||||||
case "UPDATE":{
|
case "UPDATE":{
|
||||||
|
|
||||||
@ -388,68 +466,12 @@ class Server
|
|||||||
fightLoop:
|
fightLoop:
|
||||||
while (true){
|
while (true){
|
||||||
if (fighting){
|
if (fighting){
|
||||||
if (nextActionTimer==0){
|
if (queueUpSprint){
|
||||||
if (GetMythraMana()<80&&lucidDreamingTimer==0){
|
PressKey(KeyEvent.VK_N);
|
||||||
lucidDreamingTimer=60000;
|
nextActionTimer=100;
|
||||||
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_6);
|
break fightLoop;
|
||||||
nextActionTimer=1000;
|
|
||||||
break fightLoop;
|
|
||||||
}
|
|
||||||
if (allowedToAetherflow&&aetherflowTimer==0){
|
|
||||||
PressKeyWithModifier(KeyEvent.VK_ALT, KeyEvent.VK_2);
|
|
||||||
nextActionTimer=1000;
|
|
||||||
aetherflowStacks=3;
|
|
||||||
aetherflowTimer=60000;
|
|
||||||
break fightLoop;
|
|
||||||
}
|
|
||||||
float ayaHealth=GetAyaHealth();
|
|
||||||
float mythraHealth=GetMythraHealth();
|
|
||||||
if (ayaHealth<40){
|
|
||||||
PressKey(KeyEvent.VK_F2);
|
|
||||||
r.delay(100);
|
|
||||||
Heal(Target.AYA);
|
|
||||||
break fightLoop;
|
|
||||||
}
|
|
||||||
if (ayaHealth<60){
|
|
||||||
if (whisperingDawnTimer==0&&feyIlluminationTimer<60000){
|
|
||||||
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_C);
|
|
||||||
whisperingDawnTimer=60000;
|
|
||||||
nextActionTimer=1000;
|
|
||||||
break fightLoop;
|
|
||||||
} else
|
|
||||||
if (feyIlluminationTimer==0&&whisperingDawnTimer<30000){
|
|
||||||
PressKey(KeyEvent.VK_X);
|
|
||||||
feyIlluminationTimer=120000;
|
|
||||||
nextActionTimer=1000;
|
|
||||||
break fightLoop;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mythraHealth<40){
|
|
||||||
PressKey(KeyEvent.VK_F1);
|
|
||||||
r.delay(100);
|
|
||||||
Heal(Target.MYTHRA);
|
|
||||||
break fightLoop;
|
|
||||||
}
|
|
||||||
//Looks like we're attacking.
|
|
||||||
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_8);
|
|
||||||
float targetHealth=GetTargetHealth();
|
|
||||||
if (!MultipleTargets()){
|
|
||||||
if (targetHealth>50&&bioTimer==0){
|
|
||||||
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_2);
|
|
||||||
bioTimer=30000;
|
|
||||||
nextActionTimer=2500;
|
|
||||||
break fightLoop;
|
|
||||||
} else {
|
|
||||||
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_1);
|
|
||||||
nextActionTimer=2500;
|
|
||||||
break fightLoop;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_Z);
|
|
||||||
nextActionTimer=2500;
|
|
||||||
break fightLoop;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
run(Rotation.SCHOLAR);
|
||||||
}
|
}
|
||||||
break fightLoop;
|
break fightLoop;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user