I'm trying to make my steel titan do a special attack on other NPCs, so it hits four times, for a single damage, but since all the hits try to show up at once, only two of them are seen, I want to delay the last two hits, just like dragon claws, so they appear afterwards.
Here is my code right now, I've tried using loops ect... neither works, I've tried copying the dragon claws, but I want it to attack my NPC opponent with the range symbol, not melee
Code:
if(c.npcIndex > 0) {
c.summonSpec -= 20;
c.getItems().deleteItem2(12825, 1);
Server.npcHandler.npcs[c.npcIndex].hitDiff2 = (damage * 2);
Server.npcHandler.npcs[c.npcIndex].HP -= (damage * 2);
c.startAnimation(7660);
NPC x = Server.npcHandler.npcs[c.npcIndex];
c.gfx0(1316);
//c.waitGfx(1311);
if(x != null) {
if ((damage * 2) > x.HP)
damage = (int)(x.HP/2);
x.gfx0(1449);
x.handleHitMask(damage, 0, 1);
x.handleHitMask((int)(damage/2), 0, 1);
x.handleHitMask((int)(damage/4), 0, 1);
x.handleHitMask((int)(damage/4), 0, 1);
}
}
Stuff like
Code:
if(c.npcIndex > 0) {
c.summonSpec -= 20;
c.getItems().deleteItem2(12825, 1);
Server.npcHandler.npcs[c.npcIndex].hitDiff2 = (damage * 2);
Server.npcHandler.npcs[c.npcIndex].HP -= (damage * 2);
c.startAnimation(7660);
NPC x = Server.npcHandler.npcs[c.npcIndex];
c.gfx0(1316);
//c.waitGfx(1311);
if(x != null) {
if ((damage * 2) > x.HP)
damage = (int)(x.HP/2);
x.gfx0(1449);
do{
if (c.hitDelay3 == 2) {
x.handleHitMask(damage, 0, 1);
x.handleHitMask((int)(damage/2), 0, 1);
}
if (c.hitDelay3 == 1)
x.handleHitMask((int)(damage/4), 0, 1);
if (c.hitDelay3 == 0)
x.handleHitMask((int)(damage/4), 0, 1);
c.hitDelay3--;
}while(c.hitDelay3 > 0)
}
}
doesn't work.