Advertisement
Guest User

User Panel by NeverMore 2

a guest
Oct 18th, 2012
1,708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.86 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2J_Server
  3. Index: dist/game/config/custom.properties
  4. ===================================================================
  5. --- dist/game/config/custom.properties  (revision 5526)
  6. +++ dist/game/config/custom.properties  (working copy)
  7. @@ -461,4 +297,306 @@
  8.  # ---------------------------------------------------------------------------
  9.  # Enables .changepassword voiced command which allows the players to change their account's password ingame.
  10. # Default: False
  11. -AllowChangePassword = False
  12. +AllowChangePassword = False
  13. +
  14. +# ---------------------------------------------------------------------------
  15. +#  Custom User Panel (by NeverMore)
  16. +# ---------------------------------------------------------------------------
  17. +# Using this feature every single player will have the opportunity to press .user into the game !
  18. +# .user command have many actions and features like (Enable/Disable pm , trade , custom effect etc etc )
  19. +# ---------------------------------------------------------------------------
  20. +# Allow .user command
  21. +AllowUserCommand = True
  22. +# Allow .user command
  23. +AllowExpRefusal = True
  24. +# Allow trade off/on action
  25. +AllowTradeCommand = True
  26. +# Allow pm off/on action
  27. +AllowPmCommand = True
  28. +# Allow .effecton/off command ( using this command ,player will get a special aura )
  29. +AllowSpecialEffect = True
  30. \ No newline at end of file
  31. Index: java/com/l2jserver/gameserver/model/L2Party.java
  32. ===================================================================
  33. --- java/com/l2jserver/gameserver/model/L2Party.java    (revision 5526)
  34. +++ java/com/l2jserver/gameserver/model/L2Party.java    (working copy)
  35. @@ -805,7 +805,7 @@
  36.         {
  37.             for (L2Character member : rewardedMembers)
  38.             {
  39. -               if (member.isDead())
  40. +               if (member.isDead() || ((L2PcInstance) member)._isexpsprefusal)
  41.                 {
  42.                     continue;
  43.                 }
  44. Index: java/com/l2jserver/Config.java
  45. ===================================================================
  46. --- java/com/l2jserver/Config.java  (revision 5526)
  47. +++ java/com/l2jserver/Config.java  (working copy)
  48. @@ -765,8 +737,154 @@
  49.     public static int L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP;
  50.     public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST;
  51.     public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
  52. +   public static boolean ENABLE_TRADE_REFUSAL;
  53. +   public static boolean ENABLE_PM_REFUSAL;
  54. +   public static boolean SHOW_USER;
  55. +   public static boolean ENABLE_SPECIAL_EFFECT;
  56. +   public static boolean ENABLE_EXP_REFUSAL;
  57. +  
  58.  
  59.     // --------------------------------------------------
  60.     // NPC Settings
  61.     // --------------------------------------------------
  62.     public static boolean ANNOUNCE_MAMMON_SPAWN;
  63. @@ -2425,7 +2535,306 @@
  64.                     }
  65.                 }
  66.                 L2JMOD_ALLOW_CHANGE_PASSWORD = Boolean.parseBoolean(L2JModSettings.getProperty("AllowChangePassword", "False"));
  67. +               ENABLE_PM_REFUSAL = Boolean.parseBoolean(L2JModSettings.getProperty("AllowPmCommand","False"));
  68. +               ENABLE_TRADE_REFUSAL = Boolean.parseBoolean(L2JModSettings.getProperty("AllowTradeCommand","False"));
  69. +               SHOW_USER = Boolean.parseBoolean(L2JModSettings.getProperty("AllowUserCommand","False"));
  70. +               ENABLE_SPECIAL_EFFECT = Boolean.parseBoolean(L2JModSettings.getProperty("AllowSpecialEffect","False"));
  71. +                   ENABLE_EXP_REFUSAL = Boolean.parseBoolean(L2JModSettings.getProperty("AllowExpRefusal", "true"));
  72. +
  73.                 if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
  74.                 {
  75.                     TVT_EVENT_ENABLED = false;
  76. Index: java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java
  77. ===================================================================
  78. --- java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java (revision 5526)
  79. +++ java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java (working copy)
  80. @@ -65,6 +65,26 @@
  81.             return;
  82.         }
  83.        
  84. +       if (L2PcInstance._isoneffect == true)
  85. +       {
  86. +           L2PcInstance._isoneffect = false;
  87. +       }
  88. +  
  89. +       if (L2PcInstance._istraderefusal == true)
  90. +       {
  91. +           L2PcInstance._istraderefusal = false;
  92. +       }
  93. +      
  94. +       if (L2PcInstance._ispmrefusal == true)
  95. +       {
  96. +           L2PcInstance._ispmrefusal = false;
  97. +       }
  98. +      
  99. +       if (L2PcInstance._isexpsprefusal == true)
  100. +       {
  101. +           L2PcInstance._isexpsprefusal = false;
  102. +       }
  103. +      
  104.         if (player.isLocked())
  105.         {
  106.             _log.warning("Player " + player.getName() + " tried to restart during class change.");
  107. Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
  108. ===================================================================
  109. --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (revision 5526)
  110. +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
  111. @@ -297,6 +300,28 @@
  112.  */
  113. public final class L2PcInstance extends L2Playable
  114. {
  115. +    
  116. +   // User panel
  117. +   public static boolean _isoneffect = false;
  118. +   public static boolean _ispmrefusal = false;
  119. +   public static boolean _istraderefusal = false;
  120. +   public static boolean _isexpsprefusal = false;
  121.  
  122.     // Character Skill SQL String Definitions:
  123.     private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? AND class_index=?";
  124.     private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (charId,skill_id,skill_level,class_index) VALUES (?,?,?,?)";
  125.  
  126. Index: java/com/l2jserver/gameserver/network/clientpackets/Logout.java
  127. ===================================================================
  128. --- java/com/l2jserver/gameserver/network/clientpackets/Logout.java (revision 5526)
  129. +++ java/com/l2jserver/gameserver/network/clientpackets/Logout.java (working copy)
  130. @@ -53,6 +53,26 @@
  131.         if (player == null)
  132.             return;
  133.        
  134. +       if (L2PcInstance._isoneffect == true)
  135. +       {
  136. +           L2PcInstance._isoneffect = false;
  137. +       }
  138. +  
  139. +       if (L2PcInstance._istraderefusal == true)
  140. +       {
  141. +           L2PcInstance._istraderefusal = false;
  142. +       }
  143. +      
  144. +       if (L2PcInstance._ispmrefusal == true)
  145. +       {
  146. +           L2PcInstance._ispmrefusal = false;
  147. +       }
  148. +      
  149. +       if (L2PcInstance._isexpsprefusal == true)
  150. +       {
  151. +           L2PcInstance._isexpsprefusal = false;
  152. +       }
  153. +      
  154.         if(player.getActiveEnchantItem() != null || player.getActiveEnchantAttrItem() != null)
  155.         {
  156.             player.sendPacket(ActionFailed.STATIC_PACKET);
  157. Index: java/com/l2jserver/gameserver/model/actor/L2Attackable.java
  158. ===================================================================
  159. --- java/com/l2jserver/gameserver/model/actor/L2Attackable.java (revision 5526)
  160. +++ java/com/l2jserver/gameserver/model/actor/L2Attackable.java (working copy)
  161. @@ -718,6 +718,15 @@
  162.                                 exp *= Config.L2JMOD_CHAMPION_REWARDS;
  163.                                 sp *= Config.L2JMOD_CHAMPION_REWARDS;
  164.                             }
  165. +
  166. +                           if (attacker instanceof L2PcInstance)
  167. +                           {
  168. +                               if (((L2PcInstance) attacker)._isexpsprefusal == true)
  169. +                               {
  170. +                                   exp = 0;
  171. +                                   sp = 0;
  172. +                               }
  173. +                           }
  174.                            
  175.                             // Check for an over-hit enabled strike
  176.                             if (attacker instanceof L2PcInstance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement