okay this tut will show you how to fix the famous "deltascape random dieing upon log on glitch and will hopefully shop the threads on random dieing on deltascape
Easy just go to NpcHandler.java,
There search for:
Code:
AnnoyNpcs(int npcId)
You'll see something like this
Code:
public void annoyNpcs(int npcId) {
for(Player p : server.playerHandler.players) {
if(p != null) {
client player = (client)p;
if (player.distanceToPoint(npcs[npcId].absX, npcs[npcId].absY) <= getDistanceForNpc(npcId) && p.heightLevel == npcs[npcId].heightLevel) {
if(npcGetsAnnoyed(npcId) && (npcs[npcId] != null) && (npcs[npcId].StartKilling == 0)) {
npcs[npcId].StartKilling = player.playerId; npcs[npcId].IsUnderAttack = true;
npcs[npcId].RandomWalk = false;
AttackPlayer(player.playerId);
}
}
}
}
}
Well in the line:
Code:
if (player.distanceToPoint(npcs[npcId].absX, npcs[npcId].absY) <= getDistanceForNpc(npcId) && p.heightLevel == npcs[npcId].heightLevel)
Before the add this:
Code:
npcs[npcId].absX != 0 && npcs[npcId].absY != 0
The entire void will be like this:
Code:
public void annoyNpcs(int npcId) {
for(Player p : server.playerHandler.players) {
if(p != null) {
client player = (client)p;
if (player.distanceToPoint(npcs[npcId].absX, npcs[npcId].absY) <= getDistanceForNpc(npcId) && p.heightLevel == npcs[npcId].heightLevel && npcs[npcId].absX != 0 && npcs[npcId].absY != 0) {
if(npcGetsAnnoyed(npcId) && (npcs[npcId] != null) && (npcs[npcId].StartKilling == 0)) {
npcs[npcId].StartKilling = player.playerId; npcs[npcId].IsUnderAttack = true;
npcs[npcId].RandomWalk = false;
AttackPlayer(player.playerId);
}
}
}
}
}
This mean that if jad is in the cords the npc isn't aggressive so jad or any other of them will attack
thus fixing your problem
post if any errors