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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...