There were quite some syntax errors. You might want to check that you have all needed functions in your source. Also, are you aware of the fact that you only have functionality for two or three options? And that the other twelve simply do nothing?
Thank me.
PHP Code:
/**By JarrYD
**/
var status = 0;
var selected = 1;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
}
if (status == 0) {
cm.sendYesNo("Welcome to the SRB NPC. You need 30K of each stat (STR, DEX, INT, LUK) to do an SRB. Would you like a description of the SRB System?");
} else if (status == 1) {
cm.sendNext("decription.");
} else if (status == 2) {
cm.sendSimple("What SRB do you want to choose?#k\r\n#bSRB 1:#L0#STR Item#l\r\n#L1#DEX Item#l\r\n#L2#INT Item#l\r\n#L3#LUK Item#l\r\n#gSRB 2:#L4#STR Item#l\r\n#L5#DEX Item#l\r\n#L6#INT Item#l\r\n#L7#LUK Item#l\r\n#dSRB 3:#L8#STR Item#l\r\n#L9#DEX Item#l\r\n#L10#INT Item#l\r\n#L11#LUK Item#l\r\n#rSRB 4:#L12#STR Item#l\r\n#L13#DEX Item#l\r\n#L14#INT Item#l\r\n#L15#LUK Item#l");
} else if (status == 3) {
selected = selection;
if (selection == 0) {
if (cm.getPlayer().getStr() > 29999 && cm.getPlayer().getDex() > 29999 && cm.getPlayer().getInt() > 29999) {
cm.sendSimple("Pick an Item:\r\n\r\n"+cm.EquipList(cm.getC()));
} else {
cm.sendOk("You do not have the required stats or items.");
cm.dispose();
}
} else if (selection == 1) {
if (cm.getPlayer().getStr() > 29999 && cm.getPlayer().getDex() > 29999 && cm.getPlayer().getInt() > 29999) {
cm.sendSimple("Pick an Item:\r\n\r\n"+cm.EquipList(cm.getC()));
} else {
cm.sendOk("You do not have the required stats or items.");
cm.dispose();
}
}
} else if (status == 4) {
if (selection == 0) {
cm.MakeSRB1STR(selected);
cm.getPlayer().setStr(4);
cm.getPlayer().setDex(4);
cm.getPlayer().setInt(4);
cm.getPlayer().setLuk(4);
cm.reloadChar();
cm.dispose();
} else
cm.dispose();
}
}