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:
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.
 
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
 
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. :]
 
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
 
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
 
Help Me Plzzzz

Can SomeonE HeLp mE How To Attach The Microsoft SQL Server


Plzzz Reply
 
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.".
 
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?
 
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