old drop system(odin)

Newbie Spellweaver
Joined
Jul 24, 2008
Messages
16
Reaction score
0
this is for ppl that has screwed up droprate (mostly for people using sean's repack).
this is the old code before he changed it around 5.6.
repackers that based off seanpack has screwed up droprates too thats why i posted this.
and also lets you change the droprates on world.properties again

in MapleMap.java find:
Code:
private void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster) {
		if (dropsDisabled)
			return;
		/*
		 * drop logic: decide based on monster what the max drop count is get drops (not allowed: multiple mesos,
		 * multiple items of same type exception: event drops) calculate positions
		 */
		int maxDrops;
		MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
		final boolean isBoss = monster.isBoss();
		if (isBoss) {
			maxDrops = 15; // boss droprate
		} else {
			maxDrops = 50; // mob droprate
		}

		List<Integer> toDrop = new ArrayList<Integer>();
		for (int i = 0; i < maxDrops; i++) {
			toDrop.add(monster.getDrop());
		}

		Set<Integer> alreadyDropped = new HashSet<Integer>();
		for (int i = 0; i < toDrop.size(); i++) {
			if (toDrop.get(i) == -1) {
				if (alreadyDropped.contains(-1) && !isBoss) {
					toDrop.remove(i);
					i--;
				} else {
					alreadyDropped.add(-1);
				}
			} else {
				MapleInventoryType type = ii.getInventoryType(toDrop.get(i));
				if (alreadyDropped.contains((int) type.getType()) && !isBoss) {
					toDrop.remove(i);
					i--;
				} else {
					alreadyDropped.add((int) type.getType());
				}
			}
		}
replace it with:
Code:
 private void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster) {
        if (dropsDisabled)
            return;
        /*
         * drop logic: decide based on monster what the max drop count is get drops (not allowed: multiple mesos,
         * multiple items of same type exception: event drops) calculate positions
         */
        int maxDrops;
        MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
        final boolean isBoss = monster.isBoss();
        if (isBoss) {
            maxDrops = 10 * ChannelServer.getInstance(channel).getBossDropRate();
        } else {
            maxDrops = 10 * ChannelServer.getInstance(channel).getDropRate();
        }

        List<Integer> toDrop = new ArrayList<Integer>();
        for (int i = 0; i < maxDrops; i++) {
            toDrop.add(monster.getDrop());
        }

        Set<Integer> alreadyDropped = new HashSet<Integer>();
        for (int i = 0; i < toDrop.size(); i++)  
                        {
            if (alreadyDropped.contains(toDrop.get(i)) && !isBoss) // Check the drop list whether it contains same item regardless of how many items
                        {
                            toDrop.remove(i); //remove if it contains the same
                            i--;
            }

in ChannelServer.java add:
Code:
dropRate = Integer.parseInt(props.getProperty("net.sf.odinms.world.drop"));
bossdropRate = Integer.parseInt(props.getProperty("net.sf.odinms.world.bossdrop"));
under
Code:
mesoRate = Integer.parseInt(props.getProperty("net.sf.odinms.world.meso"));
if theres 2 add on both [if you see 2 mesoRate = Integer.parseInt(props.getProperty("net.sf.odinms.world.meso")); then add under both of them]

in world.properties add:
Code:
# drop factor
net.sf.odinms.world.drop=(droprate)
# bossdrop factor
net.sf.odinms.world.bossdrop=(bossdroprate)

under:
Code:
# meso factor
net.sf.odinms.world.meso=(mesorate)

and recompile
 
Last edited:
Newbie Spellweaver
Joined
Aug 11, 2008
Messages
94
Reaction score
1
Re: [release]old drop system(odin)

Lol. What you mean by "Old Drop System"?
 
Skilled Illusionist
Loyal Member
Joined
Jun 23, 2008
Messages
324
Reaction score
0
Re: [release]old drop system(odin)

Yea, i don't get what u mean by Old Drop system, Sorry mind explain it to me XD
 
IHF
Joined
Apr 7, 2008
Messages
312
Reaction score
0
Re: [release]old drop system(odin)

I think his trying to say editing the droprate in the world.properties file o.o
 
Newbie Spellweaver
Joined
Jun 23, 2008
Messages
61
Reaction score
0
Re: [release]old drop system(odin)

system and rate is different, dude.
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
Re: [release]old drop system(odin)

Dun understand
 
Junior Spellweaver
Joined
Jul 6, 2008
Messages
104
Reaction score
15
Re: [release]old drop system(odin)

Thisll allow you to now change the drop rate through world.properties like before. Since it was last time glitched o_0
 
Elite Diviner
Loyal Member
Joined
Apr 30, 2008
Messages
414
Reaction score
0
Re: [release]old drop system(odin)

Thisll allow you to now change the drop rate through world.properties like before. Since it was last time glitched o_0

Oh, Now I see, Thanks for explaining.
 
Elite Diviner
Joined
Apr 24, 2008
Messages
416
Reaction score
2
Re: [release]old drop system(odin)

I understand wad he means u noe last time when Sean's repack was v4.x u can edit bossdroprate and mesosdroprate droprate all those from the world.properties file
 
Newbie Spellweaver
Joined
Aug 8, 2008
Messages
47
Reaction score
0
Re: [release]old drop system(odin)

I thought this was posted b4? o_O
 
Elite Diviner
Loyal Member
Joined
Apr 30, 2008
Messages
414
Reaction score
0
Re: [release]old drop system(odin)

Probably was posted before, but at least this will keep us reminded.
 
Experienced Elementalist
Joined
Jul 26, 2008
Messages
280
Reaction score
0
Re: [release]old drop system(odin)

Don't get it.. But i used to change the drop rates of items through mysql.
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: [release]old drop system(odin)

Don't get it.. But i used to change the drop rates of items through mysql.

No... I don't think you quite understand... This changes the RATE not the drop rates of items in the db... This release also allows you to changes drop rates through your world.properties
 
Mythic Archon
Loyal Member
Joined
Jul 23, 2008
Messages
796
Reaction score
56
Re: [release]old drop system(odin)

Very good release but you might want to fix up the first script
You didn't include the whole method. Or you might want to mention that you end the paste in the first for loop.
Do this before noobs start coming and saying that this script gives errors
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: [release]old drop system(odin)

yeah LOL
by the time you know it... This thread will be filled with noobs asking for a fix :)
 
Experienced Elementalist
Joined
Jul 26, 2008
Messages
280
Reaction score
0
Re: [release]old drop system(odin)

Ohh I get it now (lol slow I know).. But will changing the drop rates in the world.properties be normal? As in you set the drop rates to 50 in the world.properties and you get 50x droprate? Because from what I noe changing it in mysql is different.. Change the droprate value to 1 and you get 100% item drop for that item. E.g. Set zak helm droprate value to 1 and u get 15 helms dropping set it to 50 and u get none until like 10 zaks are killed.
 
Mythic Archon
Loyal Member
Joined
Jul 23, 2008
Messages
796
Reaction score
56
Re: [release]old drop system(odin)

Ok, the drop rate change in world.properties never worked (except before seanpack 5.6?). They don't work in my repack or pc maple's
They will work iff you add this.
 
Master Summoner
Loyal Member
Joined
Apr 20, 2008
Messages
578
Reaction score
76
Re: [release]old drop system(odin)

Ok, the drop rate change in world.properties never worked (except before seanpack 5.6?). They don't work in my repack or pc maple's
They will work iff you add this.

Proof that repack-makers don't make/fix stuff by themselves(How did you manage to get DROPRATE failing ._.)
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
Re: [release]old drop system(odin)

So does this script work?
 
Back
Top