diff --git a/scripts/npc/1061012.js b/scripts/npc/1061012.js index 6e5f15cf3b..afd5c8bf20 100644 --- a/scripts/npc/1061012.js +++ b/scripts/npc/1061012.js @@ -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()); diff --git a/scripts/npc/2013001.js b/scripts/npc/2013001.js index 897d2db8b9..98a2c4dfae 100644 --- a/scripts/npc/2013001.js +++ b/scripts/npc/2013001.js @@ -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++; } } diff --git a/scripts/npc/2030006_old.js b/scripts/npc/2030006_old.js index a1bbae69db..96c91960e7 100644 --- a/scripts/npc/2030006_old.js +++ b/scripts/npc/2030006_old.js @@ -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) { diff --git a/scripts/npc/2094002.js b/scripts/npc/2094002.js index 1c7bbbe8c8..cc3ada4d87 100644 --- a/scripts/npc/2094002.js +++ b/scripts/npc/2094002.js @@ -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"); } diff --git a/scripts/npc/2101014.js b/scripts/npc/2101014.js index db672437ae..1964a752f2 100644 --- a/scripts/npc/2101014.js +++ b/scripts/npc/2101014.js @@ -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 { diff --git a/scripts/npc/9040003.js b/scripts/npc/9040003.js index 8974ecbdb9..403798e3cd 100644 --- a/scripts/npc/9040003.js +++ b/scripts/npc/9040003.js @@ -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; diff --git a/scripts/npc/9040006.js b/scripts/npc/9040006.js index 5e2c135cff..ced6d1846f 100644 --- a/scripts/npc/9040006.js +++ b/scripts/npc/9040006.js @@ -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); diff --git a/scripts/npc/9040009.js b/scripts/npc/9040009.js index 5448994ec9..a2d69b1382 100644 --- a/scripts/npc/9040009.js +++ b/scripts/npc/9040009.js @@ -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()); } } diff --git a/scripts/portal/EBoat1.js b/scripts/portal/EBoat1.js index 82e8b90a40..b685e4b898 100644 --- a/scripts/portal/EBoat1.js +++ b/scripts/portal/EBoat1.js @@ -36,7 +36,7 @@ function enter(pi) { pi.playPortalSound(); pi.warp(200090000, 4); - if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { + if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog") === "true") { pi.changeMusic("Bgm04/ArabPirate"); } return true; diff --git a/scripts/portal/EBoat2.js b/scripts/portal/EBoat2.js index 86468b0a64..e47d91f960 100644 --- a/scripts/portal/EBoat2.js +++ b/scripts/portal/EBoat2.js @@ -36,7 +36,7 @@ function enter(pi) { pi.playPortalSound(); pi.warp(200090000, 5); - if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { + if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog") === "true") { pi.changeMusic("Bgm04/ArabPirate"); } return true; diff --git a/scripts/portal/OBoat1.js b/scripts/portal/OBoat1.js index de358d0410..d925ca89ed 100644 --- a/scripts/portal/OBoat1.js +++ b/scripts/portal/OBoat1.js @@ -37,7 +37,7 @@ function enter(pi) { pi.playPortalSound(); pi.warp(200090010, 4); - if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { + if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog") === "true") { pi.changeMusic("Bgm04/ArabPirate"); } return true; diff --git a/scripts/portal/OBoat2.js b/scripts/portal/OBoat2.js index 7bf304c4f8..f9a37dbcc8 100644 --- a/scripts/portal/OBoat2.js +++ b/scripts/portal/OBoat2.js @@ -37,7 +37,7 @@ function enter(pi) { pi.playPortalSound(); pi.warp(200090010, 5); - if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { + if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog") === "true") { pi.changeMusic("Bgm04/ArabPirate"); } return true; diff --git a/scripts/portal/davy_next1.js b/scripts/portal/davy_next1.js index e1e9fcc85c..0d2ca234d9 100644 --- a/scripts/portal/davy_next1.js +++ b/scripts/portal/davy_next1.js @@ -1,7 +1,7 @@ function enter(pi) { try { var eim = pi.getEventInstance(); - if (eim != null && eim.getProperty("stage2").equals("3")) { + if (eim != null && eim.getProperty("stage2") === "3") { pi.playPortalSound(); pi.warp(925100200, 0); //next return true; diff --git a/scripts/portal/elevator.js b/scripts/portal/elevator.js index 3ee012b44b..ee9d7f0a7b 100644 --- a/scripts/portal/elevator.js +++ b/scripts/portal/elevator.js @@ -3,11 +3,11 @@ function enter(pi) { var elevator = pi.getEventManager("Elevator"); if (elevator == null) { pi.getPlayer().dropMessage(5, "The elevator is under maintenance."); - } else if (elevator.getProperty(pi.getMapId() == 222020100 ? ("goingUp") : ("goingDown")).equals("false")) { + } else if (elevator.getProperty(pi.getMapId() == 222020100 ? ("goingUp") : ("goingDown")) === "false") { pi.playPortalSound(); pi.warp(pi.getMapId() == 222020100 ? 222020110 : 222020210, 0); return true; - } else if (elevator.getProperty(pi.getMapId() == 222020100 ? ("goingUp") : ("goingDown")).equals("true")) { + } else if (elevator.getProperty(pi.getMapId() == 222020100 ? ("goingUp") : ("goingDown")) === "true") { pi.getPlayer().dropMessage(5, "The elevator is currently moving."); } else { pi.getPlayer().dropMessage(5, "Dafuq is happening?!"); diff --git a/scripts/portal/kinggate2_open.js b/scripts/portal/kinggate2_open.js index 179d92ac17..7bf580906a 100644 --- a/scripts/portal/kinggate2_open.js +++ b/scripts/portal/kinggate2_open.js @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("kinggate").getState() == 1) { pi.playPortalSound(); pi.warp(990000900, 2); - if (pi.getPlayer().getEventInstance().getProperty("boss") != null && pi.getPlayer().getEventInstance().getProperty("boss").equals("true")) { + if (pi.getPlayer().getEventInstance().getProperty("boss") != null && pi.getPlayer().getEventInstance().getProperty("boss") === "true") { pi.changeMusic("Bgm10/Eregos"); } return true; diff --git a/scripts/portal/kinggate_open.js b/scripts/portal/kinggate_open.js index 19aa9f4321..e35e2e32a9 100644 --- a/scripts/portal/kinggate_open.js +++ b/scripts/portal/kinggate_open.js @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("kinggate").getState() == 1) { pi.playPortalSound(); pi.warp(990000900, 1); - if (pi.getPlayer().getEventInstance().getProperty("boss") != null && pi.getPlayer().getEventInstance().getProperty("boss").equals("true")) { + if (pi.getPlayer().getEventInstance().getProperty("boss") != null && pi.getPlayer().getEventInstance().getProperty("boss") === "true") { pi.changeMusic("Bgm10/Eregos"); } return true; diff --git a/scripts/reactor/9108000.js b/scripts/reactor/9108000.js index 12d9f4607f..274ebe2000 100644 --- a/scripts/reactor/9108000.js +++ b/scripts/reactor/9108000.js @@ -6,7 +6,7 @@ function act() { var newStage = stage.toString(); eim.setProperty("stage", newStage); react.forceHitReactor(react.getState() + 1); - if (eim.getProperty("stage").equals("6")) { + if (eim.getProperty("stage") === "6") { rm.mapMessage(6, "Protect the Moon Bunny!!!"); var map = eim.getMapInstance(rm.getReactor().getMap().getId()); map.allowSummonState(true); diff --git a/scripts/reactor/9108001.js b/scripts/reactor/9108001.js index 12d9f4607f..274ebe2000 100644 --- a/scripts/reactor/9108001.js +++ b/scripts/reactor/9108001.js @@ -6,7 +6,7 @@ function act() { var newStage = stage.toString(); eim.setProperty("stage", newStage); react.forceHitReactor(react.getState() + 1); - if (eim.getProperty("stage").equals("6")) { + if (eim.getProperty("stage") === "6") { rm.mapMessage(6, "Protect the Moon Bunny!!!"); var map = eim.getMapInstance(rm.getReactor().getMap().getId()); map.allowSummonState(true); diff --git a/scripts/reactor/9108002.js b/scripts/reactor/9108002.js index 12d9f4607f..274ebe2000 100644 --- a/scripts/reactor/9108002.js +++ b/scripts/reactor/9108002.js @@ -6,7 +6,7 @@ function act() { var newStage = stage.toString(); eim.setProperty("stage", newStage); react.forceHitReactor(react.getState() + 1); - if (eim.getProperty("stage").equals("6")) { + if (eim.getProperty("stage") === "6") { rm.mapMessage(6, "Protect the Moon Bunny!!!"); var map = eim.getMapInstance(rm.getReactor().getMap().getId()); map.allowSummonState(true); diff --git a/scripts/reactor/9108003.js b/scripts/reactor/9108003.js index 12d9f4607f..274ebe2000 100644 --- a/scripts/reactor/9108003.js +++ b/scripts/reactor/9108003.js @@ -6,7 +6,7 @@ function act() { var newStage = stage.toString(); eim.setProperty("stage", newStage); react.forceHitReactor(react.getState() + 1); - if (eim.getProperty("stage").equals("6")) { + if (eim.getProperty("stage") === "6") { rm.mapMessage(6, "Protect the Moon Bunny!!!"); var map = eim.getMapInstance(rm.getReactor().getMap().getId()); map.allowSummonState(true); diff --git a/scripts/reactor/9108004.js b/scripts/reactor/9108004.js index 12d9f4607f..274ebe2000 100644 --- a/scripts/reactor/9108004.js +++ b/scripts/reactor/9108004.js @@ -6,7 +6,7 @@ function act() { var newStage = stage.toString(); eim.setProperty("stage", newStage); react.forceHitReactor(react.getState() + 1); - if (eim.getProperty("stage").equals("6")) { + if (eim.getProperty("stage") === "6") { rm.mapMessage(6, "Protect the Moon Bunny!!!"); var map = eim.getMapInstance(rm.getReactor().getMap().getId()); map.allowSummonState(true); diff --git a/scripts/reactor/9108005.js b/scripts/reactor/9108005.js index 12d9f4607f..274ebe2000 100644 --- a/scripts/reactor/9108005.js +++ b/scripts/reactor/9108005.js @@ -6,7 +6,7 @@ function act() { var newStage = stage.toString(); eim.setProperty("stage", newStage); react.forceHitReactor(react.getState() + 1); - if (eim.getProperty("stage").equals("6")) { + if (eim.getProperty("stage") === "6") { rm.mapMessage(6, "Protect the Moon Bunny!!!"); var map = eim.getMapInstance(rm.getReactor().getMap().getId()); map.allowSummonState(true); diff --git a/scripts/reactor/9208000.js b/scripts/reactor/9208000.js index 2768b3fbac..3b6af3b9ac 100644 --- a/scripts/reactor/9208000.js +++ b/scripts/reactor/9208000.js @@ -36,9 +36,9 @@ function act() { var eim = rm.getPlayer().getEventInstance(); if (eim != null) { var status = eim.getProperty("stage1status"); - if (status != null && !status.equals("waiting")) { + if (status != null && status !== "waiting") { var stage = parseInt(eim.getProperty("stage1phase")); - if (status.equals("display")) { + if (status === "display") { if (!rm.getReactor().isRecentHitFromAttack()) { var prevCombo = eim.getProperty("stage1combo"); diff --git a/scripts/reactor/9208001.js b/scripts/reactor/9208001.js index 4540674dff..4a2cba88aa 100644 --- a/scripts/reactor/9208001.js +++ b/scripts/reactor/9208001.js @@ -38,10 +38,10 @@ function act() { var eim = rm.getPlayer().getEventInstance(); if (eim != null) { var status = eim.getProperty("stage1status"); - if (status != null && !status.equals("waiting")) { + if (status != null && status !== "waiting") { var stage = parseInt(eim.getProperty("stage1phase")); //rm.mapMessage(6,"Stage " + stage); - if (status.equals("display")) { + if (status === "display") { if (!rm.getReactor().isRecentHitFromAttack()) { var prevCombo = eim.getProperty("stage1combo"); diff --git a/scripts/reactor/9208002.js b/scripts/reactor/9208002.js index aa990eda89..22acc52d42 100644 --- a/scripts/reactor/9208002.js +++ b/scripts/reactor/9208002.js @@ -36,9 +36,9 @@ function act() { var eim = rm.getPlayer().getEventInstance(); if (eim != null) { var status = eim.getProperty("stage1status"); - if (status != null && !status.equals("waiting")) { + if (status != null && status !== "waiting") { var stage = parseInt(eim.getProperty("stage1phase")); - if (status.equals("display")) { + if (status === "display") { if (!rm.getReactor().isRecentHitFromAttack()) { var prevCombo = eim.getProperty("stage1combo"); var n = "" + (rm.getReactor().getObjectId() % 1000);