Jump to content

Recommended Posts

Posted

Hello Max Cheaters,

Here is my first Script, so please don't call me noob.

 

Is a simple script, based on Big Regen in Peace Zones, By Leeroy.

 

Index: /L2_GameServer/java/config/L2jLive.properties
===================================================================
--- /L2_GameServer/java/config/L2jLive.properties (revision 17)
+++ /L2_GameServer/java/config/L2jLive.properties (revision 22)
@@ -15,4 +15,19 @@
+# Enable Regen System in Towns? 
+# Original By Leeroy and Reworked By K4N4BS for L2jLive.
+# Default: False
+AllowRegenSystemInTown = False
+
+# Regen Settings:
+# NOTE:
+# If you set this 0, players will not regen in Towns.
+# If you set this under 1.0 players will have Less Regen.
+# If you set this over 1.0 players will have More Regen.
+# If you set this 1.0 nothing will Happen.
+# Default: 1.0
+RegenSystemInTownCP = 1.0
+RegenSystemInTownHP = 1.0
+RegenSystemInTownMP = 1.0

Index: /L2_GameServer/java/net/sf/l2j/gameserver/skills/Formulas.java
===================================================================
--- /L2_GameServer/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 1)
+++ /L2_GameServer/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 22)
@@ -1040,4 +1040,6 @@
			// Mother Tree effect is calculated at last
			if (player.isInsideZone(L2Character.ZONE_MOTHERTREE)) hpRegenBonus += 2;
+			
+			if (Config.ALLOW_REGEN_SYSTEM && player.isInsideZone(L2Character.ZONE_PEACE)) hpRegenMultiplier *= (Config.REGEN_SYSTEM_HP);

            // Calculate Movement bonus
@@ -1118,5 +1120,7 @@
            else if (!player.isMoving()) mpRegenMultiplier *= 1.1; // Staying
            else if (player.isRunning()) mpRegenMultiplier *= 0.7; // Running
+            
+            if (Config.ALLOW_REGEN_SYSTEM && player.isInsideZone(L2Character.ZONE_PEACE)) mpRegenMultiplier *= (Config.REGEN_SYSTEM_MP);
+            
            // Add MEN bonus
            init *= cha.getLevelMod() * MENbonus[cha.getMEN()];
@@ -1143,4 +1147,6 @@
	        // Calculate correct baseHpReg value for certain level of PC
	        init += (player.getLevel() > 10) ? ((player.getLevel()-1)/10.0) : 0.5;
+	        
+	        if (Config.ALLOW_REGEN_SYSTEM && player.isInsideZone(L2Character.ZONE_PEACE)) cpRegenMultiplier *= (Config.REGEN_SYSTEM_CP);

	        // Calculate Movement bonus
Index: /L2_GameServer/java/net/sf/l2j/Config.java
===================================================================
--- /L2_GameServer/java/net/sf/l2j/Config.java (revision 18)
+++ /L2_GameServer/java/net/sf/l2j/Config.java (revision 22)
@@ -116,4 +116,8 @@
+	public static boolean ALLOW_REGEN_SYSTEM;
+	public static float REGEN_SYSTEM_CP;
+	public static float REGEN_SYSTEM_HP;
+	public static float REGEN_SYSTEM_MP;

	/** ************************************************** **/
@@ -1116,4 +1120,8 @@
+					ALLOW_REGEN_SYSTEM = Boolean.parseBoolean(L2jLiveSettings.getProperty("AllowRegenSystemInTown", "False"));
+					REGEN_SYSTEM_CP = Float.parseFloat(L2jLiveSettings.getProperty("RegenSystemInTownCP", "1.0"));
+					REGEN_SYSTEM_HP = Float.parseFloat(L2jLiveSettings.getProperty("RegenSystemInTownHP", "1.0"));
+					REGEN_SYSTEM_MP = Float.parseFloat(L2jLiveSettings.getProperty("RegenSystemInTownMP", "1.0"));

 

Credits: Leeroy

Re-Worked By: K4N4BS, L2jLive Team.

 

And a Big Thanks to Leeroy.

  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock