Fix various other scripts with broken comparisons
This commit is contained in:
@@ -19,7 +19,7 @@ function start() {
|
||||
var em = cm.getEventManager("s4aWorld");
|
||||
if (em == null) {
|
||||
cm.sendOk("You're not allowed to enter with unknown reason. Try again.");
|
||||
} else if (em.getProperty("started").equals("true")) {
|
||||
} else if (em.getProperty("started") === "true") {
|
||||
cm.sendOk("Someone else is already attempting to defeat the Jr.Balrog in another world.");
|
||||
} else {
|
||||
var eli = em.getEligibleParty(cm.getParty());
|
||||
|
||||
@@ -158,7 +158,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
var num_correct = 0;
|
||||
for (var i = 0; i < 3; i++) {
|
||||
if (eim.getProperty("stage4_" + i).equals("" + players[i])) {
|
||||
if (eim.getProperty("stage4_" + i) === ("" + players[i])) {
|
||||
num_correct++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
while (quest[rand].equals("") && status <= 4) {
|
||||
while (quest[rand] === "" && status <= 4) {
|
||||
rand = parseInt(Math.random() * quest.length);
|
||||
}
|
||||
if (status <= 4) {
|
||||
|
||||
@@ -42,7 +42,7 @@ function action(mode, type, selection) {
|
||||
break;
|
||||
case 925100100:
|
||||
var emp = eim.getProperty("stage2");
|
||||
if (emp.equals("0")) {
|
||||
if (emp === "0") {
|
||||
if (cm.haveItem(4001120, 20)) {
|
||||
cm.sendNext("Excellent! Now hunt me 20 Rising Medals.");
|
||||
cm.gainItem(4001120, -20);
|
||||
@@ -51,7 +51,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Rookie Medals.");
|
||||
}
|
||||
} else if (emp.equals("1")) {
|
||||
} else if (emp === "1") {
|
||||
if (cm.haveItem(4001121, 20)) {
|
||||
cm.sendNext("Excellent! Now hunt me 20 Veteran Medals.");
|
||||
cm.gainItem(4001121, -20);
|
||||
@@ -60,7 +60,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Rising Medals.");
|
||||
}
|
||||
} else if (emp.equals("2")) {
|
||||
} else if (emp === "2") {
|
||||
if (cm.haveItem(4001122, 20)) {
|
||||
cm.sendNext("Excellent! Now let us go.");
|
||||
cm.gainItem(4001122, -20);
|
||||
@@ -95,7 +95,7 @@ function action(mode, type, selection) {
|
||||
case 925100301:
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.sendNext("The Lord Pirate's chest has appeared! If you happen to have a key, drop it by the chest to reveal it's treasures. That will certainly make him upset.");
|
||||
if (eim.getProperty("stage3a").equals("0")) {
|
||||
if (eim.getProperty("stage3a") === "0") {
|
||||
cm.getMap().setReactorState();
|
||||
eim.setProperty("stage3a", "1");
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ function action(mode, type, selection) {
|
||||
} else if (channelMaps.getMap(980010301).getCharacters().isEmpty()) {
|
||||
toSnd += "#L2#Join Battle Arena (3) Owner (" + expedicao2.getLeader().getName() + ")" + " Current Member: " + cm.getExpeditionMemberNames(exped2) + "\r\n";
|
||||
}
|
||||
if (toSnd.equals(startSnd)) {
|
||||
if (toSnd === startSnd) {
|
||||
cm.sendOk("All the Battle Arena is currently occupied. I suggest you to come back later or change channels.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
|
||||
@@ -55,7 +55,7 @@ function action(mode, type, selection) {
|
||||
|
||||
var eim = cm.getPlayer().getEventInstance();
|
||||
|
||||
if (eim.getProperty("stage4clear") != null && eim.getProperty("stage4clear").equals("true")) {
|
||||
if (eim.getProperty("stage4clear") != null && eim.getProperty("stage4clear") === "true") {
|
||||
cm.sendOk("After what I thought would be an immortal sleep, I have finally found someone that will save Sharenian. I can truly rest in peace now.");
|
||||
cm.dispose();
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,7 @@ function start() {
|
||||
} else {
|
||||
if (cm.isEventLeader()) {
|
||||
var currentCombo = eim.getProperty("stage3combo");
|
||||
if (currentCombo == null || currentCombo.equals("reset")) {
|
||||
if (currentCombo == null || currentCombo === "reset") {
|
||||
var newCombo = makeCombo();
|
||||
eim.setProperty("stage3combo", newCombo);
|
||||
//cm.playerMessage("Debug: " + newCombo);
|
||||
|
||||
@@ -60,7 +60,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if (cm.isEventLeader()) {
|
||||
if (status == 0) {
|
||||
if (eim.getProperty("stage1status") == null || eim.getProperty("stage1status").equals("waiting")) {
|
||||
if (eim.getProperty("stage1status") == null || eim.getProperty("stage1status") === "waiting") {
|
||||
if (eim.getProperty("stage1phase") == null) {
|
||||
stage = 1;
|
||||
eim.setProperty("stage1phase", stage);
|
||||
@@ -73,10 +73,10 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
cm.sendOk("I shall now present a more difficult puzzle for you. Good luck.");
|
||||
}
|
||||
} else if (eim.getProperty("stage1status").equals("active")) {
|
||||
} else if (eim.getProperty("stage1status") === "active") {
|
||||
stage = parseInt(eim.getProperty("stage1phase"));
|
||||
|
||||
if (eim.getProperty("stage1combo").equals(eim.getProperty("stage1guess"))) {
|
||||
if (eim.getProperty("stage1combo") === eim.getProperty("stage1guess")) {
|
||||
if (stage == 3) {
|
||||
cm.getPlayer().getMap().getReactorByName("statuegate").forceHitReactor(1);
|
||||
clearStage(1, eim);
|
||||
@@ -128,7 +128,7 @@ function getReactors() {
|
||||
var iter = cm.getPlayer().getMap().getReactors().iterator();
|
||||
while (iter.hasNext()) {
|
||||
var mo = iter.next();
|
||||
if (!mo.getName().equals("statuegate")) {
|
||||
if (!mo.getName() === "statuegate") {
|
||||
reactors.push(mo.getObjectId());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user