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!

[Release]Nx seller + nexon card exchanger NPC!

Status
Not open for further replies.
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Small release :p
Some credits to v1ral? for giving the original script
Code:
/*
	NX Cash Selling NPC
	By V1ral from www.ancient-ms.net
	Put it as any NPC you have free.
	Change prices and ammounts to your liking
*/
function start() {
	cm.sendSimple ("hey dud i sells u drugs k dud? luls jk i sell and exchange nx cash!\r\n#r#L0##e10,000 NX - 1,000,000,000 Mesos#n#l\r\n#k#L1##e25,000 NX - 2,100,000,000 Mesos#n#l#k\r\n#e#L2#Cash out #b1#k #r100 point nx card#k\r\n#e#L3#Cash out #b5#k #r100 point nx cards#k\r\n#e#L4#Cash out #b10#k #r100 point nx cards#k\r\n#e#L5#Cash out #b25#k #r100 point nx cards#k\r\n#e#L6#Cash out #b1#k #g250 point nx card#k\r\n#e#L7#Cash out #b5#k #g250 point nx cards#k\r\n#e#L8#Cash out #b10#k #g250 point nx cards#k\r\n#e#L9#Cash out #b25#k #g250 point nx cards#k")
	}

function action(mode, type, selection) {
		cm.dispose();

	switch(selection){
		case 0: 
			if(cm.getMeso() >= 1000000000){
			cm.sendOk("Thanks! 10,000 NX points has been added to your account! Enjoy! #rSome nx items may dc you when you buy them! However, you will have the item in your inven when you log back in!#k");
						cm.gainMeso(-1000000000);
			cm.modifyNX(10000, 0);
			cm.dispose();
			}else{
			cm.sendOk("Go away hobo you have no money!");
			cm.dispose();
			}
		break;
		case 1: 
			if(cm.getMeso() >= 2100000000) {
			cm.sendOk("Thanks! 25,000 NX points has been added to your account! Enjoy! #rSome nx items may dc you when you buy them! However, you will have the item in your inven when you log back in!#k");
			cm.gainMeso(-2100000000);
			cm.modifyNX(25000, 0);
			cm.dispose();		
			}
			else{	
				cm.sendOk("Ducking SCAMMER YOU DON'T HAVE 2.1 BIL WITH YOU!");
				cm.dispose();
			};
		break;
		case 2:
			if(cm.haveItem(4031530, 1)) {
			cm.sendOk("Your card has been redeemed! And in return I gave you 100 nx points!")
			cm.gainItem(4031530, -1);
			cm.modifyNX(100, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou don't have #b1#k #v4031530#")
				cm.dispose();	
			};	
		break;
		case 3:
			if(cm.haveItem(4031530, 5)) {
			cm.sendOk("Your cards have been redeemed! And in return I gave you 500 nx points!")
			cm.gainItem(4031530, -5);
			cm.modifyNX(500, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou need #b5#k #v4031530#\r\nPlease check your inventory and come back again when you have 5.")
				cm.dispose();	
			};	
		break;
		case 4:
			if(cm.haveItem(4031530, 10)) {
			cm.sendOk("Your cards have been redeemed! And in return I gave you 1000 nx points!")
			cm.gainItem(4031530, -10);
			cm.modifyNX(1000, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou need #b10#k #v4031530#\r\nPlease check your inventory and come back again when you have 10.")
				cm.dispose();	
			};	
		break;
		case 5:
			if(cm.haveItem(4031530, 25)) {
			cm.sendOk("Your cards have been redeemed! And in return I gave you 2500 nx points!")
			cm.gainItem(4031530, -25);
			cm.modifyNX(2500, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou need #b25#k #v4031530#\r\nPlease check your inventory and come back again when you have 25.")
				cm.dispose();	
			};	
		break;
		case 6:
			if(cm.haveItem(4031531, 1)) {
			cm.sendOk("Your card have been redeemed! And in return I gave you 250 nx points!")
			cm.gainItem(4031531, -1);
			cm.modifyNX(250, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou need #b1#k #v4031531#")
				cm.dispose();	
			};
		break;
		case 7:
			if(cm.haveItem(4031531, 5)) {
			cm.sendOk("Your cards have been redeemed! And in return I gave you 1250 nx points!")
			cm.gainItem(4031531, -5);
			cm.modifyNX(1250, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou need #b5#k #v4031531#\r\nPlease check your inventory and come talk to me again when you have 5.")
				cm.dispose();	
			};
		break
		case 8:
			if(cm.haveItem(4031531, 10)) {
			cm.sendOk("Your cards have been redeemed! And in return I gave you 2500 nx points!")
			cm.gainItem(4031531, -10);
			cm.modifyNX(2500, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou need #b10#k #v4031531#\r\nPlease check your inventory and come talk to me again when you have 10.")
				cm.dispose();	
			};
		break
		case 9:
			if(cm.haveItem(4031531, 25)) {
			cm.sendOk("Your cards have been redeemed! And in return I gave you 6250 nx points!")
			cm.gainItem(4031531, -25);
			cm.modifyNX(6250, 0);
			cm.dispose();
			} else {
				cm.sendOk("#eYou need #b25#k #v4031531#\r\nPlease check your inventory and come talk to me again when you have 25.")
				cm.dispose();	
			};
		}
	}

paste that into w/e blahblah.js file

If you don't have this function yet please add it in NPCConversationManager.java
Code:
public void modifyNX(int amount, int type) {
            getPlayer().modifyCSPoints(type, amount);
            if (amount > 0) {
                        getClient().getSession().write(MaplePacketCreator.serverNotice(5, "You have gained NX Cash (+" + amount +")."));
                 } else { 
                        getClient().getSession().write(MaplePacketCreator.serverNotice(5, "You have lost NX Cash (" + (amount) +")."));           
                 }
        }
 
Last edited:
Junior Spellweaver
Joined
Jun 27, 2008
Messages
148
Reaction score
0
I see you figured out my switch statements. o:
 
Master Summoner
Joined
May 31, 2008
Messages
524
Reaction score
1
Well, I'll just use this one! Btw, what are the codes for those Nexon Card Exchanger?
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
100 pt nexon card - 4031530
250 pt nexon card - 4031531
 
Master Summoner
Joined
May 31, 2008
Messages
524
Reaction score
1
Well, this script makes a NPC have 2 functions, right? 1 is to sell NX Cash, 2 is to redeem cards.
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
yes
in my server, i made monsters drop the cards at a very low rate :p
 
Initiate Mage
Joined
Jul 11, 2008
Messages
22
Reaction score
0
Handy, it doesn't matter if this was already released, it's the most convienient one we see, we use, like this one
 
Initiate Mage
Joined
Jun 17, 2008
Messages
41
Reaction score
0
so i bought a nx card for 1 bil but ti didnt go into my guy lol?
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
No... you're not buying a card... -_-
Please read the script >_>
 
Initiate Mage
Joined
Jun 17, 2008
Messages
41
Reaction score
0
i meant like i bought the nx for 1 bil and it never went to my acc
 
Initiate Mage
Joined
Apr 29, 2008
Messages
75
Reaction score
0
Doesn't work.
You need a SQL file executed in your database I'm sure of it.

Edit: The cash never goes into your account.
 
Initiate Mage
Joined
Oct 3, 2008
Messages
87
Reaction score
0
uhh how can i choose which npc to use? which part of the script can i change the npc (sorry im new)
 
Senior
Member
Joined
Feb 8, 2008
Messages
1,873
Reaction score
42
uhh how can i choose which npc to use? which part of the script can i change the npc (sorry im new)
save the file in notepad

name it [Whatever npcs id you wanna use].js

and put it in your npc folder and voila

its changed
 
Status
Not open for further replies.
Back
Top