Question 1: Has been answered.
______________________________
Question 2: Applydead. Here is my Applydead code:
Code:
public boolean ApplyDead() {
IsReallyDead = true;
OnlyOnce = true;
if (IsDeadTimer == false) {
pickupTimer = 0;
cantLeaveTimer = 0;
actionAmount++;
actionTimer = 8;
ResetAttack();
ResetAttackNPC();
IsDeadTimer = true;
ApplyDead();
ApplyDeadEat = true;
specialAttacks();
specialAttacks2();
specialAttacks3();
specialAttacks4();
specialAttacks5();
specialAttacks6();
}
if ((Wild()) && (IsReallyDead = true)){
IsReallyDead = false;
startAnimation(2241);
if (actionTimer <= 0 && IsDeadTimer == true) {
youdied();
ApplyDeadEat = false;
teleportToX = 2384;
teleportToY = 4720;
IsDeadTeleporting = true;
frame1();
updateRequired = true;
appearanceUpdateRequired = true;
NewHP = getLevelForXP(playerXP[3]);
setSkillLevel(3, getLevelForXP(playerXP[3]), playerXP[playerHitpoints]);
playerLevel[3] = getLevelForXP(playerXP[3]);
PoisonDelay = 9999999;
KillerId = playerId;
resetAnimation();
}
} else if ((isInBounty()) && (IsReallyDead = true)){
IsReallyDead = false;
startAnimation(2241);
if (actionTimer <= 0 && IsDeadTimer == true) {
checkBounty();
client killerz = (client) server.playerHandler.players[KillerId];
if((killerz != null) && (PlayerHandler.players[KillerId] != null) && (OnlyOnce = true)) {
killerz.BHkillCount += 1;
killerz.pickupTimer = 240;
killerz.sendMessage("You have killed a person in bounty");
killerz.sendMessage("You now have a total of "+killerz.BHkillCount+" kills.");
OnlyOnce = false;
}
youdied();
ApplyDeadEat = false;
teleportToX = 2709;
teleportToY = 9475;
IsDeadTeleporting = true;
frame1();
updateRequired = true;
appearanceUpdateRequired = true;
NewHP = getLevelForXP(playerXP[3]);
setSkillLevel(3, getLevelForXP(playerXP[3]), playerXP[playerHitpoints]);
playerLevel[3] = getLevelForXP(playerXP[3]);
PoisonDelay = 9999999;
KillerId = playerId;
resetAnimation();
}
} else {
IsReallyDead = false;
startAnimation(2241);
if (actionTimer <= 0 && IsDeadTimer == true) {
keepItem1();
keepItem2();
keepItem3();
deleteItem(keepItem, getItemSlot(keepItem), keepItemAmount);
deleteItem(keepItem2, getItemSlot(keepItem2), keepItemAmount2);
deleteItem(keepItem3, getItemSlot(keepItem3), keepItemAmount3);
youdied();
ApplyDeadEat = false;
teleportToX = 2384;
teleportToY = 4720;
IsDeadTeleporting = true;
frame1();
updateRequired = true;
appearanceUpdateRequired = true;
NewHP = getLevelForXP(playerXP[3]);
setSkillLevel(3, getLevelForXP(playerXP[3]), playerXP[playerHitpoints]);
playerLevel[3] = getLevelForXP(playerXP[3]);
setSkillLevel(5, getLevelForXP(playerXP[5]), playerXP[playerPrayer]);
playerLevel[5] = getLevelForXP(playerXP[5]);
PoisonDelay = 9999999;
KillerId = playerId;
if(keepItem != 0)
addItem(keepItem, keepItemAmount);
if(keepItem2 != 0)
addItem(keepItem2, keepItemAmount2);
if(keepItem3 != 0)
addItem(keepItem3, keepItemAmount3);
resetKeepItem();
resetAnimation();
}
}
ResetAttack();
startAnimation(-1);
return true;
}
Don't worry about all that OnlyOnce crap, etc. For some reason, the Applydead code may activate more than once if you were lagging.
Alright, so, there's two things happening here: Upon death, the character just stands there for a couple seconds. The animation (in red), doesn't happen. The next dodgy thing is that when the character dies, the things in green are being sent to the one who DIED, not the one who KILLED. What's happening here? could it be to do with me connecting to my server on two accounts with the same IP? I'm unable to get my server online, so I can't test that theory out.
Thanks,
~ Ice Ice Baby