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!

Nx npc

Status
Not open for further replies.
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
This is my first, sorta real release. My first one was something discovered, but it turned out I was just chasing a pot of gold. So enjoy my basic NPC :]

Needed Function:

http://forum.ragezone.com/showthread.php?t=430693
Thanks NamePlawks for the URL. And iGoofy for making the function

PHP:
/* Made by wtfx0rz of RZ. My first NPC :] and credits to iGoofy for upgrading the script so it shows the set price :]*/

var status = 0;
var price = 1000000000;
var nx = 10000;

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

function action(mode, type, selection) {
if (mode <= 0){
cm.dispose();
} else if (mode == 1)
                status++;
            else
                status--;
         if (status == 0) {
                cm.sendYesNo("Hey,  #b#h ##k!\r\n I can hook you up with some #b#eNX#n#k?! \r\n\r\n I'll sell you it for #r#e" + price + "#n#k mesos.");
        }
        else if (status == 1) {
                if(cm.getMeso() >= price) {
                    cm.gainMeso(-price);
      cm.modifyNX(nx, 0)
                    cm.dispose();
                } else {
                    cm.sendSimple("Oops! You don't have enough mesos!");
                    cm.dispose();
                }
        }
    }
Credits:
Aquatic
of Dev-OdinMS for rewriting Tryst's guide on NPCs
keroh93 for his Rebirth script. It helped me when I got stuck on the part when you press no, or when you don't have enuff mesos.
iGoofy for modifyNX() function AND upgrading the script so the npc shows the price var. Confusing to put it into words...
Me for writing the script

AND REMEMBER TO EDIT THE NPC TEXT. just read through the code and you'll know what im talkin bout

NOTE: Don't post in Dev-OdinMS. It's made by the maker of MapleGeek for his benefit. I read this around the web.
Enjoy :]
 
Last edited:
Master Summoner
Joined
May 31, 2008
Messages
524
Reaction score
1
Re: [Release]NX NPC

Nice! But, is this tested? And the price for NX is 1bil and how much NX do you get from this?
 
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
Re: [Release]NX NPC

yeah it's tested.you get 10k nx. and you can change it by changing the values. like at the top you see var nx = 10000; , just change 10000 to the amount you want it to give. and same with the price.
 
Master Summoner
Joined
May 31, 2008
Messages
524
Reaction score
1
Re: [Release]NX NPC

Oh... And you just put the script in a random NPC that you don't use? Such as Andy in Hene?
 
Experienced Elementalist
Joined
Jul 18, 2008
Messages
232
Reaction score
0
Re: [Release]NX NPC

Did you ever fix this error? Whenever you buy nx it like sometimes doubles or triples your original nx value
 
Skilled Illusionist
Loyal Member
Joined
Apr 20, 2008
Messages
329
Reaction score
2
Re: [Release]NX NPC

Sweet.. Ill use this. And thanks for putting on the credits for the rebirth script xD
 
Newbie Spellweaver
Joined
Jun 20, 2008
Messages
21
Reaction score
0
Re: [Release]NX NPC

not work i think i need to chhange something in npcconversationmanager.java pliz help its take money but dont give cash
 
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
Re: [Release]NX NPC

Sorry for the late reply guys. I've been busy.
@blvosh2
you're gonna need the modifyNX command. You can find it somewhere on this forum.
@keroh93
np :] credits should be given, or else that's just jacked up.
@thisisakevin
I'm not sure about that bug, but I've tested it, and it hasnt happened to me. At least i think...
@falzer
Yes. That is correct.
@NamePlawks
Thanks for helping. :]
 
Master Summoner
Loyal Member
Joined
Nov 30, 2007
Messages
511
Reaction score
0
Re: [Release]NX NPC

Credits to iGoofy for the modifyNX() function. <__<
 
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
Re: [Release]NX NPC

oh yeah. sorry iGoofy. forgot bout it. i'll add it rite now
 
Newbie Spellweaver
Joined
Jun 20, 2008
Messages
21
Reaction score
0
Re: [Release]NX NPC

thank you alotttttt dudeeee thankk youuu but dudes this skript in npsconversation that you gave me worng i cant compile it and i know hot to compile i am sure i compiled before
 
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
Re: [Release]NX NPC

@NamePlawks
Oh. I seeee. I'll change the thread right now.
 
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
Re: [Release]NX NPC

thank you alotttttt dudeeee thankk youuu

No problem :] I've been leeching for a while, so I decided to release something, even if it's merely an NPC.

sorry for double post -_- i forgot to edit

OH. and you might wanna edit what the NPC says. Because he says that he sells it for 1bil mesos... and that'd suck if he really sold it for 1 mil. lol
 
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
Re: [Release]NX NPC

@shins012
Wrong section. Try the support section.
 
Master Summoner
Loyal Member
Joined
Nov 30, 2007
Messages
511
Reaction score
0
Re: [Release]NX NPC

PHP:
/* Made by wtfx0rz of RZ. My first NPC :] */

var status = 0;
var price = 1000000000;
var nx = 10000;

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

function action(mode, type, selection) {
if (mode <= 0){
cm.dispose();
} else if (mode == 1)
                status++;
            else
                status--;
         if (status == 0) {
                cm.sendYesNo("Hey,  #b#h ##k!\r\n I can hook you up with some #b#eNX#n#k?! \r\n\r\n I'll sell you it for #r#e" + price + "#n#k mesos.");
        }
        else if (status == 1) {
                if(cm.getMeso() >= price) {
                    cm.gainMeso(-price);
      cm.modifyNX(nx, 0)
                    cm.dispose();
                } else {
                    cm.sendSimple("Oops! You don't have enough mesos!");
                    cm.dispose();
                }
        }
    }

Using this version, the NPC tells the price that you set for the variable 'price'. If it's set to 10000, it says "I'll sell you it for 10000 mesos.".
 
Newbie Spellweaver
Joined
Jun 20, 2008
Messages
21
Reaction score
0
Re: [Release]NX NPC

dude wat you give me i cant compile it and i am sure i know compile i compiled brfore but to these have eror maybe can you give me yours npcconversationmanager.java pliz?
 
Newbie Spellweaver
Joined
Feb 28, 2008
Messages
45
Reaction score
0
Re: [Release]NX NPC

PHP:
/* Made by wtfx0rz of RZ. My first NPC :] */

var status = 0;
var price = 1000000000;
var nx = 10000;

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

function action(mode, type, selection) {
if (mode <= 0){
cm.dispose();
} else if (mode == 1)
                status++;
            else
                status--;
         if (status == 0) {
                cm.sendYesNo("Hey,  #b#h ##k!\r\n I can hook you up with some #b#eNX#n#k?! \r\n\r\n I'll sell you it for #r#e" + price + "#n#k mesos.");
        }
        else if (status == 1) {
                if(cm.getMeso() >= price) {
                    cm.gainMeso(-price);
      cm.modifyNX(nx, 0)
                    cm.dispose();
                } else {
                    cm.sendSimple("Oops! You don't have enough mesos!");
                    cm.dispose();
                }
        }
    }
Using this version, the NPC tells the price that you set for the variable 'price'. If it's set to 10000, it says "I'll sell you it for 10000 mesos.".

Thanks Goofy! I was wondering how to add that, but I didn't know how. Thanks. I'll add it to my thread, and give you credits.
 
Status
Not open for further replies.
Back
Top