About eventmodElpies.java!?

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

About eventmodElpies.java!?

Post by LaraCroft »

Hi guys...

On the mod event "eventmodElpies.java" i get this code:

Code: Select all

    private static final int[][] DROPLIST_CRYSTALS =    {        { 1458, 80, 50, 100 },  // Crystal D-Grade        { 1459, 60, 40,  80 },  // Crystal C-Grade        { 1460, 40, 30,  60 },  // Crystal B-Grade        { 1461, 20, 20,  30 },  // Crystal A-Grade        { 1462,  0, 10,  20 },  // Crystal S-Grade    };
The first number is item id.

What is the other numbers??

Thxx.
!!!knowledge and intelligence must be shared!!!
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: About eventmodElpies.java!?

Post by Zoey76 »

The first is the item Id.
Second chance in percent.
Third and forth are random amount range.
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: About eventmodElpies.java!?

Post by LaraCroft »

Thx Zoey76
:)
!!!knowledge and intelligence must be shared!!!
shamanidze
Posts: 9
Joined: Sat Dec 11, 2010 8:40 pm

Re: About eventmodElpies.java!?

Post by shamanidze »

LaraCroft wrote:         { 1462,  0, 10,  20 },  // Crystal S-Grade
.
Is there any sense in that?
chance=0
10=< items_count= <20
0 percent = 0 items
Last edited by shamanidze on Fri Jan 14, 2011 9:02 pm, edited 1 time in total.
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: About eventmodElpies.java!?

Post by _DS_ »

In what ?
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
shamanidze
Posts: 9
Joined: Sat Dec 11, 2010 8:40 pm

Re: About eventmodElpies.java!?

Post by shamanidze »

Can remove the string and optimize the code?
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: About eventmodElpies.java!?

Post by Zoey76 »

By looking at the code 0 means 99% chances of drop, if the chance is 81+ it will drop the first item, only one item each mob, if the chance is between 1 and 20 it will drop the last item in the list, if the chance is 0 there is no drop.

There is nothing to improve or fix, except a comments in the drop list like this:

Code: Select all

### Comments for mods by Zoey76#P datapack_developmentIndex: data/scripts/mods/eventmodElpies/eventmodElpies.java===================================================================--- data/scripts/mods/eventmodElpies/eventmodElpies.java    (revision 7725)+++ data/scripts/mods/eventmodElpies/eventmodElpies.java    (working copy)@@ -67,8 +67,10 @@        {  82048,  82940,  53240,  54126, -1490 }    };    // Drop data+   // Higher the chance harder the item.    private static final int[][] DROPLIST =    {+       // ItemId, chance in percent, min amount, max amount        {  1540,  80, 10, 15 }, // Quick Healing Potion        {  1538,  60,  5, 10 }, // Blessed Scroll of Escape        {  3936,  40,  5, 10 }, // Blessed Scroll of Ressurection@@ -81,6 +83,7 @@    };    private static final int[][] DROPLIST_CRYSTALS =    {+       // ItemId, chance in percent, min amount, max amount        { 1458, 80, 50, 100 },  // Crystal D-Grade        { 1459, 60, 40,  80 },  // Crystal C-Grade        { 1460, 40, 30,  60 },  // Crystal B-GradeIndex: data/scripts/mods/eventmodRabbits/eventmodRabbits.java===================================================================--- data/scripts/mods/eventmodRabbits/eventmodRabbits.java  (revision 7725)+++ data/scripts/mods/eventmodRabbits/eventmodRabbits.java  (working copy)@@ -59,8 +59,10 @@    public static final int _skill_magic_eye = 629;        // Drop data+   // Higher the chance harder the item.    private static final int[][] DROPLIST =    {+       // ItemId, chance in percent, min amount, max amount        {  1540,  80, 10, 15 }, // Quick Healing Potion        {  1538,  60,  5, 10 }, // Blessed Scroll of Escape        {  3936,  40,  5, 10 }, // Blessed Scroll of Ressurection
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
shamanidze
Posts: 9
Joined: Sat Dec 11, 2010 8:40 pm

Re: About eventmodElpies.java!?

Post by shamanidze »

It's easier. Add a minimal amount of changes.
my patch

Code: Select all

Index: data/scripts/mods/eventmodElpies/eventmodElpies.java===================================================================--- data/scripts/mods/eventmodElpies/eventmodElpies.java    (revision 7746)+++ data/scripts/mods/eventmodElpies/eventmodElpies.java    (working copy)@@ -66,7 +66,7 @@        {  18564,  19200, 144377, 145782, -3081 },        {  82048,  82940,  53240,  54126, -1490 }    };-   // Drop data+   // Drop data    ItemId, chance in percent, min amount, max amount    private static final int[][] DROPLIST =    {        {  1540,  80, 10, 15 }, // Quick Healing PotionIndex: data/scripts/mods/eventmodRabbits/eventmodRabbits.java===================================================================--- data/scripts/mods/eventmodRabbits/eventmodRabbits.java  (revision 7746)+++ data/scripts/mods/eventmodRabbits/eventmodRabbits.java  (working copy)@@ -58,7 +58,7 @@    public static final int _skill_tornado = 630;    public static final int _skill_magic_eye = 629;    -   // Drop data[/color]+   // Drop data    ItemId, chance in percent, min amount, max amount    private static final int[][] DROPLIST =    {        {  1540,  80, 10, 15 }, // Quick Healing Potion
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: About eventmodElpies.java!?

Post by Zoey76 »

shamanidze wrote:It's easier. Add a minimal amount of changes.
my patch
So you made a patch for 2 lines of comments that will never get added to the code after I made them?

Thanks :roll:
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
Post Reply