diff --git a/docs/mychanges_ptbr.txt b/docs/mychanges_ptbr.txt index 6fd37fc6ef..106ba556e2 100644 --- a/docs/mychanges_ptbr.txt +++ b/docs/mychanges_ptbr.txt @@ -781,4 +781,8 @@ Resolvido possibilidade de bug com inconsistência de dados ao tentar salvar na Aplicado diversas pequenas correções em alguns drops de quests e métodos de eventos. Quests expiráveis agora são devidamente canceladas ao entrar no MTS ou cash shop. Corrigido problemas com itens que garantem proteção contra queda de HP em certos mapas (el nath, aqua road) garantindo proteção em mapas onde não deveriam garantir. -Adicionado novos scrolls à venda no Spindle. \ No newline at end of file +Adicionado novos scrolls à venda no Spindle. + +11 Fevereiro 2018, +Corrigido bug com pet Snail sendo inexpirável (deveria ter tempo de vida de 5 horas). +Adicionado efeito de som ao atravessar portais para a maioria dos scripts de portais. \ No newline at end of file diff --git a/scripts/portal/EBoat1.js b/scripts/portal/EBoat1.js index 5620378b26..3e98fc42c0 100644 --- a/scripts/portal/EBoat1.js +++ b/scripts/portal/EBoat1.js @@ -34,7 +34,7 @@ **/ function enter(pi) { - pi.warp(200090000, 4); + pi.playPortalSound(); pi.warp(200090000, 4); if(pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { pi.changeMusic("Bgm04/ArabPirate"); } diff --git a/scripts/portal/EBoat2.js b/scripts/portal/EBoat2.js index 74f108e075..46f871c00a 100644 --- a/scripts/portal/EBoat2.js +++ b/scripts/portal/EBoat2.js @@ -34,7 +34,7 @@ **/ function enter(pi) { - pi.warp(200090000, 5); + pi.playPortalSound(); pi.warp(200090000, 5); if(pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { pi.changeMusic("Bgm04/ArabPirate"); } diff --git a/scripts/portal/Masteria_B1_1.js b/scripts/portal/Masteria_B1_1.js index cdc0150b0e..ea1256e5f2 100644 --- a/scripts/portal/Masteria_B1_1.js +++ b/scripts/portal/Masteria_B1_1.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010005, "sU6_1"); + pi.playPortalSound(); pi.warp(610010005, "sU6_1"); return true; } return false; diff --git a/scripts/portal/Masteria_B2_1.js b/scripts/portal/Masteria_B2_1.js index cdc0150b0e..ea1256e5f2 100644 --- a/scripts/portal/Masteria_B2_1.js +++ b/scripts/portal/Masteria_B2_1.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010005, "sU6_1"); + pi.playPortalSound(); pi.warp(610010005, "sU6_1"); return true; } return false; diff --git a/scripts/portal/Masteria_B3_1.js b/scripts/portal/Masteria_B3_1.js index cdc0150b0e..ea1256e5f2 100644 --- a/scripts/portal/Masteria_B3_1.js +++ b/scripts/portal/Masteria_B3_1.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010005, "sU6_1"); + pi.playPortalSound(); pi.warp(610010005, "sU6_1"); return true; } return false; diff --git a/scripts/portal/Masteria_CC1_A.js b/scripts/portal/Masteria_CC1_A.js index b3e5983c2b..f7a6d9148b 100644 --- a/scripts/portal/Masteria_CC1_A.js +++ b/scripts/portal/Masteria_CC1_A.js @@ -21,6 +21,6 @@ */ function enter(pi) { - pi.warp(610020015, "CC6_A"); + pi.playPortalSound(); pi.warp(610020015, "CC6_A"); return true; } \ No newline at end of file diff --git a/scripts/portal/Masteria_CC6_A.js b/scripts/portal/Masteria_CC6_A.js index 492745e190..1fc69a74e6 100644 --- a/scripts/portal/Masteria_CC6_A.js +++ b/scripts/portal/Masteria_CC6_A.js @@ -21,6 +21,6 @@ */ function enter(pi) { - pi.warp(610020010, "CC1_A"); + pi.playPortalSound(); pi.warp(610020010, "CC1_A"); return true; } \ No newline at end of file diff --git a/scripts/portal/Masteria_CM1_A.js b/scripts/portal/Masteria_CM1_A.js index 37ee3b9969..b3f2fecbe0 100644 --- a/scripts/portal/Masteria_CM1_A.js +++ b/scripts/portal/Masteria_CM1_A.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020000, "CM1_B"); + pi.playPortalSound(); pi.warp(610020000, "CM1_B"); return false; } return true; diff --git a/scripts/portal/Masteria_CM1_B.js b/scripts/portal/Masteria_CM1_B.js index 2d98cf1f85..1f670a2fac 100644 --- a/scripts/portal/Masteria_CM1_B.js +++ b/scripts/portal/Masteria_CM1_B.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020000, "CM1_C"); + pi.playPortalSound(); pi.warp(610020000, "CM1_C"); return false; } return true; diff --git a/scripts/portal/Masteria_CM1_C.js b/scripts/portal/Masteria_CM1_C.js index 5aaa69e145..228db34f02 100644 --- a/scripts/portal/Masteria_CM1_C.js +++ b/scripts/portal/Masteria_CM1_C.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020000, "CM1_D"); + pi.playPortalSound(); pi.warp(610020000, "CM1_D"); return false; } return true; diff --git a/scripts/portal/Masteria_CM1_D.js b/scripts/portal/Masteria_CM1_D.js index d29e6720a6..52b2323d6e 100644 --- a/scripts/portal/Masteria_CM1_D.js +++ b/scripts/portal/Masteria_CM1_D.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020000, "CM1_E"); + pi.playPortalSound(); pi.warp(610020000, "CM1_E"); return false; } return true; diff --git a/scripts/portal/Masteria_CM2_B.js b/scripts/portal/Masteria_CM2_B.js index 109e582826..22b9a6659a 100644 --- a/scripts/portal/Masteria_CM2_B.js +++ b/scripts/portal/Masteria_CM2_B.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020001, "CM2_C"); + pi.playPortalSound(); pi.warp(610020001, "CM2_C"); return false; } return true; diff --git a/scripts/portal/Masteria_CM2_C.js b/scripts/portal/Masteria_CM2_C.js index 20c813b844..b0b77fecab 100644 --- a/scripts/portal/Masteria_CM2_C.js +++ b/scripts/portal/Masteria_CM2_C.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020001, "CM2_D"); + pi.playPortalSound(); pi.warp(610020001, "CM2_D"); return false; } return true; diff --git a/scripts/portal/Masteria_CM2_D.js b/scripts/portal/Masteria_CM2_D.js index eb47f7d5d4..02469d1c73 100644 --- a/scripts/portal/Masteria_CM2_D.js +++ b/scripts/portal/Masteria_CM2_D.js @@ -21,7 +21,7 @@ */ function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020001, "CM2_E"); + pi.playPortalSound(); pi.warp(610020001, "CM2_E"); return false; } return true; diff --git a/scripts/portal/Masteria_CM2_E.js b/scripts/portal/Masteria_CM2_E.js index 4c231f86c3..b164abc398 100644 --- a/scripts/portal/Masteria_CM2_E.js +++ b/scripts/portal/Masteria_CM2_E.js @@ -22,7 +22,7 @@ F/* function enter(pi) { if (pi.hasItem(3992039)) { - pi.warp(610020001, "CM2_F"); + pi.playPortalSound(); pi.warp(610020001, "CM2_F"); return false; } return true; diff --git a/scripts/portal/Masteria_U2_1.js b/scripts/portal/Masteria_U2_1.js index 70a4083aa7..f8e6547f3d 100644 --- a/scripts/portal/Masteria_U2_1.js +++ b/scripts/portal/Masteria_U2_1.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010004, "U5_1"); + pi.playPortalSound(); pi.warp(610010004, "U5_1"); return false; } return true; diff --git a/scripts/portal/Masteria_U3_1.js b/scripts/portal/Masteria_U3_1.js index 178de9a798..c199d4f148 100644 --- a/scripts/portal/Masteria_U3_1.js +++ b/scripts/portal/Masteria_U3_1.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010201, "sB2_1"); + pi.playPortalSound(); pi.warp(610010201, "sB2_1"); return false; } return true; diff --git a/scripts/portal/Masteria_U5_1.js b/scripts/portal/Masteria_U5_1.js index cb08e4cdbb..d6e473fd2b 100644 --- a/scripts/portal/Masteria_U5_1.js +++ b/scripts/portal/Masteria_U5_1.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010001, "sU2_1"); + pi.playPortalSound(); pi.warp(610010001, "sU2_1"); return false; } return true; diff --git a/scripts/portal/Masteria_U5_2.js b/scripts/portal/Masteria_U5_2.js index 70a4083aa7..f8e6547f3d 100644 --- a/scripts/portal/Masteria_U5_2.js +++ b/scripts/portal/Masteria_U5_2.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010004, "U5_1"); + pi.playPortalSound(); pi.warp(610010004, "U5_1"); return false; } return true; diff --git a/scripts/portal/Masteria_U6_1.js b/scripts/portal/Masteria_U6_1.js index 1314174c78..97066992c3 100644 --- a/scripts/portal/Masteria_U6_1.js +++ b/scripts/portal/Masteria_U6_1.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.warp(610010002, "sU3_1"); + pi.playPortalSound(); pi.warp(610010002, "sU3_1"); return false; } return true; diff --git a/scripts/portal/OBoat1.js b/scripts/portal/OBoat1.js index 2904efbd5f..f1a725ac40 100644 --- a/scripts/portal/OBoat1.js +++ b/scripts/portal/OBoat1.js @@ -35,7 +35,7 @@ **/ function enter(pi) { - pi.warp(200090010, 4); + pi.playPortalSound(); pi.warp(200090010, 4); if(pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { pi.changeMusic("Bgm04/ArabPirate"); } diff --git a/scripts/portal/OBoat2.js b/scripts/portal/OBoat2.js index 704e618f68..c0b4952c71 100644 --- a/scripts/portal/OBoat2.js +++ b/scripts/portal/OBoat2.js @@ -35,7 +35,7 @@ **/ function enter(pi) { - pi.warp(200090010, 5); + pi.playPortalSound(); pi.warp(200090010, 5); if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) pi.changeMusic("Bgm04/ArabPirate"); return true; diff --git a/scripts/portal/PPinkOut.js b/scripts/portal/PPinkOut.js index bc6a78d8f2..f1e2c17e1c 100644 --- a/scripts/portal/PPinkOut.js +++ b/scripts/portal/PPinkOut.js @@ -24,6 +24,6 @@ Vs Pink Bean - Clear stage portal */ function enter(pi) { - pi.warp(270050000); + pi.playPortalSound(); pi.warp(270050000); return true; } \ No newline at end of file diff --git a/scripts/portal/Pianus.js b/scripts/portal/Pianus.js index c8bf1801cf..8b1b3c5066 100644 --- a/scripts/portal/Pianus.js +++ b/scripts/portal/Pianus.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(230040420, "out00"); + pi.playPortalSound(); pi.warp(230040420, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/Pinkin.js b/scripts/portal/Pinkin.js index e3b17164ae..72fa391090 100644 --- a/scripts/portal/Pinkin.js +++ b/scripts/portal/Pinkin.js @@ -24,6 +24,6 @@ Vs Pink Bean - Ressurection stage portal */ function enter(pi) { - pi.warp(270050100); + pi.playPortalSound(); pi.warp(270050100); return true; } \ No newline at end of file diff --git a/scripts/portal/Populatus00.js b/scripts/portal/Populatus00.js index 09175ccdfa..1ebdad11ad 100644 --- a/scripts/portal/Populatus00.js +++ b/scripts/portal/Populatus00.js @@ -32,6 +32,6 @@ function enter(pi) { } } } - pi.warp(220080001, "st00"); + pi.playPortalSound(); pi.warp(220080001, "st00"); return true; } \ No newline at end of file diff --git a/scripts/portal/Spacegaga_out0.js b/scripts/portal/Spacegaga_out0.js index 891bc6fc86..ab06950336 100644 --- a/scripts/portal/Spacegaga_out0.js +++ b/scripts/portal/Spacegaga_out0.js @@ -5,7 +5,7 @@ function enter(pi) { pi.warp(922240200, 0); pi.getPlayer().cancelEffect(2360002); } else - pi.warp(pi.getPlayer().getMapId(), 0); + pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); return true; } \ No newline at end of file diff --git a/scripts/portal/Spacegaga_out1.js b/scripts/portal/Spacegaga_out1.js index 891bc6fc86..ab06950336 100644 --- a/scripts/portal/Spacegaga_out1.js +++ b/scripts/portal/Spacegaga_out1.js @@ -5,7 +5,7 @@ function enter(pi) { pi.warp(922240200, 0); pi.getPlayer().cancelEffect(2360002); } else - pi.warp(pi.getPlayer().getMapId(), 0); + pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); return true; } \ No newline at end of file diff --git a/scripts/portal/Spacegaga_out2.js b/scripts/portal/Spacegaga_out2.js index 891bc6fc86..ab06950336 100644 --- a/scripts/portal/Spacegaga_out2.js +++ b/scripts/portal/Spacegaga_out2.js @@ -5,7 +5,7 @@ function enter(pi) { pi.warp(922240200, 0); pi.getPlayer().cancelEffect(2360002); } else - pi.warp(pi.getPlayer().getMapId(), 0); + pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); return true; } \ No newline at end of file diff --git a/scripts/portal/Spacegaga_out3.js b/scripts/portal/Spacegaga_out3.js index 891bc6fc86..ab06950336 100644 --- a/scripts/portal/Spacegaga_out3.js +++ b/scripts/portal/Spacegaga_out3.js @@ -5,7 +5,7 @@ function enter(pi) { pi.warp(922240200, 0); pi.getPlayer().cancelEffect(2360002); } else - pi.warp(pi.getPlayer().getMapId(), 0); + pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); return true; } \ No newline at end of file diff --git a/scripts/portal/Zakum03.js b/scripts/portal/Zakum03.js index 855a0a6082..5724900535 100644 --- a/scripts/portal/Zakum03.js +++ b/scripts/portal/Zakum03.js @@ -34,6 +34,6 @@ function enter(pi) { return false; } - pi.warp(211042300); + pi.playPortalSound(); pi.warp(211042300); return true; } \ No newline at end of file diff --git a/scripts/portal/Zakum05.js b/scripts/portal/Zakum05.js index 5fc6b8f106..debb467067 100644 --- a/scripts/portal/Zakum05.js +++ b/scripts/portal/Zakum05.js @@ -34,6 +34,6 @@ function enter(pi) { return false; } - pi.warp(211042400,"west00"); + pi.playPortalSound(); pi.warp(211042400,"west00"); return true; } \ No newline at end of file diff --git a/scripts/portal/aMatchMove2.js b/scripts/portal/aMatchMove2.js index a73a1a4b65..bffdcb10f1 100644 --- a/scripts/portal/aMatchMove2.js +++ b/scripts/portal/aMatchMove2.js @@ -26,6 +26,6 @@ */ function enter(pi) { - pi.warp(pi.getPlayer().getSavedLocation("MIRROR")); + pi.playPortalSound(); pi.warp(pi.getPlayer().getSavedLocation("MIRROR")); return true; } \ No newline at end of file diff --git a/scripts/portal/apq00.js b/scripts/portal/apq00.js index 8d11825f35..fb44eb7773 100644 --- a/scripts/portal/apq00.js +++ b/scripts/portal/apq00.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(670010300, 0); + pi.playPortalSound(); pi.warp(670010300, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/apq01.js b/scripts/portal/apq01.js index d43c6d9009..ab57d1f93a 100644 --- a/scripts/portal/apq01.js +++ b/scripts/portal/apq01.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(670010301, 0); + pi.playPortalSound(); pi.warp(670010301, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/apq02.js b/scripts/portal/apq02.js index 93ddaf2667..9a18bac18f 100644 --- a/scripts/portal/apq02.js +++ b/scripts/portal/apq02.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(670010302, 0); + pi.playPortalSound(); pi.warp(670010302, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/apq1.js b/scripts/portal/apq1.js index 421f828725..ef5d9877bd 100644 --- a/scripts/portal/apq1.js +++ b/scripts/portal/apq1.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(670010400, 0); + pi.playPortalSound(); pi.warp(670010400, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/apq2.js b/scripts/portal/apq2.js index f50b6981e7..2c4e0c13de 100644 --- a/scripts/portal/apq2.js +++ b/scripts/portal/apq2.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(670010500, 0); + pi.playPortalSound(); pi.warp(670010500, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/apq3.js b/scripts/portal/apq3.js index 6896f7215c..247f484b4b 100644 --- a/scripts/portal/apq3.js +++ b/scripts/portal/apq3.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(670010600, 0); + pi.playPortalSound(); pi.warp(670010600, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/apqDoor.js b/scripts/portal/apqDoor.js index 1318ef8b59..f714a803d1 100644 --- a/scripts/portal/apqDoor.js +++ b/scripts/portal/apqDoor.js @@ -26,7 +26,7 @@ function enter(pi) { var name = pi.getPortal().getName().substring(2, 4); var gate = pi.getPlayer().getMap().getReactorByName("gate" + name); if(gate != null && gate.getState() == 4) { - pi.warp(670010600, "gt" + name + "PIB"); + pi.playPortalSound(); pi.warp(670010600, "gt" + name + "PIB"); return true; } else { pi.message("The gate is not opened yet."); diff --git a/scripts/portal/aqua_pq_boss_0.js b/scripts/portal/aqua_pq_boss_0.js index 4aacce8e6f..71799e5f08 100644 --- a/scripts/portal/aqua_pq_boss_0.js +++ b/scripts/portal/aqua_pq_boss_0.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(230040420, 0); + pi.playPortalSound(); pi.warp(230040420, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorAloneX.js b/scripts/portal/aranTutorAloneX.js index d8f61aeb26..e62d49969b 100644 --- a/scripts/portal/aranTutorAloneX.js +++ b/scripts/portal/aranTutorAloneX.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(914000100, 1); + pi.playPortalSound(); pi.warp(914000100, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorOut1.js b/scripts/portal/aranTutorOut1.js index 92c08110d7..8274494d9e 100644 --- a/scripts/portal/aranTutorOut1.js +++ b/scripts/portal/aranTutorOut1.js @@ -10,7 +10,7 @@ function enter(pi) { pi.teachSkill(20000017, 1, 0, -1); pi.teachSkill(20000018, 1, 0, -1); //actually nexon does enableActions here :P - pi.warp(914000200, 1); + pi.playPortalSound(); pi.warp(914000200, 1); return true; } else { pi.message("You can only exit after you accept the quest from Athena Pierce, who is to your right."); diff --git a/scripts/portal/aranTutorOut2.js b/scripts/portal/aranTutorOut2.js index 8bf246e5af..0947796690 100644 --- a/scripts/portal/aranTutorOut2.js +++ b/scripts/portal/aranTutorOut2.js @@ -6,6 +6,6 @@ function enter(pi) { pi.teachSkill(20000014, 1, 0, -1); pi.teachSkill(20000015, 1, 0, -1); //actually nexon does enableActions here :P - pi.warp(914000210, 1); + pi.playPortalSound(); pi.warp(914000210, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorOut3.js b/scripts/portal/aranTutorOut3.js index ea96fc05ad..e6747dfe6a 100644 --- a/scripts/portal/aranTutorOut3.js +++ b/scripts/portal/aranTutorOut3.js @@ -4,6 +4,6 @@ function enter(pi) { //nexon sends updatePlayerStats MapleStat.AVAILABLESP 0 pi.teachSkill(20000016, 1, 0, -1); //actually nexon does enableActions here :P - pi.warp(914000220, 1); + pi.playPortalSound(); pi.warp(914000220, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/ariantMout.js b/scripts/portal/ariantMout.js index 72741dd2f6..fc09356f93 100644 --- a/scripts/portal/ariantMout.js +++ b/scripts/portal/ariantMout.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(980010020, 0); + pi.playPortalSound(); pi.warp(980010020, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/ariantMout2.js b/scripts/portal/ariantMout2.js index 0215febe51..767cc6e2eb 100644 --- a/scripts/portal/ariantMout2.js +++ b/scripts/portal/ariantMout2.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(980010000, 0); + pi.playPortalSound(); pi.warp(980010000, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/ariant_Agit.js b/scripts/portal/ariant_Agit.js index 96436d81e1..7055608d6a 100644 --- a/scripts/portal/ariant_Agit.js +++ b/scripts/portal/ariant_Agit.js @@ -25,7 +25,7 @@ Agit's hideout (leader of the Sand Bandits) function enter(pi) { if(pi.isQuestCompleted(3928) && pi.isQuestCompleted(3931) && pi.isQuestCompleted(3934)) { - pi.warp(260000201, 1); + pi.playPortalSound(); pi.warp(260000201, 1); return true; } else { pi.message("Access restricted to only members of the Sand Bandits team."); diff --git a/scripts/portal/ariant_queens.js b/scripts/portal/ariant_queens.js index befd7aaa17..2cd50836ec 100644 --- a/scripts/portal/ariant_queens.js +++ b/scripts/portal/ariant_queens.js @@ -28,7 +28,7 @@ function enter(pi) { if(isTigunMorphed(pi.getPlayer())) { return false; } else { - pi.warp(260000300, 7); + pi.playPortalSound(); pi.warp(260000300, 7); pi.message("You, intruder! You don't have permission to roam the palace! Get out!!"); return true; } diff --git a/scripts/portal/balogTemple.js b/scripts/portal/balogTemple.js index 1b9e691393..158e8d7511 100644 --- a/scripts/portal/balogTemple.js +++ b/scripts/portal/balogTemple.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(105100000, 2); - return(true); + pi.playPortalSound(); pi.warp(105100000, 2); + return true; } \ No newline at end of file diff --git a/scripts/portal/balog_end.js b/scripts/portal/balog_end.js index b392201b8a..e353e6cb52 100644 --- a/scripts/portal/balog_end.js +++ b/scripts/portal/balog_end.js @@ -4,6 +4,6 @@ function enter(pi) { return false; } pi.gainItem(4001261,1); - pi.warp(105100100,0); - return(true); + pi.playPortalSound(); pi.warp(105100100,0); + return true; } \ No newline at end of file diff --git a/scripts/portal/bedroom_out.js b/scripts/portal/bedroom_out.js index 3aac7b9fd2..a956177997 100644 --- a/scripts/portal/bedroom_out.js +++ b/scripts/portal/bedroom_out.js @@ -1,6 +1,6 @@ function enter(pi) { if (pi.isQuestStarted(2570)) { - pi.warp(120000101, 0); + pi.playPortalSound(); pi.warp(120000101, 0); return true; } pi.earnTitle("You still got some stuff to take care of. I can see it in your eyes. Wait...no, those are eye boogers."); diff --git a/scripts/portal/catPriest_map.js b/scripts/portal/catPriest_map.js index ae00495f3a..14b3144b0b 100644 --- a/scripts/portal/catPriest_map.js +++ b/scripts/portal/catPriest_map.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(925000000, 2); + pi.playPortalSound(); pi.warp(925000000, 2); return true; } \ No newline at end of file diff --git a/scripts/portal/davy2_hd1.js b/scripts/portal/davy2_hd1.js index 6439fef0cc..84c1fbef12 100644 --- a/scripts/portal/davy2_hd1.js +++ b/scripts/portal/davy2_hd1.js @@ -8,6 +8,6 @@ function enter(pi) { eim.setProperty("stage2b", "1"); } - pi.warp(925100202,0); - return(true); + pi.playPortalSound(); pi.warp(925100202,0); + return true; } \ No newline at end of file diff --git a/scripts/portal/davy3_hd1.js b/scripts/portal/davy3_hd1.js index 37e50af50e..c40727da08 100644 --- a/scripts/portal/davy3_hd1.js +++ b/scripts/portal/davy3_hd1.js @@ -8,6 +8,6 @@ function enter(pi) { eim.setProperty("stage3b", "1"); } - pi.warp(925100302,0); - return(true); + pi.playPortalSound(); pi.warp(925100302,0); + return true; } \ No newline at end of file diff --git a/scripts/portal/davy_next0.js b/scripts/portal/davy_next0.js index cf931e3fe0..10013065d5 100644 --- a/scripts/portal/davy_next0.js +++ b/scripts/portal/davy_next0.js @@ -5,10 +5,10 @@ function passedGrindMode(map, eim) { function enter(pi) { if (pi.getMap().getMonsters().size() == 0 && passedGrindMode(pi.getMap(), pi.getEventInstance())) { - pi.warp(925100100,0); //next - return(true); + pi.playPortalSound(); pi.warp(925100100,0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/davy_next1.js b/scripts/portal/davy_next1.js index a5a9c24e9d..506d8d20a3 100644 --- a/scripts/portal/davy_next1.js +++ b/scripts/portal/davy_next1.js @@ -2,15 +2,15 @@ function enter(pi) { try { var eim = pi.getEventInstance(); if (eim != null && eim.getProperty("stage2").equals("3")) { - pi.warp(925100200,0); //next - return(true); + pi.playPortalSound(); pi.warp(925100200,0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } catch(e) { pi.playerMessage(5, "Error: " + e); } - return(false); + return false; } \ No newline at end of file diff --git a/scripts/portal/davy_next2.js b/scripts/portal/davy_next2.js index f737733129..a696d75746 100644 --- a/scripts/portal/davy_next2.js +++ b/scripts/portal/davy_next2.js @@ -5,10 +5,10 @@ function passedGrindMode(map, eim) { function enter(pi) { if (pi.getMap().getMonsters().size() == 0 && passedGrindMode(pi.getMap(), pi.getEventInstance())) { - pi.warp(925100300,0); //next - return(true); + pi.playPortalSound(); pi.warp(925100300,0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/davy_next3.js b/scripts/portal/davy_next3.js index f26e392f0a..f4adc97948 100644 --- a/scripts/portal/davy_next3.js +++ b/scripts/portal/davy_next3.js @@ -5,10 +5,10 @@ function passedGrindMode(map, eim) { function enter(pi) { if (pi.getMap().getMonsters().size() == 0 && passedGrindMode(pi.getMap(), pi.getEventInstance())) { - pi.warp(925100400,0); //next - return(true); + pi.playPortalSound(); pi.warp(925100400,0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/davy_next4.js b/scripts/portal/davy_next4.js index 650b0ad6ae..6cc7ad2a4e 100644 --- a/scripts/portal/davy_next4.js +++ b/scripts/portal/davy_next4.js @@ -19,10 +19,10 @@ function enter(pi) { eim.setProperty("spawnedBoss", "true"); } - pi.warp(925100500, 0); - return(true); + pi.playPortalSound(); pi.warp(925100500, 0); + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/dojang_exit.js b/scripts/portal/dojang_exit.js index 5c58a3db64..2da837f03e 100644 --- a/scripts/portal/dojang_exit.js +++ b/scripts/portal/dojang_exit.js @@ -29,6 +29,6 @@ function enter(pi) { var map = pi.getPlayer().getSavedLocation("MIRROR"); if(map == -1) map = 100000000; - pi.warp(map); + pi.playPortalSound(); pi.warp(map); return true; } \ No newline at end of file diff --git a/scripts/portal/dojang_next.js b/scripts/portal/dojang_next.js index c7e72bd3bd..7406ecf83c 100644 --- a/scripts/portal/dojang_next.js +++ b/scripts/portal/dojang_next.js @@ -60,7 +60,7 @@ function enter(pi) { pi.warp(pi.getPlayer().getMap().getId() + 100, 0); } } else { - pi.warp(925020003, 0); + pi.playPortalSound(); pi.warp(925020003, 0); pi.getPlayer().gainExp(2000 * pi.getPlayer().getDojoPoints(), true, true, true); } return true; diff --git a/scripts/portal/dojang_tuto.js b/scripts/portal/dojang_tuto.js index b28d114f18..d90a473d51 100644 --- a/scripts/portal/dojang_tuto.js +++ b/scripts/portal/dojang_tuto.js @@ -29,7 +29,7 @@ function enter(pi) { if (pi.getPlayer().getMap().getMonsterById(9300216) != null) { pi.getPlayer().enteredScript("dojang_Msg", pi.getPlayer().getMap().getId()); pi.getPlayer().setFinishedDojoTutorial(); - pi.warp(925020001, 0); + pi.playPortalSound(); pi.warp(925020001, 0); return true; } else { pi.getPlayer().message("So Gong: Haha! You're going to run away like a coward? I won't let you get away that easily!"); diff --git a/scripts/portal/dracoout.js b/scripts/portal/dracoout.js index 1d71f561e1..17d9fc1a08 100644 --- a/scripts/portal/dracoout.js +++ b/scripts/portal/dracoout.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(240000100, "east00"); + pi.playPortalSound(); pi.warp(240000100, "east00"); return true; } \ No newline at end of file diff --git a/scripts/portal/dragonNest.js b/scripts/portal/dragonNest.js index 319034d011..f2be6f7674 100644 --- a/scripts/portal/dragonNest.js +++ b/scripts/portal/dragonNest.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(240040611, "out00"); + pi.playPortalSound(); pi.warp(240040611, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/elevator.js b/scripts/portal/elevator.js index e9798b2631..b91e66735c 100644 --- a/scripts/portal/elevator.js +++ b/scripts/portal/elevator.js @@ -4,7 +4,7 @@ function enter(pi) { if (elevator == null) { pi.getPlayer().dropMessage(5, "The elevator is under maintenance."); } else if (elevator.getProperty(pi.getMapId() == 222020100 ? ("goingUp") : ("goingDown")).equals("false")) { - pi.warp(pi.getMapId() == 222020100 ? 222020110 : 222020210, 0); + pi.playPortalSound(); pi.warp(pi.getMapId() == 222020100 ? 222020110 : 222020210, 0); //elevator.getIv().invokeFunction(pi.getMapId() == 222020110 ? "goUp" : "goDown"); return true; } else if (elevator.getProperty(pi.getMapId() == 222020100 ? ("goingUp") : ("goingDown")).equals("true")) { diff --git a/scripts/portal/eliza_Garden.js b/scripts/portal/eliza_Garden.js index b55ff3e835..86acb4ccfe 100644 --- a/scripts/portal/eliza_Garden.js +++ b/scripts/portal/eliza_Garden.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi){ - pi.warp(920020000, 0); + pi.playPortalSound(); pi.warp(920020000, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/end_cow.js b/scripts/portal/end_cow.js index 5960392204..c1c5c98a2e 100644 --- a/scripts/portal/end_cow.js +++ b/scripts/portal/end_cow.js @@ -16,7 +16,7 @@ function enter(pi){ } } else{ - pi.warp(120000103); + pi.playPortalSound(); pi.warp(120000103); return true; } } \ No newline at end of file diff --git a/scripts/portal/enterAchter.js b/scripts/portal/enterAchter.js index a88646b122..bd7dcb85c5 100644 --- a/scripts/portal/enterAchter.js +++ b/scripts/portal/enterAchter.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.warp(100000201, "out02"); + pi.playPortalSound(); pi.warp(100000201, "out02"); pi.playPortalSound(); return true; } \ No newline at end of file diff --git a/scripts/portal/enterBackStreet.js b/scripts/portal/enterBackStreet.js index 15f1d5fa69..4a43cb12e9 100644 --- a/scripts/portal/enterBackStreet.js +++ b/scripts/portal/enterBackStreet.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.isQuestActive(21747) || pi.isQuestActive(21744) && pi.isQuestCompleted(21745)) { - pi.warp(925040000,0); + pi.playPortalSound(); pi.warp(925040000,0); return true; } else { diff --git a/scripts/portal/enterDisguise1.js b/scripts/portal/enterDisguise1.js index 0e4f8bca3f..57bc2cbb4c 100644 --- a/scripts/portal/enterDisguise1.js +++ b/scripts/portal/enterDisguise1.js @@ -39,7 +39,7 @@ function enter(pi) { pi.warp(108010600 + (10 * jobtype), "out00"); } else { - pi.warp(130010010, "out00"); + pi.playPortalSound(); pi.warp(130010010, "out00"); } return true; } \ No newline at end of file diff --git a/scripts/portal/enterDisguise2.js b/scripts/portal/enterDisguise2.js index 088685a497..5d4b6e662e 100644 --- a/scripts/portal/enterDisguise2.js +++ b/scripts/portal/enterDisguise2.js @@ -39,7 +39,7 @@ function enter(pi) { pi.warp(108010600 + (10 * jobtype), "out00"); } else { - pi.warp(130010020, "out00"); + pi.playPortalSound(); pi.warp(130010020, "out00"); } return true; } diff --git a/scripts/portal/enterDisguise3.js b/scripts/portal/enterDisguise3.js index 1a0b8c5589..445c149f36 100644 --- a/scripts/portal/enterDisguise3.js +++ b/scripts/portal/enterDisguise3.js @@ -39,7 +39,7 @@ function enter(pi) { pi.warp(108010600 + (10 * jobtype), "out00"); } else { - pi.warp(130010110, "out00"); + pi.playPortalSound(); pi.warp(130010110, "out00"); } return true; } diff --git a/scripts/portal/enterDisguise4.js b/scripts/portal/enterDisguise4.js index bcd571a435..f065ddf630 100644 --- a/scripts/portal/enterDisguise4.js +++ b/scripts/portal/enterDisguise4.js @@ -39,7 +39,7 @@ function enter(pi) { pi.warp(108010600 + (10 * jobtype), "out00"); } else { - pi.warp(130010120, "out00"); + pi.playPortalSound(); pi.warp(130010120, "out00"); } return true; } diff --git a/scripts/portal/enterDisguise5.js b/scripts/portal/enterDisguise5.js index 8239d7f450..847140b0e4 100644 --- a/scripts/portal/enterDisguise5.js +++ b/scripts/portal/enterDisguise5.js @@ -39,7 +39,7 @@ function enter(pi) { pi.warp(108010600 + (10 * jobtype), "east00"); } else { - pi.warp(130020000, "east00"); + pi.playPortalSound(); pi.warp(130020000, "east00"); } return true; } \ No newline at end of file diff --git a/scripts/portal/enterDollWay.js b/scripts/portal/enterDollWay.js index 67c5d2adfa..83d7d6a55f 100644 --- a/scripts/portal/enterDollWay.js +++ b/scripts/portal/enterDollWay.js @@ -3,7 +3,7 @@ function enter(pi) { pi.warp(105070300,3); return true; } else if(pi.isQuestStarted(21734)) { - pi.warp(910510100,0); + pi.playPortalSound(); pi.warp(910510100,0); return true; } else { pi.message("An ominous power prevents you from passing here."); diff --git a/scripts/portal/enterDollcave.js b/scripts/portal/enterDollcave.js index dfeec204c5..173b00d815 100644 --- a/scripts/portal/enterDollcave.js +++ b/scripts/portal/enterDollcave.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.isQuestCompleted(20730) || pi.isQuestCompleted(21734)) { // puppeteer defeated, newfound secret path - pi.warp(105040201,2); + pi.playPortalSound(); pi.warp(105040201,2); return true; } diff --git a/scripts/portal/enterNepenthes.js b/scripts/portal/enterNepenthes.js index 99e01a7889..1709faed38 100644 --- a/scripts/portal/enterNepenthes.js +++ b/scripts/portal/enterNepenthes.js @@ -16,7 +16,7 @@ function enter(pi) { return false; } } else { - pi.warp(200060001,2); + pi.playPortalSound(); pi.warp(200060001,2); return true; } } \ No newline at end of file diff --git a/scripts/portal/enterRienFirst.js b/scripts/portal/enterRienFirst.js index 46dd5f7ed8..9a7cb21269 100644 --- a/scripts/portal/enterRienFirst.js +++ b/scripts/portal/enterRienFirst.js @@ -23,6 +23,6 @@ function enter(pi) { if (pi.getPlayer().getJob().getId() == 2000 && !pi.isQuestCompleted(21014)) pi.warp(140000000, 1); else - pi.warp(140000000, "west00"); + pi.playPortalSound(); pi.warp(140000000, "west00"); return true; } \ No newline at end of file diff --git a/scripts/portal/enterSecondDH.js b/scripts/portal/enterSecondDH.js index b39319a956..0162849e17 100644 --- a/scripts/portal/enterSecondDH.js +++ b/scripts/portal/enterSecondDH.js @@ -33,7 +33,7 @@ function enter(pi) { pi.removeAll(4032100); var rand = Math.floor(Math.random() * maps.length); - pi.warp(maps[rand], 0); + pi.playPortalSound(); pi.warp(maps[rand], 0); return true; } else { return false; diff --git a/scripts/portal/enterWarehouse.js b/scripts/portal/enterWarehouse.js index fe16f833d6..92c5ff7102 100644 --- a/scripts/portal/enterWarehouse.js +++ b/scripts/portal/enterWarehouse.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(300000011,0); - return(true); + pi.playPortalSound(); pi.warp(300000011,0); + return true; } \ No newline at end of file diff --git a/scripts/portal/enterWitch.js b/scripts/portal/enterWitch.js index 5c04dd9dd4..ccfa23a862 100644 --- a/scripts/portal/enterWitch.js +++ b/scripts/portal/enterWitch.js @@ -6,7 +6,7 @@ function enter(pi) { pi.warp(924010100,0); return true; } else if (pi.getQuestStatus(20404) == 2) { - pi.warp(924010000,0); + pi.playPortalSound(); pi.warp(924010000,0); return true; } else { pi.playerMessage(5, "I shouldn't go here.. it's creepy!"); diff --git a/scripts/portal/enter_earth00.js b/scripts/portal/enter_earth00.js index e0d1f5376f..816a04a671 100644 --- a/scripts/portal/enter_earth00.js +++ b/scripts/portal/enter_earth00.js @@ -4,6 +4,6 @@ function enter(pi) { return false; } - pi.warp(221000300,"earth00"); + pi.playPortalSound(); pi.warp(221000300,"earth00"); return true; } \ No newline at end of file diff --git a/scripts/portal/enter_earth01.js b/scripts/portal/enter_earth01.js index 551da057a7..d4bc0c7938 100644 --- a/scripts/portal/enter_earth01.js +++ b/scripts/portal/enter_earth01.js @@ -4,6 +4,6 @@ function enter(pi) { return false; } - pi.warp(120000101,"earth01"); + pi.playPortalSound(); pi.warp(120000101,"earth01"); return true; } \ No newline at end of file diff --git a/scripts/portal/enter_nautil.js b/scripts/portal/enter_nautil.js index d33cccce36..9297edcaab 100644 --- a/scripts/portal/enter_nautil.js +++ b/scripts/portal/enter_nautil.js @@ -24,6 +24,6 @@ Nautilus Port portal By xV1ral */ function enter(pi) { - pi.warp(120010000, "nt01"); + pi.playPortalSound(); pi.warp(120010000, "nt01"); return true; } \ No newline at end of file diff --git a/scripts/portal/enterthirdDH.js b/scripts/portal/enterthirdDH.js index 7c545d2a7d..d48f3ae041 100644 --- a/scripts/portal/enterthirdDH.js +++ b/scripts/portal/enterthirdDH.js @@ -7,7 +7,7 @@ function enter(pi) { if (pi.getPlayerCount(913010200) == 0) { var map = pi.getMap(913010200); map.killAllMonsters(); - pi.warp(913010200, 0); + pi.playPortalSound(); pi.warp(913010200, 0); pi.spawnMonster(9300289, 0, 0); return true; } else { diff --git a/scripts/portal/entertraining.js b/scripts/portal/entertraining.js index 4bd57042af..5d345b7192 100644 --- a/scripts/portal/entertraining.js +++ b/scripts/portal/entertraining.js @@ -6,7 +6,7 @@ function enter(pi) { else if (pi.isQuestStarted(1043)) pi.warp(1010300, 4); else if (pi.isQuestStarted(1044)) - pi.warp(1010400, 4); + pi.playPortalSound(); pi.warp(1010400, 4); else { pi.message("Only the adventurers that have been trained by Mai may enter."); return false; diff --git a/scripts/portal/evanFarmCT.js b/scripts/portal/evanFarmCT.js index 90e07d89a9..121b64bec1 100644 --- a/scripts/portal/evanFarmCT.js +++ b/scripts/portal/evanFarmCT.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.isQuestStarted(22010) || pi.getPlayer().getJob().getId() != 2001) { - pi.warp(100030310, 0); + pi.playPortalSound(); pi.warp(100030310, 0); } else { pi.playerMessage(5, "Cannot enter the Lush Forest without a reason."); } diff --git a/scripts/portal/evanGarden1.js b/scripts/portal/evanGarden1.js index 8857159fc5..bdcf42c565 100644 --- a/scripts/portal/evanGarden1.js +++ b/scripts/portal/evanGarden1.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.isQuestStarted(22008)){ - pi.warp(100030103, "west00"); + pi.playPortalSound(); pi.warp(100030103, "west00"); } else { pi.playerMessage(5, "You cannot go to the Back Yard without a reason"); } diff --git a/scripts/portal/female00.js b/scripts/portal/female00.js index 6ee3fcf42d..b9b91b43fb 100644 --- a/scripts/portal/female00.js +++ b/scripts/portal/female00.js @@ -25,7 +25,7 @@ function enter(pi) { */ var gender = pi.getPlayer().getGender(); if (gender == 1) { - pi.warp(670010200, 4); + pi.playPortalSound(); pi.warp(670010200, 4); return true; } else { pi.getPlayer().dropMessage(5, "You cannot proceed past here."); diff --git a/scripts/portal/foxLaidy_map.js b/scripts/portal/foxLaidy_map.js index 0e2dba1f13..882a5759f0 100644 --- a/scripts/portal/foxLaidy_map.js +++ b/scripts/portal/foxLaidy_map.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(222010200, "east00"); + pi.playPortalSound(); pi.warp(222010200, "east00"); return true; } diff --git a/scripts/portal/gaga_success.js b/scripts/portal/gaga_success.js index 2fb39cccc5..c3561c9806 100644 --- a/scripts/portal/gaga_success.js +++ b/scripts/portal/gaga_success.js @@ -2,7 +2,7 @@ function enter(pi) { pi.getPlayer().getEvents().getGagaRescue().complete(); - pi.warp(922240100 + (pi.getPlayer().getMapId() - 922240000)); + pi.playPortalSound(); pi.warp(922240100 + (pi.getPlayer().getMapId() - 922240000)); pi.getPlayer().cancelEffect(2360002); return true; } \ No newline at end of file diff --git a/scripts/portal/gendergo.js b/scripts/portal/gendergo.js index 9d62fc2f4b..ae8fa82ecd 100644 --- a/scripts/portal/gendergo.js +++ b/scripts/portal/gendergo.js @@ -10,7 +10,7 @@ function enter(pi) { } } else { if (pi.getPlayer().getGender() == 0) { - pi.warp(map.getId(), "male01"); + pi.playPortalSound(); pi.warp(map.getId(), "male01"); return true; } else { pi.message("This portal leads to the boys' area, try the portal at the other side."); diff --git a/scripts/portal/ghostgate_open.js b/scripts/portal/ghostgate_open.js index 7f2c6ec008..e90cf6c901 100644 --- a/scripts/portal/ghostgate_open.js +++ b/scripts/portal/ghostgate_open.js @@ -27,7 +27,7 @@ Sharen III's Grave Exit - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("ghostgate").getState() == 1) { - pi.warp(990000800, 0); + pi.playPortalSound(); pi.warp(990000800, 0); return true; } else { diff --git a/scripts/portal/glpqEnter.js b/scripts/portal/glpqEnter.js index f7de0295cb..eef09f35d9 100644 --- a/scripts/portal/glpqEnter.js +++ b/scripts/portal/glpqEnter.js @@ -1,6 +1,6 @@ function enter(pi) { if (pi.haveItem(3992041, 1)) { - pi.warp(610030020, "out00"); + pi.playPortalSound(); pi.warp(610030020, "out00"); return true; } else { pi.playerMessage(5, "The giant gate of iron will not budge no matter what, however there is a visible key-shaped socket."); diff --git a/scripts/portal/glpqPortal0.js b/scripts/portal/glpqPortal0.js index 80c30c9ca1..2f0d73d3ce 100644 --- a/scripts/portal/glpqPortal0.js +++ b/scripts/portal/glpqPortal0.js @@ -4,7 +4,7 @@ function enter(pi) { return false; } else { - pi.warp(610030200, 0); + pi.playPortalSound(); pi.warp(610030200, 0); return true; } } diff --git a/scripts/portal/glpqPortal00.js b/scripts/portal/glpqPortal00.js index d39e9eb87d..059f44f674 100644 --- a/scripts/portal/glpqPortal00.js +++ b/scripts/portal/glpqPortal00.js @@ -1,6 +1,6 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 1) { - pi.warp(610030510,0); + pi.playPortalSound(); pi.warp(610030510,0); return true; } else { pi.playerMessage(5, "Only warriors may enter this portal."); diff --git a/scripts/portal/glpqPortal01.js b/scripts/portal/glpqPortal01.js index 9a71c1e9ce..1134cbd2a0 100644 --- a/scripts/portal/glpqPortal01.js +++ b/scripts/portal/glpqPortal01.js @@ -1,6 +1,6 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 3) { - pi.warp(610030540,0); + pi.playPortalSound(); pi.warp(610030540,0); return true; } else { pi.playerMessage(5, "Only bowmen may enter this portal."); diff --git a/scripts/portal/glpqPortal02.js b/scripts/portal/glpqPortal02.js index 2ee82b3dac..d8c8f04c4b 100644 --- a/scripts/portal/glpqPortal02.js +++ b/scripts/portal/glpqPortal02.js @@ -1,6 +1,6 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 2) { - pi.warp(610030521,0); + pi.playPortalSound(); pi.warp(610030521,0); return true; } else { pi.playerMessage(5, "Only mages may enter this portal."); diff --git a/scripts/portal/glpqPortal03.js b/scripts/portal/glpqPortal03.js index 0c0a05cd37..83a09b1958 100644 --- a/scripts/portal/glpqPortal03.js +++ b/scripts/portal/glpqPortal03.js @@ -1,6 +1,6 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 4) { - pi.warp(610030530,0); + pi.playPortalSound(); pi.warp(610030530,0); return true; } else { pi.playerMessage(5, "Only thieves may enter this portal."); diff --git a/scripts/portal/glpqPortal04.js b/scripts/portal/glpqPortal04.js index 5aa8a6ea39..f6f401da97 100644 --- a/scripts/portal/glpqPortal04.js +++ b/scripts/portal/glpqPortal04.js @@ -1,6 +1,6 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 5) { - pi.warp(610030550,0); + pi.playPortalSound(); pi.warp(610030550,0); return true; } else { pi.playerMessage(5, "Only pirates may enter this portal."); diff --git a/scripts/portal/glpqPortal1.js b/scripts/portal/glpqPortal1.js index f0a620c232..372c32cefa 100644 --- a/scripts/portal/glpqPortal1.js +++ b/scripts/portal/glpqPortal1.js @@ -2,7 +2,7 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { if (eim.getIntProperty("glpq2") == 5) { - pi.warp(610030300, 0); + pi.playPortalSound(); pi.warp(610030300, 0); return true; } else { pi.playerMessage(5, "The portal has not been activated yet!"); diff --git a/scripts/portal/glpqPortal2.js b/scripts/portal/glpqPortal2.js index 17dfd61cc1..5b006de231 100644 --- a/scripts/portal/glpqPortal2.js +++ b/scripts/portal/glpqPortal2.js @@ -1,7 +1,7 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { - pi.warp(610030300, 0); + pi.playPortalSound(); pi.warp(610030300, 0); if (eim.getIntProperty("glpq3") < 5 || eim.getIntProperty("glpq3_p") < 5) { if(eim.getIntProperty("glpq3_p") == 5) { diff --git a/scripts/portal/glpqPortal3.js b/scripts/portal/glpqPortal3.js index 0421d50a03..b1d0f6fc3e 100644 --- a/scripts/portal/glpqPortal3.js +++ b/scripts/portal/glpqPortal3.js @@ -5,7 +5,7 @@ function enter(pi) { pi.playerMessage(5, "The portal is not opened yet."); return false; } else { - pi.warp(610030400, 0); + pi.playPortalSound(); pi.warp(610030400, 0); return true; } } diff --git a/scripts/portal/glpqPortal4.js b/scripts/portal/glpqPortal4.js index b90d26d87c..f16eb73759 100644 --- a/scripts/portal/glpqPortal4.js +++ b/scripts/portal/glpqPortal4.js @@ -5,7 +5,7 @@ function enter(pi) { pi.playerMessage(5, "The portal is not opened yet."); return false; } else { - pi.warp(610030500, 0); + pi.playPortalSound(); pi.warp(610030500, 0); return true; } } diff --git a/scripts/portal/glpqPortal5.js b/scripts/portal/glpqPortal5.js index b50e3aa913..fa18933037 100644 --- a/scripts/portal/glpqPortal5.js +++ b/scripts/portal/glpqPortal5.js @@ -5,7 +5,7 @@ function enter(pi) { pi.playerMessage(5, "The portal is not opened yet."); return false; } else { - pi.warp(610030600, 0); + pi.playPortalSound(); pi.warp(610030600, 0); return true; } } diff --git a/scripts/portal/glpqPortal6.js b/scripts/portal/glpqPortal6.js index 13ca38492f..297f22d770 100644 --- a/scripts/portal/glpqPortal6.js +++ b/scripts/portal/glpqPortal6.js @@ -5,7 +5,7 @@ function enter(pi) { pi.playerMessage(5, "The portal is not opened yet."); return false; } else { - pi.warp(610030700, 0); + pi.playPortalSound(); pi.warp(610030700, 0); return true; } } diff --git a/scripts/portal/glpqPortal7.js b/scripts/portal/glpqPortal7.js index 95c9554050..85030e0054 100644 --- a/scripts/portal/glpqPortal7.js +++ b/scripts/portal/glpqPortal7.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(610030800, 0); + pi.playPortalSound(); pi.warp(610030800, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/glpqPortalDummy.js b/scripts/portal/glpqPortalDummy.js index 31509bf1e2..d2657f0173 100644 --- a/scripts/portal/glpqPortalDummy.js +++ b/scripts/portal/glpqPortalDummy.js @@ -8,7 +8,7 @@ function enter(pi) { eim.setIntProperty("glpq1", 1); pi.getEventInstance().dropMessage(5, "A strange force starts being emitted from the portal apparatus, showing a hidden path once blocked now open."); - pi.warp(610030100, 0); + pi.playPortalSound(); pi.warp(610030100, 0); pi.getEventInstance().showClearEffect(); eim.giveEventPlayersStageReward(1); diff --git a/scripts/portal/gotocastle.js b/scripts/portal/gotocastle.js index e645218d0b..78f8b24063 100644 --- a/scripts/portal/gotocastle.js +++ b/scripts/portal/gotocastle.js @@ -7,6 +7,6 @@ function enter(pi) { pi.removeAll(2430015); pi.playerMessage(5, "Quest complete."); } - pi.warp(106020501,0); + pi.playPortalSound(); pi.warp(106020501,0); return true; } \ No newline at end of file diff --git a/scripts/portal/gryphius.js b/scripts/portal/gryphius.js index c6561f2b16..d200454428 100644 --- a/scripts/portal/gryphius.js +++ b/scripts/portal/gryphius.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(240020101, "out00"); + pi.playPortalSound(); pi.warp(240020101, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/guild1F00.js b/scripts/portal/guild1F00.js index 7edf4af15b..2c77ec78ca 100644 --- a/scripts/portal/guild1F00.js +++ b/scripts/portal/guild1F00.js @@ -29,6 +29,6 @@ function enter(pi) { var backPortals = [6, 8, 9, 11]; var idx = pi.getEventInstance().gridCheck(pi.getPlayer()); - pi.warp(990000600, backPortals[idx]); + pi.playPortalSound(); pi.warp(990000600, backPortals[idx]); return true; } \ No newline at end of file diff --git a/scripts/portal/guild1F01.js b/scripts/portal/guild1F01.js index f7b8802840..2ff090ff72 100644 --- a/scripts/portal/guild1F01.js +++ b/scripts/portal/guild1F01.js @@ -29,6 +29,6 @@ Save location to return. function enter(pi) { pi.getEventInstance().gridInsert(pi.getPlayer(), 0); - pi.warp(990000700, "st00"); + pi.playPortalSound(); pi.warp(990000700, "st00"); return true; } diff --git a/scripts/portal/guild1F02.js b/scripts/portal/guild1F02.js index bafec7ac4f..8e77eab520 100644 --- a/scripts/portal/guild1F02.js +++ b/scripts/portal/guild1F02.js @@ -29,6 +29,6 @@ Save location to return. function enter(pi) { pi.getEventInstance().gridInsert(pi.getPlayer(), 1); - pi.warp(990000700, "st00"); + pi.playPortalSound(); pi.warp(990000700, "st00"); return true; } diff --git a/scripts/portal/guild1F03.js b/scripts/portal/guild1F03.js index 2cb213bb53..3be6b4b139 100644 --- a/scripts/portal/guild1F03.js +++ b/scripts/portal/guild1F03.js @@ -29,6 +29,6 @@ Save location to return. function enter(pi) { pi.getEventInstance().gridInsert(pi.getPlayer(), 3); - pi.warp(990000700, "st00"); + pi.playPortalSound(); pi.warp(990000700, "st00"); return true; } diff --git a/scripts/portal/guild1F04.js b/scripts/portal/guild1F04.js index 9303540e9e..85586fe3d8 100644 --- a/scripts/portal/guild1F04.js +++ b/scripts/portal/guild1F04.js @@ -29,6 +29,6 @@ Save location to return. function enter(pi) { pi.getEventInstance().gridInsert(pi.getPlayer(), 2); - pi.warp(990000700, "st00"); + pi.playPortalSound(); pi.warp(990000700, "st00"); return true; } diff --git a/scripts/portal/guildwaitingenter.js b/scripts/portal/guildwaitingenter.js index 58285d6d5b..9b89a0128a 100644 --- a/scripts/portal/guildwaitingenter.js +++ b/scripts/portal/guildwaitingenter.js @@ -32,7 +32,7 @@ function enter(pi) { var timeLeft = Math.ceil((entryTime - timeNow) / 1000); if(timeLeft <= 0) { - pi.warp(990000100, 0); + pi.playPortalSound(); pi.warp(990000100, 0); return true; } else { //cannot proceed while allies can still enter diff --git a/scripts/portal/guildwaitingexit.js b/scripts/portal/guildwaitingexit.js index 6393214b2b..28b400a265 100644 --- a/scripts/portal/guildwaitingexit.js +++ b/scripts/portal/guildwaitingexit.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(101030104); + pi.playPortalSound(); pi.warp(101030104); return true; } \ No newline at end of file diff --git a/scripts/portal/halloween_enter.js b/scripts/portal/halloween_enter.js index f8f0395825..598156c4fc 100644 --- a/scripts/portal/halloween_enter.js +++ b/scripts/portal/halloween_enter.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(682000100, "st00"); + pi.playPortalSound(); pi.warp(682000100, "st00"); return true; } diff --git a/scripts/portal/hontale_BR.js b/scripts/portal/hontale_BR.js index cb979f40d0..ee869d27fb 100644 --- a/scripts/portal/hontale_BR.js +++ b/scripts/portal/hontale_BR.js @@ -30,7 +30,7 @@ function enter(pi) { } } else if (pi.getPlayer().getMapId() == 240060100) { if(pi.getEventInstance().getIntProperty("defeatedHead") >= 2) { - pi.warp(240060200, 0); + pi.playPortalSound(); pi.warp(240060200, 0); return true; } else { pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door."); diff --git a/scripts/portal/hontale_BtoB1.js b/scripts/portal/hontale_BtoB1.js index 6a7b7821a0..a4ee0920c4 100644 --- a/scripts/portal/hontale_BtoB1.js +++ b/scripts/portal/hontale_BtoB1.js @@ -32,7 +32,7 @@ function enter(pi) { pi.getPlayer().dropMessage(6, "You cannot pass to the next map holding the 1st Crystal Key in your inventory."); return false; } - pi.warp(240050101, 0); + pi.playPortalSound(); pi.warp(240050101, 0); return true; } } \ No newline at end of file diff --git a/scripts/portal/hontale_morph2.js b/scripts/portal/hontale_morph2.js index 447ab087f8..0a88fe54f8 100644 --- a/scripts/portal/hontale_morph2.js +++ b/scripts/portal/hontale_morph2.js @@ -24,6 +24,6 @@ Leave the Cave of Life - Entrance Map and go back to the Peak of the Big Nest (2 */ function enter(pi) { - pi.warp(240040600, 4); + pi.playPortalSound(); pi.warp(240040600, 4); return true; } diff --git a/scripts/portal/hontale_out1.js b/scripts/portal/hontale_out1.js index eca6d11c30..1ff970056e 100644 --- a/scripts/portal/hontale_out1.js +++ b/scripts/portal/hontale_out1.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(240050400, "sp"); + pi.playPortalSound(); pi.warp(240050400, "sp"); return true; } \ No newline at end of file diff --git a/scripts/portal/inERShip.js b/scripts/portal/inERShip.js index 06c0ff4079..3b8896caac 100644 --- a/scripts/portal/inERShip.js +++ b/scripts/portal/inERShip.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(101000400, 2); + pi.playPortalSound(); pi.warp(101000400, 2); return true; } diff --git a/scripts/portal/inNix1.js b/scripts/portal/inNix1.js index c0168eba84..2650f98da5 100644 --- a/scripts/portal/inNix1.js +++ b/scripts/portal/inNix1.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(240020600,"out00"); - return(true); + pi.playPortalSound(); pi.warp(240020600,"out00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/inNix2.js b/scripts/portal/inNix2.js index 424159f7bc..9237524f66 100644 --- a/scripts/portal/inNix2.js +++ b/scripts/portal/inNix2.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(240020600,"out01"); - return(true); + pi.playPortalSound(); pi.warp(240020600,"out01"); + return true; } \ No newline at end of file diff --git a/scripts/portal/jail_in.js b/scripts/portal/jail_in.js index 25620f65e2..36f7c8989d 100644 --- a/scripts/portal/jail_in.js +++ b/scripts/portal/jail_in.js @@ -4,6 +4,6 @@ */ function enter(pi) { - pi.warp(300000012,"portal"); - return(true); + pi.playPortalSound(); pi.warp(300000012,"portal"); + return true; } \ No newline at end of file diff --git a/scripts/portal/jail_out.js b/scripts/portal/jail_out.js index 590022b03c..809125732d 100644 --- a/scripts/portal/jail_out.js +++ b/scripts/portal/jail_out.js @@ -7,8 +7,8 @@ function enter(pi) { var jailedTime = pi.getJailTimeLeft(); if(jailedTime <= 0) { - pi.warp(300000010,"in01"); - return(true); + pi.playPortalSound(); pi.warp(300000010,"in01"); + return true; } else { var seconds = Math.floor(jailedTime / 1000) % 60 ; @@ -16,6 +16,6 @@ function enter(pi) { var hours = (Math.floor(jailedTime / (1000*60*60)) % 24); pi.playerMessage(5, "You have been caught in bad behaviour by the Maple POLICE. You've got to stay here for " + hours + " hours " + minutes + " minutes " + seconds + " seconds yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr12_in.js b/scripts/portal/jnr12_in.js index bab10acb72..9e96231796 100644 --- a/scripts/portal/jnr12_in.js +++ b/scripts/portal/jnr12_in.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(926110401, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110401, 0); //next + return true; } \ No newline at end of file diff --git a/scripts/portal/jnr1_out.js b/scripts/portal/jnr1_out.js index 3a8eb921ae..99f5ae23ca 100644 --- a/scripts/portal/jnr1_out.js +++ b/scripts/portal/jnr1_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg2") == 1) { - pi.warp(926110100, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110100, 0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr1_pt00.js b/scripts/portal/jnr1_pt00.js index 15f9455afe..476359bf18 100644 --- a/scripts/portal/jnr1_pt00.js +++ b/scripts/portal/jnr1_pt00.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg1") == 1) { - pi.warp(926110001, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110001, 0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr2_out.js b/scripts/portal/jnr2_out.js index 46c8b654a2..a9ab3396f3 100644 --- a/scripts/portal/jnr2_out.js +++ b/scripts/portal/jnr2_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg3") == 3) { - pi.warp(926110200, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110200, 0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr3_in0.js b/scripts/portal/jnr3_in0.js index 7e915d7507..d20c19b1b6 100644 --- a/scripts/portal/jnr3_in0.js +++ b/scripts/portal/jnr3_in0.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr3_out1").getState() == 1) { - pi.warp(926110201, 0); - return(true); + pi.playPortalSound(); pi.warp(926110201, 0); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr3_in1.js b/scripts/portal/jnr3_in1.js index a7002274b8..a74df3bd55 100644 --- a/scripts/portal/jnr3_in1.js +++ b/scripts/portal/jnr3_in1.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr3_out2").getState() == 1) { - pi.warp(926110202, 0); - return(true); + pi.playPortalSound(); pi.warp(926110202, 0); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr3_out.js b/scripts/portal/jnr3_out.js index 421be861e2..fe3c908dea 100644 --- a/scripts/portal/jnr3_out.js +++ b/scripts/portal/jnr3_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr3_out3").getState() == 1) { - pi.warp(926110203, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110203, 0); //next + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r1.js b/scripts/portal/jnr4_r1.js index d16c47fcc8..2a0e8f5455 100644 --- a/scripts/portal/jnr4_r1.js +++ b/scripts/portal/jnr4_r1.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926110301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r2.js b/scripts/portal/jnr4_r2.js index f94adce20a..e3e7d8cde5 100644 --- a/scripts/portal/jnr4_r2.js +++ b/scripts/portal/jnr4_r2.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926110301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r3.js b/scripts/portal/jnr4_r3.js index fbd0375c26..b006c3848a 100644 --- a/scripts/portal/jnr4_r3.js +++ b/scripts/portal/jnr4_r3.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926110301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r4.js b/scripts/portal/jnr4_r4.js index ad3fa0ba59..4ac7b6944a 100644 --- a/scripts/portal/jnr4_r4.js +++ b/scripts/portal/jnr4_r4.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926110301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr5_rp.js b/scripts/portal/jnr5_rp.js index 45d9e98dae..c58aa88c9d 100644 --- a/scripts/portal/jnr5_rp.js +++ b/scripts/portal/jnr5_rp.js @@ -47,19 +47,19 @@ function enter(pi) { if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb if(pRow < 9) { - pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); + pi.playPortalSound(); pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); } else { if(eim.getIntProperty("statusStg6") == 0) { eim.setIntProperty("statusStg6", 1); eim.giveEventPlayersStageReward(6); } - pi.warp(pi.getMapId(), 1); + pi.playPortalSound(); pi.warp(pi.getMapId(), 1); } } else { //fail - pi.warp(pi.getMapId(), 2); + pi.playPortalSound(); pi.warp(pi.getMapId(), 2); } - return false; + return true; } \ No newline at end of file diff --git a/scripts/portal/jnr6_out.js b/scripts/portal/jnr6_out.js index 11ebdecc54..ba099b9be4 100644 --- a/scripts/portal/jnr6_out.js +++ b/scripts/portal/jnr6_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr6_out").getState() == 1) { - pi.warp(926110300); - return(true); + pi.playPortalSound(); pi.warp(926110300); + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr_201_0.js b/scripts/portal/jnr_201_0.js index fdfb44e1ee..e6d9e0f395 100644 --- a/scripts/portal/jnr_201_0.js +++ b/scripts/portal/jnr_201_0.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr31_out").getState() == 1) { - pi.warp(926110200, 1); - return(true); + pi.playPortalSound(); pi.warp(926110200, 1); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr_202.js b/scripts/portal/jnr_202.js index 4fbc753bec..d8c57297ac 100644 --- a/scripts/portal/jnr_202.js +++ b/scripts/portal/jnr_202.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr32_out").getState() == 1) { - pi.warp(926110200, 2); - return(true); + pi.playPortalSound(); pi.warp(926110200, 2); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr_exit.js b/scripts/portal/jnr_exit.js index c747666774..0c6ed6d674 100644 --- a/scripts/portal/jnr_exit.js +++ b/scripts/portal/jnr_exit.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(261000021, 0); - return(true); + pi.playPortalSound(); pi.warp(261000021, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/kinggate2_open.js b/scripts/portal/kinggate2_open.js index 62e05fb205..957efcc188 100644 --- a/scripts/portal/kinggate2_open.js +++ b/scripts/portal/kinggate2_open.js @@ -27,7 +27,7 @@ Stage 5: Door before Ergoth - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("kinggate").getState() == 1) { - pi.warp(990000900, 2); + pi.playPortalSound(); pi.warp(990000900, 2); if (pi.getPlayer().getEventInstance().getProperty("boss") != null && pi.getPlayer().getEventInstance().getProperty("boss").equals("true")) { pi.changeMusic("Bgm10/Eregos"); } diff --git a/scripts/portal/kinggate_open.js b/scripts/portal/kinggate_open.js index b4ffe0d4de..4078db09f0 100644 --- a/scripts/portal/kinggate_open.js +++ b/scripts/portal/kinggate_open.js @@ -27,7 +27,7 @@ Stage 5: Door before Ergoth - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("kinggate").getState() == 1) { - pi.warp(990000900, 1); + pi.playPortalSound(); pi.warp(990000900, 1); if (pi.getPlayer().getEventInstance().getProperty("boss") != null && pi.getPlayer().getEventInstance().getProperty("boss").equals("true")) { pi.changeMusic("Bgm10/Eregos"); } diff --git a/scripts/portal/magatia_alc0.js b/scripts/portal/magatia_alc0.js index c19a460afb..14c53fa7fd 100644 --- a/scripts/portal/magatia_alc0.js +++ b/scripts/portal/magatia_alc0.js @@ -22,7 +22,7 @@ function enter(pi) { if(!pi.isQuestStarted(3309) || pi.haveItem(4031708, 1)) { pi.warp(261020700, "down00"); } else { - pi.warp(926120000, "out00"); + pi.playPortalSound(); pi.warp(926120000, "out00"); } return true; diff --git a/scripts/portal/magatia_dark0.js b/scripts/portal/magatia_dark0.js index 417bae34c2..a27ed95f40 100644 --- a/scripts/portal/magatia_dark0.js +++ b/scripts/portal/magatia_dark0.js @@ -21,7 +21,7 @@ */ function enter(pi) { if(pi.isQuestCompleted(7770)) { - pi.warp(926130000, "out00"); + pi.playPortalSound(); pi.warp(926130000, "out00"); return true; } else { pi.playerMessage(5, "This pipe seems too dark to venture inside."); diff --git a/scripts/portal/male00.js b/scripts/portal/male00.js index 7c48935397..8330313608 100644 --- a/scripts/portal/male00.js +++ b/scripts/portal/male00.js @@ -25,7 +25,7 @@ function enter(pi) { */ var gender = pi.getPlayer().getGender(); if (gender == 0) { - pi.warp(670010200, 3); + pi.playPortalSound(); pi.warp(670010200, 3); return true; } else { pi.getPlayer().dropMessage(5, "You cannot proceed past here."); diff --git a/scripts/portal/mapleMarket7_out.js b/scripts/portal/mapleMarket7_out.js index 3b356f4b52..18634e50ad 100644 --- a/scripts/portal/mapleMarket7_out.js +++ b/scripts/portal/mapleMarket7_out.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(pi.getPlayer().getSavedLocation("EVENT")); + pi.playPortalSound(); pi.warp(pi.getPlayer().getSavedLocation("EVENT")); return true; } \ No newline at end of file diff --git a/scripts/portal/market00.js b/scripts/portal/market00.js index 80426a7f6b..6cf3d5bb36 100644 --- a/scripts/portal/market00.js +++ b/scripts/portal/market00.js @@ -24,7 +24,7 @@ function enter(pi) { var toMap = pi.getPlayer().getSavedLocation("FREE_MARKET"); pi.warp(toMap, pi.getMarketPortalId(toMap)); } catch(err) { - pi.warp(100000000, 0); + pi.playPortalSound(); pi.warp(100000000, 0); } return true; } \ No newline at end of file diff --git a/scripts/portal/market01.js b/scripts/portal/market01.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market01.js +++ b/scripts/portal/market01.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market02.js b/scripts/portal/market02.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market02.js +++ b/scripts/portal/market02.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market03.js b/scripts/portal/market03.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market03.js +++ b/scripts/portal/market03.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market04.js b/scripts/portal/market04.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market04.js +++ b/scripts/portal/market04.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market05.js b/scripts/portal/market05.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market05.js +++ b/scripts/portal/market05.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market06.js b/scripts/portal/market06.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market06.js +++ b/scripts/portal/market06.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market07.js b/scripts/portal/market07.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market07.js +++ b/scripts/portal/market07.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market08.js b/scripts/portal/market08.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market08.js +++ b/scripts/portal/market08.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market09.js b/scripts/portal/market09.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market09.js +++ b/scripts/portal/market09.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market10.js b/scripts/portal/market10.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market10.js +++ b/scripts/portal/market10.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market11.js b/scripts/portal/market11.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market11.js +++ b/scripts/portal/market11.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market12.js b/scripts/portal/market12.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market12.js +++ b/scripts/portal/market12.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market13.js b/scripts/portal/market13.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market13.js +++ b/scripts/portal/market13.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market14.js b/scripts/portal/market14.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market14.js +++ b/scripts/portal/market14.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market15.js b/scripts/portal/market15.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market15.js +++ b/scripts/portal/market15.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market16.js b/scripts/portal/market16.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market16.js +++ b/scripts/portal/market16.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market17.js b/scripts/portal/market17.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market17.js +++ b/scripts/portal/market17.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market18.js b/scripts/portal/market18.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market18.js +++ b/scripts/portal/market18.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market19.js b/scripts/portal/market19.js index 70221fc1f0..fdf807f34e 100644 --- a/scripts/portal/market19.js +++ b/scripts/portal/market19.js @@ -22,7 +22,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market20.js b/scripts/portal/market20.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market20.js +++ b/scripts/portal/market20.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market21.js b/scripts/portal/market21.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market21.js +++ b/scripts/portal/market21.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market22.js b/scripts/portal/market22.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market22.js +++ b/scripts/portal/market22.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market23.js b/scripts/portal/market23.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market23.js +++ b/scripts/portal/market23.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market24.js b/scripts/portal/market24.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market24.js +++ b/scripts/portal/market24.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market26.js b/scripts/portal/market26.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market26.js +++ b/scripts/portal/market26.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market52.js b/scripts/portal/market52.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market52.js +++ b/scripts/portal/market52.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market53.js b/scripts/portal/market53.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market53.js +++ b/scripts/portal/market53.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market54.js b/scripts/portal/market54.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market54.js +++ b/scripts/portal/market54.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market55.js b/scripts/portal/market55.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market55.js +++ b/scripts/portal/market55.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/market56.js b/scripts/portal/market56.js index 8a16b3899c..dcfaec1b4d 100644 --- a/scripts/portal/market56.js +++ b/scripts/portal/market56.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.warp(910000000, "out00"); + pi.playPortalSound(); pi.warp(910000000, "out00"); return true; } return false; diff --git a/scripts/portal/mayong.js b/scripts/portal/mayong.js index 360bf054ee..b7be6855f3 100644 --- a/scripts/portal/mayong.js +++ b/scripts/portal/mayong.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(240020401, "out00"); + pi.playPortalSound(); pi.warp(240020401, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/mc_out.js b/scripts/portal/mc_out.js index f440db2612..28ab17cf5b 100644 --- a/scripts/portal/mc_out.js +++ b/scripts/portal/mc_out.js @@ -23,6 +23,6 @@ Author: kevintjuh93 */ function enter(pi) { - pi.warp(pi.getPlayer().getSavedLocation("MIRROR")); + pi.playPortalSound(); pi.warp(pi.getPlayer().getSavedLocation("MIRROR")); return true; } \ No newline at end of file diff --git a/scripts/portal/met_in.js b/scripts/portal/met_in.js index ccb2962cfd..10b8ec87b3 100644 --- a/scripts/portal/met_in.js +++ b/scripts/portal/met_in.js @@ -1,6 +1,6 @@ function enter(pi) { //pi.warp(910320000, 2); event not implemented - pi.warp(103000103, 1); + pi.playPortalSound(); pi.warp(103000103, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/met_out.js b/scripts/portal/met_out.js index 0ebc23e249..cc5e7ebc92 100644 --- a/scripts/portal/met_out.js +++ b/scripts/portal/met_out.js @@ -28,7 +28,7 @@ function enter(pi) { if(mapId == -1) pi.warp(102040000, 12); else pi.warp(mapId); - //pi.warp(102040000, 12); + //pi.playPortalSound(); pi.warp(102040000, 12); return true; } \ No newline at end of file diff --git a/scripts/portal/metalgate_open.js b/scripts/portal/metalgate_open.js index cac9d5506a..e5ee4505e7 100644 --- a/scripts/portal/metalgate_open.js +++ b/scripts/portal/metalgate_open.js @@ -27,7 +27,7 @@ Stage 2: Door guarded by Dark Muscle Golems - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("metalgate").getState() == 1) { - pi.warp(990000431, 0); + pi.playPortalSound(); pi.warp(990000431, 0); return true; } pi.playerMessage(5, "This way forward is not open yet."); diff --git a/scripts/portal/minar_elli.js b/scripts/portal/minar_elli.js index aa002c71ce..790dbe19c3 100644 --- a/scripts/portal/minar_elli.js +++ b/scripts/portal/minar_elli.js @@ -30,7 +30,7 @@ function enter(pi) { return true; } else if (pi.getPlayer().getMapId() == 101010000) { pi.gainItem(4031346, -1); - pi.warp(240010100, "elli00"); + pi.playPortalSound(); pi.warp(240010100, "elli00"); return true; } return true; diff --git a/scripts/portal/minar_job4.js b/scripts/portal/minar_job4.js index 4166ccdf95..bc80b6229a 100644 --- a/scripts/portal/minar_job4.js +++ b/scripts/portal/minar_job4.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(240010501, "out00"); + pi.playPortalSound(); pi.warp(240010501, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/move_elin.js b/scripts/portal/move_elin.js index 2bf5ea4689..0f9dbec8d1 100644 --- a/scripts/portal/move_elin.js +++ b/scripts/portal/move_elin.js @@ -20,7 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(300000100, "out00"); + pi.playPortalSound(); pi.warp(300000100, "out00"); pi.playerMessage(5, "Now passing the Time Gate."); return true; } diff --git a/scripts/portal/nets_in.js b/scripts/portal/nets_in.js index 0461160468..4bae336f7d 100644 --- a/scripts/portal/nets_in.js +++ b/scripts/portal/nets_in.js @@ -1,5 +1,5 @@ function enter(pi) { pi.saveLocation("MIRROR"); - pi.warp(926010000, 0); + pi.playPortalSound(); pi.warp(926010000, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/nets_out.js b/scripts/portal/nets_out.js index f440db2612..28ab17cf5b 100644 --- a/scripts/portal/nets_out.js +++ b/scripts/portal/nets_out.js @@ -23,6 +23,6 @@ Author: kevintjuh93 */ function enter(pi) { - pi.warp(pi.getPlayer().getSavedLocation("MIRROR")); + pi.playPortalSound(); pi.warp(pi.getPlayer().getSavedLocation("MIRROR")); return true; } \ No newline at end of file diff --git a/scripts/portal/obstacle.js b/scripts/portal/obstacle.js index 59b5abfd26..7ae49c2f99 100644 --- a/scripts/portal/obstacle.js +++ b/scripts/portal/obstacle.js @@ -17,7 +17,7 @@ pi.gainItem(2430015, -1 * pi.getPlayer().getItemQuantity(2430015, false)); pi.message("You have used the Thorn Remover to clean the way."); - pi.warp(106020400, 2); + pi.playPortalSound(); pi.warp(106020400, 2); return true; } diff --git a/scripts/portal/outArchterMap.js b/scripts/portal/outArchterMap.js index b95d5fabbc..51bcc89470 100644 --- a/scripts/portal/outArchterMap.js +++ b/scripts/portal/outArchterMap.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.warp(100000000, "Achter00"); + pi.playPortalSound(); pi.warp(100000000, "Achter00"); pi.playPortalSound(); return true; } \ No newline at end of file diff --git a/scripts/portal/outChild.js b/scripts/portal/outChild.js index 3465a711aa..21970f849a 100644 --- a/scripts/portal/outChild.js +++ b/scripts/portal/outChild.js @@ -26,7 +26,7 @@ function enter(pi) { pi.warp(914000220, 2); return true; } else { - pi.warp(914000400, 2); + pi.playPortalSound(); pi.warp(914000400, 2); return true; } } \ No newline at end of file diff --git a/scripts/portal/outMaha.js b/scripts/portal/outMaha.js index 074973d151..2de8711663 100644 --- a/scripts/portal/outMaha.js +++ b/scripts/portal/outMaha.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(140000000, 0); + pi.playPortalSound(); pi.warp(140000000, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/outNix1.js b/scripts/portal/outNix1.js index 38e79512bd..c778a58310 100644 --- a/scripts/portal/outNix1.js +++ b/scripts/portal/outNix1.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(240020101,"in00"); - return(true); + pi.playPortalSound(); pi.warp(240020101,"in00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/outNix2.js b/scripts/portal/outNix2.js index 8ba1f4a5b2..419e4bda53 100644 --- a/scripts/portal/outNix2.js +++ b/scripts/portal/outNix2.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(240020401,"in00"); - return(true); + pi.playPortalSound(); pi.warp(240020401,"in00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/outPerrion_1.js b/scripts/portal/outPerrion_1.js index 920c03fe46..065e5ccc18 100644 --- a/scripts/portal/outPerrion_1.js +++ b/scripts/portal/outPerrion_1.js @@ -1,5 +1,5 @@ function enter(pi) { pi.message("You found a shortcut to the start of the underground temple."); - pi.warp(105100000, 2); - return(true); + pi.playPortalSound(); pi.warp(105100000, 2); + return true; } \ No newline at end of file diff --git a/scripts/portal/outPerrion_2.js b/scripts/portal/outPerrion_2.js index 8748ffa9ac..3002486106 100644 --- a/scripts/portal/outPerrion_2.js +++ b/scripts/portal/outPerrion_2.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(105100000, 0); - return(true); + pi.playPortalSound(); pi.warp(105100000, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/outRider.js b/scripts/portal/outRider.js index 903661782b..cedd84ffcc 100644 --- a/scripts/portal/outRider.js +++ b/scripts/portal/outRider.js @@ -1,7 +1,7 @@ function enter(pi) { if(pi.canHold(4001193, 1)) { pi.gainItem(4001193, 1); - pi.warp(211050000, 4); + pi.playPortalSound(); pi.warp(211050000, 4); return true; } else { pi.playerMessage(5, "Free a slot on your inventory before receiving the couse clear's token."); diff --git a/scripts/portal/outSpecialSchool.js b/scripts/portal/outSpecialSchool.js index 09060d4c08..dc34c28123 100644 --- a/scripts/portal/outSpecialSchool.js +++ b/scripts/portal/outSpecialSchool.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(925040000, 1); + pi.playPortalSound(); pi.warp(925040000, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/outTemple.js b/scripts/portal/outTemple.js index 163a187903..6430791153 100644 --- a/scripts/portal/outTemple.js +++ b/scripts/portal/outTemple.js @@ -21,6 +21,6 @@ */ function enter(pi) { pi.useItem(2210016); - pi.warp(200090510, 0); + pi.playPortalSound(); pi.warp(200090510, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/outtestWolf.js b/scripts/portal/outtestWolf.js index cf5698d7a0..0786173c9e 100644 --- a/scripts/portal/outtestWolf.js +++ b/scripts/portal/outtestWolf.js @@ -2,7 +2,7 @@ function enter(pi) { if(pi.getMap().countMonsters() == 0) { if(pi.canHold(4001193, 1)) { pi.gainItem(4001193, 1); - pi.warp(140010210, 0); + pi.playPortalSound(); pi.warp(140010210, 0); return true; } else { pi.playerMessage(5, "Free a slot on your inventory before receiving the couse clear's token."); diff --git a/scripts/portal/party3_jail1.js b/scripts/portal/party3_jail1.js index 084b93632b..ee81f079df 100644 --- a/scripts/portal/party3_jail1.js +++ b/scripts/portal/party3_jail1.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.warp(920010910,0); + pi.playPortalSound(); pi.warp(920010910,0); return true; } else { diff --git a/scripts/portal/party3_jail2.js b/scripts/portal/party3_jail2.js index 37e981c6fa..30f18d7fed 100644 --- a/scripts/portal/party3_jail2.js +++ b/scripts/portal/party3_jail2.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.warp(920010920,0); + pi.playPortalSound(); pi.warp(920010920,0); return true; } else { diff --git a/scripts/portal/party3_jail3.js b/scripts/portal/party3_jail3.js index 346a0bb6c9..5efdc133c8 100644 --- a/scripts/portal/party3_jail3.js +++ b/scripts/portal/party3_jail3.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.warp(920010930,0); + pi.playPortalSound(); pi.warp(920010930,0); return true; } else { diff --git a/scripts/portal/party3_jailin.js b/scripts/portal/party3_jailin.js index 69d22c354d..f4b107c220 100644 --- a/scripts/portal/party3_jailin.js +++ b/scripts/portal/party3_jailin.js @@ -41,6 +41,6 @@ function enter(pi) { pi.getEventInstance().setProperty("jail" + jailn, "0"); } - pi.warp(pi.getMapId() + 2,0); + pi.playPortalSound(); pi.warp(pi.getMapId() + 2,0); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_r4pt.js b/scripts/portal/party3_r4pt.js index 4b98206d27..aa32951d7b 100644 --- a/scripts/portal/party3_r4pt.js +++ b/scripts/portal/party3_r4pt.js @@ -44,10 +44,10 @@ function enter(pi) { if(secondPt) nextPortal = 1; else nextPortal = pi.getPortal().getId() + 3; - pi.warp(pi.getMapId(), nextPortal); + pi.playPortalSound(); pi.warp(pi.getMapId(), nextPortal); } else { //fail - pi.warp(pi.getMapId(), 2); + pi.playPortalSound(); pi.warp(pi.getMapId(), 2); } - return false; + return true; } \ No newline at end of file diff --git a/scripts/portal/party3_r4pt1.js b/scripts/portal/party3_r4pt1.js index ab8b370940..af9454977b 100644 --- a/scripts/portal/party3_r4pt1.js +++ b/scripts/portal/party3_r4pt1.js @@ -25,6 +25,6 @@ */ function enter(pi) { - pi.warp(920010600, Math.random() * 3 > 1 ? 1 : 2); + pi.playPortalSound(); pi.warp(920010600, Math.random() * 3 > 1 ? 1 : 2); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_r6pt.js b/scripts/portal/party3_r6pt.js index 2647b8ed39..5498ab4b50 100644 --- a/scripts/portal/party3_r6pt.js +++ b/scripts/portal/party3_r6pt.js @@ -45,10 +45,10 @@ function enter(pi) { if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb - pi.warp(pi.getMapId(), (pRow % 4 != 0) ? pi.getPortal().getId() + 4 : (pRow / 4)); + pi.playPortalSound(); pi.warp(pi.getMapId(), (pRow % 4 != 0) ? pi.getPortal().getId() + 4 : (pRow / 4)); } else { //fail - pi.warp(pi.getMapId(), 5); + pi.playPortalSound(); pi.warp(pi.getMapId(), 5); } - return false; + return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room1.js b/scripts/portal/party3_room1.js index c8270682ee..b3e0dc3bd7 100644 --- a/scripts/portal/party3_room1.js +++ b/scripts/portal/party3_room1.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(920010200, 13); + pi.playPortalSound(); pi.warp(920010200, 13); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room2.js b/scripts/portal/party3_room2.js index 4ca237e0bf..b0b6447f8d 100644 --- a/scripts/portal/party3_room2.js +++ b/scripts/portal/party3_room2.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(920010300, 1); + pi.playPortalSound(); pi.warp(920010300, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room3.js b/scripts/portal/party3_room3.js index cc5733f6a4..c32c34925b 100644 --- a/scripts/portal/party3_room3.js +++ b/scripts/portal/party3_room3.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(920010400, 8); + pi.playPortalSound(); pi.warp(920010400, 8); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room4.js b/scripts/portal/party3_room4.js index 7f6c977a6a..6f1dc6576e 100644 --- a/scripts/portal/party3_room4.js +++ b/scripts/portal/party3_room4.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(920010500, 3); + pi.playPortalSound(); pi.warp(920010500, 3); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room5.js b/scripts/portal/party3_room5.js index 4897ea9782..58cc977632 100644 --- a/scripts/portal/party3_room5.js +++ b/scripts/portal/party3_room5.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(920010600, 17); + pi.playPortalSound(); pi.warp(920010600, 17); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room6.js b/scripts/portal/party3_room6.js index 1d81c5328b..e7a6904de7 100644 --- a/scripts/portal/party3_room6.js +++ b/scripts/portal/party3_room6.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(920010700, 23); + pi.playPortalSound(); pi.warp(920010700, 23); return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room8.js b/scripts/portal/party3_room8.js index d8e7eda6d9..6815f90918 100644 --- a/scripts/portal/party3_room8.js +++ b/scripts/portal/party3_room8.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.warp(920011000,0); + pi.playPortalSound(); pi.warp(920011000,0); return true; } else { diff --git a/scripts/portal/party3_roomout.js b/scripts/portal/party3_roomout.js index bbbc941cbd..c8b3a66128 100644 --- a/scripts/portal/party3_roomout.js +++ b/scripts/portal/party3_roomout.js @@ -31,6 +31,6 @@ function enter(pi) { break; } - pi.warp(920010100, exitPortal); + pi.playPortalSound(); pi.warp(920010100, exitPortal); return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage.js b/scripts/portal/party6_stage.js index 4c42fd8832..cda79a2631 100644 --- a/scripts/portal/party6_stage.js +++ b/scripts/portal/party6_stage.js @@ -18,7 +18,7 @@ function enter(pi) { pi.playerMessage(5, "The spine blocks the way."); return false; } else { - pi.warp(930000300,0); //assuming they cant get past reactor without it being gone + pi.playPortalSound(); pi.warp(930000300,0); //assuming they cant get past reactor without it being gone return true; } break; diff --git a/scripts/portal/party6_stage501.js b/scripts/portal/party6_stage501.js index d0c7fb034f..887accb9f1 100644 --- a/scripts/portal/party6_stage501.js +++ b/scripts/portal/party6_stage501.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "02st"); + pi.playPortalSound(); pi.warp(930000300, "02st"); } return true; diff --git a/scripts/portal/party6_stage502.js b/scripts/portal/party6_stage502.js index 494ab57871..259846a773 100644 --- a/scripts/portal/party6_stage502.js +++ b/scripts/portal/party6_stage502.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "03st"); + pi.playPortalSound(); pi.warp(930000300, "03st"); } return true; diff --git a/scripts/portal/party6_stage503.js b/scripts/portal/party6_stage503.js index f7b4f86b97..38bd839b2d 100644 --- a/scripts/portal/party6_stage503.js +++ b/scripts/portal/party6_stage503.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "04st"); + pi.playPortalSound(); pi.warp(930000300, "04st"); } return true; diff --git a/scripts/portal/party6_stage504.js b/scripts/portal/party6_stage504.js index 867dd3c9c0..4ec4244a85 100644 --- a/scripts/portal/party6_stage504.js +++ b/scripts/portal/party6_stage504.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "05st"); + pi.playPortalSound(); pi.warp(930000300, "05st"); } return true; diff --git a/scripts/portal/party6_stage505.js b/scripts/portal/party6_stage505.js index d577846d32..afdd71b343 100644 --- a/scripts/portal/party6_stage505.js +++ b/scripts/portal/party6_stage505.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "06st"); + pi.playPortalSound(); pi.warp(930000300, "06st"); } return true; diff --git a/scripts/portal/party6_stage506.js b/scripts/portal/party6_stage506.js index 0f665872d0..7b57c7125f 100644 --- a/scripts/portal/party6_stage506.js +++ b/scripts/portal/party6_stage506.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "07st"); + pi.playPortalSound(); pi.warp(930000300, "07st"); } return true; diff --git a/scripts/portal/party6_stage507.js b/scripts/portal/party6_stage507.js index 61b94556cd..44e43aeb1e 100644 --- a/scripts/portal/party6_stage507.js +++ b/scripts/portal/party6_stage507.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "08st"); + pi.playPortalSound(); pi.warp(930000300, "08st"); } return true; diff --git a/scripts/portal/party6_stage508.js b/scripts/portal/party6_stage508.js index e6d3719430..5f930d209f 100644 --- a/scripts/portal/party6_stage508.js +++ b/scripts/portal/party6_stage508.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "09st"); + pi.playPortalSound(); pi.warp(930000300, "09st"); } return true; diff --git a/scripts/portal/party6_stage509.js b/scripts/portal/party6_stage509.js index cecdd2c598..886fcf046e 100644 --- a/scripts/portal/party6_stage509.js +++ b/scripts/portal/party6_stage509.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "10st"); + pi.playPortalSound(); pi.warp(930000300, "10st"); } return true; diff --git a/scripts/portal/party6_stage510.js b/scripts/portal/party6_stage510.js index 1b58a5b5b3..777fc0ded7 100644 --- a/scripts/portal/party6_stage510.js +++ b/scripts/portal/party6_stage510.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "11st"); + pi.playPortalSound(); pi.warp(930000300, "11st"); } return true; diff --git a/scripts/portal/party6_stage511.js b/scripts/portal/party6_stage511.js index bf25c56979..253bd5100b 100644 --- a/scripts/portal/party6_stage511.js +++ b/scripts/portal/party6_stage511.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "12st"); + pi.playPortalSound(); pi.warp(930000300, "12st"); } return true; diff --git a/scripts/portal/party6_stage512.js b/scripts/portal/party6_stage512.js index 0aa9b3e9e3..cef1f8877f 100644 --- a/scripts/portal/party6_stage512.js +++ b/scripts/portal/party6_stage512.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "13st"); + pi.playPortalSound(); pi.warp(930000300, "13st"); } return true; diff --git a/scripts/portal/party6_stage513.js b/scripts/portal/party6_stage513.js index c265e24fe6..15828f2585 100644 --- a/scripts/portal/party6_stage513.js +++ b/scripts/portal/party6_stage513.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "14st"); + pi.playPortalSound(); pi.warp(930000300, "14st"); } return true; diff --git a/scripts/portal/party6_stage514.js b/scripts/portal/party6_stage514.js index 59dfd30e57..a2c4ffa187 100644 --- a/scripts/portal/party6_stage514.js +++ b/scripts/portal/party6_stage514.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "15st"); + pi.playPortalSound(); pi.warp(930000300, "15st"); } return true; diff --git a/scripts/portal/party6_stage515.js b/scripts/portal/party6_stage515.js index 887fd53a90..221db8bc2e 100644 --- a/scripts/portal/party6_stage515.js +++ b/scripts/portal/party6_stage515.js @@ -1,8 +1,8 @@ function enter(pi) { if (java.lang.Math.random() < 0.1) { - pi.warp(930000300,"16st"); + pi.playPortalSound(); pi.warp(930000300,"16st"); } else { - pi.warp(930000300, "01st"); + pi.playPortalSound(); pi.warp(930000300, "01st"); } return true; diff --git a/scripts/portal/party6_stage800.js b/scripts/portal/party6_stage800.js index 53a860e4d4..7aa55ca09b 100644 --- a/scripts/portal/party6_stage800.js +++ b/scripts/portal/party6_stage800.js @@ -14,6 +14,6 @@ function enter(pi) { pi.gainItem(4001198, 1); } - pi.warp(300030100,0); + pi.playPortalSound(); pi.warp(300030100,0); return true; } \ No newline at end of file diff --git a/scripts/portal/q3366in.js b/scripts/portal/q3366in.js index 96193fa04e..6c8af6496a 100644 --- a/scripts/portal/q3366in.js +++ b/scripts/portal/q3366in.js @@ -19,7 +19,7 @@ */ function enter(pi) { if(pi.isQuestStarted(3366)) { - pi.warp(926130101, 0); + pi.playPortalSound(); pi.warp(926130101, 0); return true; } else { pi.message("You don't have permission to access this room."); diff --git a/scripts/portal/q3366out.js b/scripts/portal/q3366out.js index 639adc9af0..f911d738b8 100644 --- a/scripts/portal/q3366out.js +++ b/scripts/portal/q3366out.js @@ -18,6 +18,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(926130100, "in00"); + pi.playPortalSound(); pi.warp(926130100, "in00"); return true; } \ No newline at end of file diff --git a/scripts/portal/q3367in.js b/scripts/portal/q3367in.js index daeeab03c2..b0d30ed219 100644 --- a/scripts/portal/q3367in.js +++ b/scripts/portal/q3367in.js @@ -23,7 +23,7 @@ function enter(pi) { pi.gainItem(4031797, pi.getQuestProgress(3367, 31) - pi.getItemQuantity(4031797)); } - pi.warp(926130102, 0); + pi.playPortalSound(); pi.warp(926130102, 0); return true; } else { pi.message("You don't have permission to access this room."); diff --git a/scripts/portal/q3367out.js b/scripts/portal/q3367out.js index 07b648b310..cf169fc507 100644 --- a/scripts/portal/q3367out.js +++ b/scripts/portal/q3367out.js @@ -18,6 +18,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(926130100, "in01"); + pi.playPortalSound(); pi.warp(926130100, "in01"); return true; } \ No newline at end of file diff --git a/scripts/portal/q3368in.js b/scripts/portal/q3368in.js index 02336e73ed..8e9471c07c 100644 --- a/scripts/portal/q3368in.js +++ b/scripts/portal/q3368in.js @@ -19,7 +19,7 @@ */ function enter(pi) { if(pi.isQuestStarted(3368)) { - pi.warp(926130103, 0); + pi.playPortalSound(); pi.warp(926130103, 0); return true; } else { pi.message("You don't have permission to access this room."); diff --git a/scripts/portal/q3368out.js b/scripts/portal/q3368out.js index e699c33e20..a536b67a0e 100644 --- a/scripts/portal/q3368out.js +++ b/scripts/portal/q3368out.js @@ -18,6 +18,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(926130100, "in02"); + pi.playPortalSound(); pi.warp(926130100, "in02"); return true; } \ No newline at end of file diff --git a/scripts/portal/raid_rest.js b/scripts/portal/raid_rest.js index 0f09d012f0..4afd73107b 100644 --- a/scripts/portal/raid_rest.js +++ b/scripts/portal/raid_rest.js @@ -33,7 +33,7 @@ function enter(pi) { } if(pi.getPlayer().getEventInstance().giveEventReward(pi.getPlayer(), evLevel)) { - pi.warp(970030000); + pi.playPortalSound(); pi.warp(970030000); return true; } else { diff --git a/scripts/portal/raid_stage.js b/scripts/portal/raid_stage.js index 4fcfb96b5e..927115f73a 100644 --- a/scripts/portal/raid_stage.js +++ b/scripts/portal/raid_stage.js @@ -31,7 +31,7 @@ function enter(pi) { if(pi.getMapId() % 500 >= 100) nextStage = pi.getMapId() + 100; else nextStage = 970030001 + (Math.floor((pi.getMapId() - 970030100) / 500)); - pi.warp(nextStage); + pi.playPortalSound(); pi.warp(nextStage); return true; } else { diff --git a/scripts/portal/raidout.js b/scripts/portal/raidout.js index 3574c4b01f..b2d3096ad4 100644 --- a/scripts/portal/raidout.js +++ b/scripts/portal/raidout.js @@ -3,6 +3,6 @@ function enter(pi) { if (map == -1) map = 100000000; - pi.warp(map,0); + pi.playPortalSound(); pi.warp(map,0); return true; } \ No newline at end of file diff --git a/scripts/portal/rienTutor1.js b/scripts/portal/rienTutor1.js index 36306b0455..5a34f9f150 100644 --- a/scripts/portal/rienTutor1.js +++ b/scripts/portal/rienTutor1.js @@ -26,6 +26,6 @@ function enter(pi) { pi.message("You must complete the quest before proceeding to the next map."); return false; } - pi.warp(140090200, 1); + pi.playPortalSound(); pi.warp(140090200, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/rienTutor2.js b/scripts/portal/rienTutor2.js index f37c4cb1c8..58c78e3ee7 100644 --- a/scripts/portal/rienTutor2.js +++ b/scripts/portal/rienTutor2.js @@ -26,6 +26,6 @@ function enter(pi) { pi.message("You must complete the quest before proceeding to the next map.."); return false; } - pi.warp(140090300, 1); + pi.playPortalSound(); pi.warp(140090300, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/rienTutor3.js b/scripts/portal/rienTutor3.js index d301997822..fe57062e75 100644 --- a/scripts/portal/rienTutor3.js +++ b/scripts/portal/rienTutor3.js @@ -26,6 +26,6 @@ function enter(pi) { pi.message("You must complete the quest before proceeding to the next map.."); return false; } - pi.warp(140090400, 1); + pi.playPortalSound(); pi.warp(140090400, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/rienTutor4.js b/scripts/portal/rienTutor4.js index 658af2d667..0ce7dc7ee7 100644 --- a/scripts/portal/rienTutor4.js +++ b/scripts/portal/rienTutor4.js @@ -26,6 +26,6 @@ function enter(pi) { pi.message("You must complete the quest before proceeding to the next map.."); return false; } - pi.warp(140090500, 1); + pi.playPortalSound(); pi.warp(140090500, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/rnj12_in.js b/scripts/portal/rnj12_in.js index 83ebc23db3..0e3661b56b 100644 --- a/scripts/portal/rnj12_in.js +++ b/scripts/portal/rnj12_in.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(926100401, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100401, 0); //next + return true; } \ No newline at end of file diff --git a/scripts/portal/rnj1_out.js b/scripts/portal/rnj1_out.js index 263f2393ec..1f5308141a 100644 --- a/scripts/portal/rnj1_out.js +++ b/scripts/portal/rnj1_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg2") == 1) { - pi.warp(926100100, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100100, 0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj1_pt00.js b/scripts/portal/rnj1_pt00.js index 479377ee57..b528889e6b 100644 --- a/scripts/portal/rnj1_pt00.js +++ b/scripts/portal/rnj1_pt00.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg1") == 1) { - pi.warp(926100001, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100001, 0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj2_out.js b/scripts/portal/rnj2_out.js index 8b9e5719c2..edd8f0a911 100644 --- a/scripts/portal/rnj2_out.js +++ b/scripts/portal/rnj2_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg3") == 3) { - pi.warp(926100200, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100200, 0); //next + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj3_in0.js b/scripts/portal/rnj3_in0.js index d50833005b..1b30a2a21e 100644 --- a/scripts/portal/rnj3_in0.js +++ b/scripts/portal/rnj3_in0.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj3_out1").getState() == 1) { - pi.warp(926100201, 0); - return(true); + pi.playPortalSound(); pi.warp(926100201, 0); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj3_in1.js b/scripts/portal/rnj3_in1.js index e1ab91efd3..fe9a7e481b 100644 --- a/scripts/portal/rnj3_in1.js +++ b/scripts/portal/rnj3_in1.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj3_out2").getState() == 1) { - pi.warp(926100202, 0); - return(true); + pi.playPortalSound(); pi.warp(926100202, 0); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj3_out.js b/scripts/portal/rnj3_out.js index a8ece2a34d..5b8d96a129 100644 --- a/scripts/portal/rnj3_out.js +++ b/scripts/portal/rnj3_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj3_out3").getState() == 1) { - pi.warp(926100203, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100203, 0); //next + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r1.js b/scripts/portal/rnj4_r1.js index 4da9412cf4..a03880acd1 100644 --- a/scripts/portal/rnj4_r1.js +++ b/scripts/portal/rnj4_r1.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926100301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r2.js b/scripts/portal/rnj4_r2.js index fd926cdfc5..b4a94f1e69 100644 --- a/scripts/portal/rnj4_r2.js +++ b/scripts/portal/rnj4_r2.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926100301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r3.js b/scripts/portal/rnj4_r3.js index 70d2743344..a65bde77ec 100644 --- a/scripts/portal/rnj4_r3.js +++ b/scripts/portal/rnj4_r3.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926100301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r4.js b/scripts/portal/rnj4_r4.js index a0915e9778..f6251e84a1 100644 --- a/scripts/portal/rnj4_r4.js +++ b/scripts/portal/rnj4_r4.js @@ -7,10 +7,10 @@ function enter(pi) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - pi.warp(926100301 + reg, 0); //next - return(true); + pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + return true; } else { pi.playerMessage(5, "This room is already being explored."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj5_rp.js b/scripts/portal/rnj5_rp.js index f29bd7f477..e97a5a8d45 100644 --- a/scripts/portal/rnj5_rp.js +++ b/scripts/portal/rnj5_rp.js @@ -47,19 +47,19 @@ function enter(pi) { if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb if(pRow < 9) { - pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); + pi.playPortalSound(); pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); } else { if(eim.getIntProperty("statusStg6") == 0) { eim.setIntProperty("statusStg6", 1); eim.giveEventPlayersStageReward(6); } - pi.warp(pi.getMapId(), 1); + pi.playPortalSound(); pi.warp(pi.getMapId(), 1); } } else { //fail - pi.warp(pi.getMapId(), 2); + pi.playPortalSound(); pi.warp(pi.getMapId(), 2); } - return false; + return true; } \ No newline at end of file diff --git a/scripts/portal/rnj6_out.js b/scripts/portal/rnj6_out.js index 0e5b84bbb6..88cbcc86b3 100644 --- a/scripts/portal/rnj6_out.js +++ b/scripts/portal/rnj6_out.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj6_out").getState() == 1) { - pi.warp(926100300, 0); - return(true); + pi.playPortalSound(); pi.warp(926100300, 0); + return true; } else { pi.playerMessage(5, "The portal is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj_201_0.js b/scripts/portal/rnj_201_0.js index 7982984358..a778e0207d 100644 --- a/scripts/portal/rnj_201_0.js +++ b/scripts/portal/rnj_201_0.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj31_out").getState() == 1) { - pi.warp(926100200, 1); - return(true); + pi.playPortalSound(); pi.warp(926100200, 1); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj_202.js b/scripts/portal/rnj_202.js index 9cd0e7268f..95c6da9391 100644 --- a/scripts/portal/rnj_202.js +++ b/scripts/portal/rnj_202.js @@ -1,9 +1,9 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj32_out").getState() == 1) { - pi.warp(926100200, 2); - return(true); + pi.playPortalSound(); pi.warp(926100200, 2); + return true; } else { pi.playerMessage(5, "The door is not opened yet."); - return(false); + return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj_exit.js b/scripts/portal/rnj_exit.js index 867996c9aa..d80f0b7380 100644 --- a/scripts/portal/rnj_exit.js +++ b/scripts/portal/rnj_exit.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(261000011, 0); - return(true); + pi.playPortalSound(); pi.warp(261000011, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/s4berserk.js b/scripts/portal/s4berserk.js index 30aad2558a..dd0613a16d 100644 --- a/scripts/portal/s4berserk.js +++ b/scripts/portal/s4berserk.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.isQuestStarted(6153)) { if(pi.getWarpMap(910500200).countPlayers() == 0) { pi.resetMapObjects(910500200); - pi.warp(910500200, 0); + pi.playPortalSound(); pi.warp(910500200, 0); return true; } else { diff --git a/scripts/portal/s4berserk_move.js b/scripts/portal/s4berserk_move.js index 347f761d2c..cf3ee03e60 100644 --- a/scripts/portal/s4berserk_move.js +++ b/scripts/portal/s4berserk_move.js @@ -21,7 +21,7 @@ */ function enter(pi) { if (pi.getPlayer().getMap().countMonsters() == 0) { - pi.warp(910500200, "out01"); + pi.playPortalSound(); pi.warp(910500200, "out01"); return true; } pi.getPlayer().dropMessage(5, "You must defeat all the monsters first."); diff --git a/scripts/portal/s4common1_exit.js b/scripts/portal/s4common1_exit.js index 8a4e810e91..cfa7768d7b 100644 --- a/scripts/portal/s4common1_exit.js +++ b/scripts/portal/s4common1_exit.js @@ -2,7 +2,7 @@ function enter(pi) { if(pi.hasItem(4031495)) pi.warp(921100301); - else pi.warp(211040100); + else pi.playPortalSound(); pi.warp(211040100); pi.getWarpMap(921100300).clearMapObjects(); return true; diff --git a/scripts/portal/s4firehawk.js b/scripts/portal/s4firehawk.js index e77061440b..a85760b298 100644 --- a/scripts/portal/s4firehawk.js +++ b/scripts/portal/s4firehawk.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.isQuestStarted(6240)) { if(pi.getWarpMap(921100200).countPlayers() == 0) { pi.resetMapObjects(921100200); - pi.warp(921100200, 0); + pi.playPortalSound(); pi.warp(921100200, 0); return true; } else { diff --git a/scripts/portal/s4hitman.js b/scripts/portal/s4hitman.js index 164d1afda0..6acc5e6e71 100644 --- a/scripts/portal/s4hitman.js +++ b/scripts/portal/s4hitman.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.isQuestStarted(6202)) { if(pi.getWarpMap(910200000).countPlayers() == 0) { pi.resetMapObjects(910200000); - pi.warp(910200000, 0); + pi.playPortalSound(); pi.warp(910200000, 0); return true; } else { diff --git a/scripts/portal/s4iceeagle.js b/scripts/portal/s4iceeagle.js index 1fd1f06a0c..200fca8a92 100644 --- a/scripts/portal/s4iceeagle.js +++ b/scripts/portal/s4iceeagle.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.isQuestStarted(6242)) { if(pi.getWarpMap(921100210).countPlayers() == 0) { pi.resetMapObjects(921100210); - pi.warp(921100210, 0); + pi.playPortalSound(); pi.warp(921100210, 0); return true; } else { diff --git a/scripts/portal/s4nest.js b/scripts/portal/s4nest.js index 3443a1c32d..2b1e45669a 100644 --- a/scripts/portal/s4nest.js +++ b/scripts/portal/s4nest.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.isQuestStarted(6241) || pi.isQuestStarted(6243)) { if(pi.getWarpMap(924000100).countPlayers() == 0) { pi.resetMapObjects(924000100); - pi.warp(924000100, 0); + pi.playPortalSound(); pi.warp(924000100, 0); return true; } else { diff --git a/scripts/portal/s4resur_enter.js b/scripts/portal/s4resur_enter.js index 27823bbcbf..ca277bc7e5 100644 --- a/scripts/portal/s4resur_enter.js +++ b/scripts/portal/s4resur_enter.js @@ -25,7 +25,7 @@ */ function enter(pi) { if(pi.isQuestStarted(6134)) { - pi.warp(922020000, 0); + pi.playPortalSound(); pi.warp(922020000, 0); return true; } diff --git a/scripts/portal/s4resur_out.js b/scripts/portal/s4resur_out.js index 0a5a4b6736..bf6e391c51 100644 --- a/scripts/portal/s4resur_out.js +++ b/scripts/portal/s4resur_out.js @@ -35,7 +35,7 @@ function enter(pi) { return false; } } else { - pi.warp(220070400, 3); + pi.playPortalSound(); pi.warp(220070400, 3); return true; } } \ No newline at end of file diff --git a/scripts/portal/s4resurrection.js b/scripts/portal/s4resurrection.js index ef20aff809..1991066fcb 100644 --- a/scripts/portal/s4resurrection.js +++ b/scripts/portal/s4resurrection.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.haveItem(4001108)) { if(pi.getWarpMap(923000100).countPlayers() == 0) { pi.resetMapObjects(923000100); - pi.warp(923000100, 0); + pi.playPortalSound(); pi.warp(923000100, 0); return true; } else { diff --git a/scripts/portal/s4rush.js b/scripts/portal/s4rush.js index 8b7f7b748c..023009a303 100644 --- a/scripts/portal/s4rush.js +++ b/scripts/portal/s4rush.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.isQuestStarted(6110)) { if(pi.getWarpMap(910500100).countPlayers() == 0) { pi.resetMapObjects(910500100); - pi.warp(910500100, 0); + pi.playPortalSound(); pi.warp(910500100, 0); return true; } else { diff --git a/scripts/portal/s4tornado_enter.js b/scripts/portal/s4tornado_enter.js index e56b134e1a..3f089ba6d6 100644 --- a/scripts/portal/s4tornado_enter.js +++ b/scripts/portal/s4tornado_enter.js @@ -27,7 +27,7 @@ function enter(pi) { if(pi.isQuestStarted(6230) || pi.haveItem(4001110)) { if(pi.getWarpMap(922020200).countPlayers() == 0) { pi.resetMapObjects(922020200); - pi.warp(922020200, 0); + pi.playPortalSound(); pi.warp(922020200, 0); return true; } else { diff --git a/scripts/portal/secretDoor.js b/scripts/portal/secretDoor.js index 603fb63595..d631928491 100644 --- a/scripts/portal/secretDoor.js +++ b/scripts/portal/secretDoor.js @@ -22,7 +22,7 @@ */ function doorCross(pi) { - pi.warp(261030000, "sp_" + ((pi.getMapId() == 261010000) ? "jenu" : "alca")); + pi.playPortalSound(); pi.warp(261030000, "sp_" + ((pi.getMapId() == 261010000) ? "jenu" : "alca")); return true; } diff --git a/scripts/portal/secretgate1_open.js b/scripts/portal/secretgate1_open.js index e7d6c07b57..70a9696d2f 100644 --- a/scripts/portal/secretgate1_open.js +++ b/scripts/portal/secretgate1_open.js @@ -26,7 +26,7 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("secretgate1").getState() == 1) { - pi.warp(990000611,1); + pi.playPortalSound(); pi.warp(990000611,1); return true; } else { pi.playerMessage(5, "This door is closed."); diff --git a/scripts/portal/secretgate2_open.js b/scripts/portal/secretgate2_open.js index 226e8bf9e5..98f2ca082d 100644 --- a/scripts/portal/secretgate2_open.js +++ b/scripts/portal/secretgate2_open.js @@ -25,7 +25,7 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("secretgate2").getState() == 1) { - pi.warp(990000631,1); + pi.playPortalSound(); pi.warp(990000631,1); return true; } else { pi.getPlayer().dropMessage(5, "This door is closed."); diff --git a/scripts/portal/secretgate3_open.js b/scripts/portal/secretgate3_open.js index dfb1853ade..2510ee7640 100644 --- a/scripts/portal/secretgate3_open.js +++ b/scripts/portal/secretgate3_open.js @@ -25,7 +25,7 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("secretgate3").getState() == 1) { - pi.warp(990000641,1); + pi.playPortalSound(); pi.warp(990000641,1); return true; } else { pi.getPlayer().dropMessage(5, "This door is closed."); diff --git a/scripts/portal/skyrom.js b/scripts/portal/skyrom.js index 179a91cf66..28051a1bdf 100644 --- a/scripts/portal/skyrom.js +++ b/scripts/portal/skyrom.js @@ -21,7 +21,7 @@ function enter(pi) { if(pi.isQuestStarted(3935) && !pi.haveItem(4031574, 1)) { if(pi.getWarpMap(926000010).countPlayers() == 0) { - pi.warp(926000010); + pi.playPortalSound(); pi.warp(926000010); return true; } else { pi.message("Someone is already trying this map."); diff --git a/scripts/portal/space_return.js b/scripts/portal/space_return.js index 27966a28cd..105fcfe137 100644 --- a/scripts/portal/space_return.js +++ b/scripts/portal/space_return.js @@ -1,6 +1,6 @@ //Author: kevintjuh93 function enter(pi) { - pi.warp(pi.getPlayer().getSavedLocation("EVENT")); + pi.playPortalSound(); pi.warp(pi.getPlayer().getSavedLocation("EVENT")); return true; } \ No newline at end of file diff --git a/scripts/portal/speargate_open.js b/scripts/portal/speargate_open.js index 33e1fa1707..55047d9769 100644 --- a/scripts/portal/speargate_open.js +++ b/scripts/portal/speargate_open.js @@ -26,7 +26,7 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("speargate").getState() == 4) { - pi.warp(990000401, 0); + pi.playPortalSound(); pi.warp(990000401, 0); return true; } else { pi.getPlayer().dropMessage(5, "This way forward is not open yet."); diff --git a/scripts/portal/stageBogo.js b/scripts/portal/stageBogo.js index fca6c9dc02..6ec238c3c9 100644 --- a/scripts/portal/stageBogo.js +++ b/scripts/portal/stageBogo.js @@ -24,6 +24,6 @@ @Author Ronan */ function enter(pi) { - pi.warp(670010800); + pi.playPortalSound(); pi.warp(670010800); return true; } \ No newline at end of file diff --git a/scripts/portal/statuegate_open.js b/scripts/portal/statuegate_open.js index e50ee5399b..3b6c2dcdde 100644 --- a/scripts/portal/statuegate_open.js +++ b/scripts/portal/statuegate_open.js @@ -25,7 +25,7 @@ */ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("statuegate").getState() == 1) { - pi.warp(990000301, 0); + pi.playPortalSound(); pi.warp(990000301, 0); return true; } else { pi.getPlayer().dropMessage(5, "The gate is closed."); diff --git a/scripts/portal/stonegate_open.js b/scripts/portal/stonegate_open.js index 1ffdb08c0c..e1be4df8ef 100644 --- a/scripts/portal/stonegate_open.js +++ b/scripts/portal/stonegate_open.js @@ -24,7 +24,7 @@ */ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("stonegate").getState() == 1) { - pi.warp(990000430, 0); + pi.playPortalSound(); pi.warp(990000430, 0); return true; } else { pi.getPlayer().dropMessage(5, "The door is still blocked."); diff --git a/scripts/portal/subway_in2.js b/scripts/portal/subway_in2.js index ffa7a2fd56..a675a663a6 100644 --- a/scripts/portal/subway_in2.js +++ b/scripts/portal/subway_in2.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(103000101, 3); + pi.playPortalSound(); pi.warp(103000101, 3); return true; } \ No newline at end of file diff --git a/scripts/portal/tamepig_out2.js b/scripts/portal/tamepig_out2.js index 8c1579c3a6..fe862b7366 100644 --- a/scripts/portal/tamepig_out2.js +++ b/scripts/portal/tamepig_out2.js @@ -31,6 +31,6 @@ function enter(pi) { if(pCount > 5) pi.gainItem(4031507, -1 * (pCount - 5)); if(rCount > 5) pi.gainItem(4031508, -1 * (rCount - 5)); - pi.warp(230000003, "out00"); + pi.playPortalSound(); pi.warp(230000003, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/templeenter.js b/scripts/portal/templeenter.js index 81962ab647..a03f349a47 100644 --- a/scripts/portal/templeenter.js +++ b/scripts/portal/templeenter.js @@ -21,6 +21,6 @@ */ function enter(pi) { pi.cancelItem(2210016); - pi.warp(270000100, "out00"); + pi.playPortalSound(); pi.warp(270000100, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/thief_in1.js b/scripts/portal/thief_in1.js index de6b395403..a51f5c69ab 100644 --- a/scripts/portal/thief_in1.js +++ b/scripts/portal/thief_in1.js @@ -1,6 +1,6 @@ function enter(pi) { if(pi.isQuestCompleted(20730) || pi.isQuestCompleted(21734)) { // puppeteer defeated, newfound secret path - pi.warp(105040201,2); + pi.playPortalSound(); pi.warp(105040201,2); return true; } diff --git a/scripts/portal/tristanEnter.js b/scripts/portal/tristanEnter.js index 32eaf5bb36..451b39241f 100644 --- a/scripts/portal/tristanEnter.js +++ b/scripts/portal/tristanEnter.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.warp(105100101, "in00"); - return(true); + pi.playPortalSound(); pi.warp(105100101, "in00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/tutorquest.js b/scripts/portal/tutorquest.js index aab05d9ace..57d7fbc221 100644 --- a/scripts/portal/tutorquest.js +++ b/scripts/portal/tutorquest.js @@ -22,7 +22,7 @@ function enter(pi) { } } else if(pi.getPlayer().getMapId() == 130030004){ if(pi.isQuestCompleted(20013)){ - pi.warp(130030005, 0); + pi.playPortalSound(); pi.warp(130030005, 0); return true; } else { pi.message("Please complete the required quest before proceeding."); diff --git a/scripts/portal/under30gate.js b/scripts/portal/under30gate.js index c65b01c079..34b1e102d1 100644 --- a/scripts/portal/under30gate.js +++ b/scripts/portal/under30gate.js @@ -28,7 +28,7 @@ Save location to return. function enter(pi) { if (pi.getPlayer().getLevel() <= 30) { - pi.warp(990000640, 1); + pi.playPortalSound(); pi.warp(990000640, 1); return true; } else { pi.getPlayer().dropMessage(5, "You cannot proceed past this point."); diff --git a/scripts/portal/undodraco.js b/scripts/portal/undodraco.js index f3b92f0770..161c26ec0e 100644 --- a/scripts/portal/undodraco.js +++ b/scripts/portal/undodraco.js @@ -21,6 +21,6 @@ */ function enter(pi) { pi.cancelItem(2210016); - pi.warp(240000110, 2); + pi.playPortalSound(); pi.warp(240000110, 2); return true; } \ No newline at end of file diff --git a/scripts/portal/watergate_open.js b/scripts/portal/watergate_open.js index 791044c150..f8844b00af 100644 --- a/scripts/portal/watergate_open.js +++ b/scripts/portal/watergate_open.js @@ -26,7 +26,7 @@ Stage 3: Exit Door - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("watergate").getState() == 1) { - pi.warp(990000600, 1); + pi.playPortalSound(); pi.warp(990000600, 1); return true; } else pi.getPlayer().dropMessage(5, "This way forward is not open yet."); diff --git a/sql/db_drops.sql b/sql/db_drops.sql index f1d3f4c3d2..b77764e0a1 100644 --- a/sql/db_drops.sql +++ b/sql/db_drops.sql @@ -13721,8 +13721,8 @@ USE `heavenms`; (9303010, 1332019, 1, 1, 0, 700), (8140000, 4000054, 1, 1, 0, 200000), (9500134, 4000054, 1, 1, 0, 200000), -(8140000, 4032475, 1, 1, 0, 10000), -(9500134, 4032475, 1, 1, 0, 10000), +(8140000, 4032475, 1, 1, 0, 200000), +(9500134, 4032475, 1, 1, 0, 200000), (8140000, 2070006, 1, 1, 0, 400), (9500134, 2070006, 1, 1, 0, 400), (8140000, 2040902, 1, 1, 0, 750), diff --git a/src/client/MapleCharacter.java b/src/client/MapleCharacter.java index 0c340b0757..7e5df20526 100644 --- a/src/client/MapleCharacter.java +++ b/src/client/MapleCharacter.java @@ -2308,7 +2308,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { item.setExpiration(-1); forceUpdateItem(item); //TEST :3 } else if (expiration != -1 && expiration < currenttime) { - if(!ItemConstants.isPet(item.getItemId()) || ServerConstants.USE_ERASE_PET_ON_EXPIRATION) { + if(!ItemConstants.isPet(item.getItemId()) || ItemConstants.isExpirablePet(item.getItemId())) { client.announce(MaplePacketCreator.itemExpired(item.getItemId())); toberemove.add(item); if(ItemConstants.isRateCoupon(item.getItemId())) { @@ -2321,7 +2321,10 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { } } for (Item item : toberemove) { - if(item.getPetId() > -1) unequipPet(getPet(getPetIndex(item.getPetId())), true); + if(item.getPetId() > -1) { + int petIdx = getPetIndex(item.getPetId()); + if(petIdx > -1) unequipPet(getPet(petIdx), true); + } MapleInventoryManipulator.removeFromSlot(client, inv.getType(), item.getPosition(), item.getQuantity(), true); } toberemove.clear(); diff --git a/src/constants/ItemConstants.java b/src/constants/ItemConstants.java index 7eca70edab..1ae1014bcf 100644 --- a/src/constants/ItemConstants.java +++ b/src/constants/ItemConstants.java @@ -93,6 +93,10 @@ public final class ItemConstants { return itemId / 1000 == 5000; } + public static boolean isExpirablePet(int itemId) { + return ServerConstants.USE_ERASE_PET_ON_EXPIRATION || itemId == 5000054; + } + public static boolean isNewYearCardEtc(int itemId) { return itemId / 10000 == 430; } diff --git a/tools/SQL/portal_sound_regex.txt b/tools/SQL/portal_sound_regex.txt new file mode 100644 index 0000000000..be1122f2e2 --- /dev/null +++ b/tools/SQL/portal_sound_regex.txt @@ -0,0 +1,7 @@ +Search & replace tool used to provoke the portal sound ingame for most of the missing scripted warpings. + +Use these on: + + Search field: (?!((?s).*)pi.playPortalSound\(\);((?s).*)pi.warp\()function((?s).*)pi.warp\( + +Replace field: function$3pi.playPortalSound(); pi.warp( \ No newline at end of file