- Joined
- May 9, 2010
- Messages
- 1
- Reaction score
- 0
Well, today I made an npc script for a maplestory private server..... but, something went wrong. I've done coding before and I'm kinda sure what the problem is.... I just don't know how to fix it and make the npc still do what I want. Here is the script:
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (status >= 0 && mode == 0) {
cm.sendOk("See you next time!");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 0) {
if(cm.haveItem(1142009, 1) && cm.haveItem(4000029, 1000) && cm.haveItem(4031453, 100) && cm.haveItem(4031737, 1) && cm.getLevel() >=10) {
cm.gainItem(4000029, -1000);
cm.gainItem(4031453, -100);
cm.gainItem(4031737, -1);
cm.gainItem(1102094, 1);
cm.sendNext("Wow that was fast! Thank you so much! All you really had to do was defeat the Ape Saiyan who was being controlled by evil spirit and bring me back his blood..... I just wanted the bananas because I was really hungry.");
cm.dispose();
}
}
else {
cm.sendNext("Pssssst! I know a cool secret that you might be interested in!");
}
else if (status == 1) {
if(cm.haveItem(1142009, 1) && cm.getLevel() >=10) {
cm.sendNext("Hmmm, you look strong enough for sure! Well, my secret is that there is a way to gain the power of the Saiyan race without being born as one!");
}
else {
cm.sendNext("Actually, nevermind..... you seem a bit weak at the moment. Come back when you can prove your power level is at least 9000 and that you've got the power of at least 10 humans!");
cm.dispose();
}
}
else if (status == 2) {
cm.sendNext("See my tail? It gives me incredible power! Usually you would need to be born as a Saiyan to get a tail like me, but I know a way for you to grow one too!");
}
else if (status == 3) {
cm.sendNext("All you have to do is bring me 1000 bananas which can be found by killing some monkeys in the forest, and Saiyan's Blood which can be found by killing the Ape Saiyan who is being controlled by an evil spirit.");
}
else if (status == 4) {
cm.sendOk("Once you have all the stuff, come back to me and I'll make you an official Saiyan!");
cm.dispose();
}
}
}
Thanks for any help you can give. :>
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (status >= 0 && mode == 0) {
cm.sendOk("See you next time!");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 0) {
if(cm.haveItem(1142009, 1) && cm.haveItem(4000029, 1000) && cm.haveItem(4031453, 100) && cm.haveItem(4031737, 1) && cm.getLevel() >=10) {
cm.gainItem(4000029, -1000);
cm.gainItem(4031453, -100);
cm.gainItem(4031737, -1);
cm.gainItem(1102094, 1);
cm.sendNext("Wow that was fast! Thank you so much! All you really had to do was defeat the Ape Saiyan who was being controlled by evil spirit and bring me back his blood..... I just wanted the bananas because I was really hungry.");
cm.dispose();
}
}
else {
cm.sendNext("Pssssst! I know a cool secret that you might be interested in!");
}
else if (status == 1) {
if(cm.haveItem(1142009, 1) && cm.getLevel() >=10) {
cm.sendNext("Hmmm, you look strong enough for sure! Well, my secret is that there is a way to gain the power of the Saiyan race without being born as one!");
}
else {
cm.sendNext("Actually, nevermind..... you seem a bit weak at the moment. Come back when you can prove your power level is at least 9000 and that you've got the power of at least 10 humans!");
cm.dispose();
}
}
else if (status == 2) {
cm.sendNext("See my tail? It gives me incredible power! Usually you would need to be born as a Saiyan to get a tail like me, but I know a way for you to grow one too!");
}
else if (status == 3) {
cm.sendNext("All you have to do is bring me 1000 bananas which can be found by killing some monkeys in the forest, and Saiyan's Blood which can be found by killing the Ape Saiyan who is being controlled by an evil spirit.");
}
else if (status == 4) {
cm.sendOk("Once you have all the stuff, come back to me and I'll make you an official Saiyan!");
cm.dispose();
}
}
}
Thanks for any help you can give. :>

