[z508] Jad has only got ranged/mage attack, errors afther I tryed to add melee [z508]
-------------------------------------------------------------------------------------------------------
Hello,
I tryed to add jad's third (Melee) attack because it wasnt added in z508 allready.
I was pretty sure I was going to forget something, and it whould cause errors, but I Thought it be better if I tryed before asking for help
Here are my errors
Code:
Compiling net/com/codeusa/Engine.java
.\net\com\codeusa\npcs\combat\NpcCombat.java:503: 'else' without 'if'
} else {
^
.\net\com\codeusa\npcs\combat\NpcCombat.java:992: 'else' without 'if'
} else {
^
Note: .\net\com\codeusa\clanchat\Room.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Druk op een toets om door te gaan. . .
Here are my two changes in npccombat.java (whats red is what I added and probbaly is something wrong with, whats yellow is added but doesnt cause errors.):
Code:
case 2745:
if (getRandom(1) == 1) {
n.requestGFX(1625, 0);
n.requestAnim(9276, 0);
n.rockAppear = 2;
n.farCastDelay = 4;
n.switchJadAttack(true, false); /* @param 1 ranged @param 2 mage */
} else {
n.requestGFX(1626, 100);
n.requestAnim(9300, 0);
n.projectileShowDelay = 1;
n.farCastDelay = 5;
n.switchJadAttack(false, true);
} else {
n.requestAnim(2655, 0);
n.farCastDelay = 5;
n.switchJadAttack(false, true);
}
if (p.rangedPrayer) {
p.appendNPCHit(0, 0);
}
if (p.magicPrayer) {
p.appendNPCHit(0, 0);
}
if (p.meleePrayer) {
p.appendNPCHit(0, 0);
}
break;
and change 2:
Code:
if (n.npcType == 2745) {
if (p == null || n == null || n.currentHP <= 0 || p.skillLvl[3] <= 0) {
n.farCastDelay = -1;
return;
}
if (n.rangeType) {
if (Misc.getDistance(n.absX, n.absY, p.absX, p.absY) <= 12) {
if (!p.usingPrayer(18)) {
p.requestGFX(157, 0);
p.appendNPCHit(getRandom(97), 0);
} else {
p.appendNPCHit(0, 0);
}
}
} else {
if (!p.usingPrayer(17)) {
p.requestGFX(157, 0);
p.appendNPCHit(getRandom(97), 0);
} else {
p.appendNPCHit(0, 0);
}
n.farCastDelay = -1;
} else {
if (!p.usingPrayer(19)) {
p.appendNPCHit(getRandom(97), 0);
} else {
p.appendNPCHit(0, 0);
}
n.farCastDelay = -1;
}
}
Im not posting my whole Npccombat file, as z508s npc combat was pretty bad and I made it loads better allready.
I hope YOU! can help me.
Thanks for reading.