Hi,
I am currently trying to get the triple Jad wave of the Inferno working. I am trying to figure out how to spawn the 3 different Jads in separate locations, because right now they just spawn on top of one another. To try to avoid this, I have done a few things that have not worked yet.
In the InfernoWaves file this is the code that is being used for Jad
Code:
public static final int
JALTOK_JAD = 7700;
Code:
public enum InfernoData{
WAVE_1(new short[]{JALTOK_JAD, JALTOK_JAD, JALTOK_JAD});
private short[] npcs;
InfernoData(short[] npcs) {
this.npcs = npcs;
}
public short[] getNpcs() {
return npcs;
}
public int toInteger() {
return ordinal();
}
}
The code above is just defining what Jad is with his npc id, and then placing him in the queue to spawn when wave 1 starts.
In the Inferno file, in order to spawn the Jad's in different locations, I have added some conditional statements in so they don't spawn in the same location
Code:
for (short i : InfernoWave.InfernoData.values()[player.getInfernoDetails().getStage()].getNpcs()) {
int startX = 2271 + Utility.random(12); // InfernoWave.SPAWN_DATA[index][0]
int startY = 5342 + Utility.random(12); // InfernoWave.SPAWN_DATA[index][1]
if(i == InfernoWave.JALTOK_JAD) {
startX = 2267;
startY = 5348;
}
if(i == InfernoWave.JALTOK_JAD) {
startX = 2276;
startY = 5343;
}
if(i == InfernoWave.JALTOK_JAD) {
startX = 2266;
startY = 5337;
}
So, obviously right now this is not going to work because the variable i is set to JALTOK_JAD in three different conditional statements. But I am not sure what I can change about the conditional statements in order to spawn the jads in different locations. I have thought about indexing through the short[] WAVE_1 and spawning each index in a different location, but I do not know how to do that.
If my idea of indexing through the WAVE_1 array would work, can anyone help me figure out how to do that?