Jump to content

Recommended Posts

Posted

Here is a new rate to change the drop of normal mobs from boss mobs ( Includes manage the rate of big boss drop jewels! )

 

Index: config/rates.properties
===================================================================
--- config/rates.properties	(revision 5132)
+++ config/rates.properties	(working copy)
@@ -7,8 +7,19 @@
RatePartyXp = 1.
RatePartySp = 1.
RateDropAdena = 1.
+# Adane Drop Rate For Raidboss,Boss
+RateDropAdenaBoss = 1.
+RateDropAdenaRaid = 1.
RateDropItems = 1.
+# Item Drop Rate For Raidboss,Boss
+RateDropItemsBoss = 1.
+RateDropItemsRaid = 1.
+# Jewels Drop Rate For Boss Jewels
+RateDropItemsJewel = 1.
RateDropSpoil = 1.
+# Spoil Rate For Raidboss,Boss
+RateDropSpoilRaid = 1.
+RateDropSpoilBoss = 1.
RateDropManor = 1
# Fishing rates
RateExtractFish = 1
Index: src/main/java/com/l2jfree/Config.java
===================================================================
--- src/main/java/com/l2jfree/Config.java	(revision 5132)
+++ src/main/java/com/l2jfree/Config.java	(working copy)
@@ -450,13 +450,24 @@
	public static float			RATE_QUESTS_REWARD_ADENA;
	public static float			RATE_QUESTS_REWARD_ITEMS;
	public static float			RATE_DROP_ADENA;
+	// Adane Drop Rate For Raidboss,Boss
+	public static float         RATE_DROP_ADENA_RAID;
+    public static float         RATE_DROP_ADENA_BOSS;
	public static float			RATE_CONSUMABLE_COST;
	public static float			RATE_CRAFT_COST;
	public static int			RATE_MASTERWORK;
	public static int			RATE_CRITICAL_CRAFT_CHANCE;
	public static int			RATE_CRITICAL_CRAFT_MULTIPLIER;
	public static float			RATE_DROP_ITEMS;
+	// Item Drop Rate For Raidboss,Boss
+    public static float         RATE_DROP_ITEMS_BOSS;
+    public static float         RATE_DROP_ITEMS_RAID;
+    // Jewels Drop Rate For Boss Jewels
+    public static float         RATE_DROP_ITEMS_JEWEL;
	public static float			RATE_DROP_SPOIL;
+	// Spoil Rate For Raidboss,Boss
+    public static float         RATE_DROP_SPOIL_BOSS;
+    public static float         RATE_DROP_SPOIL_RAID;
	public static int			RATE_DROP_MANOR;
	public static float			RATE_DROP_QUEST;
	public static int			RATE_EXTR_FISH;
@@ -512,13 +523,24 @@
			RATE_QUESTS_REWARD_ITEMS = Float.parseFloat(ratesSettings.getProperty("RateQuestsRewardItems", "1."));

			RATE_DROP_ADENA = Float.parseFloat(ratesSettings.getProperty("RateDropAdena", "1."));
+			// Adane Drop Rate For Raidboss,Boss 
+            RATE_DROP_ADENA_BOSS = Float.parseFloat(ratesSettings.getProperty("RateDropAdenaBoss", "1."));
+	        RATE_DROP_ADENA_RAID = Float.parseFloat(ratesSettings.getProperty("RateDropAdenaRaid", "1."));
			RATE_CONSUMABLE_COST = Float.parseFloat(ratesSettings.getProperty("RateConsumableCost", "1."));
			RATE_CRAFT_COST = Float.parseFloat(ratesSettings.getProperty("RateCraftCost", "1."));
			RATE_MASTERWORK = Integer.parseInt(ratesSettings.getProperty("RateMasterwork", "20"));
			RATE_CRITICAL_CRAFT_CHANCE = Integer.parseInt(ratesSettings.getProperty("RateCriticalCraftChance", "5"));
			RATE_CRITICAL_CRAFT_MULTIPLIER = Integer.parseInt(ratesSettings.getProperty("RateCriticalCraftMutliplier", "2"));
			RATE_DROP_ITEMS = Float.parseFloat(ratesSettings.getProperty("RateDropItems", "1."));
+			// Item Drop Rate For Raidboss,Boss				
+	        RATE_DROP_ITEMS_RAID = Float.parseFloat(ratesSettings.getProperty("RateDropItemsRaid", "1."));
+	        RATE_DROP_ITEMS_BOSS = Float.parseFloat(ratesSettings.getProperty("RateDropItemsBoss", "1."));
+    	    // Jewels Drop Rate For Boss Jewels    
+            RATE_DROP_ITEMS_JEWEL = Float.parseFloat(ratesSettings.getProperty("RateDropItemsJewels", "1."));
			RATE_DROP_SPOIL = Float.parseFloat(ratesSettings.getProperty("RateDropSpoil", "1."));
+			// Spoil Rate For Raidboss,Boss
+	        RATE_DROP_SPOIL_BOSS = Float.parseFloat(ratesSettings.getProperty("RateDropSpoilBoss", "1."));
+	        RATE_DROP_SPOIL_RAID = Float.parseFloat(ratesSettings.getProperty("RateDropSpoilRaid", "1."));
			RATE_DROP_MANOR = Integer.parseInt(ratesSettings.getProperty("RateDropManor", "1"));
			RATE_DROP_QUEST = Float.parseFloat(ratesSettings.getProperty("RateDropQuest", "1."));
			RATE_EXTR_FISH = Integer.parseInt(ratesSettings.getProperty("RateExtractFish", "1"));
@@ -3259,12 +3281,30 @@
			RATE_QUESTS_REWARD_ITEMS = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropAdena"))
			RATE_DROP_ADENA = Float.parseFloat(pValue);
+		// Adane Drop Rate For Raidboss,Boss
+        else if (pName.equalsIgnoreCase("RateDropAdenaBoss"))
+		    RATE_DROP_ADENA_BOSS = Float.parseFloat(pValue);
+	    else if (pName.equalsIgnoreCase("RateDropAdenaRaid"))
+		    RATE_DROP_ADENA_RAID = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateConsumableCost"))
			RATE_CONSUMABLE_COST = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropItems"))
			RATE_DROP_ITEMS = Float.parseFloat(pValue);
+		// Item Drop Rate For Raidboss,Boss
+        else if (pName.equalsIgnoreCase("RateDropItemsBoss")) 
+		    RATE_DROP_ITEMS_BOSS = Float.parseFloat(pValue);
+        else if (pName.equalsIgnoreCase("RateDropItemsRaid")) 
+		    RATE_DROP_ITEMS_RAID = Float.parseFloat(pValue);
+	    // Jewels Drop Rate For Boss Jewels
+	    else if (pName.equalsIgnoreCase("RateDropItemsJewels")) 
+		    RATE_DROP_ITEMS_JEWEL = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropSpoil"))
			RATE_DROP_SPOIL = Float.parseFloat(pValue);
+		// Spoil Rate For Raidboss,Boss
+        else if (pName.equalsIgnoreCase("RateDropSpoilBoss")) 
+		    RATE_DROP_SPOIL_BOSS = Float.parseFloat(pValue);
+	    else if (pName.equalsIgnoreCase("RateDropSpoilRaid")) 
+		    RATE_DROP_SPOIL_RAID = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropManor"))
			RATE_DROP_MANOR = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("RateDropQuest"))
Index: src/main/java/com/l2jfree/gameserver/model/L2Attackable.java
===================================================================
--- src/main/java/com/l2jfree/gameserver/model/L2Attackable.java	(revision 5132)
+++ src/main/java/com/l2jfree/gameserver/model/L2Attackable.java	(working copy)
@@ -37,12 +37,14 @@
import com.l2jfree.gameserver.datatables.EventDroplist.DateDrop;
import com.l2jfree.gameserver.instancemanager.CursedWeaponsManager;
import com.l2jfree.gameserver.model.actor.instance.L2ChestInstance;
+import com.l2jfree.gameserver.model.actor.instance.L2GrandBossInstance;
import com.l2jfree.gameserver.model.actor.instance.L2MinionInstance;
import com.l2jfree.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jfree.gameserver.model.actor.instance.L2NpcInstance;
import com.l2jfree.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfree.gameserver.model.actor.instance.L2PetInstance;
import com.l2jfree.gameserver.model.actor.instance.L2PlayableInstance;
+import com.l2jfree.gameserver.model.actor.instance.L2RaidBossInstance;
import com.l2jfree.gameserver.model.actor.instance.L2SiegeGuardInstance;
import com.l2jfree.gameserver.model.actor.instance.L2SummonInstance;
import com.l2jfree.gameserver.model.actor.knownlist.AttackableKnownList;
@@ -1257,12 +1259,25 @@
		}

		// Applies Drop rates
-		if (drop.getItemId() == 57)
-			dropChance *= Config.RATE_DROP_ADENA;
-		else if (isSweep)
-			dropChance *= Config.RATE_DROP_SPOIL;
-		else
-			dropChance *= Config.RATE_DROP_ITEMS;
+        if (drop.getItemId() == 57)
+        {
+        	if (this instanceof L2RaidBossInstance) dropChance *= Config.RATE_DROP_ADENA_RAID; //other raid boss
+        	else if (this instanceof L2GrandBossInstance) dropChance *= Config.RATE_DROP_ADENA_BOSS; //Baium , Antharas , Valakas.....
+        	else dropChance *= Config.RATE_DROP_ADENA;
+        }
+        else if (isSweep)
+        {
+        	if (this instanceof L2RaidBossInstance) dropChance *= Config.RATE_DROP_SPOIL_RAID;
+        	else if (this instanceof L2GrandBossInstance) dropChance *= Config.RATE_DROP_SPOIL_BOSS;
+        	else dropChance *= Config.RATE_DROP_SPOIL;
+        }
+        else
+        {
+        	if (drop.getItemId() == 6656 || drop.getItemId() == 6657 || drop.getItemId() == 6658 || drop.getItemId() == 6659 || drop.getItemId() == 6660 || drop.getItemId() == 6661 || drop.getItemId() == 6662 || drop.getItemId() == 8191 ) dropChance *= Config.RATE_DROP_ITEMS_JEWEL;
+        	else if (this instanceof L2RaidBossInstance) dropChance *= Config.RATE_DROP_ITEMS_RAID;
+        	else if (this instanceof L2GrandBossInstance) dropChance *= Config.RATE_DROP_ITEMS_BOSS;
+        	else dropChance *= Config.RATE_DROP_ITEMS;
+        }

		// Round drop chance
		dropChance = Math.round(dropChance) * champRate;
@@ -1354,7 +1369,9 @@
			categoryDropChance = ((categoryDropChance - ((categoryDropChance * levelModifier) / 100)) / deepBlueDrop);

		// Applies Drop rates
-		categoryDropChance *= Config.RATE_DROP_ITEMS;
+        if (this instanceof L2RaidBossInstance) categoryDropChance *= Config.RATE_DROP_ITEMS_RAID;
+        else if (this instanceof L2GrandBossInstance) categoryDropChance *= Config.RATE_DROP_ITEMS_BOSS;
+        else categoryDropChance *= Config.RATE_DROP_ITEMS;

		// Round drop chance
		categoryDropChance = Math.round(categoryDropChance);
@@ -1399,10 +1416,20 @@
			}

			int dropChance = drop.getChance();
-			if (drop.getItemId() == 57)
-				dropChance *= Config.RATE_DROP_ADENA;
-			else
-				dropChance *= Config.RATE_DROP_ITEMS;
+            dropChance *= champRate;
+            if (drop.getItemId() == 57)
+            {	
+              if (this instanceof L2RaidBossInstance) dropChance *= Config.RATE_DROP_ADENA_RAID;
+              else if (this instanceof L2GrandBossInstance) dropChance *= Config.RATE_DROP_ADENA_BOSS;
+              else dropChance *= Config.RATE_DROP_ADENA;
+            }
+            	  else
+            {
+              if (drop.getItemId() == 6656 || drop.getItemId() == 6657 || drop.getItemId() == 6658 || drop.getItemId() == 6659 || drop.getItemId() == 6660 || drop.getItemId() == 6661 || drop.getItemId() == 6662 || drop.getItemId() == 8191 ) dropChance *= Config.RATE_DROP_ITEMS_JEWEL;
+              else if (this instanceof L2RaidBossInstance) dropChance *= Config.RATE_DROP_ITEMS_RAID;
+              else if (this instanceof L2GrandBossInstance) dropChance *= Config.RATE_DROP_ITEMS_BOSS;
+              else dropChance *= Config.RATE_DROP_ITEMS;
+            }

			dropChance = Math.round(dropChance) * champRate;

 

Works fine in L2jFree 1.2.11

Guest
This topic is now closed to further replies.
×
×
  • Create New...