Update with hundred percent check

main
sigonasr2 2 years ago
parent 32dec86a23
commit cfb735c044
  1. 11
      SigCrafter/.project
  2. 3
      SigCrafter/condition_stats.txt
  3. 49
      SigCrafter/src/sig/SigCraft.java

@ -14,4 +14,15 @@
<natures> <natures>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
</natures> </natures>
<filteredResources>
<filter>
<id>1675657259088</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription> </projectDescription>

@ -71,10 +71,11 @@ public class SigCraft {
public static Robot r; public static Robot r;
public static ColorPosition CRAFTING_WINDOW_PIXELS = new ColorPosition(284,68,77,77,77); public static ColorPosition CRAFTING_WINDOW_PIXELS = new ColorPosition(1811,234,82,77,82);
public static ColorPosition CRAFT_START_PIXELS = new ColorPosition(334,130,74,77,74); public static ColorPosition CRAFT_START_PIXELS = new ColorPosition(1405,82,173,166,156);
public static ColorPosition PRACTICE_CRAFT_START_PIXELS = new ColorPosition(334,130,41,40,41); public static ColorPosition PRACTICE_CRAFT_START_PIXELS = new ColorPosition(1405,82,179,179,179);
public static ColorPosition READY_FOR_ACTION_PIXELS = new ColorPosition(1031,892,230,197,164); public static ColorPosition READY_FOR_ACTION_PIXELS = new ColorPosition(2544,1220,255,255,201);
public static ColorPosition HUNDRED_PERCENT_QUALITY = new ColorPosition(1585,230,151,220,96);
//Quality = (0.37 * Control + 32.6) * (1 - 0.05 * min(max(Recipe Level - Character Level, 0), 5)) //Quality = (0.37 * Control + 32.6) * (1 - 0.05 * min(max(Recipe Level - Character Level, 0), 5))
//Good +50%, Excellent +300% //Good +50%, Excellent +300%
@ -134,6 +135,7 @@ public class SigCraft {
//284,68 77,77,77 //284,68 77,77,77
while (true) { while (true) {
r.delay(100); r.delay(100);
//System.out.println("Waiting...");
//LookForScreenPixels(CRAFT_START_PIXELS); //LookForScreenPixels(CRAFT_START_PIXELS);
//System.out.println(GetCondition()); //System.out.println(GetCondition());
CURRENT_CRAFT = new Craft(CONTROL,LEVEL,CP,BASE_PROGRESS,PROGRESS_GOAL,QUALITY_GOAL,GUARANTEED,DURABILITY,CRAFT_PROGRESS,CRAFT_QUALITY,DURABILITY,CP,1,1,1,RECIPE_LEVEL,Status.NORMAL,BUFFLIST); CURRENT_CRAFT = new Craft(CONTROL,LEVEL,CP,BASE_PROGRESS,PROGRESS_GOAL,QUALITY_GOAL,GUARANTEED,DURABILITY,CRAFT_PROGRESS,CRAFT_QUALITY,DURABILITY,CP,1,1,1,RECIPE_LEVEL,Status.NORMAL,BUFFLIST);
@ -156,9 +158,9 @@ public class SigCraft {
LookForScreenPixels(READY_FOR_ACTION_PIXELS); LookForScreenPixels(READY_FOR_ACTION_PIXELS);
CONDITION_CHECK = true; CONDITION_CHECK = true;
UpdateCondition(); UpdateCondition();
LoadRotation_40Durability_800Quality_1Synth_280CP_LV50(); //LoadRotation_40Durability_800Quality_1Synth_280CP_LV50();
//LoadRotation_40Durability_1200Quality_1Synth_282CP_LV47(); //LoadRotation_40Durability_1200Quality_1Synth_282CP_LV47();
//LoadRotation_40Durability_1200Quality_1Synth_wVeneration_280CP_LV47(); LoadRotation_40Durability_1200Quality_1Synth_wVeneration_280CP_LV47();
//LoadRotation_40Durability_1700Quality_1Synth_278CP_LV47(); //LoadRotation_40Durability_1700Quality_1Synth_278CP_LV47();
//LoadRotation_40Durability_1700Quality_1Synth_wVeneration_278CP_LV47(); //LoadRotation_40Durability_1700Quality_1Synth_wVeneration_278CP_LV47();
//LoadRotation_40Durability_1900Quality_1Synth_280CP_LV45(); //LoadRotation_40Durability_1900Quality_1Synth_280CP_LV45();
@ -368,10 +370,10 @@ public class SigCraft {
private static void LoadRotation_40Durability_1200Quality_1Synth_wVeneration_280CP_LV47() { private static void LoadRotation_40Durability_1200Quality_1Synth_wVeneration_280CP_LV47() {
DURABILITY=40; DURABILITY=40;
CURRENT_CRAFT = new Craft(CONTROL,LEVEL,CP,BASE_PROGRESS,PROGRESS_GOAL,QUALITY_GOAL,GUARANTEED,DURABILITY,CRAFT_PROGRESS,CRAFT_QUALITY,DURABILITY,CP,1,1,1,RECIPE_LEVEL,Status.NORMAL,BUFFLIST); CURRENT_CRAFT = new Craft(CONTROL,LEVEL,CP,BASE_PROGRESS,PROGRESS_GOAL,QUALITY_GOAL,GUARANTEED,DURABILITY,CRAFT_PROGRESS,CRAFT_QUALITY,DURABILITY,CP,1,1,1,RECIPE_LEVEL,Status.NORMAL,BUFFLIST);
PerformSkill("Inner Quiet"); //PerformSkill("Inner Quiet");
CONDITION_CHECK = false;UpdateCondition(); CONDITION_CHECK = false;UpdateCondition();
PerformSkill("Innovation");
PerformSkill("Waste Not II"); PerformSkill("Waste Not II");
PerformSkill("Innovation");
UseRegularTouch(); UseRegularTouch();
UseRegularTouch(); UseRegularTouch();
UseRegularTouch(); UseRegularTouch();
@ -410,16 +412,29 @@ public class SigCraft {
} }
private static void UseRegularTouch() { private static void UseRegularTouch() {
if ((CURRENT_CRAFT.craft_durability>5&&CURRENT_CRAFT.BuffList.get("Waste Not").stackCount>0)||(CURRENT_CRAFT.craft_durability>10&&CURRENT_CRAFT.BuffList.get("Waste Not").stackCount==0)) { boolean isHundredPercent=false;
if (CURRENT_CRAFT.craft_cp>=18) { try {
if (IsCombo()) { Color col = new Color(CaptureScreen().getRGB(HUNDRED_PERCENT_QUALITY.p.x,HUNDRED_PERCENT_QUALITY.p.y));
PerformSkill("Standard Touch",true); if (col.getRGB()==HUNDRED_PERCENT_QUALITY.c.getRGB()) {
isHundredPercent=true;
}
} catch (IOException e) {
e.printStackTrace();
}
if (!isHundredPercent){
if ((CURRENT_CRAFT.craft_durability>5&&CURRENT_CRAFT.BuffList.get("Waste Not").stackCount>0)||(CURRENT_CRAFT.craft_durability>10&&CURRENT_CRAFT.BuffList.get("Waste Not").stackCount==0)) {
if (CURRENT_CRAFT.craft_cp>=18) {
if (IsCombo()) {
PerformSkill("Standard Touch",true);
} else {
PerformSkill("Basic Touch",true);
}
} else { } else {
PerformSkill("Basic Touch",true); PerformSkill("Hasty Touch",true);
} }
} else {
PerformSkill("Hasty Touch",true);
} }
} else {
System.out.println("100% has been reached, touch will be skipped...");
} }
} }
@ -448,7 +463,7 @@ public class SigCraft {
e1.printStackTrace(); e1.printStackTrace();
} }
try { try {
Color col = new Color(CaptureScreen().getRGB(160, 282)); Color col = new Color(CaptureScreen().getRGB(1409, 245));
//System.out.println(col); //System.out.println(col);
if (col.getRed()<=150&&col.getGreen()<=150&&col.getBlue()<=150) { if (col.getRed()<=150&&col.getGreen()<=150&&col.getBlue()<=150) {
CURRENT_CONDITION = Condition.POOR; CURRENT_CONDITION = Condition.POOR;
@ -614,7 +629,7 @@ public class SigCraft {
System.out.println("\tUsing standard rotation for Progress. Quality CP Available: "+qualityCPRemaining); System.out.println("\tUsing standard rotation for Progress. Quality CP Available: "+qualityCPRemaining);
} }
RunCraftCheck(new String[]{},new String[]{"Basic Touch"},new String[]{}); //RunCraftCheck(new String[]{},new String[]{"Basic Touch"},new String[]{});
boolean combo=false; boolean combo=false;
//Can we just straight up craft? //Can we just straight up craft?

Loading…
Cancel
Save