[Release] 100% GMS-Like monsterdrops, EVERY VERSION!

Page 1 of 4 1234 LastLast
Results 1 to 15 of 58
  1. #1
    The almighty chicken kippieeej is offline
    MemberRank
    Apr 2008 Join Date
    1,038Posts

    [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    in net.sf.odinms.tools create a file called MonsterDropCreator.java

    put this in it:

    PHP Code:
    package net.sf.odinms.tools;

    import java.sql.Connection;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.rmi.NotBoundException;

    import java.sql.SQLException;
    import java.util.Properties;
    import javax.management.InstanceAlreadyExistsException;
    import javax.management.MBeanRegistrationException;
    import javax.management.MalformedObjectNameException;
    import javax.management.NotCompliantMBeanException;
    import net.sf.odinms.database.DatabaseConnection;
    import net.sf.odinms.provider.MapleData;
    import net.sf.odinms.provider.MapleDataProviderFactory;
    import net.sf.odinms.provider.MapleDataTool;

    /**
     *
     * @author Bassoe
     *
     */
    public class MonsterDropCreator {
        public static 
    void main(String args[]) throws FileNotFoundExceptionIOExceptionNotBoundExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionNotCompliantMBeanExceptionMalformedObjectNameException {
            
    //start the dump
            
    MapleData data MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/String.wz")).getData("MonsterBook.img");
            
    boolean first;
            
    Properties dbProp = new Properties();
            
    FileReader fr = new FileReader("db.properties");
            
    dbProp.load(fr);
            
    fr.close();
            
    DatabaseConnection.setProps(dbProp);
            
    Connection con DatabaseConnection.getConnection();
            for (
    MapleData dataz data.getChildren()) {
                
    int monsterId Integer.parseInt(dataz.getName());
                
    String Query "INSERT INTO monsterdrops VALUES ";
                
    first true;
                for (
    MapleData drop dataz.getChildByPath("reward")) {
                    
    int itemid MapleDataTool.getInt(drop);
                    if (
    first) {
                        
    Query += "(DEFAULT, " monsterId ", " itemid ", " getChance(itemid) + ")";
                        
    first false;
                    } else
                        
    Query += ", (DEFAULT, " monsterId ", " itemid ", " getChance(itemid) + ")";
                }
                try {
                    
    con.prepareStatement(Query).executeUpdate();
                } catch (
    SQLException e) {}
            }
        }

        public static 
    int getChance(int id) {
            switch (
    id 10000) {
                case 
    413:
                    return 
    1000;
                case 
    204:
                    return 
    12000;
                case 
    400:
                    switch (
    id 1000) {
                        case 
    4000:
                        case 
    4001:
                            return 
    5;
                        case 
    4003:
                            return 
    200;
                        case 
    4004:
                        case 
    4006:
                            return 
    1500;
                        case 
    4005:
                            return 
    100;
                    }
                case 
    401:
                case 
    402:
                case 
    416:
                    return 
    600;
                case 
    403:
                    return 
    300;
            }
            switch (
    id 1000000) {
                case 
    1:
                    return 
    2400;
                case 
    2:
                    switch (
    id) {
                        case 
    2000000:
                        case 
    2000002:
                        case 
    2000003:
                        case 
    2000004:
                        case 
    2000005:
                        case 
    2000006:
                        case 
    2001001:
                        case 
    2002000:
                        case 
    2002001:
                        case 
    2002003:
                        case 
    2002004:
                        case 
    2002006:
                        case 
    2002011:
                        case 
    2010009:
                        case 
    2012001:
                        case 
    2012002:
                        case 
    2022001:
                        case 
    2020013:
                        case 
    2020014:
                        case 
    2020015:
                        case 
    2022142:
                        case 
    2022186:
                            return 
    100;
                        case 
    2060000:
                        case 
    2061000:
                        case 
    2060001:
                        case 
    2061001:
                            return 
    200;
                        case 
    2070000:
                        case 
    2070001:
                        case 
    2070002:
                        case 
    2070003:
                        case 
    2070004:
                        case 
    2070005:
                        case 
    2070006:
                        case 
    2070007:
                        case 
    2070008:
                        case 
    2070009:
                        case 
    2070010:
                            return 
    10000;
                        default:
                            return 
    400;
                    }
            }
            return 
    0;
        }

    Then compile

    After you did that find launch_world.bat
    in that directory make a new file called DumpMonsterDrops.bat
    put this in it:

    Code:
    @echo off
    set CLASSPATH=.;dist\odinms.jar;dist\mina-core.jar;dist\slf4j-api.jar;dist\slf4j-jdk14.jar;dist\mysql-connector-java-bin.jar
    java -Dnet.sf.odinms.recvops=recvops.properties -Dnet.sf.odinms.sendops=sendops.properties -Dnet.sf.odinms.wzpath=wz\ -Dnet.sf.odinms.channel.config=channel.properties -Djavax.net.ssl.keyStore=channel.keystore -Djavax.net.ssl.keyStorePassword=passwd -Djavax.net.ssl.trustStore=channel.truststore -Djavax.net.ssl.trustStorePassword=passwd net.sf.odinms.tools.MonsterDropCreator -Dcom.sun.management.jmxremote.port=13373 -Dcom.sun.management.jmxremote.password.file=jmxremote.password -Dcom.sun.management.jmxremote.access.file=jmxremote.access
    Then (after you deleted all your monsterdrops) run it and.. VOILA! =]
    When it's done processing the bat file will close and you will have 100% gms-like monsterdrops

    Full credits to me.

    PS:
    This can be done for every version, as long as you have MonsterBook.img.xml in your String.wz

    PS2:
    To delete your previous monsterdrops (to prevent double drops) use
    Code:
    DELETE FROM monsterdrops;


  2. #2
    EntityMS v75 ♥ hirugashi is offline
    MemberRank
    Oct 2008 Join Date
    EntityMSLocation
    353Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    Great job ^^

  3. #3
    The almighty chicken kippieeej is offline
    MemberRank
    Apr 2008 Join Date
    1,038Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    Thanks, i know :)

  4. #4
    Proficient Member MapleKarma is offline
    MemberRank
    Feb 2009 Join Date
    159Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    The usual. -Gives you a cookie and a pat on the back-.

  5. #5
    Alpha Member Anujan is offline
    MemberRank
    May 2008 Join Date
    Ontario, CanadaLocation
    1,633Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    MonsterBook.xml has all the drops? o-o

  6. #6
    The almighty chicken kippieeej is offline
    MemberRank
    Apr 2008 Join Date
    1,038Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    yes :)
    Don't you know how monsterbooks work?

    edit:

  7. #7
    Account Upgraded | Title Enabled! AuroX is offline
    MemberRank
    Sep 2008 Join Date
    1,431Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    oo looks nice!

  8. #8
    Account Upgraded | Title Enabled! iamSTEVE is offline
    MemberRank
    Jul 2008 Join Date
    528Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    Isn't this practically the same as dropsider?

  9. #9
    The almighty chicken kippieeej is offline
    MemberRank
    Apr 2008 Join Date
    1,038Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    Yes, but this one only works if you have an empty database
    and it's not used for comparing drops, but for creating them

  10. #10
    Account Upgraded | Title Enabled! AuroX is offline
    MemberRank
    Sep 2008 Join Date
    1,431Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    EDIT* nvm.. understand already...

  11. #11
    Alpha Member watzmename is offline
    MemberRank
    Aug 2008 Join Date
    2,835Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    Does v55 have MonsterBook.img.xml ? I can't find it in string.wz

  12. #12
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    So you can still add other drops into the db?
    Nice.

  13. #13
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    Quote Originally Posted by watzmename View Post
    Does v55 have MonsterBook.img.xml ? I can't find it in string.wz
    No it doesn't, monsterbook was v60.

  14. #14
    Infraction Banned LaiLaiN00b is offline
    MemberRank
    Jan 2009 Join Date
    85Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    try killing mobs that drop dragon spirit / dragon stone ;D

  15. #15
    :) Horizon is offline
    MemberRank
    Jan 2009 Join Date
    Illinois, U.S.Location
    2,381Posts

    Re: [Release] 100% GMS-Like monsterdrops, EVERY VERSION!

    Quote Originally Posted by XxOsirisxX View Post
    What with the penis in the clouds?
    Yea. I saw that too. What the hell?



Page 1 of 4 1234 LastLast

Advertisement