Guest User

Untitled

a guest
Dec 9th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. }
  2.  
  3. int[] myNpcs = {2627, 2630, 2631, 2743, 2745, 2741, 4278, 4279, 4280, 4281, 4282, 4283, 4284};
  4.  
  5. public void killMyNpcs() {
  6. for (int i = 0; i < NPCHandler.maxNPCs; i++) {
  7. if (NPCHandler.getSingleton().npcs[i] != null) {
  8. if (NPCHandler.getSingleton().npcs[i].npcType == 2627 || NPCHandler.getSingleton().npcs[i].npcType == 2630 || NPCHandler.getSingleton().npcs[i].npcType == 2631 || NPCHandler.getSingleton().npcs[i].npcType == 2743
  9. || NPCHandler.getSingleton().npcs[i].npcType == 2745 || NPCHandler.getSingleton().npcs[i].npcType == 2741 || NPCHandler.getSingleton().npcs[i].npcType == 4278 || NPCHandler.getSingleton().npcs[i].npcType == 4279
  10. || NPCHandler.getSingleton().npcs[i].npcType == 4280 || NPCHandler.getSingleton().npcs[i].npcType == 4281 || NPCHandler.getSingleton().npcs[i].npcType == 4282 || NPCHandler.getSingleton().npcs[i].npcType == 4283
  11. || NPCHandler.getSingleton().npcs[i].npcType == 4284) {
  12. if (NPCHandler.getSingleton().npcs[i].spawnedBy == c.getId()) {
  13. NPCHandler.getSingleton().npcs[i].absX = 0;
  14. NPCHandler.getSingleton().npcs[i].absY = 0;
  15. NPCHandler.getSingleton().npcs[i].applyDead = true;
  16. NPCHandler.getSingleton().npcs[i].needRespawn = false;
  17. NPCHandler.getSingleton().npcs[i].heightLevel = -1;
  18. NPCHandler.getSingleton().npcs[i].randomWalk = false;
  19. NPCHandler.getSingleton().npcs[i].facePlayer(0);
  20. c.inAnathema = false;
  21. System.out.println("Npc deleted");
  22. }
  23. }
  24. }
  25. }
  26. }
  27.  
  28. public void resetDamageDone() {
  29. for (int i = 0; i < PlayerHandler.players.length; i++) {
  30. if (PlayerHandler.players[i] != null) {
  31. PlayerHandler.players[i].damageTaken[c.playerId] = 0;
  32. }
  33. }
  34. }
Add Comment
Please, Sign In to add comment