NPC for rare NX items and max stats.

Results 1 to 10 of 10
  1. #1
    Proficient Member samuelnice is offline
    MemberRank
    Jan 2007 Join Date
    176Posts

    NPC for rare NX items and max stats.

    This NPC sells 3 rare NX item and the bowties.
    Please refer to how to edit your bowtie in the other threads..
    If you know how to code your own, meaning that you can change the item IDs, you need no follow my color and stats of the Bow-tie.
    WARNING : To make the bowtie max stats , you gotta edit the stats of it.
    Heres the code :
    PHP Code:
    /*
     Mum and Dad - Seller of things and Max stats(Bowtie only)
    Proudly made by Samuel Lee from SamuelMS.
     */
    var status 0;

    function 
    start() {
            
    status = -1;
            
    action(100);
    }
    function 
    action(modetypeselection) {
            if (
    mode == -1) {
                
    cm.dispose();
            } else {
            if (
    mode == && status <= 3) {
                
    cm.sendOk("Do find me again if you need me. This is proudly coded by Samuel Lee from SamuelMS.");
                
    cm.dispose();
                return;
            }
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
                
    cm.sendSimple ("Do you want to xchange Black Charm #v4031059# with items?\r\n#k#L0##eNeh Neh Neh Boo Boo #v1012074# for 15BC.#n#l\r\n#k#L1##eSanta hat #v1002225# for 15BC.#n#l\r\n#k#L2##eMercury Cloak #v1102149# for 20BC.#n#l\r\n#k#L3##eBow-tie STR #v1122005# for people with STR as max stats#n#l\r\n#k#L4##eBow-tie DEX #v1122004# for people with DEX as max stats#n#l\r\n#k#L5##eBow-tie INT #v1122003# for people with INT as max stats#n#l\r\n#k#L6##eBow-tie LUK #v1122002# for people with LUK as max stats#n#l");
            } else if (
    status == 1) {
                if (
    selection == 0) {
                    if (
    cm.itemQuantity(4031059) >= 15) {
                        
    cm.gainItem(4031059,-15);
         
    cm.gainItem(1012074,1);
                        
    cm.sendOk("You have gain a Neh Neh Neh Boo Boo for 15BC.");
                        
    cm.dispose();
                    } else {
                         
    cm.sendOk("Sorry but you do not have the required BC.");
                         
    cm.dispose();
                        }
                } else if (
    selection == 1) {
                    if (
    cm.itemQuantity(4031059) >= 15) {
                        
    cm.gainItem(4031059,-15);
                        
    cm.gainItem(1002225,1);
                        
    cm.sendOk("You have gained a Santa Hat for 15BC.");
                        
    cm.dispose();
                    } else {
                         
    cm.sendOk("Sorry but you do not have the required BC.");
                         
    cm.dispose();
                    }
                } else if (
    selection == 2) {
                    if (
    cm.itemQuantity(4031059) >= 20) {
                        
    cm.gainItem(4031059,-20);
                        
    cm.gainItem(1102149,1);
                        
    cm.sendOk("You have gained a Mercury Cloak for 20BC.");
                        
    cm.dispose();
                    } else {
                        
    cm.sendOk("Sorry but you do not have the reuiqred BC.");
                        
    cm.dispose();
                    }
                } else if (
    selection == 3) {
           if (
    cm.c.getPlayer().getStr() >= 32767) {
                
    cm.gainItem(1122005,1);
         
    cm.getPlayer().setStr(4);
         
    cm.sendOk("You have gained a Bowtie for STR with a exchange of your stats!,please change channel for the effect.");
         
    cm.dispose();
        } else {
            
    cm.sendOk("Sorry but you do not have max stats for STR!");
         
    cm.dispose();
              } 
              }else if (
    selection == 4) {
                  if (
    cm.c.getPlayer().getDex() >= 32767) {
                                            
    cm.gainItem(1122004,1);
         
    cm.getPlayer().setDex(4);
         
    cm.sendOk("You have gained a Bowtie for DEX with a exchange of your stats!,please change channel for the effect.");
         
    cm.dispose();
                  } else {
                      
    cm.sendOk("Sorry but you do not have max stats for DEX!");
                      
    cm.dispose();
                  }
        }else if (
    selection == 5) {
            if (
    cm.c.getPlayer().getInt() >= 32767) {
                
    cm.gainItem(1122003,1);
                
    cm.getPlayer().setInt(4);
                
    cm.sendOk("You have gained a Bowtie for INT with a exchange of your stats!,please change channel for the effect.");
                
    cm.dispose();
            } else {
                
    cm.sendOk("Sorry but you do not have max stats for INT!");
                
    cm.dispose();
            }
        }else if (
    selection == 6) {
            if (
    cm.c.getPlayer().getLuk() >= 32767) {
                
    cm.gainItem(1122002,1);
                
    cm.getPlayer().setLuk(4);
                
    cm.sendOk("You have gained a Bowtie for LUK with a exchange of your stats!,please change channel for the effect.");
                
    cm.dispose();
            } else {
                
    cm.sendOk("Sorry but you do not have max stats for LUK!");
                
    cm.dispose();
            }
        }
     }
     }
     } 
    The only thing that i'll teach u is adding the cm.setLuk , cm.setDex , cm.setInt and cm.setStr.
    Goto
    Code:
    Your Repack/src/src/net/sf/odinms/scripting/npc
    Find NPCConversationManager.java
    Open it up with whatever editor you use and find this line:
    Code:
    public void setFame(int fame) {
            getPlayer().setFame(fame);
            getPlayer().updateSingleStat(MapleStat.FAME, Integer.valueOf(fame));
        }
    Now , after the last brackets of setFame, go down one line and type this:
    Code:
    public void setStr(int str) {
     getPlayer().setStr(str);
            getPlayer().updateSingleStat(MapleStat.STR, Integer.valueOf(str));
        }
            public void setDex(int dex) {
     getPlayer().setDex(dex);
            getPlayer().updateSingleStat(MapleStat.DEX, Integer.valueOf(dex));
        }
            public void setLuk(int luk) {
     getPlayer().setLuk(luk);
            getPlayer().updateSingleStat(MapleStat.LUK, Integer.valueOf(luk));
        }
            public void setInt(int int1) {
     getPlayer().setInt(int1);
            getPlayer().updateSingleStat(MapleStat.INT, Integer.valueOf(int1));
        }
    So it'll look like this:
    Code:
    public void setFame(int fame) {
            getPlayer().setFame(fame);
            getPlayer().updateSingleStat(MapleStat.FAME, Integer.valueOf(fame));
        }
    	public void setStr(int str) {
    	getPlayer().setStr(str);
            getPlayer().updateSingleStat(MapleStat.STR, Integer.valueOf(str));
        }
            public void setDex(int dex) {
    	getPlayer().setDex(dex);
            getPlayer().updateSingleStat(MapleStat.DEX, Integer.valueOf(dex));
        }
            public void setLuk(int luk) {
    	getPlayer().setLuk(luk);
            getPlayer().updateSingleStat(MapleStat.LUK, Integer.valueOf(luk));
        }
            public void setInt(int int1) {
    	getPlayer().setInt(int1);
            getPlayer().updateSingleStat(MapleStat.INT, Integer.valueOf(int1));
        }
    Compile it.
    Next is changing the currency , my currency is Black Charm , so if yours is different , you would like to change this line:
    Code:
    Do you want to xchange Black Charm #v4031059# with items?
    with
    Code:
    Do you want to xchange <Fill in currency name> #v<currency item code># with items?
    And:
    Code:
    cm.gainItem(4031059,-15);
    with
    Code:
    cm.gainItem(<currency item code>,<quantity taken or given>);
    And:
    Code:
    cm.itemQuantity(4031059) >= 15
    with:
    Code:
    cm.itemQuantity(<currency item code>) >= <Item sold for how much in currency form>
    WARNING: For the cm.itemQuantity, theres 3 lines to edit, so look properly.
    WARNING: For the cm.gainItem , theres also 3 lines to edit , so look properly.
    WARNING , Please do not remove the credits , anyone seen doing that is a noob trying to gain credits.
    Heres the line of the credits:
    Code:
    ]/*
     Mum and Dad - Seller of things and Max stats(Bowtie only)
    Proudly made by Samuel Lee from SamuelMS.
     */
    And:
    Code:
    cm.sendOk("Do find me again if you need me. This is proudly coded by Samuel Lee from SamuelMS.");
    Addition Important Note:
    Bow-tie Yellow = INT (for this script)
    Bow-tie Red = LUK (for this script)
    Bow-tie Pink = DEX (for this script)
    Bow-tie Black = STR (for this script)
    Thats all , please tell me what to add in if it's needed.


  2. #2
    Account Upgraded | Title Enabled! 3esah is offline
    MemberRank
    Jul 2008 Join Date
    254Posts

    Re: NPC for rare NX items and max stats.

    Thanks Maybe im Going To Test

  3. #3
    Proficient Member samuelnice is offline
    MemberRank
    Jan 2007 Join Date
    176Posts

    Re: NPC for rare NX items and max stats.

    Ok.. wish it works because i put in alot of effort.
    Erm , theres a change at the mercury cloak , please recopy it again...

  4. #4
    Account Upgraded | Title Enabled! billabonker is offline
    MemberRank
    Feb 2008 Join Date
    YouTube :)Location
    360Posts

    Re: NPC for rare NX items and max stats.

    not bad i guess
    9/10

  5. #5
    Apprentice Devie is offline
    MemberRank
    Feb 2010 Join Date
    13Posts

    Re: NPC for rare NX items and max stats.

    Hey someone from blaze-maple stole your code and labeled it as their own.

    http://www.blazedev.co.cc/

  6. #6
    Account Upgraded | Title Enabled! Soul is offline
    MemberRank
    Aug 2009 Join Date
    645Posts

    Re: NPC for rare NX items and max stats.

    Quote Originally Posted by Devie View Post
    Hey someone from blaze-maple stole your code and labeled it as their own.

    http://www.blazedev.co.cc/
    Lol advertising post reported.

  7. #7
    Apprentice Devie is offline
    MemberRank
    Feb 2010 Join Date
    13Posts

    Re: NPC for rare NX items and max stats.

    Quote Originally Posted by Soul View Post
    Lol advertising post reported.
    You seriously think that's advertising? Hahaha.

  8. #8
    Zzzz... billybombill is offline
    MemberRank
    Dec 2008 Join Date
    1,355Posts

    Re: NPC for rare NX items and max stats.

    advertising or not, bump much?

  9. #9
    Account Upgraded | Title Enabled! .:LastBreath:. is offline
    MemberRank
    Oct 2009 Join Date
    Under your bedLocation
    1,315Posts

    Re: NPC for rare NX items and max stats.

    Ha found another bumper, im on a role!

  10. #10
    Infraction Banned rice is offline
    MemberRank
    Nov 2009 Join Date
    2,905Posts

    Re: NPC for rare NX items and max stats.

    More of a bump if you ask me.
    Posted via Mobile Device



Advertisement