diff --git a/sig/App.java b/sig/App.java index b8b8e42..efa3121 100644 --- a/sig/App.java +++ b/sig/App.java @@ -182,6 +182,10 @@ enum Target{ MYTHRA } +enum Rotation{ + SCHOLAR +} + class Server { //initialize socket and input stream @@ -265,6 +269,7 @@ class Server long whisperingDawnTimer=0; long feyIlluminationTimer=0; boolean allowedToAetherflow=false; + boolean queueUpSprint=false; long lastFrame=System.currentTimeMillis(); @@ -293,6 +298,75 @@ class Server return; } } + + 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 public Server(int port) @@ -369,7 +443,11 @@ class Server System.out.println("Target's Health: "+GetTargetHealth()+"%"); }break; case "SPRINT":{ - PressKey(KeyEvent.VK_N); + if (nextActionTimer==0){ + PressKey(KeyEvent.VK_N); + } else { + queueUpSprint=true; + } }break; case "UPDATE":{ @@ -388,68 +466,12 @@ class Server fightLoop: while (true){ if (fighting){ - if (nextActionTimer==0){ - if (GetMythraMana()<80&&lucidDreamingTimer==0){ - lucidDreamingTimer=60000; - PressKeyWithModifier(KeyEvent.VK_CONTROL, KeyEvent.VK_6); - 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; - } + if (queueUpSprint){ + PressKey(KeyEvent.VK_N); + nextActionTimer=100; + break fightLoop; } + run(Rotation.SCHOLAR); } break fightLoop; }