A lot of servers have a terrible dragon spear, so here is a basic one that works.
Change your special attack for the dragon spear in CombatAssistant to this:
Code:
case 5730: // dragon spear
case 11716: // zamorakspear
c.startAnimation(1064);
c.gfx100(253);
c.specDamage = 0.00;
if (c.playerIndex > 0 && o1.stunTicks < -4) {
o1.stunTicks = 5;
o1.sendMessage("You have been stunned!");
o1.gfx100(254);
}
break;
Then go to your client.java and in your process() method add:
Code:
if(stunTicks > -5) {
stunTicks --;
if(stunTicks == 0)
{
sendMessage("@gre@You are no longer stunned.");
}
}
And in player.java add the following:
Code:
public int stunTicks = -4;
Extremely basic, wrote in a couple minutes.
Most servers don't have a morrigan javelin special at all.
For the bleed, it is slightly different. Add this in your combatassistant.java activateSpecial
Code:
case 13879: // Morrigan Javelin
c.usingRangeWeapon = true;
c.rangeItemUsed = c.playerEquipment[c.playerWeapon];
c.lastWeaponUsed = weapon;
c.startAnimation(10501);
c.gfx0(1836);
c.specAccuracy = 2.00;
c.specDamage = 1.50;
c.hitDelay = 3;
c.specEffect = 18;
c.projectileStage = 1;
c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase());
if (c.fightMode == 2)
c.attackTimer--;
if (c.playerIndex > 0)
fireProjectilePlayer();
else if (c.npcIndex > 0)
fireProjectileNpc();
break;
In combatassistant again in playerdelayed hit under
Code:
if(dropArrows) {
c.getItems().dropArrowPlayer();
}
Add this
Code:
switch (c.specEffect) {
case 19:
if (damage > 0) {
c.javelinDamage = damage;
c.javHits = 16;
if(c.javelinDamage > 250)
c.javelinDamage = 250;
}
break;
}
This declares the javelinDamage variable and gives the javHits variable 15, which equates to 15 ticks.
In the client process() method add somewhere:
Code:
if(javHits > 0){
handleJavelin()
}
This tells the client to process the handleJavelin() method every tick
Then add this void somewhere:
Code:
public void handleJavelin()
int ripdamage = 0;
if(javelinDamage >= 50){
ripDamage = 50;
}
else if(javelinDamage < 50){
ripDamage = javelinDamage;
}
if(javHits == 13 || javHits == 10 || javHits == 7 || javHits == 4 || javHits == 1){
handleHitMask(ripdamage, 0, 1, 0, false);
dealDamage(ripdamage);
javelinDamage = javelinDamage - ripDamage;
}
javHits -= 1;
if(constitution < 1 || javelinDamage == 0)
{
javHits = 0;
}
if(javHits == 0)
{
sendMessage("@gre@The bleed is no longer affecting you..");
}
}
You will also need to declare the following ints in the Player class
Code:
javelinDamage
javHits
This will handle the bleeding, declare the damage (0-50) and hit every 3 ticks until 0 ticks or the damage hits 0.
Improved code is allowed