I'm working on emulous poison...
and it just won't work..
Code:
if (!poisonHit) {
str.writeByte(getHitDiff());
if (getHitDiff() > 0 && (newhptype == false)) {
str.writeByteA(1); // 0: red hitting - 1: blue hitting
} else if (hitDiff > 0 && (newhptype == true)) {
str.writeByteA(hptype); // 0: red hitting - 1: blue hitting
} else {
str.writeByteA(0); // 0: red hitting - 1: blue hitting
}
} else {
str.writeByteA(2);//poison hitting
}
Code:
public void poisonDamage(int weapon, Client plr) {
if(plr == null) {//if your enemy is a null, it will not poison
return;
}
if(Misc.random(100) <= 30) {
if(plr.poisonDelay != -1) {//if your enemy's poisondelay is above -1, it will not poison
return;
}
switch(weapon) {
case 5698:// dds p++
plr.sendMessage("You have been poisoned!");
plr.poisonDamage = 6;
plr.poisonDelay = 240;
plr.minusPoison = 3;
break;
}
}
}
Code:
if(o.poisonDamage == 0 && o.poisonDelay == -1) {
c.poisonDamage(c.playerEquipment[c.playerWeapon], o);
}
Really nothing happends it just dc me after a while.