Page 1 of 1
About eventmodElpies.java!?
Posted: Wed Jan 12, 2011 5:04 pm
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.
Re: About eventmodElpies.java!?
Posted: Wed Jan 12, 2011 5:15 pm
by Zoey76
The first is the item Id.
Second chance in percent.
Third and forth are random amount range.
Re: About eventmodElpies.java!?
Posted: Wed Jan 12, 2011 5:18 pm
by LaraCroft
Thx Zoey76

Re: About eventmodElpies.java!?
Posted: Fri Jan 14, 2011 9:00 pm
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
Re: About eventmodElpies.java!?
Posted: Fri Jan 14, 2011 9:01 pm
by _DS_
In what ?
Re: About eventmodElpies.java!?
Posted: Fri Jan 14, 2011 9:04 pm
by shamanidze
Can remove the string and optimize the code?
Re: About eventmodElpies.java!?
Posted: Fri Jan 14, 2011 9:51 pm
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
Re: About eventmodElpies.java!?
Posted: Sat Jan 15, 2011 8:11 am
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
Re: About eventmodElpies.java!?
Posted: Sat Jan 15, 2011 6:30 pm
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
