I would like to edit in Dagganoths. They use their range attack [1343] when 2 or more spaces away, and melee attack [1341] when they are within a square... The attack, block, and death animations are retrieved from the NPC.config file in my server... I really don't know where to go about this. Anybody have ideas?
Here is my Ahrim The Blighted code in NPCHandler.java. It executes 3 different types of spells randomly. This is not exactly what I want for the dagganoths, as I don't want it to be random. They use range attack when further away from the player, and melee when within a square. Anyway, here's Ahrim:
Code:
case 2025:
npcs[i].attackType = 2;
int r = Misc.random(3);
if(r == 0) {
npcs[i].gfx100(158);
npcs[i].projectileId = 159;
npcs[i].endGfx = 160;
}
if(r == 1) {
npcs[i].gfx100(161);
npcs[i].projectileId = 162;
npcs[i].endGfx = 163;
}
if(r == 2) {
npcs[i].gfx100(164);
npcs[i].projectileId = 165;
npcs[i].endGfx = 166;
}
if(r == 3) {
npcs[i].gfx100(155);
npcs[i].projectileId = 156;
}
break;