Reformat and clean up npc scripts
This commit is contained in:
@@ -21,26 +21,29 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
else
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
if (status == 1) {
|
||||
var selStr = "";
|
||||
if (cm.getJobId() == 0)
|
||||
if (cm.getJobId() == 0) {
|
||||
selStr += "We have a special 90% discount for beginners.";
|
||||
}
|
||||
selStr += "Choose your destination, for fees will change from place to place.#b";
|
||||
for (var i = 0; i < maps.length; i++)
|
||||
for (var i = 0; i < maps.length; i++) {
|
||||
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
|
||||
}
|
||||
cm.sendSimple(selStr);
|
||||
} else if (status == 2) {
|
||||
if (maps[selection] == 100000000 && cm.getMapId() == 101000000 && cm.haveItem(4032288)) {
|
||||
cm.sendYesNo("Hmm, I see you have been recommended by Neinheart to come to Victoria Island to improve your knightly skills. Well, just this time the ride will be free of charges. Will you take the ride?");
|
||||
hasCoupon = true;
|
||||
} else {
|
||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b" + (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||
}
|
||||
|
||||
|
||||
selectedMap = selection;
|
||||
} else if (status == 3) {
|
||||
if (!hasCoupon) {
|
||||
@@ -60,7 +63,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
cm.gainItem(4032288, -1);
|
||||
}
|
||||
|
||||
|
||||
cm.warp(maps[selectedMap], 0);
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user