Stregone
04-20-2004, 02:18 PM
I'm writing up a java character trainer, and have gotten a basic console interface version finished that does simple stat growth calculation. Unfortunatly the algorithm I'm using just isn't working (stats grow WAY too slow).
The stats are stored in an array, the first index is which stat, starting with con at 0, and aura at 9, the second index is the level, from 0-100.
This is the algorithm I have(that isn't working right).
// s = which stat it is (con, str, ...)
public void calcStat(int s){
for (int lvl = 1; lvl <= 100; lvl++){
if ((stat[s][lvl - 1] / growthInterval[s]) % lvl == 0) {
stat[s][lvl] = stat[s][lvl - 1] + 1;
}
else{
stat[s][lvl] = stat[s][lvl - 1];
}
}
}
Oh yeah, I'm posting here because I don't play GS anymore. I always wanted to write a trainer program because I always had to pirate MS office to use the trainer spreadsheet. Now I can write one, and I need to keep programming so I don't get rusty :)
The stats are stored in an array, the first index is which stat, starting with con at 0, and aura at 9, the second index is the level, from 0-100.
This is the algorithm I have(that isn't working right).
// s = which stat it is (con, str, ...)
public void calcStat(int s){
for (int lvl = 1; lvl <= 100; lvl++){
if ((stat[s][lvl - 1] / growthInterval[s]) % lvl == 0) {
stat[s][lvl] = stat[s][lvl - 1] + 1;
}
else{
stat[s][lvl] = stat[s][lvl - 1];
}
}
}
Oh yeah, I'm posting here because I don't play GS anymore. I always wanted to write a trainer program because I always had to pirate MS office to use the trainer spreadsheet. Now I can write one, and I need to keep programming so I don't get rusty :)