nx from monsters

Results 1 to 10 of 10
  1. #1
    Account Upgraded | Title Enabled! super861 is offline
    MemberRank
    Oct 2009 Join Date
    229Posts

    nx from monsters

    how can you make it that monster give you an amount of nx? like there is a 50% chance to get (level mob * 20) nx per monster. i've used the search but couldn't find anything.

    im using exiledMs source. http://forum.ragezone.com/f427/sourc...17-1-a-914201/

    Thanks in advance!


  2. #2
    Account Upgraded | Title Enabled! Liv3 is offline
    MemberRank
    Dec 2011 Join Date
    CanadaLocation
    817Posts

    Re: nx from monsters

    Go to killMonster in MapleMap, and add a check there.

  3. #3
    Account Upgraded | Title Enabled! super861 is offline
    MemberRank
    Oct 2009 Join Date
    229Posts

    Re: nx from monsters

    am there, but honestly no idea what to add. i'm noob at java :3

  4. #4
    $_SESSION['DEV']; hecari is offline
    MemberRank
    Dec 2008 Join Date
    336Posts

    Re: nx from monsters

    Quote Originally Posted by super861 View Post
    am there, but honestly no idea what to add. i'm noob at java :3
    I thought lithium source has it already. He's asking you to go MapleMap.java and look for killMonster method. Try to locate the NX code and modify it to what you desire. I helped you locate the code:

    PHP Code:
     final int cashz = (int) ((mob.getStats().isBoss() && mob.getStats().getHPDisplayType() == 20 1) * caServerrate);
            final 
    int cashModifier = (int) ((mob.getStats().isBoss() ? (mob.getStats().isPartyBonus() ? (mob.getMobExp() / 1000) : 0) : (mob.getMobExp() / 1000 mob.getMobMaxHp() / 20000))); //no rate
            // Global Drops
            
    for (final MonsterGlobalDropEntry de globalEntry) {
                if (
    Randomizer.nextInt(999999) < de.chance && (de.continent || (de.continent 10 && mapid 100000000 == de.continent) || (de.continent 100 && mapid 10000000 == de.continent) || (de.continent 1000 && mapid 1000000 == de.continent))) {
                    if (
    de.questid && chr.getQuestStatus(de.questid) != 1) { 
                        continue; 
                    } 
                    if (
    de.itemId == 0) {
                        
    chr.modifyCSPoints(1, (int) ((Randomizer.nextInt(cashz) + cashz cashModifier) * (chr.getStat().cashBuff 100.0) * chr.getCashMod()), true); 
    Last edited by hecari; 20-05-13 at 08:45 AM.

  5. #5
    Account Upgraded | Title Enabled! super861 is offline
    MemberRank
    Oct 2009 Join Date
    229Posts

    Re: nx from monsters

    Quote Originally Posted by hecari View Post
    I thought lithium source has it already. He's asking you to go MapleMap.java and look for killMonster method. Try to locate the NX code and modify it to what you desire. I helped you locate the code:

    PHP Code:
     final int cashz = (int) ((mob.getStats().isBoss() && mob.getStats().getHPDisplayType() == 20 1) * caServerrate);
            final 
    int cashModifier = (int) ((mob.getStats().isBoss() ? (mob.getStats().isPartyBonus() ? (mob.getMobExp() / 1000) : 0) : (mob.getMobExp() / 1000 mob.getMobMaxHp() / 20000))); //no rate
            // Global Drops
            
    for (final MonsterGlobalDropEntry de globalEntry) {
                if (
    Randomizer.nextInt(999999) < de.chance && (de.continent || (de.continent 10 && mapid 100000000 == de.continent) || (de.continent 100 && mapid 10000000 == de.continent) || (de.continent 1000 && mapid 1000000 == de.continent))) {
                    if (
    de.questid && chr.getQuestStatus(de.questid) != 1) { 
                        continue; 
                    } 
                    if (
    de.itemId == 0) {
                        
    chr.modifyCSPoints(1, (int) ((Randomizer.nextInt(cashz) + cashz cashModifier) * (chr.getStat().cashBuff 100.0) * chr.getCashMod()), true); 
    oh i did find the killmonster method inside my maplemap.java. but there isnt such a code in it, or anything that has to do something with NX as far as i can tell.. i suppose it has been taken out of the lithium source, since exiled is only based of it

  6. #6
    Account Upgraded | Title Enabled! super861 is offline
    MemberRank
    Oct 2009 Join Date
    229Posts

    Re: nx from monsters

    bump.

  7. #7
    $_SESSION['DEV']; hecari is offline
    MemberRank
    Dec 2008 Join Date
    336Posts

    Re: nx from monsters

    Quote Originally Posted by super861 View Post
    bump.
    Ermm dude, relook at the code I posted.

    PHP Code:
    final int cashz = (int) ((mob.getStats().isBoss() && mob.getStats().getHPDisplayType() == 20 1) * caServerrate);
            final 
    int cashModifier = (int) ((mob.getStats().isBoss() ? (mob.getStats().isPartyBonus() ? (mob.getMobExp() / 1000) : 0) : (mob.getMobExp() / 1000 mob.getMobMaxHp() / 20000))); //no rate
            // Global Drops
            
    for (final MonsterGlobalDropEntry de globalEntry) {
                if (
    Randomizer.nextInt(999999) < de.chance && (de.continent || (de.continent 10 && mapid 100000000 == de.continent) || (de.continent 100 && mapid 10000000 == de.continent) || (de.continent 1000 && mapid 1000000 == de.continent))) {
                    if (
    de.questid && chr.getQuestStatus(de.questid) != 1) { 
                        continue; 
                    } 
                    if (
    de.itemId == 0) {
                        
    chr.modifyCSPoints(1, (int) ((Randomizer.nextInt(cashz) + cashz cashModifier) * (chr.getStat().cashBuff 100.0) * chr.getCashMod()), true); 
    Notice this : chr.modifyCSPoints(1, (int) ((Randomizer.nextInt(cashz) + cashz + cashModifier) * (chr.getStat().cashBuff / 100.0) * chr.getCashMod()), true);

  8. #8
    Account Upgraded | Title Enabled! super861 is offline
    MemberRank
    Oct 2009 Join Date
    229Posts

    Re: nx from monsters

    got it. (dunno why i didnt find it before o.O)
    but how do i change it around so that monsters do give nx? (they don't know). sorry for being noob at this *.* and thanks for tha help :3

  9. #9
    $_SESSION['DEV']; hecari is offline
    MemberRank
    Dec 2008 Join Date
    336Posts

    Re: nx from monsters

    PHP Code:
    ((Randomizer.nextInt(cashz) + cashz cashModifier) * (chr.getStat().cashBuff 100.0) * chr.getCashMod()), true); 
    Change how the variable is derived from.

  10. #10
    Account Upgraded | Title Enabled! StripedCow is offline
    MemberRank
    Jun 2011 Join Date
    813Posts

    Re: nx from monsters

    sounds like u need a randomizer to me bro


    int chance = Randomizer.nextInt(100);

    attacker.modifyCSPoints(4, 50);
    attacker.dropMessage("You have gained 50 NX.");



Advertisement