Advertisement
WallisTeer

[ aCis ] NPC Attackable

Oct 4th, 2015
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P aCis_gameserver
  3. Index: java/net/sf/l2j/Config.java
  4. ===================================================================
  5. --- java/net/sf/l2j/Config.java (revision 131)
  6. +++ java/net/sf/l2j/Config.java (working copy)
  7. @@ -601,6 +601,7 @@
  8. /** Buffs */
  9. public static boolean STORE_SKILL_COOLTIME;
  10. public static boolean EXPERTISE_PENALTY;
  11. + public static boolean NPC_ATTACKABLE;
  12. public static int BUFFS_MAX_AMOUNT;
  13.  
  14. // --------------------------------------------------
  15. @@ -1428,6 +1429,7 @@
  16. BUFFS_MAX_AMOUNT = players.getProperty("MaxBuffsAmount", 20);
  17. STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);
  18. EXPERTISE_PENALTY = players.getProperty("ExpertisePenality", true);
  19. + NPC_ATTACKABLE = players.getProperty("NpcAttackable", false);
  20.  
  21. // server
  22. ExProperties server = load(SERVER_FILE);
  23. Index: java/net/sf/l2j/gameserver/model/actor/L2Npc.java
  24. ===================================================================
  25. --- java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 129)
  26. +++ java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy)
  27. @@ -303,7 +303,10 @@
  28. @Override
  29. public boolean isAttackable()
  30. {
  31. - return true;
  32. + if (Config.NPC_ATTACKABLE || this instanceof L2Attackable)
  33. + return true;
  34. +
  35. + return false;
  36. }
  37.  
  38. /**
  39. Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java
  40. ===================================================================
  41. --- java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 129)
  42. +++ java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)
  43. @@ -233,6 +233,11 @@
  44. for (L2Skill skill : getAllSkills())
  45. addStatFuncs(skill.getStatFuncs(this));
  46. }
  47. +
  48. + if (!Config.NPC_ATTACKABLE || !(this instanceof L2Attackable))
  49. + {
  50. + setIsInvul(true);
  51. + }
  52. }
  53. }
  54.  
  55. Index: config/players.properties
  56. ===================================================================
  57. --- config/players.properties (revision 131)
  58. +++ config/players.properties (working copy)
  59. @@ -314,3 +314,8 @@
  60. # False: Players can use equip S grade at level 1.
  61. # True: Players can't use equip S grade at level 1.
  62. ExpertisePenality= False
  63. +
  64. +# Npc Attackable
  65. +# True: You can attack Npcs
  66. +# False: Npc/Mobs don't take damages
  67. +NpcAttackable = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement