Noticias:

No tienes permiso para ver los enlaces. Para poder verlos Registrate o Conectate.

Menú Principal

Rune of Drop Spoil

Iniciado por Swarlog, Ago 03, 2025, 01:41 AM

Tema anterior - Siguiente tema

Swarlog

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

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

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

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

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