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!

[Help] FuckMS v117 NPC Giving Wrong Amount of NX

Joined
Mar 1, 2010
Messages
79
Reaction score
2
Hello, I'm using the script as shown below:

/*
NX Cash Selling NPC
By Ricky, LookItzRicky at ragezone.
Put it as any NPC you have free.
Change prices and amounts to your liking
*/
function start() {
cm.sendSimple ("Hello, I am the NX Seller. How much would you like to buy?\r\n#r#L0##e10,000 NX for 10,000,000 Mesos#n#l\r\n#k#L1##e30,000 NX for 20,000,000 Mesos#n#l#k");
}

function action(mode, type, selection) {
cm.dispose();
switch(selection){
case 0:
if(cm.getMeso() >= 10000000){
cm.sendOk("Thanks, 10,000 NX points have been added to your account.");
cm.gainNX(10000);
cm.gainMeso(-10000000);
cm.dispose();
}else{
cm.sendOk("You do not have 10,000,000 mesos.");
cm.dispose();
}
break;
case 1:
if(cm.getMeso() >= 20000000){
cm.sendOk("Thanks, 30,000 NX points have been added to your account.");
cm.gainNX(30000);
cm.gainMeso(-20000000);
cm.dispose();
}else{
cm.sendOk("You do not have 20,000,000 mesos.");
cm.dispose();
}
break;
}
}

However, when I buy the NX, it takes the correct amount of mesos from me but gives me the wrong amount. What it gives is 5,000 Maple Points and 15,000 Maple Points. Where about can I change this?
 
Skilled Illusionist
Joined
Jul 19, 2012
Messages
313
Reaction score
11
It seems that all source has the same problem, including mine. Just double the value, eg you wanna obtain 100,000 nx, so in the npc script you type 200,000 and it will give 100k.
 
Upvote 0
Joined
Mar 1, 2010
Messages
79
Reaction score
2
It seems that all source has the same problem, including mine. Just double the value, eg you wanna obtain 100,000 nx, so in the npc script you type 200,000 and it will give 100k.

I see. That's rather weird. Thanks for the tip though. Will do so later and test it. Also, is there a way to edit the text it shows? I prefer 'Maple Points' over 'maple points'.
 
Upvote 0
Skilled Illusionist
Joined
Jul 19, 2012
Messages
313
Reaction score
11
IMO, most people use cm.modifyCSPoints(If not mistaken), so you get nx credit instead of Maple point or whatever else.
 
Upvote 0
Experienced Elementalist
Joined
Apr 8, 2008
Messages
203
Reaction score
29
If you look in MapleCharacter.java>modifyCSPoints , you will see why you only get half of what you expect.
Just remove the quantity/2 lines.
 
Upvote 0
Joined
Mar 1, 2010
Messages
79
Reaction score
2
IMO, most people use cm.modifyCSPoints(If not mistaken), so you get nx credit instead of Maple point or whatever else.

I checked and there was an option for both but it seems that the NPC only sells me Maple Points instead of NX Cash. But I have to double check to confirm.

If you look in MapleCharacter.java>modifyCSPoints , you will see why you only get half of what you expect.
Just remove the quantity/2 lines.

Hey, thanks a lot. I simply changed the 2 to 1. Am keeping the line in case I may have a use for it in the future.
 
Upvote 0
Back
Top