- 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
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 :]
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();
}
}
}
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: