L2JMobius

High Five Help by adding Drop Runes !

oRiGiNaL · 32 · 2813

Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
Hello, as title says, how i can add Drop Runes amount + chance? If here exist a topic with this, i would like to see it, if not, i am able to pay someone to make it ! Thank you !


Offline SavitarGodOfSpeed

  • Baron
  • *****
    • Posts: 211
  • Here to gain knowledge
No need to pay someone for such an easy task mate.

Just search for "Maphr Runes" in the Alt + G menu and you will find a lot. There are a lot of drop chance, drop amount, exp/sp runes in the data base.

If you cannot find anything in H5 because is an old client (which I HIGHLY doubt it) then go on a most recent chronicle like for example MasterClass3 search in there and just copy paste it.

As someone wise once said in discord, "developing is search, Search, Then Search, and finally search some more"


Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
Thank you for your reply. But i don;t know how to import frrom newer pack to hi5. I would like to get help in this too. Alot of variables etc etc can be added/changed and i don;t want to do wrong edits. thank you !


Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
I did something, but i get few errors in Stat.java in AbstractStatPercentEffect.java and in AbstractStatAddEffect

https://prnt.sc/6zFiB6-j2p-J
https://prnt.sc/Jct78jS4Zjp1
https://prnt.sc/3HJZ0ve5vMWx
I need help in all this 3 classes. Thank you !


Offline SavitarGodOfSpeed

  • Baron
  • *****
    • Posts: 211
  • Here to gain knowledge
Thank you for your reply. But i don;t know how to import frrom newer pack to hi5. I would like to get help in this too. Alot of variables etc etc can be added/changed and i don;t want to do wrong edits. thank you !


Wait high5 doesn't have Exp/Sp, Drop chance, Drap rate runes?

No way if you have told me for a chronicle like old Interlude then yeah probably you are correct. But for H5 there should be a rune


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16124
Here we go again...
https://l2jmobius.org/forum/index.php?topic=4883

Code: [Select]
Index: dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java
===================================================================
--- dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java (revision 12883)
+++ dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java (working copy)
@@ -300,6 +300,7 @@
  final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
  int leftHeight = 0;
  int rightHeight = 0;
+ final double dropRateEffectBonus = player.getStat().getBonusDropRateMultiplier();
  final StringBuilder leftSb = new StringBuilder();
  final StringBuilder rightSb = new StringBuilder();
  String limitReachedMsg = "";
@@ -398,6 +399,8 @@
  rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
  }
  }
+ // bonus drop rate effect
+ rateChance *= dropRateEffectBonus;
  }
 
  sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
Index: dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java
===================================================================
--- dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java (revision 12883)
+++ dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java (working copy)
@@ -179,6 +179,7 @@
  final int start = (page - 1) * 14;
  final int end = Math.min(list.size() - 1, start + 14);
  final StringBuilder builder = new StringBuilder();
+ final double dropRateEffectBonus = player.getStat().getBonusDropRateMultiplier();
  for (int index = start; index <= end; index++)
  {
  final CBDropHolder cbDropHolder = list.get(index);
@@ -272,6 +273,8 @@
  rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
  }
  }
+ // bonus drop rate effect
+ rateChance *= dropRateEffectBonus;
  }
 
  builder.append("<tr>");
Index: dist/game/data/stats/skills/08400-08499.xml
===================================================================
--- dist/game/data/stats/skills/08400-08499.xml (revision 12883)
+++ dist/game/data/stats/skills/08400-08499.xml (working copy)
@@ -427,10 +427,16 @@
  </skill>
  <skill id="8415" levels="5" name="Ring Ability - Drop Rate Up">
  <!-- Increases item drop rate. -->
+ <table name="#bonusDropRate">10 20 30 40 50</table>
  <set name="icon" val="icon.skill3080" />
  <set name="magicLevel" val="85" />
  <set name="operateType" val="P" />
- <set name="targetType" val="NONE" />
+ <set name="targetType" val="SELF" />
+ <for>
+ <effect name="Buff">
+ <add stat="bonusDropRate" val="#bonusDropRate" />
+ </effect>
+ </for>
  </skill>
  <skill id="8416" levels="5" name="Earring Ability - Drop Rate Up">
  <!-- Increases item drop rate. -->
Index: dist/game/data/xsd/skills.xsd
===================================================================
--- dist/game/data/xsd/skills.xsd (revision 12883)
+++ dist/game/data/xsd/skills.xsd (working copy)
@@ -413,9 +413,10 @@
  <xs:enumeration value="waterPower" />
  <xs:enumeration value="windPower" />
  <xs:enumeration value="firePower" />
- <xs:enumeration value="bonusSp" />
  <xs:enumeration value="defCritRateAdd" />
  <xs:enumeration value="bonusExp" />
+ <xs:enumeration value="bonusSp" />
+ <xs:enumeration value="bonusDropRate" />
  <xs:enumeration value="pvePhysDmg" />
  <xs:enumeration value="pvePhysSkillsDmg" />
  <xs:enumeration value="pveBowDmg" />
Index: java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java (working copy)
@@ -944,4 +944,9 @@
 
  return bonus;
  }
+
+ public double getBonusDropRateMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_DROP_RATE, 0, null, null) / 100);
+ }
 }
Index: java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (working copy)
@@ -755,6 +755,11 @@
  rateChance *= Config.PREMIUM_RATE_DROP_CHANCE;
  }
  }
+ // bonus drop rate effect
+ if (killer.getActingPlayer() != null)
+ {
+ rateChance *= killer.getActingPlayer().getStat().getBonusDropRateMultiplier();
+ }
 
  // only use total chance on x1, custom rates break this logic because total chance is more than 100%
  if (rateChance == 1)
@@ -1109,6 +1114,12 @@
  }
  }
 
+ // bonus drop rate effect
+ if (killer.getActingPlayer() != null)
+ {
+ rateChance *= killer.getActingPlayer().getStat().getBonusDropRateMultiplier();
+ }
+
  // calculate if item will drop
  if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
  {
Index: java/org/l2jmobius/gameserver/model/stats/Stat.java
===================================================================
--- java/org/l2jmobius/gameserver/model/stats/Stat.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/stats/Stat.java (working copy)
@@ -88,6 +88,7 @@
  EXPSP_RATE("rExp"),
  BONUS_EXP("bonusExp"),
  BONUS_SP("bonusSp"),
+ BONUS_DROP_RATE("bonusDropRate"),
  ATTACK_CANCEL("cancel"),
 
  // ACCURACY & RANGE


Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
This i was looking Mobius, thank you for your answer ! But this do refference to amount + chance? Becasue i want to make it individual. Amount runes and Chance runes.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16124
Added new stats:
bonusDropAdena
bonusDropAmount
bonusDropRate
bonusSpoilRate

Same thing I did for skill 8415.
Code: [Select]
Index: dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java
===================================================================
--- dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java (revision 12883)
+++ dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java (working copy)
@@ -38,6 +38,7 @@
 import org.l2jmobius.gameserver.model.holders.DropGroupHolder;
 import org.l2jmobius.gameserver.model.holders.DropHolder;
 import org.l2jmobius.gameserver.model.item.ItemTemplate;
+import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
 import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
 import org.l2jmobius.gameserver.util.HtmlUtil;
 import org.l2jmobius.gameserver.util.Util;
@@ -300,6 +301,10 @@
  final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
  int leftHeight = 0;
  int rightHeight = 0;
+ final double dropAmountAdenaEffectBonus = player.getStat().getBonusDropAdenaMultiplier();
+ final double dropAmountEffectBonus = player.getStat().getBonusDropAmountMultiplier();
+ final double dropRateEffectBonus = player.getStat().getBonusDropRateMultiplier();
+ final double spoilRateEffectBonus = player.getStat().getBonusSpoilRateMultiplier();
  final StringBuilder leftSb = new StringBuilder();
  final StringBuilder rightSb = new StringBuilder();
  String limitReachedMsg = "";
@@ -324,6 +329,9 @@
  rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
  rateAmount *= Config.PREMIUM_RATE_SPOIL_AMOUNT;
  }
+
+ // bonus spoil rate effect
+ rateChance *= spoilRateEffectBonus;
  }
  else
  {
@@ -398,6 +406,15 @@
  rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
  }
  }
+
+ // bonus drop amount effect
+ rateAmount *= dropAmountEffectBonus;
+ if (item.getId() == Inventory.ADENA_ID)
+ {
+ rateAmount *= dropAmountAdenaEffectBonus;
+ }
+ // bonus drop rate effect
+ rateChance *= dropRateEffectBonus;
  }
 
  sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
Index: dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java
===================================================================
--- dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java (revision 12883)
+++ dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java (working copy)
@@ -179,6 +179,10 @@
  final int start = (page - 1) * 14;
  final int end = Math.min(list.size() - 1, start + 14);
  final StringBuilder builder = new StringBuilder();
+ final double dropAmountAdenaEffectBonus = player.getStat().getBonusDropAdenaMultiplier();
+ final double dropAmountEffectBonus = player.getStat().getBonusDropAmountMultiplier();
+ final double dropRateEffectBonus = player.getStat().getBonusDropRateMultiplier();
+ final double spoilRateEffectBonus = player.getStat().getBonusSpoilRateMultiplier();
  for (int index = start; index <= end; index++)
  {
  final CBDropHolder cbDropHolder = list.get(index);
@@ -197,6 +201,9 @@
  rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
  rateAmount *= Config.PREMIUM_RATE_SPOIL_AMOUNT;
  }
+
+ // bonus spoil rate effect
+ rateChance *= spoilRateEffectBonus;
  }
  else
  {
@@ -272,6 +279,15 @@
  rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
  }
  }
+
+ // bonus drop amount effect
+ rateAmount *= dropAmountEffectBonus;
+ if (item.getId() == Inventory.ADENA_ID)
+ {
+ rateAmount *= dropAmountAdenaEffectBonus;
+ }
+ // bonus drop rate effect
+ rateChance *= dropRateEffectBonus;
  }
 
  builder.append("<tr>");
Index: dist/game/data/stats/skills/08400-08499.xml
===================================================================
--- dist/game/data/stats/skills/08400-08499.xml (revision 12883)
+++ dist/game/data/stats/skills/08400-08499.xml (working copy)
@@ -427,10 +427,16 @@
  </skill>
  <skill id="8415" levels="5" name="Ring Ability - Drop Rate Up">
  <!-- Increases item drop rate. -->
+ <table name="#bonusDropRate">10 20 30 40 50</table>
  <set name="icon" val="icon.skill3080" />
  <set name="magicLevel" val="85" />
  <set name="operateType" val="P" />
- <set name="targetType" val="NONE" />
+ <set name="targetType" val="SELF" />
+ <for>
+ <effect name="Buff">
+ <add stat="bonusDropRate" val="#bonusDropRate" />
+ </effect>
+ </for>
  </skill>
  <skill id="8416" levels="5" name="Earring Ability - Drop Rate Up">
  <!-- Increases item drop rate. -->
Index: dist/game/data/xsd/skills.xsd
===================================================================
--- dist/game/data/xsd/skills.xsd (revision 12883)
+++ dist/game/data/xsd/skills.xsd (working copy)
@@ -413,9 +413,13 @@
  <xs:enumeration value="waterPower" />
  <xs:enumeration value="windPower" />
  <xs:enumeration value="firePower" />
- <xs:enumeration value="bonusSp" />
  <xs:enumeration value="defCritRateAdd" />
  <xs:enumeration value="bonusExp" />
+ <xs:enumeration value="bonusSp" />
+ <xs:enumeration value="bonusDropAdena" />
+ <xs:enumeration value="bonusDropAmount" />
+ <xs:enumeration value="bonusDropRate" />
+ <xs:enumeration value="bonusSpoilRate" />
  <xs:enumeration value="pvePhysDmg" />
  <xs:enumeration value="pvePhysSkillsDmg" />
  <xs:enumeration value="pveBowDmg" />
Index: java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java (working copy)
@@ -944,4 +944,24 @@
 
  return bonus;
  }
+
+ public double getBonusDropAdenaMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_DROP_ADENA, 0, null, null) / 100);
+ }
+
+ public double getBonusDropAmountMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_DROP_AMOUNT, 0, null, null) / 100);
+ }
+
+ public double getBonusDropRateMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_DROP_RATE, 0, null, null) / 100);
+ }
+
+ public double getBonusSpoilRateMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_SPOIL_RATE, 0, null, null) / 100);
+ }
 }
Index: java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (working copy)
@@ -755,6 +755,11 @@
  rateChance *= Config.PREMIUM_RATE_DROP_CHANCE;
  }
  }
+ // bonus drop rate effect
+ if (killer.getActingPlayer() != null)
+ {
+ rateChance *= killer.getActingPlayer().getStat().getBonusDropRateMultiplier();
+ }
 
  // only use total chance on x1, custom rates break this logic because total chance is more than 100%
  if (rateChance == 1)
@@ -1040,6 +1045,16 @@
  {
  rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
  }
+
+ // bonus drop amount effect
+ if (killer.getActingPlayer() != null)
+ {
+ rateAmount *= killer.getActingPlayer().getStat().getBonusDropAmountMultiplier();
+ if (itemId == Inventory.ADENA_ID)
+ {
+ rateAmount *= killer.getActingPlayer().getStat().getBonusDropAdenaMultiplier();
+ }
+ }
  }
 
  // finally
@@ -1109,6 +1124,12 @@
  }
  }
 
+ // bonus drop rate effect
+ if (killer.getActingPlayer() != null)
+ {
+ rateChance *= killer.getActingPlayer().getStat().getBonusDropRateMultiplier();
+ }
+
  // calculate if item will drop
  if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
  {
@@ -1156,6 +1177,16 @@
  }
  }
 
+ // bonus drop amount effect
+ if (killer.getActingPlayer() != null)
+ {
+ rateAmount *= killer.getActingPlayer().getStat().getBonusDropAmountMultiplier();
+ if (itemId == Inventory.ADENA_ID)
+ {
+ rateAmount *= killer.getActingPlayer().getStat().getBonusDropAdenaMultiplier();
+ }
+ }
+
  // finally
  return new ItemHolder(itemId, (long) (Rnd.get(dropItem.getMin(), dropItem.getMax()) * rateAmount));
  }
@@ -1170,6 +1201,11 @@
  {
  rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
  }
+ // bonus spoil rate effect
+ if (killer.getActingPlayer() != null)
+ {
+ rateChance *= killer.getActingPlayer().getStat().getBonusSpoilRateMultiplier();
+ }
 
  // calculate if item will be rewarded
  if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
Index: java/org/l2jmobius/gameserver/model/stats/Stat.java
===================================================================
--- java/org/l2jmobius/gameserver/model/stats/Stat.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/stats/Stat.java (working copy)
@@ -88,6 +88,10 @@
  EXPSP_RATE("rExp"),
  BONUS_EXP("bonusExp"),
  BONUS_SP("bonusSp"),
+ BONUS_DROP_ADENA("bonusDropAdena"),
+ BONUS_DROP_AMOUNT("bonusDropAmount"),
+ BONUS_DROP_RATE("bonusDropRate"),
+ BONUS_SPOIL_RATE("bonusSpoilRate"),
  ATTACK_CANCEL("cancel"),
 
  // ACCURACY & RANGE


Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
As i see code.
bonusDropAdena his drop it's amount + Chance
bonusDropAmount It's just amount drop
bonusDropRate]bonusDropRate This drop it's amount + chance again
bonusSpoilRate]bonusSpoilRate Spoil amount + chance

I wanted it simple, to specify in xml of skill what player will drop. Chance or Amount so. bonusDropAmount or bonusDropChance

Like this i want. in xml of skill, i want to specify clear what drop player get. Amount or Chance.
Also, thank you for your response !


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16124
These stats exist on newer clients and are sufficient for all runes that exist in game.
bonusDropAdena is bonus drop amount for Adena
bonusDropAmount is bonus drop amount for all drops (including Adena)
bonusDropRate is extra chance for all drops
bonusSpoilRate is extra chance for all spoils

You can use multiple effects on a single skill.

If you want something different, now you have 4 working examples on how to manipulate drop amount and changes.


Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
So bonusDropRate means chance, i didn;t know once it;s not writted in variablee what boost do, but i get it now. Thank you !


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16124
Rate = Chance modifier


*The same patch can be used on CT0, Epilogue and HighFive projects.


Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68

Online Mobius

  • Distinguished King
  • *****
    • Posts: 16124
Cleaned up NpcTemplate a bit.
Code: [Select]
Index: dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java
===================================================================
--- dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java (revision 12883)
+++ dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java (working copy)
@@ -38,6 +38,7 @@
 import org.l2jmobius.gameserver.model.holders.DropGroupHolder;
 import org.l2jmobius.gameserver.model.holders.DropHolder;
 import org.l2jmobius.gameserver.model.item.ItemTemplate;
+import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
 import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
 import org.l2jmobius.gameserver.util.HtmlUtil;
 import org.l2jmobius.gameserver.util.Util;
@@ -300,6 +301,10 @@
  final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
  int leftHeight = 0;
  int rightHeight = 0;
+ final double dropAmountAdenaEffectBonus = player.getStat().getBonusDropAdenaMultiplier();
+ final double dropAmountEffectBonus = player.getStat().getBonusDropAmountMultiplier();
+ final double dropRateEffectBonus = player.getStat().getBonusDropRateMultiplier();
+ final double spoilRateEffectBonus = player.getStat().getBonusSpoilRateMultiplier();
  final StringBuilder leftSb = new StringBuilder();
  final StringBuilder rightSb = new StringBuilder();
  String limitReachedMsg = "";
@@ -324,6 +329,9 @@
  rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
  rateAmount *= Config.PREMIUM_RATE_SPOIL_AMOUNT;
  }
+
+ // bonus spoil rate effect
+ rateChance *= spoilRateEffectBonus;
  }
  else
  {
@@ -398,6 +406,15 @@
  rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
  }
  }
+
+ // bonus drop amount effect
+ rateAmount *= dropAmountEffectBonus;
+ if (item.getId() == Inventory.ADENA_ID)
+ {
+ rateAmount *= dropAmountAdenaEffectBonus;
+ }
+ // bonus drop rate effect
+ rateChance *= dropRateEffectBonus;
  }
 
  sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
Index: dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java
===================================================================
--- dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java (revision 12883)
+++ dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java (working copy)
@@ -179,6 +179,10 @@
  final int start = (page - 1) * 14;
  final int end = Math.min(list.size() - 1, start + 14);
  final StringBuilder builder = new StringBuilder();
+ final double dropAmountAdenaEffectBonus = player.getStat().getBonusDropAdenaMultiplier();
+ final double dropAmountEffectBonus = player.getStat().getBonusDropAmountMultiplier();
+ final double dropRateEffectBonus = player.getStat().getBonusDropRateMultiplier();
+ final double spoilRateEffectBonus = player.getStat().getBonusSpoilRateMultiplier();
  for (int index = start; index <= end; index++)
  {
  final CBDropHolder cbDropHolder = list.get(index);
@@ -197,6 +201,9 @@
  rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
  rateAmount *= Config.PREMIUM_RATE_SPOIL_AMOUNT;
  }
+
+ // bonus spoil rate effect
+ rateChance *= spoilRateEffectBonus;
  }
  else
  {
@@ -272,6 +279,15 @@
  rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
  }
  }
+
+ // bonus drop amount effect
+ rateAmount *= dropAmountEffectBonus;
+ if (item.getId() == Inventory.ADENA_ID)
+ {
+ rateAmount *= dropAmountAdenaEffectBonus;
+ }
+ // bonus drop rate effect
+ rateChance *= dropRateEffectBonus;
  }
 
  builder.append("<tr>");
Index: dist/game/data/stats/skills/08400-08499.xml
===================================================================
--- dist/game/data/stats/skills/08400-08499.xml (revision 12883)
+++ dist/game/data/stats/skills/08400-08499.xml (working copy)
@@ -427,10 +427,16 @@
  </skill>
  <skill id="8415" levels="5" name="Ring Ability - Drop Rate Up">
  <!-- Increases item drop rate. -->
+ <table name="#bonusDropRate">10 20 30 40 50</table>
  <set name="icon" val="icon.skill3080" />
  <set name="magicLevel" val="85" />
  <set name="operateType" val="P" />
- <set name="targetType" val="NONE" />
+ <set name="targetType" val="SELF" />
+ <for>
+ <effect name="Buff">
+ <add stat="bonusDropRate" val="#bonusDropRate" />
+ </effect>
+ </for>
  </skill>
  <skill id="8416" levels="5" name="Earring Ability - Drop Rate Up">
  <!-- Increases item drop rate. -->
Index: dist/game/data/xsd/skills.xsd
===================================================================
--- dist/game/data/xsd/skills.xsd (revision 12883)
+++ dist/game/data/xsd/skills.xsd (working copy)
@@ -413,9 +413,13 @@
  <xs:enumeration value="waterPower" />
  <xs:enumeration value="windPower" />
  <xs:enumeration value="firePower" />
- <xs:enumeration value="bonusSp" />
  <xs:enumeration value="defCritRateAdd" />
  <xs:enumeration value="bonusExp" />
+ <xs:enumeration value="bonusSp" />
+ <xs:enumeration value="bonusDropAdena" />
+ <xs:enumeration value="bonusDropAmount" />
+ <xs:enumeration value="bonusDropRate" />
+ <xs:enumeration value="bonusSpoilRate" />
  <xs:enumeration value="pvePhysDmg" />
  <xs:enumeration value="pvePhysSkillsDmg" />
  <xs:enumeration value="pveBowDmg" />
Index: java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java (working copy)
@@ -944,4 +944,24 @@
 
  return bonus;
  }
+
+ public double getBonusDropAdenaMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_DROP_ADENA, 0, null, null) / 100);
+ }
+
+ public double getBonusDropAmountMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_DROP_AMOUNT, 0, null, null) / 100);
+ }
+
+ public double getBonusDropRateMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_DROP_RATE, 0, null, null) / 100);
+ }
+
+ public double getBonusSpoilRateMultiplier()
+ {
+ return 1 + (calcStat(Stat.BONUS_SPOIL_RATE, 0, null, null) / 100);
+ }
 }
Index: java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (working copy)
@@ -34,6 +34,7 @@
 import org.l2jmobius.gameserver.enums.Sex;
 import org.l2jmobius.gameserver.model.StatSet;
 import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
 import org.l2jmobius.gameserver.model.holders.DropGroupHolder;
 import org.l2jmobius.gameserver.model.holders.DropHolder;
 import org.l2jmobius.gameserver.model.holders.ItemHolder;
@@ -700,6 +701,7 @@
  int dropOccurrenceCounter = victim.isRaid() ? Config.DROP_MAX_OCCURRENCES_RAIDBOSS : Config.DROP_MAX_OCCURRENCES_NORMAL;
  if (dropOccurrenceCounter > 0)
  {
+ final Player player = killer.getActingPlayer();
  List<ItemHolder> randomDrops = null;
  ItemHolder cachedItem = null;
  double totalChance; // total group chance is 100
@@ -736,24 +738,30 @@
  }
 
  // premium chance
- if (Config.PREMIUM_SYSTEM_ENABLED && (killer.getActingPlayer() != null) && killer.getActingPlayer().hasPremiumStatus())
+ if (player != null)
  {
- if (Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId) != null)
+ if (Config.PREMIUM_SYSTEM_ENABLED && player.hasPremiumStatus())
  {
- rateChance *= Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId);
+ if (Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId) != null)
+ {
+ rateChance *= Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId);
+ }
+ else if (item.hasExImmediateEffect())
+ {
+ // TODO: Premium herb chance? :)
+ }
+ else if (victim.isRaid())
+ {
+ // TODO: Premium raid chance? :)
+ }
+ else
+ {
+ rateChance *= Config.PREMIUM_RATE_DROP_CHANCE;
+ }
  }
- else if (item.hasExImmediateEffect())
- {
- // TODO: Premium herb chance? :)
- }
- else if (victim.isRaid())
- {
- // TODO: Premium raid chance? :)
- }
- else
- {
- rateChance *= Config.PREMIUM_RATE_DROP_CHANCE;
- }
+
+ // bonus drop rate effect
+ rateChance *= player.getStat().getBonusDropRateMultiplier();
  }
 
  // only use total chance on x1, custom rates break this logic because total chance is more than 100%
@@ -1022,24 +1030,35 @@
  }
 
  // premium amount
- if (Config.PREMIUM_SYSTEM_ENABLED && (killer.getActingPlayer() != null) && killer.getActingPlayer().hasPremiumStatus())
+ final Player player = killer.getActingPlayer();
+ if (player != null)
  {
- if (Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId) != null)
+ if (Config.PREMIUM_SYSTEM_ENABLED && player.hasPremiumStatus())
  {
- rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId);
+ if (Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId) != null)
+ {
+ rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId);
+ }
+ else if (item.hasExImmediateEffect())
+ {
+ // TODO: Premium herb amount? :)
+ }
+ else if (victim.isRaid())
+ {
+ // TODO: Premium raid amount? :)
+ }
+ else
+ {
+ rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
+ }
  }
- else if (item.hasExImmediateEffect())
+
+ // bonus drop amount effect
+ rateAmount *= player.getStat().getBonusDropAmountMultiplier();
+ if (itemId == Inventory.ADENA_ID)
  {
- // TODO: Premium herb amount? :)
+ rateAmount *= player.getStat().getBonusDropAdenaMultiplier();
  }
- else if (victim.isRaid())
- {
- // TODO: Premium raid amount? :)
- }
- else
- {
- rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
- }
  }
 
  // finally
@@ -1089,24 +1108,31 @@
  }
 
  // premium chance
- if (Config.PREMIUM_SYSTEM_ENABLED && (killer.getActingPlayer() != null) && killer.getActingPlayer().hasPremiumStatus())
+ final Player player = killer.getActingPlayer();
+ if (player != null)
  {
- if (Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId) != null)
+ if (Config.PREMIUM_SYSTEM_ENABLED && player.hasPremiumStatus())
  {
- rateChance *= Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId);
+ if (Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId) != null)
+ {
+ rateChance *= Config.PREMIUM_RATE_DROP_CHANCE_BY_ID.get(itemId);
+ }
+ else if (item.hasExImmediateEffect())
+ {
+ // TODO: Premium herb chance? :)
+ }
+ else if (victim.isRaid())
+ {
+ // TODO: Premium raid chance? :)
+ }
+ else
+ {
+ rateChance *= Config.PREMIUM_RATE_DROP_CHANCE;
+ }
  }
- else if (item.hasExImmediateEffect())
- {
- // TODO: Premium herb chance? :)
- }
- else if (victim.isRaid())
- {
- // TODO: Premium raid chance? :)
- }
- else
- {
- rateChance *= Config.PREMIUM_RATE_DROP_CHANCE;
- }
+
+ // bonus drop rate effect
+ rateChance *= player.getStat().getBonusDropRateMultiplier();
  }
 
  // calculate if item will drop
@@ -1136,24 +1162,34 @@
  }
 
  // premium amount
- if (Config.PREMIUM_SYSTEM_ENABLED && (killer.getActingPlayer() != null) && killer.getActingPlayer().hasPremiumStatus())
+ if (player != null)
  {
- if (Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId) != null)
+ if (Config.PREMIUM_SYSTEM_ENABLED && player.hasPremiumStatus())
  {
- rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId);
+ if (Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId) != null)
+ {
+ rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT_BY_ID.get(itemId);
+ }
+ else if (item.hasExImmediateEffect())
+ {
+ // TODO: Premium herb amount? :)
+ }
+ else if (victim.isRaid())
+ {
+ // TODO: Premium raid amount? :)
+ }
+ else
+ {
+ rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
+ }
  }
- else if (item.hasExImmediateEffect())
+
+ // bonus drop amount effect
+ rateAmount *= player.getStat().getBonusDropAmountMultiplier();
+ if (itemId == Inventory.ADENA_ID)
  {
- // TODO: Premium herb amount? :)
+ rateAmount *= player.getStat().getBonusDropAdenaMultiplier();
  }
- else if (victim.isRaid())
- {
- // TODO: Premium raid amount? :)
- }
- else
- {
- rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
- }
  }
 
  // finally
@@ -1166,9 +1202,16 @@
  // chance
  double rateChance = Config.RATE_SPOIL_DROP_CHANCE_MULTIPLIER;
  // premium chance
- if (Config.PREMIUM_SYSTEM_ENABLED && (killer.getActingPlayer() != null) && killer.getActingPlayer().hasPremiumStatus())
+ final Player player = killer.getActingPlayer();
+ if (player != null)
  {
- rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
+ if (Config.PREMIUM_SYSTEM_ENABLED && player.hasPremiumStatus())
+ {
+ rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
+ }
+
+ // bonus spoil rate effect
+ rateChance *= player.getStat().getBonusSpoilRateMultiplier();
  }
 
  // calculate if item will be rewarded
@@ -1177,7 +1220,7 @@
  // amount is calculated after chance returned success
  double rateAmount = Config.RATE_SPOIL_DROP_AMOUNT_MULTIPLIER;
  // premium amount
- if (Config.PREMIUM_SYSTEM_ENABLED && (killer.getActingPlayer() != null) && killer.getActingPlayer().hasPremiumStatus())
+ if (Config.PREMIUM_SYSTEM_ENABLED && (player != null) && player.hasPremiumStatus())
  {
  rateAmount *= Config.PREMIUM_RATE_SPOIL_AMOUNT;
  }
Index: java/org/l2jmobius/gameserver/model/stats/Stat.java
===================================================================
--- java/org/l2jmobius/gameserver/model/stats/Stat.java (revision 12883)
+++ java/org/l2jmobius/gameserver/model/stats/Stat.java (working copy)
@@ -88,6 +88,10 @@
  EXPSP_RATE("rExp"),
  BONUS_EXP("bonusExp"),
  BONUS_SP("bonusSp"),
+ BONUS_DROP_ADENA("bonusDropAdena"),
+ BONUS_DROP_AMOUNT("bonusDropAmount"),
+ BONUS_DROP_RATE("bonusDropRate"),
+ BONUS_SPOIL_RATE("bonusSpoilRate"),
  ATTACK_CANCEL("cancel"),
 
  // ACCURACY & RANGE


Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
Mobius, question: i can use directly icon.utx from Essence client to HI5 client?