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:
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
 
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
 
Re: [release]old drop system(odin)

Don't get it.. But i used to change the drop rates of items through mysql.
 
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
 
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
 
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.
 
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.
 
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 ._.)
 
Back