Jump to content
  • 0

[HELP] How to limit the Atk speed and Cast speed on my server?


Question

Posted

The Atk speed and casting speed is getting really high because of buffs and custom and I want to make it max 1800 or something.

 

I already edited altsettings.properties and changed

MaxPAtkSpeed=1700

MaxMAtkSpeed=1800

 

BUT it still doesn't work :(, how to fix this ?

 

Server is interlude

4 answers to this question

Recommended Posts

  • 0
Posted

The Atk speed and casting speed is getting really high because of buffs and custom and I want to make it max 1800 or something.

 

I already edited altsettings.properties and changed

MaxPAtkSpeed=1700

MaxMAtkSpeed=1800

 

BUT it still doesn't work :(, how to fix this ?

 

Server is interlude

if you add speed on customs or tattos then edit there.

  • 0
Posted

Eh I am interested in making a max atk speed...removing stats from the custom would hurt other classes too, not all classes reach same atk speed.

  • 0
Posted
Index: config/l2jmods.properties
===================================================================
@@ -5,2 +5,8 @@
# PK Announcements:
AnnouncePk = True
+
+# Maximum Attack Speed 0
+MaxAttackSpeed = 1200
+
+# Maximum Casting Speed 0
+MaxCastingSpeed = 1400
Index: java/net/sf/l2j/Config.java
===================================================================
@@ -954,4 +954,6 @@
	public static boolean ENCHANT_BREAK_ARMOR_CRYSTAL;
	public static boolean ENCHANT_BREAK_ARMOR_BLESSED;
+    public static int MAX_PATK_SPEED;
+    public static int MAX_MATK_SPEED;
     
	/** ************************************************* **/
@@ -1897,4 +1899,6 @@

                 ALT_ANNOUNCE_PK = Boolean.parseBoolean(L2JModSettings.getProperty("AnnouncePk", "False"));
+        		MAX_PATK_SPEED = Integer.parseInt(L2JModSettings.getProperty("MaxAttackSpeed", "0"));
+        		MAX_MATK_SPEED = Integer.parseInt(L2JModSettings.getProperty("MaxCastingSpeed", "0"));
                 
             }
@@ -2445,5 +2449,7 @@
         else if (pName.equalsIgnoreCase("ChampionRewardItemID")) L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue);
         else if (pName.equalsIgnoreCase("ChampionRewardItemQty")) L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue);
-
+        else if (pName.equalsIgnoreCase("MaxAttackSpeed")) MAX_PATK_SPEED = Integer.parseInt(pValue);
+        else if (pName.equalsIgnoreCase("MaxCastingSpeed")) MAX_MATK_SPEED = Integer.parseInt(pValue);
+        
         // L2JMOD Wedding System
         else if (pName.equalsIgnoreCase("AllowWedding")) L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue);
@@ -2461,5 +2467,5 @@
         else if (pName.equalsIgnoreCase("TvTEventRunningTime")) TVT_EVENT_RUNNING_TIME = Integer.parseInt(pValue);
         else if (pName.equalsIgnoreCase("TvTEventParticipationNpcId")) TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(pValue);
-
+        
         // PvP settings
         else if (pName.equalsIgnoreCase("MinKarma")) KARMA_MIN_KARMA = Integer.parseInt(pValue);
Index: java/net/sf/l2j/gameserver/model/L2Character.java
===================================================================
@@ -6446,5 +6446,29 @@
	public final int getMaxCp() { return getStat().getMaxCp(); }
	public int getMAtk(L2Character target, L2Skill skill) { return getStat().getMAtk(target, skill); }
-	public int getMAtkSpd() { return getStat().getMAtkSpd(); }
+	public final int getMAtkSps(L2Character target, L2Skill skill)
+	{
+		int matk = (int)calcStat(Stats.MAGIC_ATTACK, _template.baseMAtk, target, skill); 
+		L2ItemInstance weaponInst = getActiveWeaponInstance();
+		if (weaponInst != null)
+		{
+			if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
+				matk *= 4;
+			else if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT)
+				matk *= 2;
+		}
+		return matk;
+	}
+
+	public int getMAtkSpd()
+	{
+		int _matkspd = getStat().getMAtkSpd();
+		if (Config.MAX_MATK_SPEED > 0)
+		{
+			if (_matkspd > Config.MAX_MATK_SPEED)
+				return Config.MAX_MATK_SPEED;
+		}
+		return _matkspd;
+	}
+
	public int getMaxMp() { return getStat().getMaxMp(); }
	public int getMaxHp() { return getStat().getMaxHp(); }
@@ -6468,5 +6492,15 @@
     public double getPDefGiants(L2Character target) { return getStat().getPDefGiants(target); }
     
-    public int getPAtkSpd() { return getStat().getPAtkSpd(); }
+	public int getPAtkSpd()
+	{
+		int _patkspd = getStat().getPAtkSpd();
+		if (Config.MAX_PATK_SPEED > 0)
+		{
+			if (_patkspd > Config.MAX_PATK_SPEED)
+				return Config.MAX_PATK_SPEED;
+		}
+		return _patkspd;
+	}
+    
	public double getPAtkUndead(L2Character target) { return getStat().getPAtkUndead(target); }
	public double getPDefUndead(L2Character target) { return getStat().getPDefUndead(target); }

Guest
This topic is now closed to further replies.


×
×
  • Create New...