case 17:
// second Click npc
c.NPCSlot = c.inStream.readUnsignedWordBigEndianA();
if ((c.NPCSlot < 0) || (c.NPCSlot >= server.npcHandler.npcs.length)
|| (server.npcHandler.npcs[c.NPCSlot] == null))
break;
c.NPCID = server.npcHandler.npcs[c.NPCSlot].npcType;
long time = System.currentTimeMillis();
if (misc.random(100) == 1) {
c.triggerRandom();
break;
}
if (time - c.globalCooldown[0] <= 50) {
c.sM("Action throttled... please wait longer before acting!");
break;
}
if (time - c.lastMouse > 5000) {
//sM("Client hack detected!");
c.println("Suspicious activity!");
c.disconnected = true;
break;
}
if(c.action == 1){
c.sM("Suspicious activity!");
break;
}
c.globalCooldown[0] = time;
int npcX = server.npcHandler.npcs[c.NPCSlot].absX;
int npcY = server.npcHandler.npcs[c.NPCSlot].absY;
if ((Math.abs(c.absX - npcX) > 50) || (Math.abs(c.absY - npcY) > 50)) {
//sM("Client hack detected!");
break;
}
if (server.npcHandler.npcs[c.NPCSlot].IsDead) {
//sM("That monster has been killed!");
break;
}
FishingGo = false;
PutNPCCoords = false;
switch (NPCID) {
case 1597:
c.openUpShop(1);
break;
default:
c.sM("They are busy right now.");
break;
}
break;