Jump to content

Recommended Posts

Posted

My Next Share, Config for RaidBoss Drop Change.

 

Patch:

Index: D:/Workspace/GameServer_Clean/java/config/rates.properties
===================================================================
--- D:/Workspace/GameServer_Clean/java/config/rates.properties (revision 666)
+++ D:/Workspace/GameServer_Clean/java/config/rates.properties (working copy)
@@ -17,6 +17,18 @@
RateQuestsReward = 1.
RateKarmaExpLost = 1
RateSiegeGuardsPrice = 1
+#Adena drop chance from Raidboss and Minions
+AdenaBoss = 1.
+AdenaRaid = 1.
+AdenaMinon = 1.
+#Item drop chance from Raidboss and Minions
+ItemsBoss = 1.
+ItemsRaid = 1.
+ItemsMinon = 1.
+#Spoil chance from Raidboss and Minions
+SpoilBoss = 1.
+SpoilRaid = 1.
+SpoilMinon = 1.

# Player Drop Rate control, values are the percent values
PlayerDropLimit = 0
Index: D:/Workspace/GameServer_Clean/java/net/sf/l2j/Config.java
===================================================================
--- D:/Workspace/GameServer_Clean/java/net/sf/l2j/Config.java 
+++ D:/Workspace/GameServer_Clean/java/net/sf/l2j/Config.java (working copy)
@@ -388,6 +388,19 @@
public static float RATE_DROP_ITEMS;
/** Rate for spoiled items */
public static float RATE_DROP_SPOIL;
+ /**Raids Config */
+ //ADENA BOSS
+ public static float ADENA_BOSS;
+ public static float ADENA_RAID;
+ public static float ADENA_MINON;
+ //ITEMS BOSS
+ public static float ITEMS_BOSS;
+ public static float ITEMS_RAID;
+ public static float ITEMS_MINON;
+ //SPOIL BOSS
+ public static float SPOIL_BOSS;
+ public static float SPOIL_RAID;
+ public static float SPOIL_MINON;
/** Rate for quest items */
public static float RATE_DROP_QUEST;
/** Rate for karma and experience lose */
@@ -1416,6 +1429,18 @@
RATE_CONSUMABLE_COST = Float.parseFloat(ratesSettings.getProperty("RateConsumableCost", "1."));
RATE_DROP_ITEMS = Float.parseFloat(ratesSettings.getProperty("RateDropItems", "1."));
RATE_DROP_SPOIL = Float.parseFloat(ratesSettings.getProperty("RateDropSpoil", "1."));
+ //ADENA BOSS
+ ADENA_BOSS = Float.parseFloat(ratesSettings.getProperty("AdenaBoss", "1."));
+ ADENA_RAID = Float.parseFloat(ratesSettings.getProperty("AdenaRaid", "1."));
+ ADENA_MINON = Float.parseFloat(ratesSettings.getProperty("AdenaMinon", "1."));
+ //ITEMS BOSS
+ ITEMS_BOSS = Float.parseFloat(ratesSettings.getProperty("ItemsBoss", "1."));
+ ITEMS_RAID = Float.parseFloat(ratesSettings.getProperty("ItemsRaid", "1."));
+ ITEMS_MINON = Float.parseFloat(ratesSettings.getProperty("ItemsMinon", "1."));
+ //SPOIL BOSS
+ SPOIL_BOSS = Float.parseFloat(ratesSettings.getProperty("SpoilBoss", "1."));
+ SPOIL_RAID = Float.parseFloat(ratesSettings.getProperty("SpoilRaid", "1."));
+ SPOIL_MINON = Float.parseFloat(ratesSettings.getProperty("SpoilMinon", "1."));
RATE_BOX_SPAWN = Integer.parseInt(ratesSettings.getProperty("RateBoxSpawn","20"));
RATE_DROP_QUEST = Float.parseFloat(ratesSettings.getProperty("RateDropQuest", "1."));
RATE_KARMA_EXP_LOST = Float.parseFloat(ratesSettings.getProperty("RateKarmaExpLost", "1.")); 
@@ -1821,6 +1846,18 @@
else if (pName.equalsIgnoreCase("RateConsumableCost")) RATE_CONSUMABLE_COST = Float.parseFloat(pValue);
else if (pName.equalsIgnoreCase("RateDropItems")) RATE_DROP_ITEMS = Float.parseFloat(pValue);
else if (pName.equalsIgnoreCase("RateDropSpoil")) RATE_DROP_SPOIL = Float.parseFloat(pValue);
+ //ADENA BOSS
+ else if (pName.equalsIgnoreCase("AdenaBoss")) ADENA_BOSS = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("AdenaRaid")) ADENA_RAID = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("AdenaMinon")) ADENA_MINON = Float.parseFloat(pValue);
+ //ADENA BOSS
+ else if (pName.equalsIgnoreCase("ItemsBoss")) ITEMS_BOSS = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("ItemsRaid")) ITEMS_RAID = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("ItemsMinon")) ITEMS_MINON = Float.parseFloat(pValue);
+ //ADENA BOSS
+ else if (pName.equalsIgnoreCase("SpoilBoss")) SPOIL_BOSS = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("SpoilRaid")) SPOIL_RAID = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("SpoilMinon")) SPOIL_MINON = Float.parseFloat(pValue);
else if (pName.equalsIgnoreCase("RateBoxSpawn")) RATE_BOX_SPAWN = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("RateDropQuest")) RATE_DROP_QUEST = Float.parseFloat(pValue);
else if (pName.equalsIgnoreCase("RateKarmaExpLost")) RATE_KARMA_EXP_LOST = Float.parseFloat(pValue);

Index: D:/Workspace/GameServer_Clean/java/net/sf/l2j/gameserver/model/L2Attackable.java
===================================================================
--- D:/Workspace/GameServer_Clean/java/net/sf/l2j/gameserver/model/L2Attackable.java 
+++ D:/Workspace/GameServer_Clean/java/net/sf/l2j/gameserver/model/L2Attackable.java (working copy)
@@ -45,7 +45,8 @@
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
-import net.sf.l2j.gameserver.model.actor.instance.L2RaidBossInstance;
+import net.sf.l2j.gameserver.model.actor.instance.L2BossInstance; // Boss rate drops
+import net.sf.l2j.gameserver.model.actor.instance.L2RaidBossInstance; // Boss rate drops
import net.sf.l2j.gameserver.model.actor.instance.L2SiegeGuardInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
import net.sf.l2j.gameserver.model.actor.knownlist.AttackableKnownList;
@@ -952,9 +953,28 @@
if (Config.DEEPBLUE_DROP_RULES) dropChance = ((drop.getChance() - ((drop.getChance() * levelModifier)/100)) / deepBlueDrop);

// 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;
+ /**Raids Config */
+ if (drop.getItemId() == 57)
+ {
+ if (this instanceof L2RaidBossInstance) dropChance *= Config.ADENA_RAID;
+ else if (this instanceof L2BossInstance) dropChance *= Config.ADENA_BOSS;
+ else if (this instanceof L2MinionInstance) dropChance *= Config.ADENA_MINON;
+ else dropChance *= Config.RATE_DROP_ADENA;
+ }
+ else if (isSweep)
+ {
+ if (this instanceof L2RaidBossInstance) dropChance *= Config.SPOIL_RAID;
+ else if (this instanceof L2BossInstance) dropChance *= Config.SPOIL_BOSS;
+ else if (this instanceof L2MinionInstance) dropChance *= Config.SPOIL_MINON;
+ else dropChance *= Config.RATE_DROP_SPOIL;
+ }
+ else
+ {
+ if (this instanceof L2RaidBossInstance) dropChance *= Config.ITEMS_RAID;
+ else if (this instanceof L2BossInstance) dropChance *= Config.ITEMS_BOSS;
+ else if (this instanceof L2MinionInstance) dropChance *= Config.ITEMS_MINON;
+ else dropChance *= Config.RATE_DROP_ITEMS;
+ } 

// Round drop chance
dropChance = Math.round(dropChance);
@@ -1035,7 +1055,11 @@
if (Config.DEEPBLUE_DROP_RULES) categoryDropChance = ((categoryDropChance - ((categoryDropChance * levelModifier)/100)) / deepBlueDrop);

// Applies Drop rates
- categoryDropChance *= Config.RATE_DROP_ITEMS;
+ /**Raids Config */
+ if (this instanceof L2RaidBossInstance) categoryDropChance *= Config.ITEMS_RAID;
+ else if (this instanceof L2BossInstance) categoryDropChance *= Config.ITEMS_BOSS;
+ else if (this instanceof L2MinionInstance) categoryDropChance *= Config.ITEMS_MINON;
+ else categoryDropChance *= Config.RATE_DROP_ITEMS;

// Round drop chance
categoryDropChance = Math.round(categoryDropChance);
@@ -1063,8 +1087,21 @@
// if smaller.

int dropChance = drop.getChance();
- if (drop.getItemId() == 57) dropChance *= Config.RATE_DROP_ADENA;
- else dropChance *= Config.RATE_DROP_ITEMS;
+ /**Raids Config */
+ if (drop.getItemId() == 57)
+ { 
+ if (this instanceof L2RaidBossInstance) dropChance *= Config.ADENA_RAID;
+ else if (this instanceof L2BossInstance) dropChance *= Config.ADENA_BOSS;
+ else if (this instanceof L2MinionInstance) dropChance *= Config.ADENA_MINON;
+ else dropChance *= Config.RATE_DROP_ADENA;
+ }
+ else
+ {
+ if (this instanceof L2RaidBossInstance) dropChance *= Config.ITEMS_RAID;
+ else if (this instanceof L2BossInstance) dropChance *= Config.ITEMS_BOSS;
+ else if (this instanceof L2MinionInstance) dropChance *= Config.ITEMS_MINON;
+ else dropChance *= Config.RATE_DROP_ITEMS;
+ }

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