Autor Tema: [IMP] Rune of Drop Spoil  (Leído 3616 veces)

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.633
  • Karma: 5
  • Sexo: Masculino
    • U3Games
[IMP] Rune of Drop Spoil
« en: Febrero 20, 2015, 01:36:19 am »
High Five

Les traigo runes para drop y spoil 50% por 7 dias.

El personaje que lleve la rune drop se le aumenta 50% el drop por 7 dias.
El personaje que lleve la rune spoil se le aumenta 50% el spoil por 7 dias.

Core

Código: [Seleccionar]
--- a/L2J_Server/java/com/l2jserver/gameserver/model/drops/CorpseDropItem.java
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/drops/CorpseDropItem.java
@@ -20,6 +20,7 @@
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.stats.Stats;
 
 /**
  *
@@ -64,6 +65,6 @@
  @Override
  public double getChance(L2Character victim, L2Character killer)
  {
- return super.getChance(victim, killer) * Config.RATE_CORPSE_DROP_CHANCE_MULTIPLIER;
+ return super.getChance(victim, killer) * Config.RATE_CORPSE_DROP_CHANCE_MULTIPLIER * ((killer.calcStat(Stats.BONUS_SPOIL, 0, null, null) / 100) + 1);
  }
 }
-------------------------------------------------------------------------------------------------------------------------------------
--- a/L2J_Server/java/com/l2jserver/gameserver/model/drops/DeathDropItem.java
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/drops/DeathDropItem.java
@@ -20,6 +20,7 @@
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.stats.Stats;
 
 /**
  *
@@ -64,6 +65,6 @@
  @Override
  public double getChance(L2Character victim, L2Character killer)
  {
- return super.getChance(victim, killer) * Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER;
+ return super.getChance(victim, killer) * Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER * ((killer.calcStat(Stats.BONUS_DROP, 0, null, null) / 100) + 1);
  }
 }
--------------------------------------------------------------------------------------------------------------------------------
--- a/L2J_Server/java/com/l2jserver/gameserver/model/drops/GroupedCorpseDropItem.java
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/drops/GroupedCorpseDropItem.java
@@ -20,6 +20,7 @@
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.stats.Stats;
 
 /**
  * @author Nos
@@ -41,6 +42,6 @@
  @Override
  public double getChance(L2Character victim, L2Character killer)
  {
- return super.getChance(victim, killer) * Config.RATE_CORPSE_DROP_CHANCE_MULTIPLIER;
+ return super.getChance(victim, killer) * Config.RATE_CORPSE_DROP_CHANCE_MULTIPLIER * ((killer.calcStat(Stats.BONUS_SPOIL, 0, null, null) / 100) + 1);
  }
 }
---------------------------------------------------------------------------------------------------------------------------------
--- a/L2J_Server/java/com/l2jserver/gameserver/model/drops/GroupedDeathDropItem.java
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/drops/GroupedDeathDropItem.java
@@ -20,6 +20,7 @@
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.stats.Stats;
 
 /**
  *
@@ -41,6 +42,6 @@
  @Override
  public double getChance(L2Character victim, L2Character killer)
  {
- return super.getChance(victim, killer) * Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER;
+ return super.getChance(victim, killer) * Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER * ((killer.calcStat(Stats.BONUS_DROP, 0, null, null) / 100) + 1);
  }
 }
--------------------------------------------------------------------------------------------------------------------------------------
--- a/L2J_Server/java/com/l2jserver/gameserver/model/stats/Stats.java
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/stats/Stats.java
@@ -87,6 +87,8 @@
  EXPSP_RATE("rExp"),
  BONUS_EXP("bonusExp"),
  BONUS_SP("bonusSp"),
+ BONUS_DROP("bonusDrop"), // bonus drop
+ BONUS_SPOIL("bonusSpoil"), // bonus spoil
  ATTACK_CANCEL("cancel"),
 
  // ACCURACY & RANGE

Datapack

Código: [Seleccionar]
--- /dev/null
+++ b/L2J_DataPack/dist/game/data/stats/skills/custom/rune.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/skills.xsd">
+ <skill id="30000" levels="2" name="Rune of Drop">
+ <!-- Confirmed CT2.5 -->
+ <table name="#bonusDrop"> 30 50 </table>
+ <table name="#icons"> br_cashtex.skill.br_cash_rune_of_exp_buff_3 br_cashtex.skill.br_cash_rune_of_exp_buff_5 </table>
+ <set name="icon" val="#icons" />
+ <set name="magicLvl" val="1" />
+ <set name="operateType" val="P" />
+ <set name="targetType" val="SELF" />
+ <for>
+ <effect name="Buff">
+ <add order="0x40" stat="bonusDrop" val="#bonusDrop" />
+ </effect>
+ </for>
+ </skill>
+ <skill id="30001" levels="2" name="Rune of Spoil">
+ <!-- Confirmed CT2.5 -->
+ <table name="#bonusSpoil"> 30 50 </table>
+ <table name="#icons"> br_cashtex.skill.br_cash_rune_of_exp_buff_3 br_cashtex.skill.br_cash_rune_of_exp_buff_5 </table>
+ <set name="icon" val="#icons" />
+ <set name="magicLvl" val="1" />
+ <set name="operateType" val="P" />
+ <set name="targetType" val="SELF" />
+ <for>
+ <effect name="Buff">
+ <add order="0x40" stat="bonusSpoil" val="#bonusSpoil" />
+ </effect>
+ </for>
+ </skill>
+</list>
\ No newline at end of file
-----------------------------------------------------------------------------------------------------------------------------
--- /dev/null
+++ b/L2J_DataPack/dist/game/data/stats/items/custom/rune.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/items.xsd">
+ <item id="30000" type="EtcItem" name="Rune of Drop 50% - 7 days limited period">
+ <set name="icon" val="br_cashtex.item.br_cash_rune_of_exp_i00" />
+ <set name="etcitem_type" val="RUNE" />
+ <set name="immediate_effect" val="true" />
+ <set name="material" val="PAPER" />
+ <set name="weight" val="120" />
+ <set name="is_tradable" val="false" />
+ <set name="is_dropable" val="false" />
+ <set name="is_sellable" val="false" />
+ <set name="is_premium" val="true" />
+ <set name="handler" val="ItemSkills" />
+ <set name="item_skill" val="30000-2" />
+ <set name="time" val="10080" />
+ </item>
+ <item id="30001" type="EtcItem" name="Rune of Spoil 50% - 7 days limited period">
+ <set name="icon" val="br_cashtex.item.br_cash_rune_of_exp_i00" />
+ <set name="etcitem_type" val="RUNE" />
+ <set name="immediate_effect" val="true" />
+ <set name="material" val="PAPER" />
+ <set name="weight" val="120" />
+ <set name="is_tradable" val="false" />
+ <set name="is_dropable" val="false" />
+ <set name="is_sellable" val="false" />
+ <set name="is_premium" val="true" />
+ <set name="handler" val="ItemSkills" />
+ <set name="item_skill" val="30001-2" />
+ <set name="time" val="10080" />
+ </item>
+</list>


por ultimo deben crear los items en el cliente en itemname-e.dat y etcitemgrp.dat con la id 30000 y 30001

algo como esto

itemname-e

Código: [Seleccionar]
30000 Rune of Drop 50% 7-day limited period a,Ancient characters which endow mysterious ability if stored in the inventory. It increases acquired Drop by 50%. The remaining period decreases even during log-off state. Cannot be exchanged or dropped.\0 -1 0 0 a, 0 0 a, 0 0 0 0 0 0 0 0 0 0 a, 1
30001 Rune of Spoil 50% 7-day limited period a,Ancient characters which endow mysterious ability if stored in the inventory. It increases acquired Spoil by 50%. The remaining period decreases even during log-off state. Cannot be exchanged or dropped.\0 -1 0 0 a, 0 0 a, 0 0 0 0 0 0 0 0 0 0 a, 1

etcitemgrp.dat

Código: [Seleccionar]
2 30000 0 0 0 0 0 0 0 0 0 0 1 0 0 br_cashtex.item.br_cash_rune_of_exp_i00 -1 120 18 0 9BBEAD0 0 1 1 1 0 33 0
2 30001 0 0 0 0 0 0 0 0 0 0 1 0 0 br_cashtex.item.br_cash_rune_of_exp_i00 -1 120 18 0 9BBEAD0 0 1 1 1 0 33 0


creditos = execanciani

Desconectado brianxx55

  • Usuario
  • *
  • Mensajes: 12
  • Karma: 0
  • Sexo: Masculino
Re:[IMP] Rune of Drop Spoil
« Respuesta #1 en: Abril 13, 2015, 12:07:21 am »
funcionara para freya?

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.633
  • Karma: 5
  • Sexo: Masculino
    • U3Games
Re:[IMP] Rune of Drop Spoil
« Respuesta #2 en: Abril 13, 2015, 12:12:42 am »
funcionara para freya?

Claro! Solo hay que adaptarlo ^^

Desconectado matiasl2

  • Usuario
  • *
  • Mensajes: 19
  • Karma: 0
Re:[IMP] Rune of Drop Spoil
« Respuesta #3 en: Noviembre 30, 2015, 02:33:24 am »
alguna idea de como adaptarlo a freya es completamente diferente xD alguno me ayudaria?

Desconectado lvchin

  • Usuario
  • *
  • Mensajes: 49
  • Karma: 0
  • Sexo: Masculino
Re:[IMP] Rune of Drop Spoil
« Respuesta #4 en: Diciembre 03, 2015, 10:44:13 pm »
No sirve para el nuevo l2jserver ? por que en esa ruta no existe
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/drops/CorpseDropItem.java

Desconectado bysonix

  • Usuario
  • *
  • Mensajes: 9
  • Karma: 0
Re:[IMP] Rune of Drop Spoil
« Respuesta #5 en: Marzo 10, 2017, 02:32:57 am »
lo  puedes adaptar para frozen

Desconectado hasl

  • Usuario
  • *
  • Mensajes: 1
  • Karma: 0
Re: [IMP] Rune of Drop Spoil
« Respuesta #6 en: Octubre 05, 2020, 04:15:24 am »
Alguien ha podido adaptar eso a las ultimas versiones de l2j high five? no tengo CorpseDropItem