Created
February 18, 2013 11:50
-
-
Save anonymous/4976825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static public void makeTrinketProfiles(API api, FeralProfile profile0, File dir) { | |
class T { | |
final int id, up; | |
Item item; | |
T(int id, int up) { | |
this.id = id; | |
this.up = up; | |
} | |
} | |
T[] trinkets = { | |
new T(-96546, 0), | |
new T(-96492, 0), | |
new T(-96369, 0), | |
new T(-96409, 0), | |
new T(-94511, 0), | |
new T(87057, 2), // bottle | |
new T(79328, 2), // xuen | |
new T(87167, 2) // terror | |
}; | |
for (T x: trinkets) { | |
x.item = api.loadItem(x.id); | |
} | |
ReforgeAlgo algo = new ReforgeAlgo().atLeast(StatT.HIT, 2550).atLeast(StatT.EXP, 2550) | |
.setWeight(StatT.MASTERY, 10).setWeight(StatT.CRIT, 9).setWeight(StatT.HASTE, 8); | |
for (int i = 1; i < trinkets.length; i++) { | |
for (int j = 0; j <= i; j++) { | |
profile0.T1.clear(); | |
profile0.T2.clear(); | |
try { | |
profile0.T1.setItem(trinkets[i].item); | |
profile0.T2.setItem(trinkets[j].item); | |
profile0.T1.setUpgradeLevel(trinkets[i].up); | |
profile0.T2.setUpgradeLevel(trinkets[j].up); | |
} catch (RuntimeException err) { | |
continue; | |
} | |
profile0.reforge(algo, null, 0, 0, false); | |
String code = CompactGear.toString(profile0); | |
File file = new File(dir, profile0.T1.item.itemId + "_" + profile0.T2.item.itemId + ".txt"); | |
try { | |
FileWriter w = new FileWriter(file); | |
w.write(code); | |
w.close(); | |
} catch (IOException err) { | |
System.err.println(file + ": " + err); | |
} | |
System.out.println(file); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment