Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Web [Tut]How to make a Npc that gives you NX

Newbie Spellweaver
Joined
Aug 10, 2011
Messages
5
Reaction score
0
How to make an NPC that gives you NX Cash! (Maplestory Private Server)
1)Decide if you want to make it for free or for mesos, or for an item. Open Notepad or WordPad
2)Copy and paste this, if you need mesos to buy nexon cash!

Code:
var status; 

function start() { 
    status = -1; 
    action(1, 0, 0); 
} 

function action(mode, type, selection) {  
    if (mode == 1) { 
        status++; 
    }else{ 
        status--; 
    } 
     
    if (status == 0) { 
        cm.sendSimple("Give me 100 mesos and I give you NX! \r\n #L0# Yes #l \r\n #L1# No. #l"); 
    } else if (status == 1) { 
        if (selection == 0) { 
           if (cm.getMeso() >= 100) { 
                cm.sendOk("Ok Heres your nx!!."); 
                cm.gainNX(100000);
                cm.dispose(); 
            }else{ 
                cm.sendOk("You don't have enough mesos."); 
                cm.dispose(); 
            } 
        } else if (selection == 1) { 
            cm.sendOk("Oh well thats to bad! Come next time!."); 
            cm.dispose(); 
        } 
    }

If you want to edit it please, only edit the text and the amount of nx, unless you know what your doing and/or you found a glitch or something.
Copy and paste this, if your doing it for an item

Code:
var status; 

function start() { 
    status = -1; 
    action(1, 0, 0); 
} 

function action(mode, type, selection) { 
    if (mode == 1) { 
        status++; 
    }else{ 
        status--; 
    } 
     
    if (status == 0) { 
        cm.sendSimple("Give me 1 Eye Mask (Red) and I give you NX! \r\n #L0# I have item. #l \r\n #L1# Sorry, I don't. #l"); 
    } else if (status == 1) { 
        if (selection == 0) { 
            if (cm.haveItem(1022084, 1)) { 
                cm.sendOk("Lol Niiice you have it! Well, Here you go!."); 
                cm.gainNX(10000);
                cm.dispose(); 
            }else{ 
                cm.sendOk("Please come back when you get the item."); 
                cm.dispose(); 
            } 
        } else if (selection == 1) { 
            cm.sendOk("Oh well thats to bad! Come next time!."); 
            cm.dispose(); 
        } 
    }

It is much much easier if your doing it for free...
Copy and paste this:
Code:
function start() { 
    cm.sendOk("Hi! I give you free Nexon cash! Here you go!."); 
} 

function action(mode, type, selection) { 
    cm.gainnx(10000); 
    cm.sendOk("Ok Bye now!"); 
    cm.dispose(); 
}
This is easy because all you have to do is edit how much nx the npc gives you.
3) Now save it as a npc number with .js at the end...Here is an Example.
Code:
22000.js
Make sure that you save it as all files, because it will probably become a txt file if you forget! Save it in Repack>Scripts>Npc This is very important!
Ok thanks! for reading this guide!
Please do not flame or post bad comments, for this is my first tutorial and please reply if theres something wrong, I'm a noob :blush:
 
Last edited:
return null;
Loyal Member
Joined
Dec 21, 2008
Messages
805
Reaction score
130
How's this a tutorial, all you've done is tell us to copy and paste.
 
Junior Spellweaver
Joined
Jun 16, 2010
Messages
137
Reaction score
13
It can still be short if it checks for mesos...
PHP:
function start() { 
    cm.sendOk("Hi! I give you free Nexon cash! Here you go!."); 
} 

function action(mode, type, selection) { 
    if (cm.getMesos() >= 100) {
    cm.gainNx(10000); 
    cm.sendOk("Ok, here is your nx!"); 
    cm.dispose(); 
	} else
	cm.sendOk("You don't have enough mesos.");
	cm.dispose;
}

Same with the one checking for the item, also you forgot to take away the item...just saying :eek:tt1:

PHP:
function start() { 
    cm.sendOk("Give me 1 Eye Mask (Red) and I'll give you NX!"); 
} 

function action(mode, type, selection) { 
    if (cm.haveItem(1022084, 1)) {
    cm.gainItem(1022084, -1);
    cm.gainNx(10000); 
    cm.sendOk("Lol Niiice you have it! Well here you go!"); 
    cm.dispose(); 
	} else
	cm.sendOk("Please com back when you get the item.");
	cm.dispose;
}
I quite agree with mertjuh too...this is more of a tut on how to save an npc into your files than making one yourself...
 
Newbie Spellweaver
Joined
Aug 10, 2011
Messages
5
Reaction score
0
Ok thanks i'll edit the guide thanks for letting me know :)

---------- Post added at 05:38 PM ---------- Previous post was at 05:33 PM ----------

How's this a tutorial, all you've done is tell us to copy and paste.

Sorry... Well uhh sorry? At least it tells you where to put it and other stuff :| Yea its horrible I know :| :(:
 
Back
Top