[Release] monster,item,npc db option

Results 1 to 12 of 12
  1. #1
    Member c92h23 is offline
    MemberRank
    Jun 2008 Join Date
    91Posts

    [Release] monster,item,npc db option



    Item Option Setting



    NPC Option Setting



    Monster Option Setting

    what is this ??

    This can set Monster position, Item Option, NPC position, swear filter at DB!
    Monster could set Hp,Mp,Exp,level,coordinates.
    Item could set speed,jump,str,dex,etc...
    NPC could set coordinates and map set

    If there is no information in DB, it shows xml information in the wz file

    step.1 download sql.zip

    http://www.mediafire.com/download.php?uzzzjtun1no

    step.2 add source

    MaplePacketCreator.java in find
    mplew.write(equip.getUpgradeSlots());
    mplew.write(equip.getLevel());
    mplew.writeShort(equip.getStr()); // str
    mplew.writeShort(equip.getDex()); // dex
    mplew.writeShort(equip.getInt()); // int
    mplew.writeShort(equip.getLuk()); // luk
    mplew.writeShort(equip.getHp()); // hp
    mplew.writeShort(equip.getMp()); // mp
    mplew.writeShort(equip.getWatk()); // watk
    mplew.writeShort(equip.getMatk()); // matk
    mplew.writeShort(equip.getWdef()); // wdef
    mplew.writeShort(equip.getMdef()); // mdef
    mplew.writeShort(equip.getAcc()); // accuracy
    mplew.writeShort(equip.getAvoid()); // avoid
    mplew.writeShort(equip.getHands()); // hands
    mplew.writeShort(equip.getSpeed()); // speed
    mplew.writeShort(equip.getJump()); // jump
    mplew.writeMapleAsciiString(equip.getOwner());
    replace

    /*mplew.write(equip.getUpgradeSlots());
    mplew.write(equip.getLevel());
    mplew.writeShort(equip.getStr()); // str
    mplew.writeShort(equip.getDex()); // dex
    mplew.writeShort(equip.getInt()); // int
    mplew.writeShort(equip.getLuk()); // luk
    mplew.writeShort(equip.getHp()); // hp
    mplew.writeShort(equip.getMp()); // mp
    mplew.writeShort(equip.getWatk()); // watk
    mplew.writeShort(equip.getMatk()); // matk
    mplew.writeShort(equip.getWdef()); // wdef
    mplew.writeShort(equip.getMdef()); // mdef
    mplew.writeShort(equip.getAcc()); // accuracy
    mplew.writeShort(equip.getAvoid()); // avoid
    mplew.writeShort(equip.getHands()); // hands
    mplew.writeShort(equip.getSpeed()); // speed
    mplew.writeShort(equip.getJump()); // jump
    mplew.writeMapleAsciiString(equip.getOwner()); backup source */
    try {
    Connection con = DatabaseConnection.getConnection();
    PreparedStatement ps = con.prepareStatement("SELECT * FROM op_item WHERE itemid = ?");
    ps.setInt(1, equip.getItemId());
    ResultSet rs = ps.executeQuery();
    if (!rs.next()) {
    mplew.write(equip.getUpgradeSlots());
    mplew.write(equip.getLevel());
    mplew.writeShort(equip.getStr()); // str
    mplew.writeShort(equip.getDex()); // dex
    mplew.writeShort(equip.getInt()); // int
    mplew.writeShort(equip.getLuk()); // luk
    mplew.writeShort(equip.getHp()); // hp
    mplew.writeShort(equip.getMp()); // mp
    mplew.writeShort(equip.getWatk()); // watk
    mplew.writeShort(equip.getMatk()); // matk
    mplew.writeShort(equip.getWdef()); // wdef
    mplew.writeShort(equip.getMdef()); // mdef
    mplew.writeShort(equip.getAcc()); // accuracy
    mplew.writeShort(equip.getAvoid()); // avoid
    mplew.writeShort(equip.getHands()); // hands
    mplew.writeShort(equip.getSpeed()); // speed
    mplew.writeShort(equip.getJump()); // jump
    mplew.writeMapleAsciiString(equip.getOwner());
    } else {
    mplew.write(rs.getShort("upgradeslots"));
    mplew.write(rs.getShort("level"));
    mplew.writeShort(rs.getShort("str")); // str
    mplew.writeShort(rs.getShort("dex")); // dex
    mplew.writeShort(rs.getShort("int")); // int
    mplew.writeShort(rs.getShort("luk")); // luk
    mplew.writeShort(rs.getShort("hp")); // hp
    mplew.writeShort(rs.getShort("mp")); // mp
    mplew.writeShort(rs.getShort("watk")); // watk
    mplew.writeShort(rs.getShort("matk")); // matk
    mplew.writeShort(rs.getShort("wdef")); // wdef
    mplew.writeShort(rs.getShort("mdef")); // mdef
    mplew.writeShort(rs.getShort("acc")); // accuracy
    mplew.writeShort(rs.getShort("avoid")); // avoid
    mplew.writeShort(rs.getShort("hands")); // hands
    mplew.writeShort(rs.getShort("speed")); // speed
    mplew.writeShort(rs.getShort("jump")); // jump
    mplew.writeMapleAsciiString(rs.getString("owner"));
    }
    } catch (Exception ex) {
    ex.printStackTrace();
    }
    MapleMap.java in find

    MapleStatEffect summonStat = chr.getStatForBuff(MapleBuffStat.SUMMON);
    above add

    try {
    PreparedStatement ps = con.prepareStatement("SELECT * FROM op_monster WHERE map = ?");
    ps.setInt(1, chr.getMapId());
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    MapleMonsterStats stat = new MapleMonsterStats();
    Point spawnPos = new Point(rs.getInt("x"), rs.getInt("y"));
    stat.setName(stat.getName());

    stat.setHp(rs.getInt("hp"));
    stat.setMp(rs.getInt("mp"));
    stat.setLevel(rs.getInt("level"));
    stat.setExp(rs.getInt("exp"));
    if (rs.getInt("boss") == 1)
    stat.setBoss(true);
    if (rs.getInt("undead") == 1)
    stat.setUndead(true);

    if (rs.getInt("amount") == 1) {
    MapleMonster mob = MapleLifeFactory.getMonster(rs.getInt("mobid"));
    mob.setOverrideStats(stat);
    mob.setHp(mob.getMaxHp());
    mob.setMp(mob.getMaxMp());
    chr.getMap().spawnMonsterOnGroundBelow(mob, spawnPos);
    } else {
    for (int i = 0; i < rs.getInt("amount"); i++) {
    MapleMonster mob = MapleLifeFactory.getMonster(rs.getInt("mobid"));
    mob.setOverrideStats(stat);
    mob.setHp(mob.getMaxHp());
    mob.setMp(mob.getMaxMp());
    chr.getMap().spawnMonsterOnGroundBelow(mob, spawnPos);
    }
    }
    }
    } catch (SQLException ex) {
    ex.printStackTrace();
    }

    try {
    PreparedStatement ps = con.prepareStatement("SELECT * FROM op_npc WHERE map = ?");
    ps.setInt(1, chr.getMapId());
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    Point pos = new Point(rs.getInt("x"), rs.getInt("y"));
    MapleNPC npc = MapleLifeFactory.getNPC(rs.getInt("npcid"));
    npc.setPosition(pos);
    npc.setCy(pos.y);
    npc.setRx0(pos.x);
    npc.setRx1(pos.x);
    npc.setFh(this.getFootholds().findBelow(pos).getId());
    npc.setCustom(true);
    chr.getMap().addMapObject(npc);
    chr.getMap().broadcastMessage(MaplePacketCreator.spawnNPC(npc));
    }
    } catch (SQLException ex) {

    }
    made me
    Last edited by c92h23; 16-01-09 at 12:17 PM.


  2. #2
    Account Upgraded | Title Enabled! Bosco Wong is offline
    MemberRank
    Jun 2008 Join Date
    SingaporeLocation
    278Posts

    Re: [Release] monster,item,npc db option

    nice thx for the release

  3. #3
    Valued Member EC15 is offline
    MemberRank
    Jan 2009 Join Date
    120Posts

    Re: [Release] monster,item,npc db option

    awosome release! good job!

  4. #4
    Account Upgraded | Title Enabled! EspadaFung is offline
    MemberRank
    Jul 2008 Join Date
    Home, don't stalk meLocation
    1,030Posts

    Re: [Release] monster,item,npc db option

    so this read the database than xml? am i right? o.o

  5. #5
    Account Upgraded | Title Enabled! renegod is offline
    MemberRank
    Aug 2005 Join Date
    SingaporeLocation
    630Posts

    Re: [Release] monster,item,npc db option

    Isit that hard to edit? Hmm.. you can try editing your post next time.

  6. #6
    Account Upgraded | Title Enabled! RMZero213 is offline
    MemberRank
    Apr 2008 Join Date
    Far, far awayLocation
    1,280Posts

    Re: [Release] monster,item,npc db option

    Try again on the mobs, exit map -> come back = mob respawned.
    Multiple people exit map -> come back = lots of mobs spawned.

  7. #7
    Member c92h23 is offline
    MemberRank
    Jun 2008 Join Date
    91Posts

    Re: [Release] monster,item,npc db option

    Quote Originally Posted by RMZero213 View Post
    Try again on the mobs, exit map -> come back = mob respawned.
    Multiple people exit map -> come back = lots of mobs spawned.
    umm???

  8. #8
    Account Upgraded | Title Enabled! shakar96 is offline
    MemberRank
    Jun 2008 Join Date
    I QUIT, LOL I had 9XX posts :)Location
    656Posts

    Re: [Release] monster,item,npc db option

    Nice one :)

  9. #9
    Infraction Banned TraitorxX is offline
    MemberRank
    Jan 2009 Join Date
    27Posts

    Re: [Release] monster,item,npc db option

    Thanks for stealing my idea (That I released a while ago (http://forum.ragezone.com/f427/relea...rom-db-484660/))

  10. #10
    Member c92h23 is offline
    MemberRank
    Jun 2008 Join Date
    91Posts

    Re: [Release] monster,item,npc db option

    Quote Originally Posted by TraitorxX View Post
    Thanks for stealing my idea (That I released a while ago (http://forum.ragezone.com/f427/relea...rom-db-484660/))
    I have not seen ... It was your idea
    sorry

    - Google translation

  11. #11
    Apprentice Cyberbully is offline
    MemberRank
    Oct 2008 Join Date
    18Posts

    Re: [Release] monster,item,npc db option

    well he did make the monster unique stat bit so credits on that

  12. #12
    Account Upgraded | Title Enabled! shakar96 is offline
    MemberRank
    Jun 2008 Join Date
    I QUIT, LOL I had 9XX posts :)Location
    656Posts

    Re: [Release] monster,item,npc db option

    Can you put the SQL in code?
    The download isn't working :(

    EDIT: NVM works.



Advertisement