Changed back to previous drop system.
This commit is contained in:
22
trunk/dist/game/config/Custom.ini
vendored
22
trunk/dist/game/config/Custom.ini
vendored
@@ -474,6 +474,18 @@ DualboxCheckWhitelist = 127.0.0.1,0
|
||||
AllowChangePassword = False
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Old Drop Behavior
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enables L2J old drop behavior
|
||||
# The old L2J system used to add amount of items drop per 100% range of chance.
|
||||
# For example, if chance is 230% when rate are applied, it will do :
|
||||
# amount dropped = (2 * getRandomAmount(min,max)) + 30% chance to get ad additional getRandomAmount(min,max)
|
||||
# Default : False
|
||||
OldDropBehavior = False
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Allowed Player Races
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -698,10 +710,16 @@ PremiumRateDropChance = 1
|
||||
# Drop amount for premium players.
|
||||
PremiumRateDropAmount = 2
|
||||
|
||||
# Spoil chance for premium players.
|
||||
PremiumRateSpoilChance = 1
|
||||
|
||||
# Spoil amount for premium players.
|
||||
PremiumRateSpoilAmount = 2
|
||||
|
||||
# List of items affected by custom drop rate by id, used now for Adena rate too.
|
||||
# Usage: itemId1,multiplier1;itemId2,multiplier2;...
|
||||
PremiumDropChanceMultiplierByItemId = 57,1
|
||||
PremiumDropAmountMultiplierByItemId = 57,2
|
||||
PremiumRateDropChanceByItemId = 57,2;6656,1;6657,1;6658,1;6659,1;6660,1;6661,1;6662,1;8191,1;10170,1;10314,1
|
||||
PremiumRateDropAmountByItemId = 57,2;6656,1;6657,1;6658,1;6659,1;6660,1;6661,1;6662,1;8191,1;10170,1;10314,1
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
8
trunk/dist/game/config/NPC.ini
vendored
8
trunk/dist/game/config/NPC.ini
vendored
@@ -194,14 +194,6 @@ IgnoreNpcStatFormulas = True
|
||||
# Drops
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# If True, activates bellow level gap rules for standard mobs:
|
||||
# Default: True
|
||||
UseDeepBlueDropRules = True
|
||||
|
||||
# If True, activates bellow level gap rules for raid bosses:
|
||||
# Default: True
|
||||
UseDeepBlueDropRulesRaid = True
|
||||
|
||||
# The min and max level difference used for level gap calculation
|
||||
# this is only for how many levels higher the player is than the monster
|
||||
# Default: 8
|
||||
|
3
trunk/dist/game/config/Rates.ini
vendored
3
trunk/dist/game/config/Rates.ini
vendored
@@ -9,7 +9,8 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Rates
|
||||
# ---------------------------------------------------------------------------
|
||||
# Warning: Remember if you increase both chance and amount you will have higher rates than expected
|
||||
# Warning: to achieve old l2j behavior before drops rework you need to enable OldDropBehavior in Custom.ini
|
||||
# and increase only chance multipliers! Remember if you increase both chance and amount you will have higher rates than expected
|
||||
# Example: if amount multiplier is 5 and chance multiplier is 5 you will end up with 5*5 = 25 drop rates so be careful!
|
||||
|
||||
# Multiplies the amount of items dropped from monster on ground when it dies.
|
||||
|
@@ -77,7 +77,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
{
|
||||
target = L2World.getInstance().findObject(Integer.parseInt(st.nextToken()));
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
catch (final NumberFormatException e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -116,11 +116,11 @@ public class NpcViewMod implements IBypassHandler
|
||||
}
|
||||
sendNpcDropList(activeChar, npc, dropListScope, st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0);
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
catch (final NumberFormatException e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
catch (final IllegalArgumentException e)
|
||||
{
|
||||
_log.warning("Bypass[NpcViewMod] unknown drop list scope: " + dropListScopeString);
|
||||
return false;
|
||||
@@ -155,7 +155,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
{
|
||||
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
|
||||
long min = Long.MAX_VALUE;
|
||||
for (TimeUnit tu : TimeUnit.values())
|
||||
for (final TimeUnit tu : TimeUnit.values())
|
||||
{
|
||||
final long minTimeFromMillis = tu.convert(npcSpawn.getRespawnMinDelay(), TimeUnit.MILLISECONDS);
|
||||
final long maxTimeFromMillis = tu.convert(npcSpawn.getRespawnMaxDelay(), TimeUnit.MILLISECONDS);
|
||||
@@ -287,7 +287,34 @@ public class NpcViewMod implements IBypassHandler
|
||||
final IDropItem dropItem = dropList.get(i);
|
||||
if (dropItem instanceof GeneralDropItem)
|
||||
{
|
||||
addGeneralDropItem(activeChar, npc, amountFormat, chanceFormat, sb, (GeneralDropItem) dropItem);
|
||||
final GeneralDropItem generalDropItem = (GeneralDropItem) dropItem;
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(generalDropItem.getItemId());
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top>");
|
||||
sb.append("<img src=\"" + item.getIcon() + "\" width=32 height=32>");
|
||||
sb.append("</td><td fixwidth=300 align=center><font name=\"hs9\" color=\"CD9000\">");
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
|
||||
final long min = generalDropItem.getMin(npc, activeChar);
|
||||
final long max = generalDropItem.getMax(npc, activeChar);
|
||||
if (min == max)
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
sb.append(" - ");
|
||||
sb.append(amountFormat.format(max));
|
||||
}
|
||||
|
||||
sb.append("</td></tr><tr><td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(generalDropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append("%</td></tr></table></td></tr><tr><td width=32></td><td width=300> </td></tr></table>");
|
||||
}
|
||||
else if (dropItem instanceof GroupedGeneralDropItem)
|
||||
{
|
||||
@@ -295,21 +322,46 @@ public class NpcViewMod implements IBypassHandler
|
||||
if (generalGroupedDropItem.getItems().size() == 1)
|
||||
{
|
||||
final GeneralDropItem generalDropItem = generalGroupedDropItem.getItems().get(0);
|
||||
addGeneralDropItem(activeChar, npc, amountFormat, chanceFormat, sb, new GeneralDropItem(generalDropItem.getItemId(), generalDropItem.getMin(), generalDropItem.getMax(), (generalDropItem.getChance(npc, activeChar) * generalGroupedDropItem.getChance()) / 100, generalDropItem.getAmountStrategy(), generalDropItem.getChanceStrategy(), generalGroupedDropItem.getPreciseStrategy(), generalGroupedDropItem.getKillerChanceModifierStrategy(), generalDropItem.getDropCalculationStrategy()));
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(generalDropItem.getItemId());
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top>");
|
||||
sb.append("<img src=\"" + item.getIcon() + "\" width=32 height=32>");
|
||||
sb.append("</td><td fixwidth=300 align=center><font name=\"hs9\" color=\"CD9000\">");
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
|
||||
final long min = generalDropItem.getMin(npc, activeChar);
|
||||
final long max = generalDropItem.getMax(npc, activeChar);
|
||||
if (min == max)
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
sb.append(" - ");
|
||||
sb.append(amountFormat.format(max));
|
||||
}
|
||||
|
||||
sb.append("</td></tr><tr><td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(generalGroupedDropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append("%</td></tr></table></td></tr><tr><td width=32></td><td width=300> </td></tr></table>");
|
||||
}
|
||||
else
|
||||
{
|
||||
final GroupedGeneralDropItem normalized = generalGroupedDropItem.normalizeMe(npc, activeChar);
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top><img src=\"L2UI_CT1.ICON_DF_premiumItem\" width=32 height=32></td>");
|
||||
sb.append("<td fixwidth=300 align=center><font name=\"ScreenMessageSmall\" color=\"CD9000\">One from group</font>");
|
||||
sb.append("</td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0><tr>");
|
||||
sb.append("<td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(normalized.getChance(), 100)));
|
||||
sb.append(chanceFormat.format(Math.min(generalGroupedDropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append("%</td></tr></table><br>");
|
||||
|
||||
for (GeneralDropItem generalDropItem : normalized.getItems())
|
||||
for (final GeneralDropItem generalDropItem : generalGroupedDropItem.getItems())
|
||||
{
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(generalDropItem.getItemId());
|
||||
sb.append("<table width=291 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
@@ -324,9 +376,9 @@ public class NpcViewMod implements IBypassHandler
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=259><table width=253 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td><td width=205 align=center>");
|
||||
final MinMax minMax = getPreciseMinMax(normalized.getChance(), generalDropItem.getMin(npc, activeChar), generalDropItem.getMax(npc, activeChar), generalDropItem.isPreciseCalculated());
|
||||
final long min = minMax.min;
|
||||
final long max = minMax.max;
|
||||
|
||||
final long min = generalDropItem.getMin(npc, activeChar);
|
||||
final long max = generalDropItem.getMax(npc, activeChar);
|
||||
sb.append(amountFormat.format(min));
|
||||
if (min != max)
|
||||
{
|
||||
@@ -379,62 +431,4 @@ public class NpcViewMod implements IBypassHandler
|
||||
html = html.replaceAll("%items%", bodySb.toString());
|
||||
Util.sendCBHtml(activeChar, html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param activeChar
|
||||
* @param npc
|
||||
* @param amountFormat
|
||||
* @param chanceFormat
|
||||
* @param sb
|
||||
* @param dropItem
|
||||
*/
|
||||
private static void addGeneralDropItem(L2PcInstance activeChar, L2Npc npc, DecimalFormat amountFormat, DecimalFormat chanceFormat, StringBuilder sb, GeneralDropItem dropItem)
|
||||
{
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(dropItem.getItemId());
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top>");
|
||||
sb.append("<img src=\"" + item.getIcon() + "\" width=32 height=32>");
|
||||
sb.append("</td><td fixwidth=300 align=center><font name=\"hs9\" color=\"CD9000\">");
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
final MinMax minMax = getPreciseMinMax(dropItem.getChance(npc, activeChar), dropItem.getMin(npc, activeChar), dropItem.getMax(npc, activeChar), dropItem.isPreciseCalculated());
|
||||
|
||||
final long min = minMax.min;
|
||||
final long max = minMax.max;
|
||||
sb.append(amountFormat.format(min));
|
||||
if (min != max)
|
||||
{
|
||||
sb.append(" - ");
|
||||
sb.append(amountFormat.format(max));
|
||||
}
|
||||
|
||||
sb.append("</td></tr><tr><td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(dropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append("%</td></tr></table></td></tr><tr><td width=32></td><td width=300> </td></tr></table>");
|
||||
}
|
||||
|
||||
private static class MinMax
|
||||
{
|
||||
public final long min, max;
|
||||
|
||||
public MinMax(long min, long max)
|
||||
{
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
}
|
||||
}
|
||||
|
||||
private static MinMax getPreciseMinMax(double chance, long min, long max, boolean isPrecise)
|
||||
{
|
||||
if (!isPrecise || (chance <= 100))
|
||||
{
|
||||
return new MinMax(min, max);
|
||||
}
|
||||
|
||||
final int mult = (int) chance / 100;
|
||||
return new MinMax(mult * min, (chance % 100) > 0 ? (mult + 1) * max : mult * max);
|
||||
}
|
||||
}
|
||||
|
@@ -49,11 +49,15 @@ public class Premium implements IVoicedCommandHandler
|
||||
html.append("<tr><td>Rate SP: <font color=\"LEVEL\"> x" + Config.RATE_SP + "<br1></font></td></tr>");
|
||||
html.append("<tr><td>Drop Chance: <font color=\"LEVEL\"> x" + Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER + "<br1></font></td></tr><br>");
|
||||
html.append("<tr><td>Drop Amount: <font color=\"LEVEL\"> x" + Config.RATE_DEATH_DROP_AMOUNT_MULTIPLIER + "<br1></font></td></tr><br>");
|
||||
html.append("<tr><td>Spoil Chance: <font color=\"LEVEL\"> x" + Config.RATE_CORPSE_DROP_CHANCE_MULTIPLIER + "<br1></font></td></tr><br>");
|
||||
html.append("<tr><td>Spoil Amount: <font color=\"LEVEL\"> x" + Config.RATE_CORPSE_DROP_AMOUNT_MULTIPLIER + "<br><br></font></td></tr><br>");
|
||||
html.append("<tr><td><center>Premium Info & Rules<br></td></tr>");
|
||||
html.append("<tr><td>Rate XP: <font color=\"LEVEL\"> x" + (Config.RATE_XP * Config.PREMIUM_RATE_XP) + "<br1></font></td></tr>");
|
||||
html.append("<tr><td>Rate SP: <font color=\"LEVEL\"> x" + (Config.RATE_SP * Config.PREMIUM_RATE_SP) + "<br1></font></td></tr>");
|
||||
html.append("<tr><td>Drop Chance: <font color=\"LEVEL\"> x" + (Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER * Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER * Config.PREMIUM_RATE_DROP_CHANCE) + "<br1></font></td></tr>");
|
||||
html.append("<tr><td>Drop Amount: <font color=\"LEVEL\"> x" + (Config.RATE_DEATH_DROP_AMOUNT_MULTIPLIER * Config.PREMIUM_RATE_DROP_AMOUNT) + "<br1></font></td></tr>");
|
||||
html.append("<tr><td>Spoil Chance: <font color=\"LEVEL\"> x" + (Config.RATE_CORPSE_DROP_CHANCE_MULTIPLIER * Config.PREMIUM_RATE_SPOIL_CHANCE) + "<br1></font></td></tr>");
|
||||
html.append("<tr><td>Spoil Amount: <font color=\"LEVEL\"> x" + (Config.RATE_CORPSE_DROP_AMOUNT_MULTIPLIER * Config.PREMIUM_RATE_SPOIL_AMOUNT) + "<br1></font></td></tr>");
|
||||
html.append("<tr><td> <font color=\"70FFCA\">1. Premium benefits CAN NOT BE TRANSFERED.<br1></font></td></tr>");
|
||||
html.append("<tr><td> <font color=\"70FFCA\">2. Premium does not effect party members.<br1></font></td></tr>");
|
||||
html.append("<tr><td> <font color=\"70FFCA\">3. Premium benefits effect ALL characters in same account.</font></td></tr>");
|
||||
@@ -67,6 +71,8 @@ public class Premium implements IVoicedCommandHandler
|
||||
html.append("<tr><td>Rate SP: <font color=\"LEVEL\">x" + (Config.RATE_SP * Config.PREMIUM_RATE_SP) + " <br1></font></td></tr>");
|
||||
html.append("<tr><td>Drop Chance: <font color=\"LEVEL\">x" + (Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER * Config.PREMIUM_RATE_DROP_CHANCE) + " <br1></font></td></tr>");
|
||||
html.append("<tr><td>Drop Amount: <font color=\"LEVEL\">x" + (Config.RATE_DEATH_DROP_AMOUNT_MULTIPLIER * Config.PREMIUM_RATE_DROP_AMOUNT) + " <br1></font></td></tr>");
|
||||
html.append("<tr><td>Spoil Chance: <font color=\"LEVEL\">x" + (Config.RATE_CORPSE_DROP_CHANCE_MULTIPLIER * Config.PREMIUM_RATE_SPOIL_CHANCE) + " <br1></font></td></tr>");
|
||||
html.append("<tr><td>Spoil Amount: <font color=\"LEVEL\">x" + (Config.RATE_CORPSE_DROP_AMOUNT_MULTIPLIER * Config.PREMIUM_RATE_SPOIL_AMOUNT) + " <br1></font></td></tr>");
|
||||
html.append("<tr><td>Expires: <font color=\"00A5FF\">" + String.valueOf(format.format(endDate)) + "</font></td></tr>");
|
||||
html.append("<tr><td>Current Date: <font color=\"70FFCA\">" + String.valueOf(format.format(System.currentTimeMillis())) + "<br><br></font></td></tr>");
|
||||
html.append("<tr><td><center>Premium Info & Rules<br></center></td></tr>");
|
||||
|
@@ -222,12 +222,12 @@ public class Q10751_WindsOfFateEncounters extends Quest implements IBypassHandle
|
||||
if (classId == 184)
|
||||
{
|
||||
htmltext = "33943-ccf.html";
|
||||
giveItems(player, NAVARIS_SUPPORT_BOX_F, 1);
|
||||
giveItems(player, NAVARIS_SUPPORT_BOX_F);
|
||||
}
|
||||
else if (classId == 185)
|
||||
{
|
||||
htmltext = "33942-ccm.html";
|
||||
giveItems(player, NAVARIS_SUPPORT_BOX_M, 1);
|
||||
giveItems(player, NAVARIS_SUPPORT_BOX_M);
|
||||
}
|
||||
player.broadcastUserInfo();
|
||||
qs.exitQuest(false, true);
|
||||
|
Reference in New Issue
Block a user