diff --git a/scripts/portal/08_xmas_out.js b/scripts/portal/08_xmas_out.js index 3ea19ef655..75ab92c0cb 100644 --- a/scripts/portal/08_xmas_out.js +++ b/scripts/portal/08_xmas_out.js @@ -19,7 +19,7 @@ */ function enter(pi) { - pi.playPortalSound(); - pi.warp(pi.getMapId() - 2, 0); - return true; + pi.playPortalSound(); + pi.warp(pi.getMapId() - 2, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/Depart_ToKerning.js b/scripts/portal/Depart_ToKerning.js index 213f7aa04f..d4381c7d23 100644 --- a/scripts/portal/Depart_ToKerning.js +++ b/scripts/portal/Depart_ToKerning.js @@ -1,10 +1,10 @@ function enter(pi) { - var em = pi.getEventManager("KerningTrain"); - if (!em.startInstance(pi.getPlayer())) { - pi.message("The passenger wagon is already full. Try again a bit later."); - return false; - } - - pi.playPortalSound(); - return true; + var em = pi.getEventManager("KerningTrain"); + if (!em.startInstance(pi.getPlayer())) { + pi.message("The passenger wagon is already full. Try again a bit later."); + return false; + } + + pi.playPortalSound(); + return true; } \ No newline at end of file diff --git a/scripts/portal/Depart_goFoward0.js b/scripts/portal/Depart_goFoward0.js index f7c94e246b..1d01203d2b 100644 --- a/scripts/portal/Depart_goFoward0.js +++ b/scripts/portal/Depart_goFoward0.js @@ -1,29 +1,29 @@ function enter(pi) { var mapid = pi.getPlayer().getMap().getId(); - + if (mapid == 103040410 && pi.isQuestCompleted(2287)) { - pi.playPortalSound(); - pi.warp(103040420, "right00"); - return true; + pi.playPortalSound(); + pi.warp(103040420, "right00"); + return true; } else if (mapid == 103040420 && pi.isQuestCompleted(2288)) { - pi.playPortalSound(); - pi.warp(103040430, "right00"); - return true; + pi.playPortalSound(); + pi.warp(103040430, "right00"); + return true; } else if (mapid == 103040410 && pi.isQuestStarted(2287)) { - pi.playPortalSound(); - pi.warp(103040420, "right00"); - return true; + pi.playPortalSound(); + pi.warp(103040420, "right00"); + return true; } else if (mapid == 103040420 && pi.isQuestStarted(2288)) { - pi.playPortalSound(); - pi.warp(103040430, "right00"); - return true; + pi.playPortalSound(); + pi.warp(103040430, "right00"); + return true; } else { - if (mapid == 103040440 || mapid == 103040450) { + if (mapid == 103040440 || mapid == 103040450) { pi.playPortalSound(); pi.warp(mapid + 10, "right00"); return true; - } - pi.getPlayer().dropMessage(5, "You cannot access this area."); - return false; + } + pi.getPlayer().dropMessage(5, "You cannot access this area."); + return false; } } \ No newline at end of file diff --git a/scripts/portal/Depart_goFoward1.js b/scripts/portal/Depart_goFoward1.js index 68d1b7f2d3..c39a9df7f1 100644 --- a/scripts/portal/Depart_goFoward1.js +++ b/scripts/portal/Depart_goFoward1.js @@ -1,29 +1,29 @@ function enter(pi) { var mapid = pi.getPlayer().getMap().getId(); - + if (mapid == 103040410 && pi.isQuestCompleted(2287)) { - pi.playPortalSound(); - pi.warp(103040420, "right01"); - return true; + pi.playPortalSound(); + pi.warp(103040420, "right01"); + return true; } else if (mapid == 103040420 && pi.isQuestCompleted(2288)) { - pi.playPortalSound(); - pi.warp(103040430, "right01"); - return true; + pi.playPortalSound(); + pi.warp(103040430, "right01"); + return true; } else if (mapid == 103040410 && pi.isQuestStarted(2287)) { - pi.playPortalSound(); - pi.warp(103040420, "right01"); - return true; + pi.playPortalSound(); + pi.warp(103040420, "right01"); + return true; } else if (mapid == 103040420 && pi.isQuestStarted(2288)) { - pi.playPortalSound(); - pi.warp(103040430, "right01"); - return true; + pi.playPortalSound(); + pi.warp(103040430, "right01"); + return true; } else { - if (mapid == 103040440 || mapid == 103040450) { + if (mapid == 103040440 || mapid == 103040450) { pi.playPortalSound(); pi.warp(mapid + 10, "right01"); return true; - } - pi.getPlayer().dropMessage(5, "You cannot access this area."); - return false; + } + pi.getPlayer().dropMessage(5, "You cannot access this area."); + return false; } } \ No newline at end of file diff --git a/scripts/portal/Depart_topOut.js b/scripts/portal/Depart_topOut.js index f4fccaeb19..a4fa37613b 100644 --- a/scripts/portal/Depart_topOut.js +++ b/scripts/portal/Depart_topOut.js @@ -1,5 +1,5 @@ function enter(pi) { pi.playPortalSound(); - pi.warp(103040300,1); + pi.warp(103040300, 1); return true; } \ No newline at end of file diff --git a/scripts/portal/DragonEggNotice.js b/scripts/portal/DragonEggNotice.js index d859e609d0..cb5f319a68 100644 --- a/scripts/portal/DragonEggNotice.js +++ b/scripts/portal/DragonEggNotice.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22014, "egg=o")) { - return false; - } - pi.updateAreaInfo(22014, "egg=o;mo30=o;mo40=o;mo41=o;mo50=o;mo42=o;mo60=o"); - pi.sendImage("UI/tutorial/evan/8/0"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22014, "egg=o")) { + return false; + } + pi.updateAreaInfo(22014, "egg=o;mo30=o;mo40=o;mo41=o;mo50=o;mo42=o;mo60=o"); + pi.sendImage("UI/tutorial/evan/8/0"); + return true; } \ No newline at end of file diff --git a/scripts/portal/EBoat1.js b/scripts/portal/EBoat1.js index 3e98fc42c0..82e8b90a40 100644 --- a/scripts/portal/EBoat1.js +++ b/scripts/portal/EBoat1.js @@ -20,23 +20,24 @@ */ /** --- Odin JavaScript -------------------------------------------------------------------------------- - During The Ride To Ellinia --- By --------------------------------------------------------------------------------------------- - Information --- Version Info ----------------------------------------------------------------------------------- - 1.4 - Code clean up [Information] - 1.3 - Typo >.< [Information] - 1.2 - Update to support lastest script [Information] - 1.1 - The right statement to bring out the music [Information] - 1.0 - First Version by Information ---------------------------------------------------------------------------------------------------- -**/ + -- Odin JavaScript -------------------------------------------------------------------------------- + During The Ride To Ellinia + -- By --------------------------------------------------------------------------------------------- + Information + -- Version Info ----------------------------------------------------------------------------------- + 1.4 - Code clean up [Information] + 1.3 - Typo >.< [Information] + 1.2 - Update to support lastest script [Information] + 1.1 - The right statement to bring out the music [Information] + 1.0 - First Version by Information + --------------------------------------------------------------------------------------------------- + **/ function enter(pi) { - pi.playPortalSound(); pi.warp(200090000, 4); - if(pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { - pi.changeMusic("Bgm04/ArabPirate"); - } - return true; + pi.playPortalSound(); + pi.warp(200090000, 4); + if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { + pi.changeMusic("Bgm04/ArabPirate"); + } + return true; } diff --git a/scripts/portal/EBoat2.js b/scripts/portal/EBoat2.js index 46f871c00a..86468b0a64 100644 --- a/scripts/portal/EBoat2.js +++ b/scripts/portal/EBoat2.js @@ -20,23 +20,24 @@ */ /** --- Odin JavaScript -------------------------------------------------------------------------------- - During The Ride To Ellinia --- By --------------------------------------------------------------------------------------------- - Information --- Version Info ----------------------------------------------------------------------------------- - 1.4 - Code clean up [Information] - 1.3 - Typo >.< [Information] - 1.2 - Update to support lastest script [Information] - 1.1 - The right statement to bring out the music [Information] - 1.0 - First Version by Information ---------------------------------------------------------------------------------------------------- -**/ + -- Odin JavaScript -------------------------------------------------------------------------------- + During The Ride To Ellinia + -- By --------------------------------------------------------------------------------------------- + Information + -- Version Info ----------------------------------------------------------------------------------- + 1.4 - Code clean up [Information] + 1.3 - Typo >.< [Information] + 1.2 - Update to support lastest script [Information] + 1.1 - The right statement to bring out the music [Information] + 1.0 - First Version by Information + --------------------------------------------------------------------------------------------------- + **/ function enter(pi) { - pi.playPortalSound(); pi.warp(200090000, 5); - if(pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { - pi.changeMusic("Bgm04/ArabPirate"); - } - return true; + pi.playPortalSound(); + pi.warp(200090000, 5); + if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { + pi.changeMusic("Bgm04/ArabPirate"); + } + return true; } diff --git a/scripts/portal/MC2revive.js b/scripts/portal/MC2revive.js index 283d3925f5..064b1b1b16 100644 --- a/scripts/portal/MC2revive.js +++ b/scripts/portal/MC2revive.js @@ -1,5 +1,5 @@ function enter(pi) { pi.playPortalSound(); - pi.warp( pi.getMapId() - 100); + pi.warp(pi.getMapId() - 100); return true; } \ No newline at end of file diff --git a/scripts/portal/MCRevive1.js b/scripts/portal/MCRevive1.js index 80e89b9d26..d8be0b2755 100644 --- a/scripts/portal/MCRevive1.js +++ b/scripts/portal/MCRevive1.js @@ -1,4 +1,3 @@ - /* [CelticMS] Monster Carnival Reviving Field 1 */ diff --git a/scripts/portal/MCRevive2.js b/scripts/portal/MCRevive2.js index 77696a1667..6aa8ed38d4 100644 --- a/scripts/portal/MCRevive2.js +++ b/scripts/portal/MCRevive2.js @@ -1,4 +1,3 @@ - /* [CelticMS] Monster Carnival Reviving Field 1 */ diff --git a/scripts/portal/MCRevive3.js b/scripts/portal/MCRevive3.js index f11c3e54ef..50be606ec6 100644 --- a/scripts/portal/MCRevive3.js +++ b/scripts/portal/MCRevive3.js @@ -1,19 +1,18 @@ - /* [CelticMS] Monster Carnival Reviving Field 1 */ function enter(pi) { - var portal = 0; - switch (pi.getPlayer().getTeam()) { - case 0: - portal = 4; - break; - case 1: - portal = 3; - break; - } - pi.warp(980000301, portal); - pi.playPortalSound(); - return true; + var portal = 0; + switch (pi.getPlayer().getTeam()) { + case 0: + portal = 4; + break; + case 1: + portal = 3; + break; + } + pi.warp(980000301, portal); + pi.playPortalSound(); + return true; } diff --git a/scripts/portal/MCRevive4.js b/scripts/portal/MCRevive4.js index 747706887e..a1cd11ec3c 100644 --- a/scripts/portal/MCRevive4.js +++ b/scripts/portal/MCRevive4.js @@ -1,19 +1,18 @@ - /* [CelticMS] Monster Carnival Reviving Field 1 */ function enter(pi) { - var portal = 0; - switch (pi.getPlayer().getTeam()) { - case 0: - portal = 4; - break; - case 1: - portal = 3; - break; - } - pi.warp(980000401, portal); - pi.playPortalSound(); - return true; + var portal = 0; + switch (pi.getPlayer().getTeam()) { + case 0: + portal = 4; + break; + case 1: + portal = 3; + break; + } + pi.warp(980000401, portal); + pi.playPortalSound(); + return true; } diff --git a/scripts/portal/MCRevive5.js b/scripts/portal/MCRevive5.js index f89c28b366..a25061497c 100644 --- a/scripts/portal/MCRevive5.js +++ b/scripts/portal/MCRevive5.js @@ -1,10 +1,9 @@ - /* [CelticMS] Monster Carnival Reviving Field 1 */ function enter(pi) { - pi.warp(980000501, 0); - pi.playPortalSound(); - return true; + pi.warp(980000501, 0); + pi.playPortalSound(); + return true; } diff --git a/scripts/portal/MCRevive6.js b/scripts/portal/MCRevive6.js index f9e0ae6ad1..7b30d3bf13 100644 --- a/scripts/portal/MCRevive6.js +++ b/scripts/portal/MCRevive6.js @@ -1,10 +1,9 @@ - /* [CelticMS] Monster Carnival Reviving Field 1 */ function enter(pi) { - pi.warp(980000601, 0); - pi.playPortalSound(); - return true; + pi.warp(980000601, 0); + pi.playPortalSound(); + return true; } diff --git a/scripts/portal/MD_cakeEnter.js b/scripts/portal/MD_cakeEnter.js index 4a59b2a76c..5f5f39e8bf 100644 --- a/scripts/portal/MD_cakeEnter.js +++ b/scripts/portal/MD_cakeEnter.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(674030100,"in00"); + pi.playPortalSound(); + pi.warp(674030100, "in00"); return true; } \ No newline at end of file diff --git a/scripts/portal/MD_drakeroom.js b/scripts/portal/MD_drakeroom.js index 86339e773a..0ffe84aa38 100644 --- a/scripts/portal/MD_drakeroom.js +++ b/scripts/portal/MD_drakeroom.js @@ -20,7 +20,7 @@ */ /* MiniDungeon - Rabbit -*/ +*/ var baseid = 105090311; var dungeonid = 105090320; var dungeons = 30; @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -42,7 +42,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -52,8 +52,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_error.js b/scripts/portal/MD_error.js index 51018666a0..12f449740e 100644 --- a/scripts/portal/MD_error.js +++ b/scripts/portal/MD_error.js @@ -21,7 +21,7 @@ /* MiniDungeon - Critical Error -*/ +*/ var baseid = 261020300; var dungeonid = 261020301; @@ -32,7 +32,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -44,7 +44,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -54,8 +54,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_golem.js b/scripts/portal/MD_golem.js index 539e980cc7..ce88590f9f 100644 --- a/scripts/portal/MD_golem.js +++ b/scripts/portal/MD_golem.js @@ -21,7 +21,7 @@ /* MiniDungeon - Golem -*/ +*/ var baseid = 105040304; var dungeonid = 105040320; @@ -32,7 +32,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -44,7 +44,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -54,8 +54,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_high.js b/scripts/portal/MD_high.js index 4c429593f1..ccd12746f2 100644 --- a/scripts/portal/MD_high.js +++ b/scripts/portal/MD_high.js @@ -21,7 +21,7 @@ /* MiniDungeon - Longest Ride on ByeBye Station -*/ +*/ var baseid = 551030000; var dungeonid = 551030001; @@ -32,7 +32,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -44,7 +44,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -54,8 +54,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_mushroom.js b/scripts/portal/MD_mushroom.js index 46f12dc1bf..698d7c4aaa 100644 --- a/scripts/portal/MD_mushroom.js +++ b/scripts/portal/MD_mushroom.js @@ -21,7 +21,7 @@ /* MiniDungeon - Mushroom -*/ +*/ var baseid = 105050100; var dungeonid = 105050101; @@ -32,7 +32,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -44,7 +44,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -54,8 +54,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_pig.js b/scripts/portal/MD_pig.js index 31d1bbbdfb..bf23c6e3dc 100644 --- a/scripts/portal/MD_pig.js +++ b/scripts/portal/MD_pig.js @@ -21,7 +21,7 @@ /* MiniDungeon - Pig -*/ +*/ var baseid = 100020000; var dungeonid = 100020100; @@ -32,7 +32,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -44,7 +44,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -54,8 +54,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_protect.js b/scripts/portal/MD_protect.js index 7bdef62c06..2e0f89177a 100644 --- a/scripts/portal/MD_protect.js +++ b/scripts/portal/MD_protect.js @@ -20,7 +20,7 @@ */ /* MiniDungeon - Newts -*/ +*/ var baseid = 240040520; var dungeonid = 240040900; var dungeons = 19; @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -42,7 +42,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -52,8 +52,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_rabbit.js b/scripts/portal/MD_rabbit.js index 0d3737702a..4fefe967a1 100644 --- a/scripts/portal/MD_rabbit.js +++ b/scripts/portal/MD_rabbit.js @@ -20,7 +20,7 @@ */ /* MiniDungeon - Rabbit -*/ +*/ var baseid = 221023400; var dungeonid = 221023401; var dungeons = 30; @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -42,7 +42,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -52,8 +52,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_remember.js b/scripts/portal/MD_remember.js index 21d2a3ff3d..85d73ccadb 100644 --- a/scripts/portal/MD_remember.js +++ b/scripts/portal/MD_remember.js @@ -20,7 +20,7 @@ */ /* MiniDungeon - Skele -*/ +*/ var baseid = 240040511; var dungeonid = 240040800; var dungeons = 19; @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -42,7 +42,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -52,8 +52,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_roundTable.js b/scripts/portal/MD_roundTable.js index 8f4050bd66..1f3a91dca0 100644 --- a/scripts/portal/MD_roundTable.js +++ b/scripts/portal/MD_roundTable.js @@ -20,7 +20,7 @@ */ /* MiniDungeon - Round Table -*/ +*/ var baseid = 240020500; var dungeonid = 240020512; var dungeons = 30; @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -42,7 +42,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -52,8 +52,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_sand.js b/scripts/portal/MD_sand.js index d459d074bd..fdd6ef99f4 100644 --- a/scripts/portal/MD_sand.js +++ b/scripts/portal/MD_sand.js @@ -20,7 +20,7 @@ */ /* MiniDungeon - Sand -*/ +*/ var baseid = 260020600; var dungeonid = 260020630; var dungeons = 34; @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -42,7 +42,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -52,8 +52,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/MD_treasure.js b/scripts/portal/MD_treasure.js index cc37b21a8c..8aaa72c5b2 100644 --- a/scripts/portal/MD_treasure.js +++ b/scripts/portal/MD_treasure.js @@ -20,7 +20,7 @@ */ /* MiniDungeon - Pirate -*/ +*/ var baseid = 251010402; var dungeonid = 251010410; var dungeons = 30; @@ -30,7 +30,7 @@ function enter(pi) { if (pi.getParty() != null) { if (pi.isLeader()) { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warpParty(dungeonid + i, "out00"); return true; @@ -42,7 +42,7 @@ function enter(pi) { } } else { for (var i = 0; i < dungeons; i++) { - if(pi.startDungeonInstance(dungeonid + i)) { + if (pi.startDungeonInstance(dungeonid + i)) { pi.playPortalSound(); pi.warp(dungeonid + i, "out00"); return true; @@ -52,8 +52,8 @@ function enter(pi) { pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later."); return false; } else { - pi.playPortalSound(); - pi.warp(baseid, "MD00"); - return true; + pi.playPortalSound(); + pi.warp(baseid, "MD00"); + return true; } } \ No newline at end of file diff --git a/scripts/portal/Masteria_B1_1.js b/scripts/portal/Masteria_B1_1.js index ea1256e5f2..50332af9bc 100644 --- a/scripts/portal/Masteria_B1_1.js +++ b/scripts/portal/Masteria_B1_1.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); 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 ea1256e5f2..50332af9bc 100644 --- a/scripts/portal/Masteria_B2_1.js +++ b/scripts/portal/Masteria_B2_1.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); 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 ea1256e5f2..50332af9bc 100644 --- a/scripts/portal/Masteria_B3_1.js +++ b/scripts/portal/Masteria_B3_1.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); 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 f7a6d9148b..76dae30e4f 100644 --- a/scripts/portal/Masteria_CC1_A.js +++ b/scripts/portal/Masteria_CC1_A.js @@ -21,6 +21,7 @@ */ function enter(pi) { - pi.playPortalSound(); 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 1fc69a74e6..50b3507fda 100644 --- a/scripts/portal/Masteria_CC6_A.js +++ b/scripts/portal/Masteria_CC6_A.js @@ -21,6 +21,7 @@ */ function enter(pi) { - pi.playPortalSound(); 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 b3f2fecbe0..268fc4b36e 100644 --- a/scripts/portal/Masteria_CM1_A.js +++ b/scripts/portal/Masteria_CM1_A.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 1f670a2fac..dc65c66fbe 100644 --- a/scripts/portal/Masteria_CM1_B.js +++ b/scripts/portal/Masteria_CM1_B.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 228db34f02..9db9451dcc 100644 --- a/scripts/portal/Masteria_CM1_C.js +++ b/scripts/portal/Masteria_CM1_C.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 52b2323d6e..9406e78da6 100644 --- a/scripts/portal/Masteria_CM1_D.js +++ b/scripts/portal/Masteria_CM1_D.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 22b9a6659a..ac27adcae9 100644 --- a/scripts/portal/Masteria_CM2_B.js +++ b/scripts/portal/Masteria_CM2_B.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 b0b77fecab..59c96e02ec 100644 --- a/scripts/portal/Masteria_CM2_C.js +++ b/scripts/portal/Masteria_CM2_C.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 02469d1c73..ca64125b25 100644 --- a/scripts/portal/Masteria_CM2_D.js +++ b/scripts/portal/Masteria_CM2_D.js @@ -21,7 +21,8 @@ */ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 1f9f777287..93df2a06aa 100644 --- a/scripts/portal/Masteria_CM2_E.js +++ b/scripts/portal/Masteria_CM2_E.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992039)) { - pi.playPortalSound(); 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 f8e6547f3d..c9cd3092f3 100644 --- a/scripts/portal/Masteria_U2_1.js +++ b/scripts/portal/Masteria_U2_1.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); 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 c199d4f148..9ff96d1488 100644 --- a/scripts/portal/Masteria_U3_1.js +++ b/scripts/portal/Masteria_U3_1.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); 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 d6e473fd2b..5bd8210679 100644 --- a/scripts/portal/Masteria_U5_1.js +++ b/scripts/portal/Masteria_U5_1.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); 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 f8e6547f3d..c9cd3092f3 100644 --- a/scripts/portal/Masteria_U5_2.js +++ b/scripts/portal/Masteria_U5_2.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); 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 97066992c3..90109579f4 100644 --- a/scripts/portal/Masteria_U6_1.js +++ b/scripts/portal/Masteria_U6_1.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.hasItem(3992040)) { - pi.playPortalSound(); pi.warp(610010002, "sU3_1"); + pi.playPortalSound(); + pi.warp(610010002, "sU3_1"); return false; } return true; diff --git a/scripts/portal/NextMap.js b/scripts/portal/NextMap.js index c73dd26196..32663d4d6a 100644 --- a/scripts/portal/NextMap.js +++ b/scripts/portal/NextMap.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(pi.getMapId() + 100, 0); - return true; + pi.playPortalSound(); + pi.warp(pi.getMapId() + 100, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/OBoat1.js b/scripts/portal/OBoat1.js index f1a725ac40..de358d0410 100644 --- a/scripts/portal/OBoat1.js +++ b/scripts/portal/OBoat1.js @@ -20,23 +20,24 @@ */ /** --- Odin JavaScript -------------------------------------------------------------------------------- - During The Ride To Orbis --- By --------------------------------------------------------------------------------------------- - Information --- Version Info ----------------------------------------------------------------------------------- - 1.4 - Code clean up [Information] - 1.4 - Remove event instance [Information] - 1.3 - Typo >.< [Information] - 1.2 - Update to support lastest script [Information] - 1.1 - The right statement to bring out the music [Information] - 1.0 - First Version by Information ---------------------------------------------------------------------------------------------------- -**/ + -- Odin JavaScript -------------------------------------------------------------------------------- + During The Ride To Orbis + -- By --------------------------------------------------------------------------------------------- + Information + -- Version Info ----------------------------------------------------------------------------------- + 1.4 - Code clean up [Information] + 1.4 - Remove event instance [Information] + 1.3 - Typo >.< [Information] + 1.2 - Update to support lastest script [Information] + 1.1 - The right statement to bring out the music [Information] + 1.0 - First Version by Information + --------------------------------------------------------------------------------------------------- + **/ function enter(pi) { - pi.playPortalSound(); pi.warp(200090010, 4); - if(pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { + pi.playPortalSound(); + pi.warp(200090010, 4); + if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) { pi.changeMusic("Bgm04/ArabPirate"); } return true; diff --git a/scripts/portal/OBoat2.js b/scripts/portal/OBoat2.js index c0b4952c71..7bf304c4f8 100644 --- a/scripts/portal/OBoat2.js +++ b/scripts/portal/OBoat2.js @@ -20,23 +20,25 @@ */ /** --- Odin JavaScript -------------------------------------------------------------------------------- - During The Ride To Orbis --- By --------------------------------------------------------------------------------------------- - Information --- Version Info ----------------------------------------------------------------------------------- - 1.4 - Code clean up [Information] - 1.4 - Remove event instance [Information] - 1.3 - Typo >.< [Information] - 1.2 - Update to support lastest script [Information] - 1.1 - The right statement to bring out the music [Information] - 1.0 - First Version by Information ---------------------------------------------------------------------------------------------------- -**/ + -- Odin JavaScript -------------------------------------------------------------------------------- + During The Ride To Orbis + -- By --------------------------------------------------------------------------------------------- + Information + -- Version Info ----------------------------------------------------------------------------------- + 1.4 - Code clean up [Information] + 1.4 - Remove event instance [Information] + 1.3 - Typo >.< [Information] + 1.2 - Update to support lastest script [Information] + 1.1 - The right statement to bring out the music [Information] + 1.0 - First Version by Information + --------------------------------------------------------------------------------------------------- + **/ function enter(pi) { - pi.playPortalSound(); pi.warp(200090010, 5); - if (pi.getPlayer().getClient().getChannelServer().getEventSM().getEventManager("Boats").getProperty("haveBalrog").equals("true")) + 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 ebcc81d9c8..4fe4af5ce6 100644 --- a/scripts/portal/PPinkOut.js +++ b/scripts/portal/PPinkOut.js @@ -24,6 +24,7 @@ Vs Pink Bean - Clear stage portal */ function enter(pi) { - pi.playPortalSound(); pi.warp(270050000); - return true; + 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 8b1b3c5066..8ed5a7ac25 100644 --- a/scripts/portal/Pianus.js +++ b/scripts/portal/Pianus.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 886729bccf..979389acff 100644 --- a/scripts/portal/Pinkin.js +++ b/scripts/portal/Pinkin.js @@ -24,6 +24,7 @@ Vs Pink Bean - Resurrection stage portal */ function enter(pi) { - pi.playPortalSound(); pi.warp(270050100); - return true; + 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 deed0cea90..48a3ad0df8 100644 --- a/scripts/portal/Populatus00.js +++ b/scripts/portal/Populatus00.js @@ -29,18 +29,17 @@ function enter(pi) { if (pi.getParty() == null) { pi.playerMessage(5, "You are currently not in a party, create one to attempt the boss."); return false; - } else if(!pi.isLeader()) { + } else if (!pi.isLeader()) { pi.playerMessage(5, "Your party leader must enter the portal to start the battle."); return false; } else { var eli = em.getEligibleParty(pi.getParty()); - if(eli.size() > 0) { - if(!em.startInstance(pi.getParty(), pi.getPlayer().getMap(), 1)) { + if (eli.size() > 0) { + if (!em.startInstance(pi.getParty(), pi.getPlayer().getMap(), 1)) { pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place yet."); return false; } - } - else { //this should never appear + } else { //this should never appear pi.playerMessage(5, "You cannot start this battle yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search."); return false; } diff --git a/scripts/portal/Spacegaga_out0.js b/scripts/portal/Spacegaga_out0.js index 8a89b22737..7734653ba8 100644 --- a/scripts/portal/Spacegaga_out0.js +++ b/scripts/portal/Spacegaga_out0.js @@ -1,15 +1,17 @@ //Author: kevintjuh93 -function enter(pi) { - var eim = pi.getPlayer().getEventInstance(); - var fc = eim.getIntProperty("falls"); - - if (fc >= 3) { - pi.playPortalSound(); pi.warp(922240200, 0); - } else { - eim.setIntProperty("falls", fc + 1); - pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); - } +function enter(pi) { + var eim = pi.getPlayer().getEventInstance(); + var fc = eim.getIntProperty("falls"); - return true; + if (fc >= 3) { + pi.playPortalSound(); + pi.warp(922240200, 0); + } else { + eim.setIntProperty("falls", fc + 1); + 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 e27fdabbd6..7734653ba8 100644 --- a/scripts/portal/Spacegaga_out1.js +++ b/scripts/portal/Spacegaga_out1.js @@ -1,15 +1,17 @@ //Author: kevintjuh93 -function enter(pi) { - var eim = pi.getPlayer().getEventInstance(); - var fc = eim.getIntProperty("falls"); - - if (fc >= 3) { - pi.playPortalSound(); pi.warp(922240200, 0); - } else { - eim.setIntProperty("falls", fc + 1); - pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); - } +function enter(pi) { + var eim = pi.getPlayer().getEventInstance(); + var fc = eim.getIntProperty("falls"); - return true; + if (fc >= 3) { + pi.playPortalSound(); + pi.warp(922240200, 0); + } else { + eim.setIntProperty("falls", fc + 1); + 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 e27fdabbd6..7734653ba8 100644 --- a/scripts/portal/Spacegaga_out2.js +++ b/scripts/portal/Spacegaga_out2.js @@ -1,15 +1,17 @@ //Author: kevintjuh93 -function enter(pi) { - var eim = pi.getPlayer().getEventInstance(); - var fc = eim.getIntProperty("falls"); - - if (fc >= 3) { - pi.playPortalSound(); pi.warp(922240200, 0); - } else { - eim.setIntProperty("falls", fc + 1); - pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); - } +function enter(pi) { + var eim = pi.getPlayer().getEventInstance(); + var fc = eim.getIntProperty("falls"); - return true; + if (fc >= 3) { + pi.playPortalSound(); + pi.warp(922240200, 0); + } else { + eim.setIntProperty("falls", fc + 1); + 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 8a89b22737..7734653ba8 100644 --- a/scripts/portal/Spacegaga_out3.js +++ b/scripts/portal/Spacegaga_out3.js @@ -1,15 +1,17 @@ //Author: kevintjuh93 -function enter(pi) { - var eim = pi.getPlayer().getEventInstance(); - var fc = eim.getIntProperty("falls"); - - if (fc >= 3) { - pi.playPortalSound(); pi.warp(922240200, 0); - } else { - eim.setIntProperty("falls", fc + 1); - pi.playPortalSound(); pi.warp(pi.getPlayer().getMapId(), 0); - } +function enter(pi) { + var eim = pi.getPlayer().getEventInstance(); + var fc = eim.getIntProperty("falls"); - return true; + if (fc >= 3) { + pi.playPortalSound(); + pi.warp(922240200, 0); + } else { + eim.setIntProperty("falls", fc + 1); + pi.playPortalSound(); + pi.warp(pi.getPlayer().getMapId(), 0); + } + + return true; } \ No newline at end of file diff --git a/scripts/portal/TD_Boss_enter.js b/scripts/portal/TD_Boss_enter.js index be4c109c74..be49e3d3b2 100644 --- a/scripts/portal/TD_Boss_enter.js +++ b/scripts/portal/TD_Boss_enter.js @@ -1,33 +1,32 @@ /* @author RonanLana */ function enter(pi) { - var stage = ((Math.floor(pi.getMapId() / 100)) % 10) - 1; - var em = pi.getEventManager("TD_Battle" + stage); - if(em == null) { - pi.playerMessage(5, "TD Battle " + stage + " encountered an unexpected error and is currently unavailable."); - return false; - } + var stage = ((Math.floor(pi.getMapId() / 100)) % 10) - 1; + var em = pi.getEventManager("TD_Battle" + stage); + if (em == null) { + pi.playerMessage(5, "TD Battle " + stage + " encountered an unexpected error and is currently unavailable."); + return false; + } - if (pi.getParty() == null) { - pi.playerMessage(5, "You are currently not in a party, create one to attempt the boss."); - return false; - } else if(!pi.isLeader()) { - pi.playerMessage(5, "Your party leader must enter the portal to start the battle."); + if (pi.getParty() == null) { + pi.playerMessage(5, "You are currently not in a party, create one to attempt the boss."); + return false; + } else if (!pi.isLeader()) { + pi.playerMessage(5, "Your party leader must enter the portal to start the battle."); + return false; + } else { + var eli = em.getEligibleParty(pi.getParty()); + if (eli.size() > 0) { + if (!em.startInstance(pi.getParty(), pi.getPlayer().getMap(), 1)) { + pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place yet."); return false; + } } else { - var eli = em.getEligibleParty(pi.getParty()); - if(eli.size() > 0) { - if(!em.startInstance(pi.getParty(), pi.getPlayer().getMap(), 1)) { - pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place yet."); - return false; - } - } - else { - pi.playerMessage(5, "Your party must consist of at least 2 players to attempt the boss."); - return false; - } - - pi.playPortalSound(); - return true; + pi.playerMessage(5, "Your party must consist of at least 2 players to attempt the boss."); + return false; } + + pi.playPortalSound(); + return true; + } } diff --git a/scripts/portal/TD_MC_Egate.js b/scripts/portal/TD_MC_Egate.js index fe82c1f95c..f5fe3e631a 100644 --- a/scripts/portal/TD_MC_Egate.js +++ b/scripts/portal/TD_MC_Egate.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(106021300, 1); - return true; + pi.playPortalSound(); + pi.warp(106021300, 1); + return true; } \ No newline at end of file diff --git a/scripts/portal/TD_MC_enterboss1.js b/scripts/portal/TD_MC_enterboss1.js index 260a8cb2b4..55b56dd69d 100644 --- a/scripts/portal/TD_MC_enterboss1.js +++ b/scripts/portal/TD_MC_enterboss1.js @@ -1,13 +1,12 @@ function enter(pi) { - var questProgress = pi.getQuestProgressInt(2330, 3300005) + pi.getQuestProgressInt(2330, 3300006) + pi.getQuestProgressInt(2330, 3300007); //3 Yetis + var questProgress = pi.getQuestProgressInt(2330, 3300005) + pi.getQuestProgressInt(2330, 3300006) + pi.getQuestProgressInt(2330, 3300007); //3 Yetis - if(pi.isQuestStarted(2330) && questProgress < 3){ - pi.openNpc(1300013); - } - else{ - pi.playPortalSound(); - pi.warp(106021401, 1); - } - - return true; + if (pi.isQuestStarted(2330) && questProgress < 3) { + pi.openNpc(1300013); + } else { + pi.playPortalSound(); + pi.warp(106021401, 1); + } + + return true; } \ No newline at end of file diff --git a/scripts/portal/TD_MC_enterboss2.js b/scripts/portal/TD_MC_enterboss2.js index de76ba2802..a8b98dce19 100644 --- a/scripts/portal/TD_MC_enterboss2.js +++ b/scripts/portal/TD_MC_enterboss2.js @@ -1,34 +1,32 @@ function enter(pi) { - if(pi.isQuestCompleted(2331)) { + if (pi.isQuestCompleted(2331)) { pi.openNpc(1300013); return false; } - - if(pi.isQuestCompleted(2333) && pi.isQuestStarted(2331) && !pi.hasItem(4001318)){ + + if (pi.isQuestCompleted(2333) && pi.isQuestStarted(2331) && !pi.hasItem(4001318)) { pi.getPlayer().message("Lost the Royal Seal, eh? Worry not! Kevin's code here to save your hide."); - if(pi.canHold(4001318)){ + if (pi.canHold(4001318)) { pi.gainItem(4001318, 1); - } - else{ + } else { pi.getPlayer().message("Hey, how do you plan to hold this Seal when your inventory is full?"); } } - if(pi.isQuestCompleted(2333)){ + if (pi.isQuestCompleted(2333)) { pi.playPortalSound(); pi.warp(106021600, 1); return true; - } - else if(pi.isQuestStarted(2332) && pi.hasItem(4032388)){ + } else if (pi.isQuestStarted(2332) && pi.hasItem(4032388)) { pi.forceCompleteQuest(2332, 1300002); pi.getPlayer().message("You've found the princess!"); pi.giveCharacterExp(4400, pi.getPlayer()); - + var em = pi.getEventManager("MK_PrimeMinister"); var party = pi.getPlayer().getParty(); if (party != null) { var eli = em.getEligibleParty(pi.getParty()); // thanks Conrad for pointing out missing eligible party declaration here - if(eli.size() > 0) { + if (eli.size() > 0) { if (em.startInstance(party, pi.getMap(), 1)) { pi.playPortalSound(); return true; @@ -46,14 +44,13 @@ function enter(pi) { return false; } } - } - else if(pi.isQuestStarted(2333) || (pi.isQuestCompleted(2332) && !pi.isQuestStarted(2333))){ + } else if (pi.isQuestStarted(2333) || (pi.isQuestCompleted(2332) && !pi.isQuestStarted(2333))) { var em = pi.getEventManager("MK_PrimeMinister"); - + var party = pi.getPlayer().getParty(); if (party != null) { var eli = em.getEligibleParty(pi.getParty()); - if(eli.size() > 0) { + if (eli.size() > 0) { if (em.startInstance(party, pi.getMap(), 1)) { pi.playPortalSound(); return true; @@ -71,8 +68,7 @@ function enter(pi) { return false; } } - } - else{ + } else { pi.getPlayer().message("The door seems to be locked. Perhaps I can find a key to open it..."); return false; } diff --git a/scripts/portal/TD_MC_first.js b/scripts/portal/TD_MC_first.js index c663d15421..541987c91d 100644 --- a/scripts/portal/TD_MC_first.js +++ b/scripts/portal/TD_MC_first.js @@ -1,20 +1,20 @@ function enter(pi) { - if (pi.isQuestCompleted(2260) || - pi.isQuestStarted(2300) || pi.isQuestCompleted(2300) || - pi.isQuestStarted(2301) || pi.isQuestCompleted(2301) || - pi.isQuestStarted(2302) || pi.isQuestCompleted(2302) || - pi.isQuestStarted(2303) || pi.isQuestCompleted(2303) || - pi.isQuestStarted(2304) || pi.isQuestCompleted(2304) || - pi.isQuestStarted(2305) || pi.isQuestCompleted(2305) || - pi.isQuestStarted(2306) || pi.isQuestCompleted(2306) || - pi.isQuestStarted(2307) || pi.isQuestCompleted(2307) || - pi.isQuestStarted(2308) || pi.isQuestCompleted(2308) || - pi.isQuestStarted(2309) || pi.isQuestCompleted(2309) || - pi.isQuestStarted(2310) || pi.isQuestCompleted(2310)) { - pi.playPortalSound(); - pi.warp(106020000, 0); - return true; - } - pi.playerMessage(5, "A strange force is blocking you from entering."); - return false; + if (pi.isQuestCompleted(2260) || + pi.isQuestStarted(2300) || pi.isQuestCompleted(2300) || + pi.isQuestStarted(2301) || pi.isQuestCompleted(2301) || + pi.isQuestStarted(2302) || pi.isQuestCompleted(2302) || + pi.isQuestStarted(2303) || pi.isQuestCompleted(2303) || + pi.isQuestStarted(2304) || pi.isQuestCompleted(2304) || + pi.isQuestStarted(2305) || pi.isQuestCompleted(2305) || + pi.isQuestStarted(2306) || pi.isQuestCompleted(2306) || + pi.isQuestStarted(2307) || pi.isQuestCompleted(2307) || + pi.isQuestStarted(2308) || pi.isQuestCompleted(2308) || + pi.isQuestStarted(2309) || pi.isQuestCompleted(2309) || + pi.isQuestStarted(2310) || pi.isQuestCompleted(2310)) { + pi.playPortalSound(); + pi.warp(106020000, 0); + return true; + } + pi.playerMessage(5, "A strange force is blocking you from entering."); + return false; } \ No newline at end of file diff --git a/scripts/portal/TD_MC_jump.js b/scripts/portal/TD_MC_jump.js index f82ef0fc26..ada90f6725 100644 --- a/scripts/portal/TD_MC_jump.js +++ b/scripts/portal/TD_MC_jump.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(106020501, 0); - return true; + pi.playPortalSound(); + pi.warp(106020501, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/TD_neo_inTree.js b/scripts/portal/TD_neo_inTree.js index 0ee32c0ac8..a3d13897e3 100644 --- a/scripts/portal/TD_neo_inTree.js +++ b/scripts/portal/TD_neo_inTree.js @@ -1,21 +1,21 @@ function enter(pi) { var nex = pi.getEventManager("GuardianNex"); - if(nex == null) { + if (nex == null) { pi.message("Guardian Nex challenge encountered an error and is unavailable."); return false; } - + var quests = [3719, 3724, 3730, 3736, 3742, 3748]; var mobs = [7120100, 7120101, 7120102, 8120100, 8120101, 8140510]; - - for(var i = 0; i < quests.length; i++) { + + for (var i = 0; i < quests.length; i++) { if (pi.isQuestActive(quests[i])) { - if(pi.getQuestProgressInt(quests[i], mobs[i]) != 0) { + if (pi.getQuestProgressInt(quests[i], mobs[i]) != 0) { pi.message("You already faced Nex. Complete your mission."); return false; } - - if(!nex.startInstance(i, pi.getPlayer())) { + + if (!nex.startInstance(i, pi.getPlayer())) { pi.message("Someone is already challenging Nex. Wait for them to finish before you enter."); return false; } else { @@ -24,7 +24,7 @@ function enter(pi) { } } } - + pi.message("A mysterious force won't let you in."); return false; } \ No newline at end of file diff --git a/scripts/portal/Zakum03.js b/scripts/portal/Zakum03.js index 5724900535..704f608e0b 100644 --- a/scripts/portal/Zakum03.js +++ b/scripts/portal/Zakum03.js @@ -19,21 +19,23 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Zakum PQ portal */ - + function enter(pi) { if (!pi.getEventInstance().isEventCleared()) { pi.getPlayer().dropMessage(5, "Your team has not yet completed the trials. Fetch the Fire Ore and give it to Aura first."); return false; } - + if (pi.getEventInstance().gridCheck(pi.getPlayer()) == -1) { pi.getPlayer().dropMessage(5, "Your have yet to claim your prize. Talk to Aura."); return false; } - - pi.playPortalSound(); 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 b23f2495a4..b6d68d09ed 100644 --- a/scripts/portal/Zakum05.js +++ b/scripts/portal/Zakum05.js @@ -19,32 +19,34 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Zakum Entrance */ - + function enter(pi) { if (!(pi.isQuestStarted(100200) || pi.isQuestCompleted(100200))) { - pi.getPlayer().dropMessage(5,"You need approval from the masters to battle. You may not attempt the boss right now."); + pi.getPlayer().dropMessage(5, "You need approval from the masters to battle. You may not attempt the boss right now."); return false; } - + if (!pi.isQuestCompleted(100201)) { - pi.getPlayer().dropMessage(5,"You haven't completed all the trials yet. You may not attempt the boss right now."); + pi.getPlayer().dropMessage(5, "You haven't completed all the trials yet. You may not attempt the boss right now."); return false; } - + if (!pi.haveItem(4001017)) { // thanks Conrad for pointing out missing checks for token item and unused reactor - pi.getPlayer().dropMessage(5,"You do not have the Eye of Fire. You may not face the boss."); + pi.getPlayer().dropMessage(5, "You do not have the Eye of Fire. You may not face the boss."); return false; } - + var react = pi.getMap().getReactorById(2118002); if (react != null && react.getState() > 0) { - pi.getPlayer().dropMessage(5,"The entrance is currently blocked."); + pi.getPlayer().dropMessage(5, "The entrance is currently blocked."); return false; } - - pi.playPortalSound(); 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 bffdcb10f1..89b845c2d1 100644 --- a/scripts/portal/aMatchMove2.js +++ b/scripts/portal/aMatchMove2.js @@ -19,13 +19,15 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -/* + +/* * @author: Moogra * @portal: aMatchMove2 * @purpose: warps user out from Ariant PQ */ function enter(pi) { - pi.playPortalSound(); 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/adviceMap.js b/scripts/portal/adviceMap.js index 79515a7ddd..2fef4c37c3 100644 --- a/scripts/portal/adviceMap.js +++ b/scripts/portal/adviceMap.js @@ -19,7 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -function enter (pi) { +function enter(pi) { pi.showInstruction("Press the #e#b[Up]#k arrow#n to use the portal and move to the next map.", 230, 5); return true; } diff --git a/scripts/portal/apq00.js b/scripts/portal/apq00.js index fb44eb7773..be5aeb290a 100644 --- a/scripts/portal/apq00.js +++ b/scripts/portal/apq00.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(670010300, 0); - return true; + 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 ab57d1f93a..54ffa828de 100644 --- a/scripts/portal/apq01.js +++ b/scripts/portal/apq01.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(670010301, 0); - return true; + 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 9a18bac18f..000f8455a2 100644 --- a/scripts/portal/apq02.js +++ b/scripts/portal/apq02.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(670010302, 0); - return true; + 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 ef5d9877bd..32f94087ad 100644 --- a/scripts/portal/apq1.js +++ b/scripts/portal/apq1.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(670010400, 0); - return true; + 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 2c4e0c13de..df961fc25b 100644 --- a/scripts/portal/apq2.js +++ b/scripts/portal/apq2.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(670010500, 0); - return true; + 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 247f484b4b..aa475eb044 100644 --- a/scripts/portal/apq3.js +++ b/scripts/portal/apq3.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(670010600, 0); - return true; + pi.playPortalSound(); + pi.warp(670010600, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/apqClosed.js b/scripts/portal/apqClosed.js index 796929dece..49e982adba 100644 --- a/scripts/portal/apqClosed.js +++ b/scripts/portal/apqClosed.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.message("The gate is not opened yet."); - return false; + pi.message("The gate is not opened yet."); + return false; } \ No newline at end of file diff --git a/scripts/portal/apqDoor.js b/scripts/portal/apqDoor.js index f714a803d1..3bd542bb40 100644 --- a/scripts/portal/apqDoor.js +++ b/scripts/portal/apqDoor.js @@ -23,13 +23,14 @@ * @Author Ronan */ 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.playPortalSound(); pi.warp(670010600, "gt" + name + "PIB"); - return true; - } else { - pi.message("The gate is not opened yet."); - return false; - } + var name = pi.getPortal().getName().substring(2, 4); + var gate = pi.getPlayer().getMap().getReactorByName("gate" + name); + if (gate != null && gate.getState() == 4) { + pi.playPortalSound(); + pi.warp(670010600, "gt" + name + "PIB"); + return true; + } else { + pi.message("The gate is not opened yet."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/aqua_pq_boss_0.js b/scripts/portal/aqua_pq_boss_0.js index 71799e5f08..98e6cb69bc 100644 --- a/scripts/portal/aqua_pq_boss_0.js +++ b/scripts/portal/aqua_pq_boss_0.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(230040420, 0); - return true; + 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 e62d49969b..df61a70358 100644 --- a/scripts/portal/aranTutorAloneX.js +++ b/scripts/portal/aranTutorAloneX.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(914000100, 1); - return true; - } \ No newline at end of file + pi.playPortalSound(); + pi.warp(914000100, 1); + return true; +} \ No newline at end of file diff --git a/scripts/portal/aranTutorArrow0.js b/scripts/portal/aranTutorArrow0.js index 0378679430..152fecb335 100644 --- a/scripts/portal/aranTutorArrow0.js +++ b/scripts/portal/aranTutorArrow0.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); +function enter(pi) { + pi.blockPortal(); if (pi.containsAreaInfo(21002, "arr0=o")) { - return false; + return false; } pi.updateAreaInfo(21002, "arr0=o;mo1=o;mo2=o;mo3=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow3"); - return true; + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow3"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorArrow1.js b/scripts/portal/aranTutorArrow1.js index 6385f645d5..44c5552866 100644 --- a/scripts/portal/aranTutorArrow1.js +++ b/scripts/portal/aranTutorArrow1.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ function enter(pi) { - pi.blockPortal(); + pi.blockPortal(); if (pi.containsAreaInfo(21002, "arr1=o")) { - return false; + return false; } pi.updateAreaInfo(21002, "normal=o;arr0=o;arr1=o;mo1=o;mo2=o;mo3=o;mo4=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1"); - return true; + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorArrow2.js b/scripts/portal/aranTutorArrow2.js index 11dc2e2fa5..31adf0010e 100644 --- a/scripts/portal/aranTutorArrow2.js +++ b/scripts/portal/aranTutorArrow2.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); +function enter(pi) { + pi.blockPortal(); if (pi.containsAreaInfo(21002, "arr2=o")) { - return false; + return false; } pi.updateAreaInfo(21002, "normal=o;arr0=o;arr1=o;arr2=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1"); - return true; + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorArrow3.js b/scripts/portal/aranTutorArrow3.js index e4e7fdd5ab..f629f87487 100644 --- a/scripts/portal/aranTutorArrow3.js +++ b/scripts/portal/aranTutorArrow3.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); +function enter(pi) { + pi.blockPortal(); if (pi.containsAreaInfo(21002, "arr3=o")) { - return false; + return false; } pi.updateAreaInfo(21002, "cmd=o;normal=o;arr0=o;arr1=o;arr2=o;arr3=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1"); - return true; + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorGuide0.js b/scripts/portal/aranTutorGuide0.js index 021057f726..3e38c8233a 100644 --- a/scripts/portal/aranTutorGuide0.js +++ b/scripts/portal/aranTutorGuide0.js @@ -19,16 +19,17 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "normal=o")) { - return false; - } - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide1"); - pi.message("To use a Regular Attack on monsters, press the Ctrl key."); - pi.updateAreaInfo(21002, "normal=o;arr0=o;mo1=o;mo2=o;mo3=o"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "normal=o")) { + return false; + } + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide1"); + pi.message("To use a Regular Attack on monsters, press the Ctrl key."); + pi.updateAreaInfo(21002, "normal=o;arr0=o;mo1=o;mo2=o;mo3=o"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorGuide1.js b/scripts/portal/aranTutorGuide1.js index c674dd9f2b..35569447a9 100644 --- a/scripts/portal/aranTutorGuide1.js +++ b/scripts/portal/aranTutorGuide1.js @@ -19,16 +19,17 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "chain=o")) { - return false; - } - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide2"); - pi.message("You can use Consecutive Attacks by pressing the Ctrl key multiple times."); - pi.updateAreaInfo(21002, "normal=o;arr0=o;arr1=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "chain=o")) { + return false; + } + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide2"); + pi.message("You can use Consecutive Attacks by pressing the Ctrl key multiple times."); + pi.updateAreaInfo(21002, "normal=o;arr0=o;arr1=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorGuide2.js b/scripts/portal/aranTutorGuide2.js index 5e8c157853..58fdb401b4 100644 --- a/scripts/portal/aranTutorGuide2.js +++ b/scripts/portal/aranTutorGuide2.js @@ -19,16 +19,17 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "cmd=o")) { - return false; - } - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide3"); - pi.message("You can use a Command Attack by pressing both the arrow key and the attack key after a Consecutive Attack."); - pi.updateAreaInfo(21002, "cmd=o;normal=o;arr0=o;arr1=o;arr2=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "cmd=o")) { + return false; + } + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide3"); + pi.message("You can use a Command Attack by pressing both the arrow key and the attack key after a Consecutive Attack."); + pi.updateAreaInfo(21002, "cmd=o;normal=o;arr0=o;arr1=o;arr2=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorLost.js b/scripts/portal/aranTutorLost.js index a38f0e2191..b7944365df 100644 --- a/scripts/portal/aranTutorLost.js +++ b/scripts/portal/aranTutorLost.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "fin=o")) { - return false; - } - pi.updateAreaInfo(21002, "cmd=o;normal=o;arr0=o;arr1=o;arr2=o;arr3=o;fin=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); - pi.showIntro("Effect/Direction1.img/aranTutorial/ClickChild"); - return true; + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "fin=o")) { + return false; + } + pi.updateAreaInfo(21002, "cmd=o;normal=o;arr0=o;arr1=o;arr2=o;arr3=o;fin=o;mo1=o;chain=o;mo2=o;mo3=o;mo4=o"); + pi.showIntro("Effect/Direction1.img/aranTutorial/ClickChild"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorMono0.js b/scripts/portal/aranTutorMono0.js index d214d14d08..aabfa2bb1d 100644 --- a/scripts/portal/aranTutorMono0.js +++ b/scripts/portal/aranTutorMono0.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "mo1=o")) { - return false; - } - pi.updateAreaInfo(21002, "mo1=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon1"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "mo1=o")) { + return false; + } + pi.updateAreaInfo(21002, "mo1=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon1"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorMono1.js b/scripts/portal/aranTutorMono1.js index a8509e9581..ee8690f1c1 100644 --- a/scripts/portal/aranTutorMono1.js +++ b/scripts/portal/aranTutorMono1.js @@ -19,16 +19,17 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "mo2=o")) { - return false; - } - pi.playSound("Aran/balloon"); - pi.updateAreaInfo(21002, "mo1=o;mo2=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon2"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "mo2=o")) { + return false; + } + pi.playSound("Aran/balloon"); + pi.updateAreaInfo(21002, "mo1=o;mo2=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon2"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorMono2.js b/scripts/portal/aranTutorMono2.js index 2b06feae4b..638544faa1 100644 --- a/scripts/portal/aranTutorMono2.js +++ b/scripts/portal/aranTutorMono2.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "mo3=o")) { - return false; - } - pi.updateAreaInfo(21002, "mo1=o;mo2=o;mo3=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon3"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "mo3=o")) { + return false; + } + pi.updateAreaInfo(21002, "mo1=o;mo2=o;mo3=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon3"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorMono3.js b/scripts/portal/aranTutorMono3.js index cefbdfdd90..a9406d3d75 100644 --- a/scripts/portal/aranTutorMono3.js +++ b/scripts/portal/aranTutorMono3.js @@ -19,15 +19,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(21002, "mo4=o")) { - return false; - } - pi.updateAreaInfo(21002, "normal=o;arr0=o;mo1=o;mo2=o;mo3=o;mo4=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon6"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(21002, "mo4=o")) { + return false; + } + pi.updateAreaInfo(21002, "normal=o;arr0=o;mo1=o;mo2=o;mo3=o;mo4=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon6"); + return true; } \ No newline at end of file diff --git a/scripts/portal/aranTutorOut1.js b/scripts/portal/aranTutorOut1.js index 1e9c7001d2..e0c1b33f45 100644 --- a/scripts/portal/aranTutorOut1.js +++ b/scripts/portal/aranTutorOut1.js @@ -2,18 +2,19 @@ @Author: kevintjuh93 */ function enter(pi) { - if (pi.isQuestStarted(21000)) { - //lol nexon does this xD - pi.teachSkill(20000017, 0, -1, -1); - pi.teachSkill(20000018, 0, -1, -1); - //nexon sends updatePlayerStats Stat.AVAILABLESP 0 - pi.teachSkill(20000017, 1, 0, -1); - pi.teachSkill(20000018, 1, 0, -1); - //actually nexon does enableActions here :P - 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."); - return false; - } + if (pi.isQuestStarted(21000)) { + //lol nexon does this xD + pi.teachSkill(20000017, 0, -1, -1); + pi.teachSkill(20000018, 0, -1, -1); + //nexon sends updatePlayerStats Stat.AVAILABLESP 0 + pi.teachSkill(20000017, 1, 0, -1); + pi.teachSkill(20000018, 1, 0, -1); + //actually nexon does enableActions here :P + 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."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/aranTutorOut2.js b/scripts/portal/aranTutorOut2.js index dc2d184418..0c5e3c2e80 100644 --- a/scripts/portal/aranTutorOut2.js +++ b/scripts/portal/aranTutorOut2.js @@ -1,11 +1,12 @@ function enter(pi) { - //lol nexon does this xD - pi.teachSkill(20000014, 0, -1, -1); - pi.teachSkill(20000015, 0, -1, -1); - //nexon sends updatePlayerStats Stat.AVAILABLESP 0 - pi.teachSkill(20000014, 1, 0, -1); - pi.teachSkill(20000015, 1, 0, -1); - //actually nexon does enableActions here :P - pi.playPortalSound(); pi.warp(914000210, 1); - return true; + //lol nexon does this xD + pi.teachSkill(20000014, 0, -1, -1); + pi.teachSkill(20000015, 0, -1, -1); + //nexon sends updatePlayerStats Stat.AVAILABLESP 0 + pi.teachSkill(20000014, 1, 0, -1); + pi.teachSkill(20000015, 1, 0, -1); + //actually nexon does enableActions here :P + 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 f1f71ad9b4..ec946351c1 100644 --- a/scripts/portal/aranTutorOut3.js +++ b/scripts/portal/aranTutorOut3.js @@ -1,9 +1,10 @@ function enter(pi) { - //lol nexon does this xD - pi.teachSkill(20000016, 0, -1, -1); - //nexon sends updatePlayerStats Stat.AVAILABLESP 0 - pi.teachSkill(20000016, 1, 0, -1); - //actually nexon does enableActions here :P - pi.playPortalSound(); pi.warp(914000220, 1); - return true; + //lol nexon does this xD + pi.teachSkill(20000016, 0, -1, -1); + //nexon sends updatePlayerStats Stat.AVAILABLESP 0 + pi.teachSkill(20000016, 1, 0, -1); + //actually nexon does enableActions here :P + 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 fc09356f93..3620112f34 100644 --- a/scripts/portal/ariantMout.js +++ b/scripts/portal/ariantMout.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 767cc6e2eb..2fb39b0b67 100644 --- a/scripts/portal/ariantMout2.js +++ b/scripts/portal/ariantMout2.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 12cc6b18da..efa21313d3 100644 --- a/scripts/portal/ariant_Agit.js +++ b/scripts/portal/ariant_Agit.js @@ -24,11 +24,12 @@ Agit's hideout (leader of the Sand Bandits) */ function enter(pi) { - if(pi.isQuestCompleted(3928) && pi.isQuestCompleted(3931) && pi.isQuestCompleted(3934)) { - pi.playPortalSound(); pi.warp(260000201, 1); - return true; - } else { - pi.message("Access restricted to only members of the Sand Bandits team."); - return false; - } + if (pi.isQuestCompleted(3928) && pi.isQuestCompleted(3931) && pi.isQuestCompleted(3934)) { + pi.playPortalSound(); + pi.warp(260000201, 1); + return true; + } else { + pi.message("Access restricted to only members of the Sand Bandits team."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/ariant_castle.js b/scripts/portal/ariant_castle.js index 0efbe4d049..f428569925 100644 --- a/scripts/portal/ariant_castle.js +++ b/scripts/portal/ariant_castle.js @@ -20,22 +20,22 @@ */ /** --- Odin JavaScript -------------------------------------------------------------------------------- - Portal - To get into Ariant Castle --- By --------------------------------------------------------------------------------------------- - Jayd --- Version Info ----------------------------------------------------------------------------------- - 1.0 - First Version by Jayd ---------------------------------------------------------------------------------------------------- -**/ + -- Odin JavaScript -------------------------------------------------------------------------------- + Portal - To get into Ariant Castle + -- By --------------------------------------------------------------------------------------------- + Jayd + -- Version Info ----------------------------------------------------------------------------------- + 1.0 - First Version by Jayd + --------------------------------------------------------------------------------------------------- + **/ function enter(pi) { - if (pi.getPlayer().haveItem(4031582) == true) { - pi.playPortalSound(); - pi.warp(260000301, 5); - return true; - } else { - pi.playerMessage(5, "You can enter only if you have a Entry Pass to the Palace."); - return false; - } + if (pi.getPlayer().haveItem(4031582) == true) { + pi.playPortalSound(); + pi.warp(260000301, 5); + return true; + } else { + pi.playerMessage(5, "You can enter only if you have a Entry Pass to the Palace."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/ariant_queens.js b/scripts/portal/ariant_queens.js index 053b2f23f7..460af95c04 100644 --- a/scripts/portal/ariant_queens.js +++ b/scripts/portal/ariant_queens.js @@ -20,14 +20,15 @@ function isTigunMorphed(ch) { const BuffStat = Java.type('client.BuffStat'); - return ch.getBuffSource(BuffStat.MORPH) == 2210005; + return ch.getBuffSource(BuffStat.MORPH) == 2210005; } function enter(pi) { - if(isTigunMorphed(pi.getPlayer())) { + if (isTigunMorphed(pi.getPlayer())) { return false; } else { - pi.playPortalSound(); 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/babyPigOut.js b/scripts/portal/babyPigOut.js index 56559ffbe3..2e7f60945f 100644 --- a/scripts/portal/babyPigOut.js +++ b/scripts/portal/babyPigOut.js @@ -1,9 +1,9 @@ function enter(pi) { - if (pi.isQuestCompleted(22015)) { - pi.playPortalSound(); - pi.warp(100030300, 2); - } else { - pi.playerMessage(5, "Please rescue the baby pig!");//not gms like - } - return true; + if (pi.isQuestCompleted(22015)) { + pi.playPortalSound(); + pi.warp(100030300, 2); + } else { + pi.playerMessage(5, "Please rescue the baby pig!");//not gms like + } + return true; } \ No newline at end of file diff --git a/scripts/portal/balogTemple.js b/scripts/portal/balogTemple.js index 158e8d7511..dd92bf2e58 100644 --- a/scripts/portal/balogTemple.js +++ b/scripts/portal/balogTemple.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(105100000, 2); + 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 e353e6cb52..1f8bb291d9 100644 --- a/scripts/portal/balog_end.js +++ b/scripts/portal/balog_end.js @@ -1,9 +1,10 @@ function enter(pi) { - if (!pi.canHold(4001261,1)) { - pi.playerMessage(5, "Please make 1 ETC room."); - return false; - } - pi.gainItem(4001261,1); - pi.playPortalSound(); pi.warp(105100100,0); - return true; + if (!pi.canHold(4001261, 1)) { + pi.playerMessage(5, "Please make 1 ETC room."); + return false; + } + pi.gainItem(4001261, 1); + 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 a956177997..f06a5a57ec 100644 --- a/scripts/portal/bedroom_out.js +++ b/scripts/portal/bedroom_out.js @@ -1,8 +1,9 @@ function enter(pi) { - if (pi.isQuestStarted(2570)) { - 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."); - return false; + if (pi.isQuestStarted(2570)) { + 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."); + return false; } \ No newline at end of file diff --git a/scripts/portal/cannon_tuto_06.js b/scripts/portal/cannon_tuto_06.js index e1474fdaa1..aec9ad8bc3 100644 --- a/scripts/portal/cannon_tuto_06.js +++ b/scripts/portal/cannon_tuto_06.js @@ -1,6 +1,6 @@ function enter(pi) { - pi.setDirectionStatus(true); - pi.lockUI2(); - pi.openNpc(3, 1096003); - return true; + pi.setDirectionStatus(true); + pi.lockUI2(); + pi.openNpc(3, 1096003); + return true; } \ No newline at end of file diff --git a/scripts/portal/cannon_tuto_07.js b/scripts/portal/cannon_tuto_07.js index f61b04491b..16f3eab1e1 100644 --- a/scripts/portal/cannon_tuto_07.js +++ b/scripts/portal/cannon_tuto_07.js @@ -1,11 +1,11 @@ function enter(pi) { - pi.setDirectionStatus(true); - pi.lockUI2(); - pi.spawnNPC(579711, 1096012, -51, -97, 0, true);//A2 01 01 7F D8 08 00 4C B9 10 00 CD FF 9F FF 01 8A 00 9B FF FF FF 01 - pi.setNPCValue(579711, "summon"); - pi.updateInfo("fly", "579711"); - pi.sendDirectionInfo(3, 0); - pi.sendDirectionInfo(3, 2); - pi.sendDirectionInfo(4, 0); - return true; + pi.setDirectionStatus(true); + pi.lockUI2(); + pi.spawnNPC(579711, 1096012, -51, -97, 0, true);//A2 01 01 7F D8 08 00 4C B9 10 00 CD FF 9F FF 01 8A 00 9B FF FF FF 01 + pi.setNPCValue(579711, "summon"); + pi.updateInfo("fly", "579711"); + pi.sendDirectionInfo(3, 0); + pi.sendDirectionInfo(3, 2); + pi.sendDirectionInfo(4, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/cannon_tuto_09.js b/scripts/portal/cannon_tuto_09.js index 1ebd085a40..f28b76fb74 100644 --- a/scripts/portal/cannon_tuto_09.js +++ b/scripts/portal/cannon_tuto_09.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.openNpc(8, 1096005); - return true; + pi.openNpc(8, 1096005); + return true; } \ No newline at end of file diff --git a/scripts/portal/cannon_tuto_10.js b/scripts/portal/cannon_tuto_10.js index 17c8d94afb..78f169e896 100644 --- a/scripts/portal/cannon_tuto_10.js +++ b/scripts/portal/cannon_tuto_10.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.unlockUI(); - return true; + pi.unlockUI(); + return true; } \ No newline at end of file diff --git a/scripts/portal/captinsg00.js b/scripts/portal/captinsg00.js index a4ee3d6e4e..98cbe8caf4 100644 --- a/scripts/portal/captinsg00.js +++ b/scripts/portal/captinsg00.js @@ -1,33 +1,32 @@ /* @author RonanLana */ function enter(pi) { - if (!pi.haveItem(4000381)) { - pi.playerMessage(5, "You do not have White Essence."); - return false; + if (!pi.haveItem(4000381)) { + pi.playerMessage(5, "You do not have White Essence."); + return false; + } else { + var em = pi.getEventManager("LatanicaBattle"); + + if (pi.getParty() == null) { + pi.playerMessage(5, "You are currently not in a party, create one to attempt the boss."); + return false; + } else if (!pi.isLeader()) { + pi.playerMessage(5, "Your party leader must enter the portal to start the battle."); + return false; } else { - var em = pi.getEventManager("LatanicaBattle"); - - if (pi.getParty() == null) { - pi.playerMessage(5, "You are currently not in a party, create one to attempt the boss."); - return false; - } else if(!pi.isLeader()) { - pi.playerMessage(5, "Your party leader must enter the portal to start the battle."); - return false; - } else { - var eli = em.getEligibleParty(pi.getParty()); - if(eli.size() > 0) { - if(!em.startInstance(pi.getParty(), pi.getPlayer().getMap(), 1)) { - pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place yet."); - return false; - } - } - else { //this should never appear - pi.playerMessage(5, "You cannot start this battle yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search."); - return false; - } - - pi.playPortalSound(); - return true; + var eli = em.getEligibleParty(pi.getParty()); + if (eli.size() > 0) { + if (!em.startInstance(pi.getParty(), pi.getPlayer().getMap(), 1)) { + pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place yet."); + return false; } + } else { //this should never appear + pi.playerMessage(5, "You cannot start this battle yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search."); + return false; + } + + pi.playPortalSound(); + return true; } + } } \ No newline at end of file diff --git a/scripts/portal/catPriest_map.js b/scripts/portal/catPriest_map.js index 14b3144b0b..ac4b970f95 100644 --- a/scripts/portal/catPriest_map.js +++ b/scripts/portal/catPriest_map.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(925000000, 2); + pi.playPortalSound(); + pi.warp(925000000, 2); return true; } \ No newline at end of file diff --git a/scripts/portal/contactDragon.js b/scripts/portal/contactDragon.js index 7805fee6a0..4154121543 100644 --- a/scripts/portal/contactDragon.js +++ b/scripts/portal/contactDragon.js @@ -1,7 +1,7 @@ //Author: kevintjuh93 function enter(pi) { - pi.playPortalSound(); - pi.warp(900090100, 0); - return true; + pi.playPortalSound(); + pi.warp(900090100, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/curseforest.js b/scripts/portal/curseforest.js index 9db67dba5d..af2577b203 100644 --- a/scripts/portal/curseforest.js +++ b/scripts/portal/curseforest.js @@ -1,15 +1,16 @@ function enter(pi) { - if(pi.isQuestStarted(2224) || pi.isQuestStarted(2226) || pi.isQuestCompleted(2227)) { + if (pi.isQuestStarted(2224) || pi.isQuestStarted(2226) || pi.isQuestCompleted(2227)) { var hourDay = pi.getHourOfDay(); - if(!((hourDay >= 0 && hourDay < 7) || hourDay >= 17)) { + if (!((hourDay >= 0 && hourDay < 7) || hourDay >= 17)) { pi.getPlayer().dropMessage(5, "You cannot access this area right now."); return false; } else { - pi.playPortalSound(); pi.warp(pi.isQuestCompleted(2227) ? 910100001 : 910100000,"out00"); + pi.playPortalSound(); + pi.warp(pi.isQuestCompleted(2227) ? 910100001 : 910100000, "out00"); return true; } } - + pi.getPlayer().dropMessage(5, "You cannot access this area."); return false; } \ No newline at end of file diff --git a/scripts/portal/davy2_hd1.js b/scripts/portal/davy2_hd1.js index 84c1fbef12..b70018f624 100644 --- a/scripts/portal/davy2_hd1.js +++ b/scripts/portal/davy2_hd1.js @@ -3,11 +3,12 @@ var windowTime = 10 * 1000; function enter(pi) { var eim = pi.getEventInstance(); var level = eim.getProperty("level"); - if(eim.getProperty("stage2b") == "0") { + if (eim.getProperty("stage2b") == "0") { pi.getMap(925100202).spawnAllMonstersFromMapSpawnList(level, true); eim.setProperty("stage2b", "1"); } - - pi.playPortalSound(); pi.warp(925100202,0); + + 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 c40727da08..3546b736ce 100644 --- a/scripts/portal/davy3_hd1.js +++ b/scripts/portal/davy3_hd1.js @@ -3,11 +3,12 @@ var windowTime = 10 * 1000; function enter(pi) { var eim = pi.getEventInstance(); var level = eim.getProperty("level"); - if(eim.getProperty("stage3b") == "0") { + if (eim.getProperty("stage3b") == "0") { pi.getMap(925100302).spawnAllMonstersFromMapSpawnList(level, true); eim.setProperty("stage3b", "1"); } - - pi.playPortalSound(); pi.warp(925100302,0); + + 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 10013065d5..e990a58567 100644 --- a/scripts/portal/davy_next0.js +++ b/scripts/portal/davy_next0.js @@ -1,11 +1,14 @@ function passedGrindMode(map, eim) { - if(eim.getIntProperty("grindMode") == 0) return true; + if (eim.getIntProperty("grindMode") == 0) { + return true; + } return eim.activatedAllReactorsOnMap(map, 2511000, 2517999); } function enter(pi) { if (pi.getMap().getMonsters().size() == 0 && passedGrindMode(pi.getMap(), pi.getEventInstance())) { - pi.playPortalSound(); pi.warp(925100100,0); //next + pi.playPortalSound(); + pi.warp(925100100, 0); //next return true; } else { pi.playerMessage(5, "The portal is not opened yet."); diff --git a/scripts/portal/davy_next1.js b/scripts/portal/davy_next1.js index 506d8d20a3..e1e9fcc85c 100644 --- a/scripts/portal/davy_next1.js +++ b/scripts/portal/davy_next1.js @@ -2,15 +2,16 @@ function enter(pi) { try { var eim = pi.getEventInstance(); if (eim != null && eim.getProperty("stage2").equals("3")) { - pi.playPortalSound(); pi.warp(925100200,0); //next + pi.playPortalSound(); + pi.warp(925100200, 0); //next return true; } else { pi.playerMessage(5, "The portal is not opened yet."); return false; } - } catch(e) { + } catch (e) { pi.playerMessage(5, "Error: " + e); } - + return false; } \ No newline at end of file diff --git a/scripts/portal/davy_next2.js b/scripts/portal/davy_next2.js index a696d75746..b678728a41 100644 --- a/scripts/portal/davy_next2.js +++ b/scripts/portal/davy_next2.js @@ -1,14 +1,17 @@ function passedGrindMode(map, eim) { - if(eim.getIntProperty("grindMode") == 0) return true; + if (eim.getIntProperty("grindMode") == 0) { + return true; + } return eim.activatedAllReactorsOnMap(map, 2511000, 2517999); } function enter(pi) { if (pi.getMap().getMonsters().size() == 0 && passedGrindMode(pi.getMap(), pi.getEventInstance())) { - pi.playPortalSound(); pi.warp(925100300,0); //next + pi.playPortalSound(); + pi.warp(925100300, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/davy_next3.js b/scripts/portal/davy_next3.js index f4adc97948..5f15f46037 100644 --- a/scripts/portal/davy_next3.js +++ b/scripts/portal/davy_next3.js @@ -1,14 +1,17 @@ function passedGrindMode(map, eim) { - if(eim.getIntProperty("grindMode") == 0) return true; + if (eim.getIntProperty("grindMode") == 0) { + return true; + } return eim.activatedAllReactorsOnMap(map, 2511000, 2517999); } function enter(pi) { if (pi.getMap().getMonsters().size() == 0 && passedGrindMode(pi.getMap(), pi.getEventInstance())) { - pi.playPortalSound(); pi.warp(925100400,0); //next + pi.playPortalSound(); + pi.warp(925100400, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/davy_next4.js b/scripts/portal/davy_next4.js index 6bf9207c57..9cf25b73e0 100644 --- a/scripts/portal/davy_next4.js +++ b/scripts/portal/davy_next4.js @@ -1,16 +1,22 @@ function enter(pi) { if (pi.getMap().getReactorByName("sMob1").getState() >= 1 && pi.getMap().getReactorByName("sMob2").getState() >= 1 && pi.getMap().getReactorByName("sMob3").getState() >= 1 && pi.getMap().getReactorByName("sMob4").getState() >= 1 && pi.getMap().getMonsters().size() == 0) { - var eim = pi.getEventInstance(); - - if(eim.getProperty("spawnedBoss") == null) { + var eim = pi.getEventInstance(); + + if (eim.getProperty("spawnedBoss") == null) { var level = parseInt(eim.getProperty("level")); var chests = parseInt(eim.getProperty("openedChests")); - var boss; + var boss; const LifeFactory = Java.type('server.life.LifeFactory'); - if(chests == 0) boss = LifeFactory.getMonster(9300119); //lord pirate - else if(chests == 1) boss = LifeFactory.getMonster(9300105); //angry lord pirate - else boss = LifeFactory.getMonster(9300106); //enraged lord pirate + if (chests == 0) { + boss = LifeFactory.getMonster(9300119); + }//lord pirate + else if (chests == 1) { + boss = LifeFactory.getMonster(9300105); + }//angry lord pirate + else { + boss = LifeFactory.getMonster(9300106); + } //enraged lord pirate boss.changeDifficulty(level, true); @@ -18,11 +24,12 @@ function enter(pi) { pi.getMap(925100500).spawnMonsterOnGroundBelow(boss, new Point(777, 140)); eim.setProperty("spawnedBoss", "true"); } - - pi.playPortalSound(); pi.warp(925100500, 0); + + pi.playPortalSound(); + pi.warp(925100500, 0); return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/dojang_exit.js b/scripts/portal/dojang_exit.js index 2da837f03e..fe72d8d15f 100644 --- a/scripts/portal/dojang_exit.js +++ b/scripts/portal/dojang_exit.js @@ -19,7 +19,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -/* + +/* * @author: kevintjuh93, moogra * @portal: dojang_exit * @purpose: warps user out @@ -27,8 +28,11 @@ function enter(pi) { var map = pi.getPlayer().getSavedLocation("MIRROR"); - if(map == -1) map = 100000000; - - pi.playPortalSound(); pi.warp(map); + if (map == -1) { + map = 100000000; + } + + 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 b8741bee76..e07f729c60 100644 --- a/scripts/portal/dojang_next.js +++ b/scripts/portal/dojang_next.js @@ -24,43 +24,48 @@ */ function enter(pi) { var currwarp = Date.now(); - - if(currwarp - pi.getPlayer().getNpcCooldown() < 3000) return false; // this script can be ran twice when passing the dojo portal... strange. + + if (currwarp - pi.getPlayer().getNpcCooldown() < 3000) { + return false; + } // this script can be ran twice when passing the dojo portal... strange. pi.getPlayer().setNpcCooldown(currwarp); - + var gate = pi.getPlayer().getMap().getReactorByName("door"); - if(gate != null) { + if (gate != null) { if (gate.getState() == 1 || pi.getMap().countMonsters() == 0) { if (Math.floor(pi.getPlayer().getMapId() / 100) % 100 < 38) { - if(((Math.floor((pi.getPlayer().getMap().getId() + 100) / 100)) % 100) % 6 == 0) { - if(Math.floor(pi.getPlayer().getMapId() / 10000) == 92503) { + if (((Math.floor((pi.getPlayer().getMap().getId() + 100) / 100)) % 100) % 6 == 0) { + if (Math.floor(pi.getPlayer().getMapId() / 10000) == 92503) { var restMapId = pi.getPlayer().getMap().getId() + 100; var mapId = pi.getPlayer().getMap().getId(); - - for(var i = 0; i < 5; i++) { + + for (var i = 0; i < 5; i++) { var chrlist = pi.getMap(mapId - 100 * i).getAllPlayers(); - + var pIter = chrlist.iterator(); while (pIter.hasNext()) { var chr = pIter.next(); - - for(var j = i; j >= 0; j--) { + + for (var j = i; j >= 0; j--) { chr.message("You received " + chr.addDojoPointsByMap(mapId - 100 * j) + " training points. Your total training points score is now " + chr.getDojoPoints() + "."); } - + chr.changeMap(restMapId, 0); } } } else { pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap(pi.getMapId()) + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + "."); - pi.playPortalSound(); pi.warp(pi.getPlayer().getMap().getId() + 100, 0); + pi.playPortalSound(); + pi.warp(pi.getPlayer().getMap().getId() + 100, 0); } } else { pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap(pi.getMapId()) + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + "."); - pi.playPortalSound(); pi.warp(pi.getPlayer().getMap().getId() + 100, 0); + pi.playPortalSound(); + pi.warp(pi.getPlayer().getMap().getId() + 100, 0); } } else { - pi.playPortalSound(); 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 31378e49b5..ce6bdd7ee4 100644 --- a/scripts/portal/dojang_tuto.js +++ b/scripts/portal/dojang_tuto.js @@ -19,7 +19,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -/* + +/* Author: Traitor Map(s): So Gong's maps Desc: doesn't do anything man. ANYTHING. @@ -31,7 +32,8 @@ function enter(pi) { pi.getPlayer().setFinishedDojoTutorial(); pi.getClient().getChannelServer().resetDojo(pi.getPlayer().getMap().getId()); pi.getClient().getChannelServer().dismissDojoSchedule(pi.getPlayer().getMap().getId(), pi.getParty()); - pi.playPortalSound(); 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/dojang_up.js b/scripts/portal/dojang_up.js index 1a6b7eee53..7217aec743 100644 --- a/scripts/portal/dojang_up.js +++ b/scripts/portal/dojang_up.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* * @author: Moogra * @function: Warp character up and award player with dojo points @@ -33,13 +34,15 @@ function enter(pi) { var stage = Math.floor(pi.getPlayer().getMapId() / 100) % 100; const GameConstants = Java.type('constants.game.GameConstants'); if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !GameConstants.isDojoPartyArea(pi.getPlayer().getMapId())) // we can also try 5 * stage / 6 | 0 + 1 + { pi.getPlayer().setVanquisherKills(pi.getPlayer().getVanquisherKills() + 1); + } } else { pi.getPlayer().message("There are still some monsters remaining."); } pi.enableActions(); return true; - } catch(err) { + } catch (err) { pi.getPlayer().dropMessage(err); } } diff --git a/scripts/portal/dracoout.js b/scripts/portal/dracoout.js index 17d9fc1a08..988cd6525c 100644 --- a/scripts/portal/dracoout.js +++ b/scripts/portal/dracoout.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 db3f4b75bd..d01ce28b3a 100644 --- a/scripts/portal/dragonNest.js +++ b/scripts/portal/dragonNest.js @@ -21,7 +21,8 @@ */ function enter(pi) { if (pi.isQuestCompleted(3706)) { - pi.playPortalSound(); pi.warp(240040612, "out00"); + pi.playPortalSound(); + pi.warp(240040612, "out00"); return true; } else if (pi.isQuestStarted(100203) || pi.getPlayer().haveItem(4001094)) { var em = pi.getEventManager("NineSpirit"); diff --git a/scripts/portal/dragoneyes.js b/scripts/portal/dragoneyes.js index dfd5b6e4d2..875ff11820 100644 --- a/scripts/portal/dragoneyes.js +++ b/scripts/portal/dragoneyes.js @@ -1,9 +1,9 @@ function enter(pi) { - if (pi.isQuestCompleted(22012)) { - return false; - } else { - pi.forceCompleteQuest(22012); - } - pi.blockPortal(); - return true; + if (pi.isQuestCompleted(22012)) { + return false; + } else { + pi.forceCompleteQuest(22012); + } + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/elevator.js b/scripts/portal/elevator.js index 0c0564601b..3ee012b44b 100644 --- a/scripts/portal/elevator.js +++ b/scripts/portal/elevator.js @@ -4,14 +4,16 @@ 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.playPortalSound(); pi.warp(pi.getMapId() == 222020100 ? 222020110 : 222020210, 0); + pi.playPortalSound(); + pi.warp(pi.getMapId() == 222020100 ? 222020110 : 222020210, 0); return true; } else if (elevator.getProperty(pi.getMapId() == 222020100 ? ("goingUp") : ("goingDown")).equals("true")) { pi.getPlayer().dropMessage(5, "The elevator is currently moving."); + } else { + pi.getPlayer().dropMessage(5, "Dafuq is happening?!"); } - else pi.getPlayer().dropMessage(5, "Dafuq is happening?!"); - } catch(e) { + } catch (e) { pi.getPlayer().dropMessage(5, "Error: " + e); } - return false; + return false; } \ No newline at end of file diff --git a/scripts/portal/eliza_Garden.js b/scripts/portal/eliza_Garden.js index da3e8f0827..4768172eff 100644 --- a/scripts/portal/eliza_Garden.js +++ b/scripts/portal/eliza_Garden.js @@ -19,7 +19,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -function enter(pi){ - pi.playPortalSound(); pi.warp(920020000, 2); - return true; +function enter(pi) { + pi.playPortalSound(); + pi.warp(920020000, 2); + return true; } \ No newline at end of file diff --git a/scripts/portal/end_cow.js b/scripts/portal/end_cow.js index 9f8874863d..7e78694dc7 100644 --- a/scripts/portal/end_cow.js +++ b/scripts/portal/end_cow.js @@ -4,19 +4,19 @@ Quest: Find Fresh Milk (2180) */ -function enter(pi){ - if (pi.isQuestStarted(2180) && (pi.hasItem(4031847) || pi.hasItem(4031848) || pi.hasItem(4031849) || pi.hasItem(4031850))){ - if (pi.hasItem(4031850)){ - pi.playPortalSound(); pi.warp(120000103); - return true; - } - else{ - pi.getPlayer().dropMessage(5, "Your milk jug is not full..."); - return false; - } - } - else{ - pi.playPortalSound(); pi.warp(120000103); - return true; - } +function enter(pi) { + if (pi.isQuestStarted(2180) && (pi.hasItem(4031847) || pi.hasItem(4031848) || pi.hasItem(4031849) || pi.hasItem(4031850))) { + if (pi.hasItem(4031850)) { + pi.playPortalSound(); + pi.warp(120000103); + return true; + } else { + pi.getPlayer().dropMessage(5, "Your milk jug is not full..."); + return false; + } + } else { + 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 bd7dcb85c5..10440a2618 100644 --- a/scripts/portal/enterAchter.js +++ b/scripts/portal/enterAchter.js @@ -1,5 +1,6 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(100000201, "out02"); - pi.playPortalSound(); - return true; + 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 4a43cb12e9..2b866ab7a1 100644 --- a/scripts/portal/enterBackStreet.js +++ b/scripts/portal/enterBackStreet.js @@ -1,9 +1,9 @@ function enter(pi) { - if(pi.isQuestActive(21747) || pi.isQuestActive(21744) && pi.isQuestCompleted(21745)) { - pi.playPortalSound(); pi.warp(925040000,0); + if (pi.isQuestActive(21747) || pi.isQuestActive(21744) && pi.isQuestCompleted(21745)) { + pi.playPortalSound(); + pi.warp(925040000, 0); return true; - } - else { + } else { pi.message("You don't have permission to access this area."); return false; } diff --git a/scripts/portal/enterDisguise0.js b/scripts/portal/enterDisguise0.js index 01d6f61cd3..4ef5836ef6 100644 --- a/scripts/portal/enterDisguise0.js +++ b/scripts/portal/enterDisguise0.js @@ -19,23 +19,24 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -/* + +/* Map(s): Empress' Road : Crossroads of Ereve Description: Takes you to Training Forest I */ function enter(pi) { - if(pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { - if(pi.hasItem(4032179)) { - pi.playPortalSound(); - pi.warp(130010000, "east00"); - } else { - pi.getPlayer().dropMessage(5, "Due to the lock down you can not enter without a permit."); - return false; - } - } else { - pi.playPortalSound(); - pi.warp(130010000, "east00"); - } - return true; + if (pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { + if (pi.hasItem(4032179)) { + pi.playPortalSound(); + pi.warp(130010000, "east00"); + } else { + pi.getPlayer().dropMessage(5, "Due to the lock down you can not enter without a permit."); + return false; + } + } else { + pi.playPortalSound(); + pi.warp(130010000, "east00"); + } + return true; } \ No newline at end of file diff --git a/scripts/portal/enterDisguise1.js b/scripts/portal/enterDisguise1.js index 5524e9bfc9..3910598ca8 100644 --- a/scripts/portal/enterDisguise1.js +++ b/scripts/portal/enterDisguise1.js @@ -25,21 +25,23 @@ var jobtype = 0; function enter(pi) { - if(pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { - var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); - if(map.countPlayers() > 0) { - pi.message("Someone else is already searching the area."); - return false; - } - - if(pi.haveItem(4032101 + jobtype, 1)) { - pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); - return false; - } - - pi.playPortalSound(); pi.warp(108010600 + (10 * jobtype), "out00"); - } else { - pi.playPortalSound(); pi.warp(130010010, "out00"); - } - return true; + if (pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { + var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); + if (map.countPlayers() > 0) { + pi.message("Someone else is already searching the area."); + return false; + } + + if (pi.haveItem(4032101 + jobtype, 1)) { + pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); + return false; + } + + pi.playPortalSound(); + pi.warp(108010600 + (10 * jobtype), "out00"); + } else { + 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 731b5f6a2c..bdea295478 100644 --- a/scripts/portal/enterDisguise2.js +++ b/scripts/portal/enterDisguise2.js @@ -25,21 +25,23 @@ var jobtype = 1; function enter(pi) { - if(pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { - var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); - if(map.countPlayers() > 0) { - pi.message("Someone else is already searching the area."); - return false; - } - - if(pi.haveItem(4032101 + jobtype, 1)) { - pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); - return false; - } - - pi.playPortalSound(); pi.warp(108010600 + (10 * jobtype), "out00"); - } else { - pi.playPortalSound(); pi.warp(130010020, "out00"); - } - return true; + if (pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { + var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); + if (map.countPlayers() > 0) { + pi.message("Someone else is already searching the area."); + return false; + } + + if (pi.haveItem(4032101 + jobtype, 1)) { + pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); + return false; + } + + pi.playPortalSound(); + pi.warp(108010600 + (10 * jobtype), "out00"); + } else { + pi.playPortalSound(); + pi.warp(130010020, "out00"); + } + return true; } diff --git a/scripts/portal/enterDisguise3.js b/scripts/portal/enterDisguise3.js index 73431335a8..3eda3462b5 100644 --- a/scripts/portal/enterDisguise3.js +++ b/scripts/portal/enterDisguise3.js @@ -25,21 +25,23 @@ var jobtype = 2; function enter(pi) { - if(pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { - var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); - if(map.countPlayers() > 0) { - pi.message("Someone else is already searching the area."); - return false; - } - - if(pi.haveItem(4032101 + jobtype, 1)) { - pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); - return false; - } - - pi.playPortalSound(); pi.warp(108010600 + (10 * jobtype), "out00"); - } else { - pi.playPortalSound(); pi.warp(130010110, "out00"); - } - return true; + if (pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { + var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); + if (map.countPlayers() > 0) { + pi.message("Someone else is already searching the area."); + return false; + } + + if (pi.haveItem(4032101 + jobtype, 1)) { + pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); + return false; + } + + pi.playPortalSound(); + pi.warp(108010600 + (10 * jobtype), "out00"); + } else { + pi.playPortalSound(); + pi.warp(130010110, "out00"); + } + return true; } diff --git a/scripts/portal/enterDisguise4.js b/scripts/portal/enterDisguise4.js index f5eac73ebf..7baba97b4b 100644 --- a/scripts/portal/enterDisguise4.js +++ b/scripts/portal/enterDisguise4.js @@ -25,21 +25,23 @@ var jobtype = 3; function enter(pi) { - if(pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { - var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); - if(map.countPlayers() > 0) { - pi.message("Someone else is already searching the area."); - return false; - } - - if(pi.haveItem(4032101 + jobtype, 1)) { - pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); - return false; - } - - pi.playPortalSound(); pi.warp(108010600 + (10 * jobtype), "out00"); - } else { - pi.playPortalSound(); pi.warp(130010120, "out00"); - } - return true; + if (pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { + var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); + if (map.countPlayers() > 0) { + pi.message("Someone else is already searching the area."); + return false; + } + + if (pi.haveItem(4032101 + jobtype, 1)) { + pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); + return false; + } + + pi.playPortalSound(); + pi.warp(108010600 + (10 * jobtype), "out00"); + } else { + pi.playPortalSound(); + pi.warp(130010120, "out00"); + } + return true; } diff --git a/scripts/portal/enterDisguise5.js b/scripts/portal/enterDisguise5.js index 63a31832ca..c14a9ed678 100644 --- a/scripts/portal/enterDisguise5.js +++ b/scripts/portal/enterDisguise5.js @@ -25,21 +25,23 @@ var jobtype = 4; function enter(pi) { - if(pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { - var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); - if(map.countPlayers() > 0) { - pi.message("Someone else is already searching the area."); - return false; - } - - if(pi.haveItem(4032101 + jobtype, 1)) { - pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); - return false; - } - - pi.playPortalSound(); pi.warp(108010600 + (10 * jobtype), "east00"); - } else { - pi.playPortalSound(); pi.warp(130020000, "east00"); - } - return true; + if (pi.isQuestStarted(20301) || pi.isQuestStarted(20302) || pi.isQuestStarted(20303) || pi.isQuestStarted(20304) || pi.isQuestStarted(20305)) { + var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010600 + (10 * jobtype)); + if (map.countPlayers() > 0) { + pi.message("Someone else is already searching the area."); + return false; + } + + if (pi.haveItem(4032101 + jobtype, 1)) { + pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight."); + return false; + } + + pi.playPortalSound(); + pi.warp(108010600 + (10 * jobtype), "east00"); + } else { + 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 a5e0884b7e..63571c88ce 100644 --- a/scripts/portal/enterDollWay.js +++ b/scripts/portal/enterDollWay.js @@ -1,9 +1,11 @@ function enter(pi) { - if(pi.isQuestCompleted(20730) || pi.isQuestCompleted(21734)) { // puppeteer defeated, newfound secret path - pi.playPortalSound(); pi.warp(105070300,3); + if (pi.isQuestCompleted(20730) || pi.isQuestCompleted(21734)) { // puppeteer defeated, newfound secret path + pi.playPortalSound(); + pi.warp(105070300, 3); return true; - } else if(pi.isQuestStarted(21734)) { - pi.playPortalSound(); pi.warp(910510100,0); + } else if (pi.isQuestStarted(21734)) { + 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 173b00d815..8d70cc25af 100644 --- a/scripts/portal/enterDollcave.js +++ b/scripts/portal/enterDollcave.js @@ -1,9 +1,10 @@ function enter(pi) { - if(pi.isQuestCompleted(20730) || pi.isQuestCompleted(21734)) { // puppeteer defeated, newfound secret path - pi.playPortalSound(); pi.warp(105040201,2); - return true; - } - - pi.openNpc(1063011, "PupeteerPassword"); - return false; + if (pi.isQuestCompleted(20730) || pi.isQuestCompleted(21734)) { // puppeteer defeated, newfound secret path + pi.playPortalSound(); + pi.warp(105040201, 2); + return true; + } + + pi.openNpc(1063011, "PupeteerPassword"); + return false; } \ No newline at end of file diff --git a/scripts/portal/enterFirstDH.js b/scripts/portal/enterFirstDH.js index 7d5225f302..32e2411acd 100644 --- a/scripts/portal/enterFirstDH.js +++ b/scripts/portal/enterFirstDH.js @@ -1,27 +1,28 @@ var mapp = -1; var map = 0; + function enter(pi) { if (pi.getQuestStatus(20701) == 1) { - map = 913000000; + map = 913000000; } else if (pi.getQuestStatus(20702) == 1) { - map = 913000100; + map = 913000100; } else if (pi.getQuestStatus(20703) == 1) { - map = 913000200; + map = 913000200; } if (map > 0) { - if (pi.getPlayerCount(map) == 0) { - var mapp = pi.getMap(map); - mapp.resetPQ(); - + if (pi.getPlayerCount(map) == 0) { + var mapp = pi.getMap(map); + mapp.resetPQ(); + pi.playPortalSound(); - pi.warp(map, 0); + pi.warp(map, 0); return true; - } else { - pi.playerMessage(5, "Someone is already in this map."); + } else { + pi.playerMessage(5, "Someone is already in this map."); return false; - } + } } else { - pi.playerMessage(5, "Hall #1 can only be entered if you're engaged in Kiku's Acclimation Training."); + pi.playerMessage(5, "Hall #1 can only be entered if you're engaged in Kiku's Acclimation Training."); return false; } } \ No newline at end of file diff --git a/scripts/portal/enterGym.js b/scripts/portal/enterGym.js index 9fb1036066..9eb431d4c0 100644 --- a/scripts/portal/enterGym.js +++ b/scripts/portal/enterGym.js @@ -1,4 +1,3 @@ - function enter(pi) { if (pi.isQuestStarted(21701)) { pi.playPortalSound(); @@ -9,11 +8,11 @@ function enter(pi) { pi.warp(914010100, 1); return true; } else if (pi.isQuestStarted(21703)) { - pi.playPortalSound(); - pi.warp(914010200, 1); + pi.playPortalSound(); + pi.warp(914010200, 1); return true; } else { - pi.playerMessage(5, "You will be allowed to enter the Penguin Training Ground only if you are receiving a lesson from Puo."); + pi.playerMessage(5, "You will be allowed to enter the Penguin Training Ground only if you are receiving a lesson from Puo."); return false; } } \ No newline at end of file diff --git a/scripts/portal/enterInfo.js b/scripts/portal/enterInfo.js index 6b6026054b..77e0a0f274 100644 --- a/scripts/portal/enterInfo.js +++ b/scripts/portal/enterInfo.js @@ -1,12 +1,12 @@ function enter(pi) { var mapobj = pi.getWarpMap(104000004); - if(pi.isQuestActive(21733) && pi.getQuestProgressInt(21733, 9300345) == 0 && mapobj.countMonsters() == 0) { + if (pi.isQuestActive(21733) && pi.getQuestProgressInt(21733, 9300345) == 0 && mapobj.countMonsters() == 0) { const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); mapobj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300345), new Point(0, 0)); pi.setQuestProgress(21733, 21762, 2); } - + pi.playPortalSound(); pi.warp(104000004, 1); return true; diff --git a/scripts/portal/enterMCave.js b/scripts/portal/enterMCave.js index 51189a3ef8..eed8a163a4 100644 --- a/scripts/portal/enterMCave.js +++ b/scripts/portal/enterMCave.js @@ -1,41 +1,43 @@ function enter(pi) { - if(pi.isQuestStarted(21201)) { // Second Job - for (var i = 108000700; i < 108000709; i++){ - if(pi.getPlayerCount(i) > 0 && pi.getPlayerCount(i + 10) > 0) - continue; - - pi.playPortalSound(); - pi.warp(i, "out00"); - pi.setQuestProgress(21202, 21203, 0); - return true; - } - pi.message("The mirror is blank due to many players recalling their memories. Please wait and try again."); - return false; - } else if(pi.isQuestStarted(21302) && !pi.isQuestCompleted(21303)) { // Third Job - if(pi.getPlayerCount(108010701) > 0 || pi.getPlayerCount(108010702) > 0) { - pi.message("The mirror is blank due to many players recalling their memories. Please wait and try again."); - return false; - } else { - var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010702); - spawnMob(-210, 454, 9001013, map); - - pi.playPortalSound(); - pi.setQuestProgress(21303, 21203, 1); - pi.warp(108010701, "out00"); - return true; - } - } else { - pi.message("You have already passed your test, there is no need to access the mirror again."); - return false; - } + if (pi.isQuestStarted(21201)) { // Second Job + for (var i = 108000700; i < 108000709; i++) { + if (pi.getPlayerCount(i) > 0 && pi.getPlayerCount(i + 10) > 0) { + continue; + } + + pi.playPortalSound(); + pi.warp(i, "out00"); + pi.setQuestProgress(21202, 21203, 0); + return true; + } + pi.message("The mirror is blank due to many players recalling their memories. Please wait and try again."); + return false; + } else if (pi.isQuestStarted(21302) && !pi.isQuestCompleted(21303)) { // Third Job + if (pi.getPlayerCount(108010701) > 0 || pi.getPlayerCount(108010702) > 0) { + pi.message("The mirror is blank due to many players recalling their memories. Please wait and try again."); + return false; + } else { + var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010702); + spawnMob(-210, 454, 9001013, map); + + pi.playPortalSound(); + pi.setQuestProgress(21303, 21203, 1); + pi.warp(108010701, "out00"); + return true; + } + } else { + pi.message("You have already passed your test, there is no need to access the mirror again."); + return false; + } } function spawnMob(x, y, id, map) { - if(map.getMonsterById(id) != null) - return; + if (map.getMonsterById(id) != null) { + return; + } - const LifeFactory = Java.type('server.life.LifeFactory'); - const Point = Java.type('java.awt.Point'); - var mob = LifeFactory.getMonster(id); - map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); + const LifeFactory = Java.type('server.life.LifeFactory'); + const Point = Java.type('java.awt.Point'); + var mob = LifeFactory.getMonster(id); + map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/portal/enterMagiclibrar.js b/scripts/portal/enterMagiclibrar.js index 73c5a7dd01..1e49aef594 100644 --- a/scripts/portal/enterMagiclibrar.js +++ b/scripts/portal/enterMagiclibrar.js @@ -19,13 +19,12 @@ Credits to: Kevin */ function enter(pi) { - if(pi.isQuestStarted(20718)){ + if (pi.isQuestStarted(20718)) { var cml = pi.getEventManager("Cygnus_Magic_Library"); cml.setProperty("player", pi.getPlayer().getName()); cml.startInstance(pi.getPlayer()); pi.playPortalSound(); - } - else{ + } else { pi.playPortalSound(); pi.warp(101000003, 8); } diff --git a/scripts/portal/enterNepenthes.js b/scripts/portal/enterNepenthes.js index 1a673381bb..3657d6a640 100644 --- a/scripts/portal/enterNepenthes.js +++ b/scripts/portal/enterNepenthes.js @@ -2,23 +2,25 @@ function enter(pi) { if (pi.isQuestActive(21739)) { var mapobj1 = pi.getWarpMap(920030000); var mapobj2 = pi.getWarpMap(920030001); - - if(mapobj1.countPlayers() == 0 && mapobj2.countPlayers() == 0) { + + if (mapobj1.countPlayers() == 0 && mapobj2.countPlayers() == 0) { mapobj1.resetPQ(1); mapobj2.resetPQ(1); const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); mapobj2.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300348), new Point(591, -34)); - - pi.playPortalSound(); pi.warp(920030000,2); + + pi.playPortalSound(); + pi.warp(920030000, 2); return true; } else { pi.message("Someone is already challenging the area."); return false; } } else { - pi.playPortalSound(); pi.warp(200060001,2); + pi.playPortalSound(); + pi.warp(200060001, 2); return true; } } \ No newline at end of file diff --git a/scripts/portal/enterPort.js b/scripts/portal/enterPort.js index 2bc63eee5b..5d52a7993a 100644 --- a/scripts/portal/enterPort.js +++ b/scripts/portal/enterPort.js @@ -21,29 +21,31 @@ */ function enter(pi) { - if(pi.isQuestStarted(21301) && pi.getQuestProgressInt(21301, 9001013) == 0) { - if(pi.getPlayerCount(108010700) != 0) { - pi.message("The portal is blocked from the other side. I wonder if someone is already fighting the Thief Crow?"); - return false; - } else { - var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010700); - spawnMob(2732, 3, 9001013, map); - - pi.playPortalSound(); - pi.warp(108010700, "west00"); - } - } else { - pi.playPortalSound(); pi.warp(140020300, 1); - } - return true; + if (pi.isQuestStarted(21301) && pi.getQuestProgressInt(21301, 9001013) == 0) { + if (pi.getPlayerCount(108010700) != 0) { + pi.message("The portal is blocked from the other side. I wonder if someone is already fighting the Thief Crow?"); + return false; + } else { + var map = pi.getClient().getChannelServer().getMapFactory().getMap(108010700); + spawnMob(2732, 3, 9001013, map); + + pi.playPortalSound(); + pi.warp(108010700, "west00"); + } + } else { + pi.playPortalSound(); + pi.warp(140020300, 1); + } + return true; } function spawnMob(x, y, id, map) { - if(map.getMonsterById(id) != null) - return; + if (map.getMonsterById(id) != null) { + return; + } - const LifeFactory = Java.type('server.life.LifeFactory'); - const Point = Java.type('java.awt.Point'); - var mob = LifeFactory.getMonster(id); - map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); + const LifeFactory = Java.type('server.life.LifeFactory'); + const Point = Java.type('java.awt.Point'); + var mob = LifeFactory.getMonster(id); + map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/portal/enterRider.js b/scripts/portal/enterRider.js index 225c2e42a2..b64f98a706 100644 --- a/scripts/portal/enterRider.js +++ b/scripts/portal/enterRider.js @@ -1,11 +1,10 @@ function enter(pi) { - if(pi.isQuestStarted(21610) && pi.haveItem(4001193, 1) == 0) { + if (pi.isQuestStarted(21610) && pi.haveItem(4001193, 1) == 0) { var em = pi.getEventManager("Aran_2ndmount"); if (em == null) { pi.message("Sorry, but the 2nd mount quest (Scadur) is closed."); return false; - } - else { + } else { var em = pi.getEventManager("Aran_2ndmount"); if (!em.startInstance(pi.getPlayer())) { pi.message("There is currently someone in this map, come back later."); diff --git a/scripts/portal/enterRienFirst.js b/scripts/portal/enterRienFirst.js index 6f295bf25f..89dcad150d 100644 --- a/scripts/portal/enterRienFirst.js +++ b/scripts/portal/enterRienFirst.js @@ -20,11 +20,13 @@ along with this program. If not, see . */ function enter(pi) { - if (pi.getPlayer().getJob().getId() == 2000 && !pi.isQuestCompleted(21014)) { - pi.playPortalSound(); pi.warp(140000000, "st00"); - } else { - pi.playPortalSound(); pi.warp(140000000, "west00"); - } - - return true; + if (pi.getPlayer().getJob().getId() == 2000 && !pi.isQuestCompleted(21014)) { + pi.playPortalSound(); + pi.warp(140000000, "st00"); + } else { + 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 324067b5a4..e5f39dfa60 100644 --- a/scripts/portal/enterSecondDH.js +++ b/scripts/portal/enterSecondDH.js @@ -25,15 +25,16 @@ */ function enter(pi) { var maps = [108000600, 108000601, 108000602]; - if(pi.isQuestStarted(20201) || pi.isQuestStarted(20202) || pi.isQuestStarted(20203) || pi.isQuestStarted(20204) || pi.isQuestStarted(20205)) { + if (pi.isQuestStarted(20201) || pi.isQuestStarted(20202) || pi.isQuestStarted(20203) || pi.isQuestStarted(20204) || pi.isQuestStarted(20205)) { pi.removeAll(4032096); pi.removeAll(4032097); pi.removeAll(4032098); pi.removeAll(4032099); pi.removeAll(4032100); - + var rand = Math.floor(Math.random() * maps.length); - pi.playPortalSound(); 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 92c5ff7102..f407677f8a 100644 --- a/scripts/portal/enterWarehouse.js +++ b/scripts/portal/enterWarehouse.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(300000011,0); + 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 e21cb9dd55..1639529c1c 100644 --- a/scripts/portal/enterWitch.js +++ b/scripts/portal/enterWitch.js @@ -1,7 +1,7 @@ function enter(pi) { if (pi.isQuestCompleted(20404)) { var warpMap; - + if (pi.isQuestCompleted(20407)) { warpMap = 924010200; } else if (pi.isQuestCompleted(20406)) { @@ -9,14 +9,14 @@ function enter(pi) { } else { warpMap = 924010000; } - + pi.playPortalSound(); - pi.warp(warpMap, 1); + pi.warp(warpMap, 1); return true; - - + + } else { - pi.playerMessage(5, "I shouldn't go here.. it's creepy!"); + pi.playerMessage(5, "I shouldn't go here.. it's creepy!"); return false; } } \ No newline at end of file diff --git a/scripts/portal/enter_earth00.js b/scripts/portal/enter_earth00.js index 816a04a671..2dda329a92 100644 --- a/scripts/portal/enter_earth00.js +++ b/scripts/portal/enter_earth00.js @@ -3,7 +3,8 @@ function enter(pi) { pi.getPlayer().dropMessage(6, "You need a warp card to activate this portal."); return false; } - - pi.playPortalSound(); 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 d4bc0c7938..bf882f0ed7 100644 --- a/scripts/portal/enter_earth01.js +++ b/scripts/portal/enter_earth01.js @@ -3,7 +3,8 @@ function enter(pi) { pi.getPlayer().dropMessage(6, "You need a warp card to activate this portal."); return false; } - - pi.playPortalSound(); 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 5b85b8ce4f..8161a460fa 100644 --- a/scripts/portal/enter_nautil.js +++ b/scripts/portal/enter_nautil.js @@ -19,11 +19,13 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Nautilus Port portal @author xV1ral */ -function enter(pi) { - pi.playPortalSound(); pi.warp(120010000, "nt01"); - return true; +function enter(pi) { + pi.playPortalSound(); + pi.warp(120010000, "nt01"); + return true; } \ No newline at end of file diff --git a/scripts/portal/enter_td.js b/scripts/portal/enter_td.js index 1e5d569440..378be8614b 100644 --- a/scripts/portal/enter_td.js +++ b/scripts/portal/enter_td.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(600000000,"yn00"); + pi.playPortalSound(); + pi.warp(600000000, "yn00"); return true; } \ No newline at end of file diff --git a/scripts/portal/enterfourthDH.js b/scripts/portal/enterfourthDH.js index ff7579244a..53844c9a20 100644 --- a/scripts/portal/enterfourthDH.js +++ b/scripts/portal/enterfourthDH.js @@ -3,15 +3,15 @@ function enter(pi) { pi.playerMessage(5, "You already have the proof of ability."); return false; } - + if (pi.isQuestStarted(20611) || pi.isQuestStarted(20612) || pi.isQuestStarted(20613) || pi.isQuestStarted(20614) || pi.isQuestStarted(20615)) { if (pi.getPlayerCount(913020300) == 0) { var map = pi.getMap(913020300); map.killAllMonsters(); - + pi.playPortalSound(); pi.warp(913020300, 0); - pi.spawnMonster(9300294, 87,88); + pi.spawnMonster(9300294, 87, 88); return true; } else { pi.playerMessage(5, "Someone is already attempting to defeat the boss. Better come back later."); diff --git a/scripts/portal/enterthirdDH.js b/scripts/portal/enterthirdDH.js index d48f3ae041..69c05cd288 100644 --- a/scripts/portal/enterthirdDH.js +++ b/scripts/portal/enterthirdDH.js @@ -3,11 +3,12 @@ function enter(pi) { pi.playerMessage(5, "You already have the proof of qualification."); return false; } - if (pi.isQuestStarted(20601) || pi.isQuestStarted(20602) || pi.isQuestStarted(20603) || pi.isQuestStarted(20604) || pi.isQuestStarted(20605)) { + if (pi.isQuestStarted(20601) || pi.isQuestStarted(20602) || pi.isQuestStarted(20603) || pi.isQuestStarted(20604) || pi.isQuestStarted(20605)) { if (pi.getPlayerCount(913010200) == 0) { var map = pi.getMap(913010200); - map.killAllMonsters(); - pi.playPortalSound(); pi.warp(913010200, 0); + map.killAllMonsters(); + pi.playPortalSound(); + pi.warp(913010200, 0); pi.spawnMonster(9300289, 0, 0); return true; } else { @@ -15,7 +16,7 @@ function enter(pi) { return false; } } else { - pi.playerMessage(5, "The only way to enter the hall #3 is if you're training for the Level 100 skills."); + pi.playerMessage(5, "The only way to enter the hall #3 is if you're training for the Level 100 skills."); return false; } } \ No newline at end of file diff --git a/scripts/portal/entertraining.js b/scripts/portal/entertraining.js index 14f5f6c9c6..bc5f9fb896 100644 --- a/scripts/portal/entertraining.js +++ b/scripts/portal/entertraining.js @@ -1,15 +1,19 @@ function enter(pi) { - if (pi.isQuestStarted(1041)) { - pi.playPortalSound(); pi.warp(1010100, 4); - } else if (pi.isQuestStarted(1042)) { - pi.playPortalSound(); pi.warp(1010200, 4); - } else if (pi.isQuestStarted(1043)) { - pi.playPortalSound(); pi.warp(1010300, 4); - } else if (pi.isQuestStarted(1044)) { - pi.playPortalSound(); pi.warp(1010400, 4); - } else { - pi.message("Only the adventurers that have been trained by Mai may enter."); - return false; - } - return true; + if (pi.isQuestStarted(1041)) { + pi.playPortalSound(); + pi.warp(1010100, 4); + } else if (pi.isQuestStarted(1042)) { + pi.playPortalSound(); + pi.warp(1010200, 4); + } else if (pi.isQuestStarted(1043)) { + pi.playPortalSound(); + pi.warp(1010300, 4); + } else if (pi.isQuestStarted(1044)) { + pi.playPortalSound(); + pi.warp(1010400, 4); + } else { + pi.message("Only the adventurers that have been trained by Mai may enter."); + return false; + } + return true; } \ No newline at end of file diff --git a/scripts/portal/evanEntrance.js b/scripts/portal/evanEntrance.js index ddce568e35..e6da38e7cb 100644 --- a/scripts/portal/evanEntrance.js +++ b/scripts/portal/evanEntrance.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(100030400, "east00"); - return true; + pi.playPortalSound(); + pi.warp(100030400, "east00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evanFall.js b/scripts/portal/evanFall.js index b8101f0ab7..82dd5e612e 100644 --- a/scripts/portal/evanFall.js +++ b/scripts/portal/evanFall.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(900090102, 0); - return true; + pi.playPortalSound(); + pi.warp(900090102, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/evanFarmCT.js b/scripts/portal/evanFarmCT.js index 121b64bec1..7b10ef7121 100644 --- a/scripts/portal/evanFarmCT.js +++ b/scripts/portal/evanFarmCT.js @@ -1,8 +1,9 @@ function enter(pi) { - if(pi.isQuestStarted(22010) || pi.getPlayer().getJob().getId() != 2001) { - pi.playPortalSound(); pi.warp(100030310, 0); - } else { - pi.playerMessage(5, "Cannot enter the Lush Forest without a reason."); - } - return true; + if (pi.isQuestStarted(22010) || pi.getPlayer().getJob().getId() != 2001) { + pi.playPortalSound(); + pi.warp(100030310, 0); + } else { + pi.playerMessage(5, "Cannot enter the Lush Forest without a reason."); + } + return true; } \ No newline at end of file diff --git a/scripts/portal/evanGarden1.js b/scripts/portal/evanGarden1.js index bdcf42c565..eb35845818 100644 --- a/scripts/portal/evanGarden1.js +++ b/scripts/portal/evanGarden1.js @@ -1,8 +1,9 @@ function enter(pi) { - if(pi.isQuestStarted(22008)){ - pi.playPortalSound(); pi.warp(100030103, "west00"); - } else { - pi.playerMessage(5, "You cannot go to the Back Yard without a reason"); - } - return true; + if (pi.isQuestStarted(22008)) { + pi.playPortalSound(); + pi.warp(100030103, "west00"); + } else { + pi.playerMessage(5, "You cannot go to the Back Yard without a reason"); + } + return true; } \ No newline at end of file diff --git a/scripts/portal/evanRoom0.js b/scripts/portal/evanRoom0.js index 7077149e3e..cdadae80d2 100644 --- a/scripts/portal/evanRoom0.js +++ b/scripts/portal/evanRoom0.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22014, "mo30=o")) { - return false; - } - pi.updateAreaInfo(22014, "mo30=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon30"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22014, "mo30=o")) { + return false; + } + pi.updateAreaInfo(22014, "mo30=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon30"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evanRoom1.js b/scripts/portal/evanRoom1.js index c8a946cf01..755a2d35fa 100644 --- a/scripts/portal/evanRoom1.js +++ b/scripts/portal/evanRoom1.js @@ -1,12 +1,12 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "hand=o")) { - return false; - } - pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo20=o;hand=o;mo21=o"); - pi.sendImage("UI/tutorial/evan/0/0"); - pi.showIntro("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon70"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "hand=o")) { + return false; + } + pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo20=o;hand=o;mo21=o"); + pi.sendImage("UI/tutorial/evan/0/0"); + pi.showIntro("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon70"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk00.js b/scripts/portal/evantalk00.js index 08092bd435..261301824b 100644 --- a/scripts/portal/evantalk00.js +++ b/scripts/portal/evantalk00.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "mo00=o")) { - return false; - } - pi.updateAreaInfo(22013, "mo00=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon00"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "mo00=o")) { + return false; + } + pi.updateAreaInfo(22013, "mo00=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk01.js b/scripts/portal/evantalk01.js index 46f59ea97b..535ca3aecd 100644 --- a/scripts/portal/evantalk01.js +++ b/scripts/portal/evantalk01.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "mo01=o")) { - return false; - } - pi.updateAreaInfo(22013, "dt00=o;mo00=o;mo01=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon01"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "mo01=o")) { + return false; + } + pi.updateAreaInfo(22013, "dt00=o;mo00=o;mo01=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon01"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk02.js b/scripts/portal/evantalk02.js index 08bb244080..edd52956bd 100644 --- a/scripts/portal/evantalk02.js +++ b/scripts/portal/evantalk02.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "mo02=o")) { - return false; - } - pi.updateAreaInfo(22013, "dt00=o;mo00=o;mo01=o;mo02=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon02"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "mo02=o")) { + return false; + } + pi.updateAreaInfo(22013, "dt00=o;mo00=o;mo01=o;mo02=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon02"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk10.js b/scripts/portal/evantalk10.js index 113a7c3e0e..af59060755 100644 --- a/scripts/portal/evantalk10.js +++ b/scripts/portal/evantalk10.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "mo10=o")) { - return false; - } - pi.updateAreaInfo(22013, "dt00=o;mo00=o;mo01=o;mo10=0;mo02=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon10"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "mo10=o")) { + return false; + } + pi.updateAreaInfo(22013, "dt00=o;mo00=o;mo01=o;mo10=0;mo02=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon10"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk11.js b/scripts/portal/evantalk11.js index 2389d08884..52ce30a82e 100644 --- a/scripts/portal/evantalk11.js +++ b/scripts/portal/evantalk11.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "mo11=o")) { - return false; - } - pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo11=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon11"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "mo11=o")) { + return false; + } + pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo11=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon11"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk20.js b/scripts/portal/evantalk20.js index 890d5a23c2..7f102a517e 100644 --- a/scripts/portal/evantalk20.js +++ b/scripts/portal/evantalk20.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "mo20=o")) { - return false; - } - pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo11=o;mo20=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon20"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "mo20=o")) { + return false; + } + pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo11=o;mo20=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon20"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk21.js b/scripts/portal/evantalk21.js index dc0fdd9fb1..b922432efa 100644 --- a/scripts/portal/evantalk21.js +++ b/scripts/portal/evantalk21.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "mo21=o")) { - return false; - } - pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo11=o;mo20=o;mo21=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon21"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "mo21=o")) { + return false; + } + pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o;mo11=o;mo20=o;mo21=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon21"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk40.js b/scripts/portal/evantalk40.js index 558dbd9aa6..e82c3e7065 100644 --- a/scripts/portal/evantalk40.js +++ b/scripts/portal/evantalk40.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22014, "mo40=o")) { - return false; - } - pi.updateAreaInfo(22014, "mo30=o;mo40=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon40"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22014, "mo40=o")) { + return false; + } + pi.updateAreaInfo(22014, "mo30=o;mo40=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon40"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk41.js b/scripts/portal/evantalk41.js index f39ecff873..411251f019 100644 --- a/scripts/portal/evantalk41.js +++ b/scripts/portal/evantalk41.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22014, "mo41=o")) { - return false; - } - pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon41"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22014, "mo41=o")) { + return false; + } + pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon41"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk42.js b/scripts/portal/evantalk42.js index 026dcd27bf..3571cfc6a6 100644 --- a/scripts/portal/evantalk42.js +++ b/scripts/portal/evantalk42.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22014, "mo42=o")) { - return false; - } - pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o;mo42=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon42"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22014, "mo42=o")) { + return false; + } + pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o;mo42=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon42"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk50.js b/scripts/portal/evantalk50.js index 696d144b5c..69d559267f 100644 --- a/scripts/portal/evantalk50.js +++ b/scripts/portal/evantalk50.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22014, "mo50=o")) { - return false; - } - pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o;mo50=o;mo42=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon50"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22014, "mo50=o")) { + return false; + } + pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o;mo50=o;mo42=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon50"); + return true; } \ No newline at end of file diff --git a/scripts/portal/evantalk60.js b/scripts/portal/evantalk60.js index 391f99ed74..1791b3b175 100644 --- a/scripts/portal/evantalk60.js +++ b/scripts/portal/evantalk60.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22014, "mo60=o")) { - return false; - } - pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o;mo50=o;mo42=o;mo60=o"); - pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon60"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22014, "mo60=o")) { + return false; + } + pi.updateAreaInfo(22014, "mo30=o;mo40=o;mo41=o;mo50=o;mo42=o;mo60=o"); + pi.showInfo("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon60"); + return true; } \ No newline at end of file diff --git a/scripts/portal/exit_puppeteer.js b/scripts/portal/exit_puppeteer.js index 0b85698087..7ffdda8b8f 100644 --- a/scripts/portal/exit_puppeteer.js +++ b/scripts/portal/exit_puppeteer.js @@ -1,17 +1,16 @@ function enter(pi) { - if(pi.getMap().countMonster(9300285) > 0){ - pi.getPlayer().message("Defeat the Puppeteer before leaving."); - return false; - } - else{ - var eim = pi.getEventInstance(); - if(eim != null){ - eim.stopEventTimer(); - eim.dispose(); - } + if (pi.getMap().countMonster(9300285) > 0) { + pi.getPlayer().message("Defeat the Puppeteer before leaving."); + return false; + } else { + var eim = pi.getEventInstance(); + if (eim != null) { + eim.stopEventTimer(); + eim.dispose(); + } - pi.playPortalSound(); - pi.warp(105070300, 3); - return true; - } + pi.playPortalSound(); + pi.warp(105070300, 3); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/female00.js b/scripts/portal/female00.js index b9b91b43fb..3a9ebb9d31 100644 --- a/scripts/portal/female00.js +++ b/scripts/portal/female00.js @@ -21,11 +21,12 @@ */ function enter(pi) { /** - *female00.js - */ + *female00.js + */ var gender = pi.getPlayer().getGender(); if (gender == 1) { - pi.playPortalSound(); 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 c9532a08d5..5d889f783e 100644 --- a/scripts/portal/foxLaidy_map.js +++ b/scripts/portal/foxLaidy_map.js @@ -1,10 +1,14 @@ function enter(pi) { - if(!(pi.isQuestStarted(3647) && pi.haveItem(4031793, 1))) { - pi.playPortalSound(); pi.warp(222010200, "east00"); - } else { - if(!pi.isQuestStarted(23647)) pi.forceStartQuest(23647); - pi.playPortalSound(); pi.warp(922220000, "east00"); + if (!(pi.isQuestStarted(3647) && pi.haveItem(4031793, 1))) { + pi.playPortalSound(); + pi.warp(222010200, "east00"); + } else { + if (!pi.isQuestStarted(23647)) { + pi.forceStartQuest(23647); } - - return true; + pi.playPortalSound(); + pi.warp(922220000, "east00"); + } + + return true; } diff --git a/scripts/portal/gaga_success.js b/scripts/portal/gaga_success.js index c32a40e070..97a321772a 100644 --- a/scripts/portal/gaga_success.js +++ b/scripts/portal/gaga_success.js @@ -1,6 +1,7 @@ //Author: kevintjuh93 -function enter(pi) { - pi.playPortalSound(); pi.warp(922240100 + (pi.getPlayer().getMapId() - 922240000), 0); - return true; +function enter(pi) { + pi.playPortalSound(); + pi.warp(922240100 + (pi.getPlayer().getMapId() - 922240000), 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/gendergo.js b/scripts/portal/gendergo.js index 33aa7de45f..acfcaf98f3 100644 --- a/scripts/portal/gendergo.js +++ b/scripts/portal/gendergo.js @@ -1,8 +1,9 @@ function enter(pi) { var map = pi.getPlayer().getMap(); - if(pi.getPortal().getName() == "female00") { + if (pi.getPortal().getName() == "female00") { if (pi.getPlayer().getGender() == 1) { - pi.playPortalSound(); pi.warp(map.getId(), "female01"); + pi.playPortalSound(); + pi.warp(map.getId(), "female01"); return true; } else { pi.message("This portal leads to the girls' area, try the portal at the other side."); @@ -10,7 +11,8 @@ function enter(pi) { } } else { if (pi.getPlayer().getGender() == 0) { - pi.playPortalSound(); 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 e90cf6c901..a848e9359b 100644 --- a/scripts/portal/ghostgate_open.js +++ b/scripts/portal/ghostgate_open.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Sharen III's Grave Exit - Guild Quest @@ -27,10 +28,10 @@ Sharen III's Grave Exit - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("ghostgate").getState() == 1) { - pi.playPortalSound(); pi.warp(990000800, 0); + pi.playPortalSound(); + pi.warp(990000800, 0); return true; - } - else { + } else { pi.playerMessage(5, "This way forward is not open yet."); return false; } diff --git a/scripts/portal/glTutoMsg0.js b/scripts/portal/glTutoMsg0.js index 654801f495..65a8545a1d 100644 --- a/scripts/portal/glTutoMsg0.js +++ b/scripts/portal/glTutoMsg0.js @@ -19,10 +19,11 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - pi.showInstruction("Once you leave this area you won't be able to return.", 150, 5); - return true; +function enter(pi) { + pi.showInstruction("Once you leave this area you won't be able to return.", 150, 5); + return true; } \ No newline at end of file diff --git a/scripts/portal/glpqEnter.js b/scripts/portal/glpqEnter.js index eef09f35d9..dbfd4505f5 100644 --- a/scripts/portal/glpqEnter.js +++ b/scripts/portal/glpqEnter.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.haveItem(3992041, 1)) { - pi.playPortalSound(); 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."); + pi.playerMessage(5, "The giant gate of iron will not budge no matter what, however there is a visible key-shaped socket."); return false; } } \ No newline at end of file diff --git a/scripts/portal/glpqPortal0.js b/scripts/portal/glpqPortal0.js index 2f0d73d3ce..734567f89d 100644 --- a/scripts/portal/glpqPortal0.js +++ b/scripts/portal/glpqPortal0.js @@ -2,9 +2,10 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("glpq1") == 0) { pi.getEventInstance().dropMessage(5, "This path is currently blocked."); return false; - + } else { - pi.playPortalSound(); 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 059f44f674..24945509cb 100644 --- a/scripts/portal/glpqPortal00.js +++ b/scripts/portal/glpqPortal00.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 1) { - pi.playPortalSound(); pi.warp(610030510,0); + pi.playPortalSound(); + pi.warp(610030510, 0); return true; } else { - pi.playerMessage(5, "Only warriors may enter this portal."); + pi.playerMessage(5, "Only warriors may enter this portal."); return false; } } \ No newline at end of file diff --git a/scripts/portal/glpqPortal01.js b/scripts/portal/glpqPortal01.js index 1134cbd2a0..cad463c7bf 100644 --- a/scripts/portal/glpqPortal01.js +++ b/scripts/portal/glpqPortal01.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 3) { - pi.playPortalSound(); pi.warp(610030540,0); + pi.playPortalSound(); + pi.warp(610030540, 0); return true; } else { - pi.playerMessage(5, "Only bowmen may enter this portal."); + pi.playerMessage(5, "Only bowmen may enter this portal."); return false; } } \ No newline at end of file diff --git a/scripts/portal/glpqPortal02.js b/scripts/portal/glpqPortal02.js index d8c8f04c4b..f980485a6c 100644 --- a/scripts/portal/glpqPortal02.js +++ b/scripts/portal/glpqPortal02.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 2) { - pi.playPortalSound(); pi.warp(610030521,0); + pi.playPortalSound(); + pi.warp(610030521, 0); return true; } else { - pi.playerMessage(5, "Only mages may enter this portal."); + pi.playerMessage(5, "Only mages may enter this portal."); return false; } } \ No newline at end of file diff --git a/scripts/portal/glpqPortal03.js b/scripts/portal/glpqPortal03.js index 83a09b1958..fdae3f343c 100644 --- a/scripts/portal/glpqPortal03.js +++ b/scripts/portal/glpqPortal03.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 4) { - pi.playPortalSound(); pi.warp(610030530,0); + pi.playPortalSound(); + pi.warp(610030530, 0); return true; } else { - pi.playerMessage(5, "Only thieves may enter this portal."); + pi.playerMessage(5, "Only thieves may enter this portal."); return false; } } \ No newline at end of file diff --git a/scripts/portal/glpqPortal04.js b/scripts/portal/glpqPortal04.js index f6f401da97..16a6cf87c7 100644 --- a/scripts/portal/glpqPortal04.js +++ b/scripts/portal/glpqPortal04.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getPlayer().getJob().getJobNiche() == 5) { - pi.playPortalSound(); pi.warp(610030550,0); + pi.playPortalSound(); + pi.warp(610030550, 0); return true; } else { - pi.playerMessage(5, "Only pirates may enter this portal."); + pi.playerMessage(5, "Only pirates may enter this portal."); return false; } } \ No newline at end of file diff --git a/scripts/portal/glpqPortal1.js b/scripts/portal/glpqPortal1.js index 372c32cefa..85337aa3cd 100644 --- a/scripts/portal/glpqPortal1.js +++ b/scripts/portal/glpqPortal1.js @@ -1,14 +1,15 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { - if (eim.getIntProperty("glpq2") == 5) { - pi.playPortalSound(); pi.warp(610030300, 0); + if (eim.getIntProperty("glpq2") == 5) { + pi.playPortalSound(); + pi.warp(610030300, 0); return true; - } else { - pi.playerMessage(5, "The portal has not been activated yet!"); + } else { + pi.playerMessage(5, "The portal has not been activated yet!"); return false; - } + } } - + return false; } \ No newline at end of file diff --git a/scripts/portal/glpqPortal2.js b/scripts/portal/glpqPortal2.js index 5b006de231..b8c6ad33a9 100644 --- a/scripts/portal/glpqPortal2.js +++ b/scripts/portal/glpqPortal2.js @@ -1,30 +1,30 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { - pi.playPortalSound(); pi.warp(610030300, 0); - - if (eim.getIntProperty("glpq3") < 5 || eim.getIntProperty("glpq3_p") < 5) { - if(eim.getIntProperty("glpq3_p") == 5) { + pi.playPortalSound(); + pi.warp(610030300, 0); + + if (eim.getIntProperty("glpq3") < 5 || eim.getIntProperty("glpq3_p") < 5) { + if (eim.getIntProperty("glpq3_p") == 5) { pi.mapMessage(6, "Not all Sigils have been activated yet. Make sure they have all been activated to proceed to the next stage."); } else { eim.setIntProperty("glpq3_p", eim.getIntProperty("glpq3_p") + 1); - - if(eim.getIntProperty("glpq3") == 5 && eim.getIntProperty("glpq3_p") == 5) { + + if (eim.getIntProperty("glpq3") == 5 && eim.getIntProperty("glpq3_p") == 5) { pi.mapMessage(6, "The Antellion grants you access to the next portal! Proceed!"); - + eim.showClearEffect(610030300, "3pt", 2); eim.giveEventPlayersStageReward(3); } else { pi.mapMessage(6, "An adventurer has passed through! " + (5 - eim.getIntProperty("glpq3_p")) + " to go."); } } - } - else { + } else { pi.getPlayer().dropMessage(6, "The portal at the bottom has already been opened! Proceed there!"); } - + return true; } - + return false; } \ No newline at end of file diff --git a/scripts/portal/glpqPortal3.js b/scripts/portal/glpqPortal3.js index b1d0f6fc3e..978d3da6d9 100644 --- a/scripts/portal/glpqPortal3.js +++ b/scripts/portal/glpqPortal3.js @@ -1,14 +1,15 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { - if (eim.getIntProperty("glpq3") < 5 || eim.getIntProperty("glpq3_p") < 5) { - pi.playerMessage(5, "The portal is not opened yet."); + if (eim.getIntProperty("glpq3") < 5 || eim.getIntProperty("glpq3_p") < 5) { + pi.playerMessage(5, "The portal is not opened yet."); return false; - } else { - pi.playPortalSound(); pi.warp(610030400, 0); + } else { + pi.playPortalSound(); + pi.warp(610030400, 0); return true; - } + } } - + return false; } \ No newline at end of file diff --git a/scripts/portal/glpqPortal4.js b/scripts/portal/glpqPortal4.js index f16eb73759..dc8abb8280 100644 --- a/scripts/portal/glpqPortal4.js +++ b/scripts/portal/glpqPortal4.js @@ -1,14 +1,15 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { - if (eim.getIntProperty("glpq4") < 5){ - pi.playerMessage(5, "The portal is not opened yet."); + if (eim.getIntProperty("glpq4") < 5) { + pi.playerMessage(5, "The portal is not opened yet."); return false; - } else { - pi.playPortalSound(); pi.warp(610030500, 0); + } else { + pi.playPortalSound(); + pi.warp(610030500, 0); return true; - } + } } - + return false; } \ No newline at end of file diff --git a/scripts/portal/glpqPortal5.js b/scripts/portal/glpqPortal5.js index fa18933037..3d289f8147 100644 --- a/scripts/portal/glpqPortal5.js +++ b/scripts/portal/glpqPortal5.js @@ -1,14 +1,15 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { - if (eim.getIntProperty("glpq5") < 5){ - pi.playerMessage(5, "The portal is not opened yet."); + if (eim.getIntProperty("glpq5") < 5) { + pi.playerMessage(5, "The portal is not opened yet."); return false; - } else { - pi.playPortalSound(); pi.warp(610030600, 0); + } else { + pi.playPortalSound(); + pi.warp(610030600, 0); return true; - } + } } - + return false; } \ No newline at end of file diff --git a/scripts/portal/glpqPortal6.js b/scripts/portal/glpqPortal6.js index 297f22d770..f9d0578b3b 100644 --- a/scripts/portal/glpqPortal6.js +++ b/scripts/portal/glpqPortal6.js @@ -1,14 +1,15 @@ function enter(pi) { var eim = pi.getEventInstance(); if (eim != null) { - if (eim.getIntProperty("glpq6") < 3){ - pi.playerMessage(5, "The portal is not opened yet."); + if (eim.getIntProperty("glpq6") < 3) { + pi.playerMessage(5, "The portal is not opened yet."); return false; - } else { - pi.playPortalSound(); pi.warp(610030700, 0); + } else { + pi.playPortalSound(); + pi.warp(610030700, 0); return true; - } + } } - + return false; } \ No newline at end of file diff --git a/scripts/portal/glpqPortal7.js b/scripts/portal/glpqPortal7.js index 85030e0054..4bbcbee002 100644 --- a/scripts/portal/glpqPortal7.js +++ b/scripts/portal/glpqPortal7.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); 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 d2657f0173..2d35c647b9 100644 --- a/scripts/portal/glpqPortalDummy.js +++ b/scripts/portal/glpqPortalDummy.js @@ -1,20 +1,21 @@ function enter(pi) { var react = pi.getMap().getReactorByName("mob0"); - + if (react.getState() < 1) { react.forceHitReactor(1); - + var eim = pi.getEventInstance(); 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.playPortalSound(); pi.warp(610030100, 0); - + pi.playPortalSound(); + pi.warp(610030100, 0); + pi.getEventInstance().showClearEffect(); eim.giveEventPlayersStageReward(1); return true; } - + pi.getEventInstance().dropMessage(5, "The portal apparatus is malfunctional, due to the last transportation. The finding another way through."); return false; } \ No newline at end of file diff --git a/scripts/portal/go_secretroom.js b/scripts/portal/go_secretroom.js index e8c99de379..16fc9b2592 100644 --- a/scripts/portal/go_secretroom.js +++ b/scripts/portal/go_secretroom.js @@ -1,15 +1,15 @@ function enter(pi) { - if(!pi.isQuestCompleted(2335) && !(pi.isQuestStarted(2335) && pi.hasItem(4032405))){ - pi.getPlayer().message("The door is locked securely. I will need a key if I want to go in there."); - return false; - } + if (!pi.isQuestCompleted(2335) && !(pi.isQuestStarted(2335) && pi.hasItem(4032405))) { + pi.getPlayer().message("The door is locked securely. I will need a key if I want to go in there."); + return false; + } - if(pi.isQuestStarted(2335)){ - pi.forceCompleteQuest(2335, 1300002); - pi.giveCharacterExp(5000, pi.getPlayer()); - pi.gainItem(4032405, -1); - } - pi.playPortalSound(); - pi.warp(106021001, 1); - return true; + if (pi.isQuestStarted(2335)) { + pi.forceCompleteQuest(2335, 1300002); + pi.giveCharacterExp(5000, pi.getPlayer()); + pi.gainItem(4032405, -1); + } + pi.playPortalSound(); + pi.warp(106021001, 1); + return true; } \ No newline at end of file diff --git a/scripts/portal/gotocastle.js b/scripts/portal/gotocastle.js index a4603d74da..e3dd0458ec 100644 --- a/scripts/portal/gotocastle.js +++ b/scripts/portal/gotocastle.js @@ -1,6 +1,7 @@ function enter(pi) { if (pi.isQuestCompleted(2324)) { - pi.playPortalSound(); pi.warp(106020501,0); + pi.playPortalSound(); + pi.warp(106020501, 0); return true; } else { pi.playerMessage(5, "The path ahead is covered with sprawling vine thorns, only a Thorn Remover to clear this out..."); diff --git a/scripts/portal/gryphius.js b/scripts/portal/gryphius.js index d200454428..971b4c1724 100644 --- a/scripts/portal/gryphius.js +++ b/scripts/portal/gryphius.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(240020101, "out00"); - return true; + 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 2c77ec78ca..472ad1ed8c 100644 --- a/scripts/portal/guild1F00.js +++ b/scripts/portal/guild1F00.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Return from Sharen III's Grave - Guild Quest @@ -26,9 +27,10 @@ Return from Sharen III's Grave - Guild Quest */ function enter(pi) { - var backPortals = [6, 8, 9, 11]; - var idx = pi.getEventInstance().gridCheck(pi.getPlayer()); - - pi.playPortalSound(); pi.warp(990000600, backPortals[idx]); - return true; + var backPortals = [6, 8, 9, 11]; + var idx = pi.getEventInstance().gridCheck(pi.getPlayer()); + + 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 2ff090ff72..6da17a8971 100644 --- a/scripts/portal/guild1F01.js +++ b/scripts/portal/guild1F01.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Warp to Sharen III's Grave - Guild Quest Give guild points if holding appropriate item and not gained already @@ -28,7 +29,8 @@ Save location to return. */ function enter(pi) { - pi.getEventInstance().gridInsert(pi.getPlayer(), 0); - pi.playPortalSound(); pi.warp(990000700, "st00"); - return true; + pi.getEventInstance().gridInsert(pi.getPlayer(), 0); + pi.playPortalSound(); + pi.warp(990000700, "st00"); + return true; } diff --git a/scripts/portal/guild1F02.js b/scripts/portal/guild1F02.js index 8e77eab520..8cc9106393 100644 --- a/scripts/portal/guild1F02.js +++ b/scripts/portal/guild1F02.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Warp to Sharen III's Grave - Guild Quest Give guild points if holding appropriate item and not gained already @@ -28,7 +29,8 @@ Save location to return. */ function enter(pi) { - pi.getEventInstance().gridInsert(pi.getPlayer(), 1); - pi.playPortalSound(); pi.warp(990000700, "st00"); - return true; + pi.getEventInstance().gridInsert(pi.getPlayer(), 1); + pi.playPortalSound(); + pi.warp(990000700, "st00"); + return true; } diff --git a/scripts/portal/guild1F03.js b/scripts/portal/guild1F03.js index 3be6b4b139..00633a1812 100644 --- a/scripts/portal/guild1F03.js +++ b/scripts/portal/guild1F03.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Warp to Sharen III's Grave - Guild Quest Give guild points if holding appropriate item and not gained already @@ -28,7 +29,8 @@ Save location to return. */ function enter(pi) { - pi.getEventInstance().gridInsert(pi.getPlayer(), 3); - pi.playPortalSound(); pi.warp(990000700, "st00"); - return true; + pi.getEventInstance().gridInsert(pi.getPlayer(), 3); + pi.playPortalSound(); + pi.warp(990000700, "st00"); + return true; } diff --git a/scripts/portal/guild1F04.js b/scripts/portal/guild1F04.js index 85586fe3d8..b4db2a2c49 100644 --- a/scripts/portal/guild1F04.js +++ b/scripts/portal/guild1F04.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Warp to Sharen III's Grave - Guild Quest Give guild points if holding appropriate item and not gained already @@ -28,7 +29,8 @@ Save location to return. */ function enter(pi) { - pi.getEventInstance().gridInsert(pi.getPlayer(), 2); - pi.playPortalSound(); pi.warp(990000700, "st00"); - return true; + pi.getEventInstance().gridInsert(pi.getPlayer(), 2); + pi.playPortalSound(); + pi.warp(990000700, "st00"); + return true; } diff --git a/scripts/portal/guildwaitingenter.js b/scripts/portal/guildwaitingenter.js index 9b89a0128a..fa987fd9f0 100644 --- a/scripts/portal/guildwaitingenter.js +++ b/scripts/portal/guildwaitingenter.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @Author Lerk * @Author Ronan * @@ -26,17 +27,17 @@ */ function enter(pi) { - var entryTime = pi.getPlayer().getEventInstance().getProperty("entryTimestamp"); - var timeNow = Date.now(); - - var timeLeft = Math.ceil((entryTime - timeNow) / 1000); - - if(timeLeft <= 0) { - pi.playPortalSound(); pi.warp(990000100, 0); - return true; - } - else { //cannot proceed while allies can still enter - pi.playerMessage(5, "The portal will open in about " + timeLeft + " seconds."); - return false; - } + var entryTime = pi.getPlayer().getEventInstance().getProperty("entryTimestamp"); + var timeNow = Date.now(); + + var timeLeft = Math.ceil((entryTime - timeNow) / 1000); + + if (timeLeft <= 0) { + pi.playPortalSound(); + pi.warp(990000100, 0); + return true; + } else { //cannot proceed while allies can still enter + pi.playerMessage(5, "The portal will open in about " + timeLeft + " seconds."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/guildwaitingexit.js b/scripts/portal/guildwaitingexit.js index 28b400a265..7b237f14df 100644 --- a/scripts/portal/guildwaitingexit.js +++ b/scripts/portal/guildwaitingexit.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(101030104); - return true; + pi.playPortalSound(); + pi.warp(101030104); + return true; } \ No newline at end of file diff --git a/scripts/portal/guyfawkes0_esc.js b/scripts/portal/guyfawkes0_esc.js index 841eb4236c..3a7057bf7b 100644 --- a/scripts/portal/guyfawkes0_esc.js +++ b/scripts/portal/guyfawkes0_esc.js @@ -18,11 +18,12 @@ along with this program. If not, see . */ function enter(pi) { - if(pi.getEventInstance().getIntProperty("statusStg1") == 1) { - pi.playPortalSound(); pi.warp(674030200, 0); - return true; - } else { - pi.message("The tunnel is currently blocked."); - return false; - } + if (pi.getEventInstance().getIntProperty("statusStg1") == 1) { + pi.playPortalSound(); + pi.warp(674030200, 0); + return true; + } else { + pi.message("The tunnel is currently blocked."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/guyfawkes0_floor.js b/scripts/portal/guyfawkes0_floor.js index fbca14d691..3ed7625bf8 100644 --- a/scripts/portal/guyfawkes0_floor.js +++ b/scripts/portal/guyfawkes0_floor.js @@ -18,6 +18,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.warp(674030000, 0); - return true; + pi.warp(674030000, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/halloween_Omni1.js b/scripts/portal/halloween_Omni1.js index 93d7e2c2a8..db31f66965 100644 --- a/scripts/portal/halloween_Omni1.js +++ b/scripts/portal/halloween_Omni1.js @@ -20,6 +20,6 @@ along with this program. If not, see . */ function enter(pi) { - pi.playerMessage(5, "It seems to be locked."); - return true; + pi.playerMessage(5, "It seems to be locked."); + return true; } \ No newline at end of file diff --git a/scripts/portal/halloween_enter.js b/scripts/portal/halloween_enter.js index 598156c4fc..8e7dd1e96e 100644 --- a/scripts/portal/halloween_enter.js +++ b/scripts/portal/halloween_enter.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(682000100, "st00"); - return true; + pi.playPortalSound(); + pi.warp(682000100, "st00"); + return true; } diff --git a/scripts/portal/hontale_BR.js b/scripts/portal/hontale_BR.js index 637f7661bd..f4c98b55ba 100644 --- a/scripts/portal/hontale_BR.js +++ b/scripts/portal/hontale_BR.js @@ -20,22 +20,24 @@ along with this program. If not, see . */ function enter(pi) { - if (pi.getPlayer().getMapId() == 240060000) { - if(pi.getEventInstance().getIntProperty("defeatedHead") >= 1) { - pi.playPortalSound(); pi.warp(240060100, 0); - return true; - } else { - pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door."); - return false; - } - } else if (pi.getPlayer().getMapId() == 240060100) { - if(pi.getEventInstance().getIntProperty("defeatedHead") >= 2) { - pi.playPortalSound(); pi.warp(240060200, 0); - return true; - } else { - pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door."); - return false; - } - } - return false; + if (pi.getPlayer().getMapId() == 240060000) { + if (pi.getEventInstance().getIntProperty("defeatedHead") >= 1) { + pi.playPortalSound(); + pi.warp(240060100, 0); + return true; + } else { + pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door."); + return false; + } + } else if (pi.getPlayer().getMapId() == 240060100) { + if (pi.getEventInstance().getIntProperty("defeatedHead") >= 2) { + pi.playPortalSound(); + pi.warp(240060200, 0); + return true; + } else { + pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door."); + return false; + } + } + return false; } \ No newline at end of file diff --git a/scripts/portal/hontale_Bopen.js b/scripts/portal/hontale_Bopen.js index 2ca2ce3b7e..dbdabf0494 100644 --- a/scripts/portal/hontale_Bopen.js +++ b/scripts/portal/hontale_Bopen.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* The five caves * @author Jvlaple */ @@ -28,7 +29,7 @@ function enter(pi) { var target; var targetPortal; var avail; - + if (pi.getPlayer().getMapId() == 240050101) { nextMap = 240050102; eim = pi.getPlayer().getEventInstance(); @@ -45,8 +46,7 @@ function enter(pi) { pi.getPlayer().changeMap(target, targetPortal); return true; } - } - else if (pi.getPlayer().getMapId() == 240050102) { + } else if (pi.getPlayer().getMapId() == 240050102) { nextMap = 240050103; eim = pi.getPlayer().getEventInstance(); target = eim.getMapInstance(nextMap); @@ -62,8 +62,7 @@ function enter(pi) { pi.getPlayer().changeMap(target, targetPortal); return true; } - } - else if (pi.getPlayer().getMapId() == 240050103) { + } else if (pi.getPlayer().getMapId() == 240050103) { nextMap = 240050104; eim = pi.getPlayer().getEventInstance(); target = eim.getMapInstance(nextMap); @@ -79,8 +78,7 @@ function enter(pi) { pi.getPlayer().changeMap(target, targetPortal); return true; } - } - else if (pi.getPlayer().getMapId() == 240050104) { + } else if (pi.getPlayer().getMapId() == 240050104) { nextMap = 240050105; eim = pi.getPlayer().getEventInstance(); target = eim.getMapInstance(nextMap); @@ -96,13 +94,12 @@ function enter(pi) { pi.getPlayer().changeMap(target, targetPortal); return true; } - } - else if (pi.getPlayer().getMapId() == 240050105) { + } else if (pi.getPlayer().getMapId() == 240050105) { nextMap = 240050100; eim = pi.getPlayer().getEventInstance(); target = eim.getMapInstance(nextMap); targetPortal = target.getPortal("st00"); - + avail = eim.getProperty("5stageclear"); if (avail == null) { if (pi.haveItem(4001092) && pi.isEventLeader()) { diff --git a/scripts/portal/hontale_BtoB1.js b/scripts/portal/hontale_BtoB1.js index a4ee0920c4..0d284030aa 100644 --- a/scripts/portal/hontale_BtoB1.js +++ b/scripts/portal/hontale_BtoB1.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @Author Jvlaple */ @@ -27,12 +28,13 @@ function enter(pi) { if (pi.getMap().countPlayers() == 1) { pi.getPlayer().dropMessage(6, "As the last player on this map, you are compelled to wait for the incoming keys."); return false; - }else { - if(pi.haveItem(4001087)) { + } else { + if (pi.haveItem(4001087)) { pi.getPlayer().dropMessage(6, "You cannot pass to the next map holding the 1st Crystal Key in your inventory."); return false; } - pi.playPortalSound(); pi.warp(240050101, 0); + pi.playPortalSound(); + pi.warp(240050101, 0); return true; } } \ No newline at end of file diff --git a/scripts/portal/hontale_C.js b/scripts/portal/hontale_C.js index 3f6f08795b..ba447aa92f 100644 --- a/scripts/portal/hontale_C.js +++ b/scripts/portal/hontale_C.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Portal for the LightBulb Map... **hontale_c.js @@ -32,13 +33,13 @@ function enter(pi) { var theWay = pi.getMap().getReactorByName("light").getState(); if (theWay == 1) { target = 240050300; //light - } else if(theWay == 3) { + } else if (theWay == 3) { target = 240050310; //dark } else { pi.playerMessage(5, "Hit the Lightbulb to determine your fate!"); return false; } - + pi.playPortalSound(); eim.warpEventTeam(target); return true; diff --git a/scripts/portal/hontale_morph2.js b/scripts/portal/hontale_morph2.js index 0a88fe54f8..0f2f51c896 100644 --- a/scripts/portal/hontale_morph2.js +++ b/scripts/portal/hontale_morph2.js @@ -24,6 +24,7 @@ Leave the Cave of Life - Entrance Map and go back to the Peak of the Big Nest (2 */ function enter(pi) { - pi.playPortalSound(); pi.warp(240040600, 4); - return true; + pi.playPortalSound(); + pi.warp(240040600, 4); + return true; } diff --git a/scripts/portal/hontale_out1.js b/scripts/portal/hontale_out1.js index 1ff970056e..1d3b7a25d3 100644 --- a/scripts/portal/hontale_out1.js +++ b/scripts/portal/hontale_out1.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(240050400, "sp"); - return true; + pi.playPortalSound(); + pi.warp(240050400, "sp"); + return true; } \ No newline at end of file diff --git a/scripts/portal/in2159011.js b/scripts/portal/in2159011.js index 91a1167f64..fff665301b 100644 --- a/scripts/portal/in2159011.js +++ b/scripts/portal/in2159011.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.openNpc(2159011); - return true; + pi.openNpc(2159011); + return true; } \ No newline at end of file diff --git a/scripts/portal/inDragonEgg.js b/scripts/portal/inDragonEgg.js index 676ca05ab4..c4dfec31ec 100644 --- a/scripts/portal/inDragonEgg.js +++ b/scripts/portal/inDragonEgg.js @@ -1,9 +1,11 @@ function enter(pi) { - pi.playPortalSound(); - if(pi.isQuestStarted(22005)){ - pi.playPortalSound(); pi.warp(900020100, 0); - } else{ - pi.playPortalSound(); pi.warp(100030301, 0); + pi.playPortalSound(); + if (pi.isQuestStarted(22005)) { + pi.playPortalSound(); + pi.warp(900020100, 0); + } else { + pi.playPortalSound(); + pi.warp(100030301, 0); } - return true; + return true; } \ No newline at end of file diff --git a/scripts/portal/inERShip.js b/scripts/portal/inERShip.js index 3b8896caac..0dd0288d3a 100644 --- a/scripts/portal/inERShip.js +++ b/scripts/portal/inERShip.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(101000400, 2); - return true; + pi.playPortalSound(); + pi.warp(101000400, 2); + return true; } diff --git a/scripts/portal/inNix1.js b/scripts/portal/inNix1.js index 2650f98da5..39f433b440 100644 --- a/scripts/portal/inNix1.js +++ b/scripts/portal/inNix1.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); 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 9237524f66..e6496a14dc 100644 --- a/scripts/portal/inNix2.js +++ b/scripts/portal/inNix2.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); 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/infoAttack.js b/scripts/portal/infoAttack.js index d3fadb0bd3..b5f3222fec 100644 --- a/scripts/portal/infoAttack.js +++ b/scripts/portal/infoAttack.js @@ -1,7 +1,8 @@ function enter(pi) { - if (pi.isQuestStarted(1035)) - pi.showInfo("UI/tutorial.img/20"); + if (pi.isQuestStarted(1035)) { + pi.showInfo("UI/tutorial.img/20"); + } - pi.blockPortal(); - return true; + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/infoMinimap.js b/scripts/portal/infoMinimap.js index 2ebd0275ce..f4b5a75927 100644 --- a/scripts/portal/infoMinimap.js +++ b/scripts/portal/infoMinimap.js @@ -19,13 +19,15 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - if (pi.isQuestStarted(1031)) - pi.showInfo("UI/tutorial.img/25"); +function enter(pi) { + if (pi.isQuestStarted(1031)) { + pi.showInfo("UI/tutorial.img/25"); + } - pi.blockPortal(); - return true; + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/infoPickup.js b/scripts/portal/infoPickup.js index 04698dba20..795edaca61 100644 --- a/scripts/portal/infoPickup.js +++ b/scripts/portal/infoPickup.js @@ -19,13 +19,15 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - if (pi.isQuestStarted(1035)) - pi.showInfo("UI/tutorial.img/21"); +function enter(pi) { + if (pi.isQuestStarted(1035)) { + pi.showInfo("UI/tutorial.img/21"); + } pi.blockPortal(); - return true; + return true; } \ No newline at end of file diff --git a/scripts/portal/infoReactor.js b/scripts/portal/infoReactor.js index 5796725da2..d93471d232 100644 --- a/scripts/portal/infoReactor.js +++ b/scripts/portal/infoReactor.js @@ -19,15 +19,17 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - if (pi.isQuestCompleted(1008)) - pi.showInfo("UI/tutorial.img/22"); - else if (pi.isQuestCompleted(1020)) - pi.showInfo("UI/tutorial.img/27"); - +function enter(pi) { + if (pi.isQuestCompleted(1008)) { + pi.showInfo("UI/tutorial.img/22"); + } else if (pi.isQuestCompleted(1020)) { + pi.showInfo("UI/tutorial.img/27"); + } + pi.blockPortal(); return true; } \ No newline at end of file diff --git a/scripts/portal/infoSkill.js b/scripts/portal/infoSkill.js index c9c09ab073..8240319c70 100644 --- a/scripts/portal/infoSkill.js +++ b/scripts/portal/infoSkill.js @@ -19,13 +19,15 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* @author kevintjuh93 */ -function enter(pi) { - if (pi.isQuestCompleted(1035)) - pi.showInfo("UI/tutorial.img/23"); - +function enter(pi) { + if (pi.isQuestCompleted(1035)) { + pi.showInfo("UI/tutorial.img/23"); + } + pi.blockPortal(); - return true; + return true; } \ No newline at end of file diff --git a/scripts/portal/infoWorldmap.js b/scripts/portal/infoWorldmap.js index 0943e19cac..88c0bc3911 100644 --- a/scripts/portal/infoWorldmap.js +++ b/scripts/portal/infoWorldmap.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.showInfo("UI/tutorial.img/26"); - pi.blockPortal(); - return true; + pi.showInfo("UI/tutorial.img/26"); + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/jail_in.js b/scripts/portal/jail_in.js index 36f7c8989d..c428ed930a 100644 --- a/scripts/portal/jail_in.js +++ b/scripts/portal/jail_in.js @@ -1,9 +1,10 @@ /** * @author: Ronan * @event: Jail - visit to jail :3 -*/ + */ function enter(pi) { - pi.playPortalSound(); 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 809125732d..03952617e3 100644 --- a/scripts/portal/jail_out.js +++ b/scripts/portal/jail_out.js @@ -1,21 +1,21 @@ /** * @author: Ronan * @event: Jail -*/ + */ function enter(pi) { - var jailedTime = pi.getJailTimeLeft(); - - if(jailedTime <= 0) { - pi.playPortalSound(); pi.warp(300000010,"in01"); - return true; - } - else { - var seconds = Math.floor(jailedTime / 1000) % 60 ; - var minutes = (Math.floor(jailedTime / (1000*60)) % 60); - 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; - } + var jailedTime = pi.getJailTimeLeft(); + + if (jailedTime <= 0) { + pi.playPortalSound(); + pi.warp(300000010, "in01"); + return true; + } else { + var seconds = Math.floor(jailedTime / 1000) % 60; + var minutes = (Math.floor(jailedTime / (1000 * 60)) % 60); + 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; + } } \ No newline at end of file diff --git a/scripts/portal/jnr12_in.js b/scripts/portal/jnr12_in.js index 9e96231796..43cdfb9880 100644 --- a/scripts/portal/jnr12_in.js +++ b/scripts/portal/jnr12_in.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(926110401, 0); //next + 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 99f5ae23ca..f9b3dc528b 100644 --- a/scripts/portal/jnr1_out.js +++ b/scripts/portal/jnr1_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg2") == 1) { - pi.playPortalSound(); pi.warp(926110100, 0); //next + pi.playPortalSound(); + pi.warp(926110100, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr1_pt00.js b/scripts/portal/jnr1_pt00.js index 476359bf18..25a8cdfd52 100644 --- a/scripts/portal/jnr1_pt00.js +++ b/scripts/portal/jnr1_pt00.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg1") == 1) { - pi.playPortalSound(); pi.warp(926110001, 0); //next + pi.playPortalSound(); + pi.warp(926110001, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr2_out.js b/scripts/portal/jnr2_out.js index a9ab3396f3..4f7698e220 100644 --- a/scripts/portal/jnr2_out.js +++ b/scripts/portal/jnr2_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg3") == 3) { - pi.playPortalSound(); pi.warp(926110200, 0); //next + pi.playPortalSound(); + pi.warp(926110200, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr3_in0.js b/scripts/portal/jnr3_in0.js index d20c19b1b6..b969c42856 100644 --- a/scripts/portal/jnr3_in0.js +++ b/scripts/portal/jnr3_in0.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr3_out1").getState() == 1) { - pi.playPortalSound(); pi.warp(926110201, 0); + pi.playPortalSound(); + pi.warp(926110201, 0); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr3_in1.js b/scripts/portal/jnr3_in1.js index a74df3bd55..b473c51f73 100644 --- a/scripts/portal/jnr3_in1.js +++ b/scripts/portal/jnr3_in1.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr3_out2").getState() == 1) { - pi.playPortalSound(); pi.warp(926110202, 0); + pi.playPortalSound(); + pi.warp(926110202, 0); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr3_out.js b/scripts/portal/jnr3_out.js index fe3c908dea..a41ec85753 100644 --- a/scripts/portal/jnr3_out.js +++ b/scripts/portal/jnr3_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr3_out3").getState() == 1) { - pi.playPortalSound(); pi.warp(926110203, 0); //next + pi.playPortalSound(); + pi.warp(926110203, 0); //next return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r1.js b/scripts/portal/jnr4_r1.js index 2a0e8f5455..cdb3f49c6b 100644 --- a/scripts/portal/jnr4_r1.js +++ b/scripts/portal/jnr4_r1.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 0; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926110301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r2.js b/scripts/portal/jnr4_r2.js index e3e7d8cde5..1eef1cdae3 100644 --- a/scripts/portal/jnr4_r2.js +++ b/scripts/portal/jnr4_r2.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 1; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926110301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r3.js b/scripts/portal/jnr4_r3.js index b006c3848a..763ea497b8 100644 --- a/scripts/portal/jnr4_r3.js +++ b/scripts/portal/jnr4_r3.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 2; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926110301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr4_r4.js b/scripts/portal/jnr4_r4.js index 4ac7b6944a..d408b4d9b8 100644 --- a/scripts/portal/jnr4_r4.js +++ b/scripts/portal/jnr4_r4.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 3; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926110301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926110301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr5_rp.js b/scripts/portal/jnr5_rp.js index c58aa88c9d..b77d06e5ef 100644 --- a/scripts/portal/jnr5_rp.js +++ b/scripts/portal/jnr5_rp.js @@ -24,11 +24,11 @@ function enter(pi) { var mapplayer = "stage6_comb" + (pi.getMapId() % 10); var eim = pi.getEventInstance(); - - if(eim.getProperty(mapplayer) == null) { + + if (eim.getProperty(mapplayer) == null) { var comb = ""; - for(var i = 0; i < 10; i++) { + for (var i = 0; i < 10; i++) { var r = Math.floor((Math.random() * 4)); comb += r.toString(); } @@ -37,29 +37,32 @@ function enter(pi) { } var comb = eim.getProperty(mapplayer); - + var name = pi.getPortal().getName().substring(2, 4); var portalId = parseInt(name, 10); - - + + var pRow = Math.floor(portalId / 10); var pCol = (portalId % 10); - + if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb - if(pRow < 9) { - pi.playPortalSound(); pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); + if (pRow < 9) { + pi.playPortalSound(); + pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); } else { - if(eim.getIntProperty("statusStg6") == 0) { + if (eim.getIntProperty("statusStg6") == 0) { eim.setIntProperty("statusStg6", 1); eim.giveEventPlayersStageReward(6); } - - pi.playPortalSound(); pi.warp(pi.getMapId(), 1); + + pi.playPortalSound(); + pi.warp(pi.getMapId(), 1); } - + } else { //fail - pi.playPortalSound(); pi.warp(pi.getMapId(), 2); + pi.playPortalSound(); + pi.warp(pi.getMapId(), 2); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/jnr6_out.js b/scripts/portal/jnr6_out.js index aec7e9956a..7587759b12 100644 --- a/scripts/portal/jnr6_out.js +++ b/scripts/portal/jnr6_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr6_out").getState() == 1) { - pi.playPortalSound(); pi.warp(926110300, 0); + pi.playPortalSound(); + pi.warp(926110300, 0); return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); 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 e6d9e0f395..57a4278284 100644 --- a/scripts/portal/jnr_201_0.js +++ b/scripts/portal/jnr_201_0.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr31_out").getState() == 1) { - pi.playPortalSound(); pi.warp(926110200, 1); + pi.playPortalSound(); + pi.warp(926110200, 1); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr_202.js b/scripts/portal/jnr_202.js index d8c57297ac..d6aa456135 100644 --- a/scripts/portal/jnr_202.js +++ b/scripts/portal/jnr_202.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("jnr32_out").getState() == 1) { - pi.playPortalSound(); pi.warp(926110200, 2); + pi.playPortalSound(); + pi.warp(926110200, 2); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/jnr_exit.js b/scripts/portal/jnr_exit.js index 0c6ed6d674..681747447a 100644 --- a/scripts/portal/jnr_exit.js +++ b/scripts/portal/jnr_exit.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(261000021, 0); + 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 957efcc188..179d92ac17 100644 --- a/scripts/portal/kinggate2_open.js +++ b/scripts/portal/kinggate2_open.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 5: Door before Ergoth - Guild Quest @@ -27,13 +28,13 @@ Stage 5: Door before Ergoth - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("kinggate").getState() == 1) { - pi.playPortalSound(); 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"); } return true; - } - else { + } else { pi.playerMessage(5, "This crack appears to be blocked off by the door nearby."); return false; } diff --git a/scripts/portal/kinggate_open.js b/scripts/portal/kinggate_open.js index 4078db09f0..19aa9f4321 100644 --- a/scripts/portal/kinggate_open.js +++ b/scripts/portal/kinggate_open.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 5: Door before Ergoth - Guild Quest @@ -27,13 +28,13 @@ Stage 5: Door before Ergoth - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("kinggate").getState() == 1) { - pi.playPortalSound(); 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"); } return true; - } - else { + } else { pi.playerMessage(5, "This door is closed."); return false; } diff --git a/scripts/portal/kpq0.js b/scripts/portal/kpq0.js index 18112930d3..3598f916ca 100644 --- a/scripts/portal/kpq0.js +++ b/scripts/portal/kpq0.js @@ -31,8 +31,7 @@ function enter(pi) { pi.playPortalSound(); pi.getPlayer().changeMap(target, target.getPortal("st00")); return true; - } - else { + } else { pi.getPlayer().dropMessage(5, "The portal is not opened yet."); return false; } diff --git a/scripts/portal/kpq1.js b/scripts/portal/kpq1.js index b41259baf6..df1f0cbefc 100644 --- a/scripts/portal/kpq1.js +++ b/scripts/portal/kpq1.js @@ -31,8 +31,7 @@ function enter(pi) { pi.playPortalSound(); pi.getPlayer().changeMap(target, target.getPortal("st00")); return true; - } - else { + } else { pi.getPlayer().dropMessage(5, "The portal is not opened yet."); return false; } diff --git a/scripts/portal/kpq2.js b/scripts/portal/kpq2.js index 9e95c3bfb7..d991407769 100644 --- a/scripts/portal/kpq2.js +++ b/scripts/portal/kpq2.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Kerning PQ: 3rd stage to 4th stage portal */ @@ -30,8 +31,7 @@ function enter(pi) { pi.playPortalSound(); pi.getPlayer().changeMap(target, target.getPortal("st00")); return true; - } - else { + } else { pi.getPlayer().dropMessage(5, "The portal is not opened yet."); return false; } diff --git a/scripts/portal/kpq3.js b/scripts/portal/kpq3.js index 9a57b83573..9756ed5069 100644 --- a/scripts/portal/kpq3.js +++ b/scripts/portal/kpq3.js @@ -20,6 +20,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Kerning PQ: 4th stage to last stage portal */ @@ -31,8 +32,7 @@ function enter(pi) { pi.playPortalSound(); pi.getPlayer().changeMap(target, target.getPortal("st00")); return true; - } - else { + } else { pi.getPlayer().dropMessage(5, "The portal is not opened yet."); return false; } diff --git a/scripts/portal/kpq4.js b/scripts/portal/kpq4.js index 940f3c388d..94b7d2cd00 100644 --- a/scripts/portal/kpq4.js +++ b/scripts/portal/kpq4.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Kerning PQ: last stage to bonus stage portal */ @@ -30,8 +31,7 @@ function enter(pi) { pi.playPortalSound(); pi.getPlayer().changeMap(target, target.getPortal("st00")); return true; - } - else { + } else { pi.getPlayer().dropMessage(5, "The portal is not opened yet."); return false; } diff --git a/scripts/portal/lionCastle_enter.js b/scripts/portal/lionCastle_enter.js index efdc31b6d9..fcfcf2eea6 100644 --- a/scripts/portal/lionCastle_enter.js +++ b/scripts/portal/lionCastle_enter.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(211060010, "west00"); - return true; + pi.playPortalSound(); + pi.warp(211060010, "west00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/lpq0.js b/scripts/portal/lpq0.js index 1d0ee1c6e2..6ad55cace2 100644 --- a/scripts/portal/lpq0.js +++ b/scripts/portal/lpq0.js @@ -33,8 +33,7 @@ function enter(pi) { if (avail == null) { pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); return false; - } - else { + } else { pi.playPortalSound(); pi.getPlayer().changeMap(target, targetPortal); return true; diff --git a/scripts/portal/lpq1.js b/scripts/portal/lpq1.js index 3ad14c4a3d..e2391caba0 100644 --- a/scripts/portal/lpq1.js +++ b/scripts/portal/lpq1.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* LudiPQ - 1 - 2 Portal @author Jvlaple @@ -33,8 +34,7 @@ function enter(pi) { if (avail == null) { pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); return false; - } - else { + } else { pi.playPortalSound(); pi.getPlayer().changeMap(target, targetPortal); return true; diff --git a/scripts/portal/lpq2.js b/scripts/portal/lpq2.js index 7833a35095..77c55517c9 100644 --- a/scripts/portal/lpq2.js +++ b/scripts/portal/lpq2.js @@ -18,26 +18,26 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* LudiPQ - 1 - 2 Portal @author Jvlaple */ function enter(pi) { - var nextMap = 922010400; - var eim = pi.getPlayer().getEventInstance(); - var target = eim.getMapInstance(nextMap); - var targetPortal = target.getPortal("st00"); - // only let people through if the eim is ready - var avail = eim.getProperty("3stageclear"); - if (avail == null) { - // can't go thru eh? - pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); - return false; - } - else { - pi.playPortalSound(); - pi.getPlayer().changeMap(target, targetPortal); - return true; - } + var nextMap = 922010400; + var eim = pi.getPlayer().getEventInstance(); + var target = eim.getMapInstance(nextMap); + var targetPortal = target.getPortal("st00"); + // only let people through if the eim is ready + var avail = eim.getProperty("3stageclear"); + if (avail == null) { + // can't go thru eh? + pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); + return false; + } else { + pi.playPortalSound(); + pi.getPlayer().changeMap(target, targetPortal); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/lpq3.js b/scripts/portal/lpq3.js index 7182a41bba..2037de43aa 100644 --- a/scripts/portal/lpq3.js +++ b/scripts/portal/lpq3.js @@ -18,26 +18,26 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* LudiPQ - 1 - 2 Portal @author Jvlaple */ function enter(pi) { - var nextMap = 922010500; - var eim = pi.getPlayer().getEventInstance(); - var target = eim.getMapInstance(nextMap); - var targetPortal = target.getPortal("st00"); - // only let people through if the eim is ready - var avail = eim.getProperty("4stageclear"); - if (avail == null) { - // can't go thru eh? - pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); - return false; - } - else { - pi.playPortalSound(); - pi.getPlayer().changeMap(target, targetPortal); - return true; - } + var nextMap = 922010500; + var eim = pi.getPlayer().getEventInstance(); + var target = eim.getMapInstance(nextMap); + var targetPortal = target.getPortal("st00"); + // only let people through if the eim is ready + var avail = eim.getProperty("4stageclear"); + if (avail == null) { + // can't go thru eh? + pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); + return false; + } else { + pi.playPortalSound(); + pi.getPlayer().changeMap(target, targetPortal); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/lpq4.js b/scripts/portal/lpq4.js index 3ac0e0256e..dc21c3c86d 100644 --- a/scripts/portal/lpq4.js +++ b/scripts/portal/lpq4.js @@ -18,26 +18,26 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* LudiPQ - 1 - 2 Portal @author Jvlaple */ function enter(pi) { - var nextMap = 922010600; - var eim = pi.getPlayer().getEventInstance(); - var target = eim.getMapInstance(nextMap); - var targetPortal = target.getPortal("st00"); - // only let people through if the eim is ready - var avail = eim.getProperty("5stageclear"); - if (avail == null) { - // can't go thru eh? - pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); - return false; - } - else { - pi.playPortalSound(); - pi.getPlayer().changeMap(target, targetPortal); - return true; - } + var nextMap = 922010600; + var eim = pi.getPlayer().getEventInstance(); + var target = eim.getMapInstance(nextMap); + var targetPortal = target.getPortal("st00"); + // only let people through if the eim is ready + var avail = eim.getProperty("5stageclear"); + if (avail == null) { + // can't go thru eh? + pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); + return false; + } else { + pi.playPortalSound(); + pi.getPlayer().changeMap(target, targetPortal); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/lpq5.js b/scripts/portal/lpq5.js index 2320535d2c..e9c488d1d0 100644 --- a/scripts/portal/lpq5.js +++ b/scripts/portal/lpq5.js @@ -25,23 +25,22 @@ LudiPQ - 1 - 2 Portal */ function enter(pi) { - var nextMap = 922010700; - var eim = pi.getPlayer().getEventInstance(); - var target = eim.getMapInstance(nextMap); - var targetPortal = target.getPortal("st00"); - // only let people through if the eim is ready - var avail = eim.getProperty("5stageclear"); - if (avail == null) { - // can't go thru eh? - pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); - return false; + var nextMap = 922010700; + var eim = pi.getPlayer().getEventInstance(); + var target = eim.getMapInstance(nextMap); + var targetPortal = target.getPortal("st00"); + // only let people through if the eim is ready + var avail = eim.getProperty("5stageclear"); + if (avail == null) { + // can't go thru eh? + pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); + return false; + } else { + if (eim.getProperty("6stageclear") == null) { + eim.setProperty("6stageclear", "true"); } - else { - if(eim.getProperty("6stageclear") == null) { - eim.setProperty("6stageclear", "true"); - } - pi.playPortalSound(); - pi.getPlayer().changeMap(target, targetPortal); - return true; - } + pi.playPortalSound(); + pi.getPlayer().changeMap(target, targetPortal); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/lpq6.js b/scripts/portal/lpq6.js index 0d80d7a111..cabcc421c9 100644 --- a/scripts/portal/lpq6.js +++ b/scripts/portal/lpq6.js @@ -24,12 +24,13 @@ Ludi PQ: 5th stage to 6th stage portal */ function enter(pi) { - var eim = pi.getPlayer().getEventInstance(); - var target = eim.getMapInstance(922010800); - if (eim.getProperty("7stageclear") != null) { - pi.playPortalSound(); - pi.getPlayer().changeMap(target, target.getPortal("st00")); - return true; - } else - return false; + var eim = pi.getPlayer().getEventInstance(); + var target = eim.getMapInstance(922010800); + if (eim.getProperty("7stageclear") != null) { + pi.playPortalSound(); + pi.getPlayer().changeMap(target, target.getPortal("st00")); + return true; + } else { + return false; + } } \ No newline at end of file diff --git a/scripts/portal/lpq7.js b/scripts/portal/lpq7.js index 4d37be40c2..f0f03d2865 100644 --- a/scripts/portal/lpq7.js +++ b/scripts/portal/lpq7.js @@ -25,20 +25,19 @@ LudiPQ - 1 - 2 Portal */ function enter(pi) { - var nextMap = 922010900; - var eim = pi.getPlayer().getEventInstance(); - var target = eim.getMapInstance(nextMap); - var targetPortal = target.getPortal("st00"); - // only let people through if the eim is ready - var avail = eim.getProperty("8stageclear"); - if (avail == null) { - // can't go thru eh? - pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); - return false; - } - else { - pi.playPortalSound(); - pi.getPlayer().changeMap(target, targetPortal); - return true; - } + var nextMap = 922010900; + var eim = pi.getPlayer().getEventInstance(); + var target = eim.getMapInstance(nextMap); + var targetPortal = target.getPortal("st00"); + // only let people through if the eim is ready + var avail = eim.getProperty("8stageclear"); + if (avail == null) { + // can't go thru eh? + pi.getPlayer().dropMessage(5, "Some seal is blocking this door."); + return false; + } else { + pi.playPortalSound(); + pi.getPlayer().changeMap(target, targetPortal); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/magatia_alc0.js b/scripts/portal/magatia_alc0.js index 15fafa8d42..81393c27ae 100644 --- a/scripts/portal/magatia_alc0.js +++ b/scripts/portal/magatia_alc0.js @@ -19,11 +19,13 @@ */ function enter(pi) { - if(!pi.isQuestStarted(3309) || pi.haveItem(4031708, 1)) { - pi.playPortalSound(); pi.warp(261020700, "down00"); - } else { - pi.playPortalSound(); pi.warp(926120000, "out00"); - } - - return true; + if (!pi.isQuestStarted(3309) || pi.haveItem(4031708, 1)) { + pi.playPortalSound(); + pi.warp(261020700, "down00"); + } else { + pi.playPortalSound(); + pi.warp(926120000, "out00"); + } + + return true; } \ No newline at end of file diff --git a/scripts/portal/magatia_dark0.js b/scripts/portal/magatia_dark0.js index a27ed95f40..1ea1b622f3 100644 --- a/scripts/portal/magatia_dark0.js +++ b/scripts/portal/magatia_dark0.js @@ -20,8 +20,9 @@ along with this program. If not, see . */ function enter(pi) { - if(pi.isQuestCompleted(7770)) { - pi.playPortalSound(); pi.warp(926130000, "out00"); + if (pi.isQuestCompleted(7770)) { + 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 8330313608..52abb8e30b 100644 --- a/scripts/portal/male00.js +++ b/scripts/portal/male00.js @@ -21,11 +21,12 @@ */ function enter(pi) { /** - *Male00.js - */ + *Male00.js + */ var gender = pi.getPlayer().getGender(); if (gender == 0) { - pi.playPortalSound(); 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 053182a1d1..1dda1ca0d0 100644 --- a/scripts/portal/mapleMarket7_out.js +++ b/scripts/portal/mapleMarket7_out.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 79d428d429..a41a1be05c 100644 --- a/scripts/portal/market00.js +++ b/scripts/portal/market00.js @@ -22,9 +22,11 @@ function enter(pi) { try { var toMap = pi.getPlayer().getSavedLocation("FREE_MARKET"); - pi.playPortalSound(); pi.warp(toMap, pi.getMarketPortalId(toMap)); - } catch(err) { - pi.playPortalSound(); pi.warp(100000000, 0); + pi.playPortalSound(); + pi.warp(toMap, pi.getMarketPortalId(toMap)); + } catch (err) { + 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market01.js +++ b/scripts/portal/market01.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market02.js +++ b/scripts/portal/market02.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market03.js +++ b/scripts/portal/market03.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market04.js +++ b/scripts/portal/market04.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market05.js +++ b/scripts/portal/market05.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market06.js +++ b/scripts/portal/market06.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market07.js +++ b/scripts/portal/market07.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market08.js +++ b/scripts/portal/market08.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market09.js +++ b/scripts/portal/market09.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market10.js +++ b/scripts/portal/market10.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market11.js +++ b/scripts/portal/market11.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market12.js +++ b/scripts/portal/market12.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market13.js +++ b/scripts/portal/market13.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market14.js +++ b/scripts/portal/market14.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market15.js +++ b/scripts/portal/market15.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market16.js +++ b/scripts/portal/market16.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market17.js +++ b/scripts/portal/market17.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market18.js +++ b/scripts/portal/market18.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 fdf807f34e..f8e197b3b6 100644 --- a/scripts/portal/market19.js +++ b/scripts/portal/market19.js @@ -22,7 +22,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market20.js +++ b/scripts/portal/market20.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market21.js +++ b/scripts/portal/market21.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market22.js +++ b/scripts/portal/market22.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market23.js +++ b/scripts/portal/market23.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market24.js +++ b/scripts/portal/market24.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market26.js +++ b/scripts/portal/market26.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market52.js +++ b/scripts/portal/market52.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market53.js +++ b/scripts/portal/market53.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market54.js +++ b/scripts/portal/market54.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market55.js +++ b/scripts/portal/market55.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 dcfaec1b4d..9b3224fe72 100644 --- a/scripts/portal/market56.js +++ b/scripts/portal/market56.js @@ -1,7 +1,8 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 910000000) { pi.getPlayer().saveLocation("FREE_MARKET"); - pi.playPortalSound(); 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 b7be6855f3..926e351486 100644 --- a/scripts/portal/mayong.js +++ b/scripts/portal/mayong.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(240020401, "out00"); - return true; + pi.playPortalSound(); + pi.warp(240020401, "out00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/met_in.js b/scripts/portal/met_in.js index 10b8ec87b3..d3570a6d85 100644 --- a/scripts/portal/met_in.js +++ b/scripts/portal/met_in.js @@ -1,6 +1,7 @@ function enter(pi) { - //pi.warp(910320000, 2); event not implemented - - pi.playPortalSound(); pi.warp(103000103, 1); - return true; + //pi.warp(910320000, 2); event not implemented + + 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 e20c518cfc..aa57339442 100644 --- a/scripts/portal/met_out.js +++ b/scripts/portal/met_out.js @@ -18,17 +18,21 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 -*/ +*/ function enter(pi) { var mapId = pi.getPlayer().getSavedLocation("MIRROR"); - + pi.playPortalSound(); - if(mapId == -1) pi.warp(102040000, 12); - else pi.warp(mapId); - + if (mapId == -1) { + pi.warp(102040000, 12); + } else { + pi.warp(mapId); + } + //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 4b39d221f6..432a8004c5 100644 --- a/scripts/portal/metalgate_open.js +++ b/scripts/portal/metalgate_open.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 2: Door guard by Dark Muscle Golems - Guild Quest @@ -27,7 +28,8 @@ Stage 2: Door guard by Dark Muscle Golems - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("metalgate").getState() == 1) { - pi.playPortalSound(); 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/metro_Chat00.js b/scripts/portal/metro_Chat00.js index 1759a1e9f1..047d808497 100644 --- a/scripts/portal/metro_Chat00.js +++ b/scripts/portal/metro_Chat00.js @@ -1,4 +1,4 @@ function enter(pi) { pi.showWZEffect("Effect/Direction2.img/metro/Im"); - return true; + return true; } \ No newline at end of file diff --git a/scripts/portal/metro_in00.js b/scripts/portal/metro_in00.js index 986dc066f1..feb0c6f48f 100644 --- a/scripts/portal/metro_in00.js +++ b/scripts/portal/metro_in00.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.openNpc(1052115); - return true; + pi.openNpc(1052115); + return true; } \ No newline at end of file diff --git a/scripts/portal/minar_elli.js b/scripts/portal/minar_elli.js index e71356e9d0..83c7d5bc7c 100644 --- a/scripts/portal/minar_elli.js +++ b/scripts/portal/minar_elli.js @@ -20,17 +20,19 @@ along with this program. If not, see . */ function enter(pi) { - if (!pi.haveItem(4031346)) { + if (!pi.haveItem(4031346)) { pi.getPlayer().dropMessage(6, "You need a magic seed to use this portal."); return false; - } + } if (pi.getPlayer().getMapId() == 240010100) { pi.gainItem(4031346, -1); - pi.playPortalSound(); pi.warp(101010000, "minar00"); + pi.playPortalSound(); + pi.warp(101010000, "minar00"); return true; } else if (pi.getPlayer().getMapId() == 101010000) { pi.gainItem(4031346, -1); - pi.playPortalSound(); 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 bc80b6229a..a921005219 100644 --- a/scripts/portal/minar_job4.js +++ b/scripts/portal/minar_job4.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(240010501, "out00"); + pi.playPortalSound(); + pi.warp(240010501, "out00"); return true; } \ No newline at end of file diff --git a/scripts/portal/mirtalk00.js b/scripts/portal/mirtalk00.js index 81aab3f7b8..618dfb66fe 100644 --- a/scripts/portal/mirtalk00.js +++ b/scripts/portal/mirtalk00.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "dt00=o")) { - return false; - } - pi.mapEffect("evan/dragonTalk00"); - pi.updateAreaInfo(22013, "dt00=o;mo00=o"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "dt00=o")) { + return false; + } + pi.mapEffect("evan/dragonTalk00"); + pi.updateAreaInfo(22013, "dt00=o;mo00=o"); + return true; } \ No newline at end of file diff --git a/scripts/portal/mirtalk01.js b/scripts/portal/mirtalk01.js index e7c238f9d6..280af1b158 100644 --- a/scripts/portal/mirtalk01.js +++ b/scripts/portal/mirtalk01.js @@ -1,11 +1,11 @@ //Author: kevintjuh93 -function enter(pi) { - pi.blockPortal(); - if (pi.containsAreaInfo(22013, "dt01=o")) { - return false; - } - pi.mapEffect("evan/dragonTalk01"); - pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o"); - return true; +function enter(pi) { + pi.blockPortal(); + if (pi.containsAreaInfo(22013, "dt01=o")) { + return false; + } + pi.mapEffect("evan/dragonTalk01"); + pi.updateAreaInfo(22013, "dt00=o;dt01=o;mo00=o;mo01=o;mo10=o;mo02=o"); + return true; } \ No newline at end of file diff --git a/scripts/portal/moveBefore.js b/scripts/portal/moveBefore.js index a7b4d6a4b3..9f8cdf49e3 100644 --- a/scripts/portal/moveBefore.js +++ b/scripts/portal/moveBefore.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(pi.getMapId() - 10, "west00"); - return true; + pi.playPortalSound(); + pi.warp(pi.getMapId() - 10, "west00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/moveNext.js b/scripts/portal/moveNext.js index 1e6f92b2ce..837c8cbbff 100644 --- a/scripts/portal/moveNext.js +++ b/scripts/portal/moveNext.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.playPortalSound(); - pi.warp(pi.getMapId() + 10, "east00"); - return true; + pi.playPortalSound(); + pi.warp(pi.getMapId() + 10, "east00"); + return true; } \ No newline at end of file diff --git a/scripts/portal/move_elin.js b/scripts/portal/move_elin.js index 0f9dbec8d1..47703a4464 100644 --- a/scripts/portal/move_elin.js +++ b/scripts/portal/move_elin.js @@ -20,7 +20,8 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 2098cf3cf5..2283fdf703 100644 --- a/scripts/portal/nets_in.js +++ b/scripts/portal/nets_in.js @@ -1,5 +1,6 @@ function enter(pi) { - pi.getPlayer().saveLocation("MIRROR"); - pi.playPortalSound(); pi.warp(926010000, 4); - return true; + pi.getPlayer().saveLocation("MIRROR"); + pi.playPortalSound(); + pi.warp(926010000, 4); + return true; } \ No newline at end of file diff --git a/scripts/portal/nets_out.js b/scripts/portal/nets_out.js index 64c55d18f0..d1627e9770 100644 --- a/scripts/portal/nets_out.js +++ b/scripts/portal/nets_out.js @@ -18,15 +18,19 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 -*/ +*/ function enter(pi) { var mapid = pi.getPlayer().getSavedLocation("MIRROR"); - + pi.playPortalSound(); - if(mapid == 260020500) pi.warp(mapid, 3); - else pi.warp(mapid); + if (mapid == 260020500) { + pi.warp(mapid, 3); + } else { + pi.warp(mapid); + } return true; } \ No newline at end of file diff --git a/scripts/portal/obstacle.js b/scripts/portal/obstacle.js index 6a0b0476ae..eefe8ce2af 100644 --- a/scripts/portal/obstacle.js +++ b/scripts/portal/obstacle.js @@ -3,19 +3,21 @@ Map: Mushroom Castle - Deep Inside Mushroom Forest (106020300) Right Portal */ - - function enter(pi){ - if (pi.isQuestStarted(100202)) { - pi.playPortalSound(); pi.warp(106020400, 2); - return true; - } else if (pi.hasItem(4000507)) { - pi.gainItem(4000507, -1); - pi.message("You have used a Poison Spore to pass through the barrier."); - - pi.playPortalSound(); pi.warp(106020400, 2); - return true; - } - pi.message("The overgrown vines is blocking the way."); - return false; - } \ No newline at end of file +function enter(pi) { + if (pi.isQuestStarted(100202)) { + pi.playPortalSound(); + pi.warp(106020400, 2); + return true; + } else if (pi.hasItem(4000507)) { + pi.gainItem(4000507, -1); + pi.message("You have used a Poison Spore to pass through the barrier."); + + pi.playPortalSound(); + pi.warp(106020400, 2); + return true; + } + + pi.message("The overgrown vines is blocking the way."); + return false; +} \ No newline at end of file diff --git a/scripts/portal/outArchterMap.js b/scripts/portal/outArchterMap.js index 51bcc89470..6126369265 100644 --- a/scripts/portal/outArchterMap.js +++ b/scripts/portal/outArchterMap.js @@ -1,5 +1,6 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(100000000, "Achter00"); - pi.playPortalSound(); - return true; + 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 13a08057c3..39a84cc7e5 100644 --- a/scripts/portal/outChild.js +++ b/scripts/portal/outChild.js @@ -18,15 +18,18 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - if (!pi.isQuestStarted(21001)) { - pi.playPortalSound(); pi.warp(914000220, 2); - return true; - } else { - pi.playPortalSound(); pi.warp(914000400, 2); - return true; - } + if (!pi.isQuestStarted(21001)) { + pi.playPortalSound(); + pi.warp(914000220, 2); + return true; + } else { + pi.playPortalSound(); + pi.warp(914000400, 2); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/outDarkEreb.js b/scripts/portal/outDarkEreb.js index b56ce8f2ae..eac3a29fdb 100644 --- a/scripts/portal/outDarkEreb.js +++ b/scripts/portal/outDarkEreb.js @@ -21,7 +21,8 @@ */ function enter(pi) { var warpMap = pi.isQuestCompleted(20407) ? 924010200 : 924010100; - - pi.playPortalSound(); pi.warp(warpMap, 0); + + pi.playPortalSound(); + pi.warp(warpMap, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/outMagiclib.js b/scripts/portal/outMagiclib.js index dfee023721..72c8d7b2cc 100644 --- a/scripts/portal/outMagiclib.js +++ b/scripts/portal/outMagiclib.js @@ -1,19 +1,19 @@ function enter(pi) { - if(pi.getMap().countMonster(2220100) > 0){ - pi.getPlayer().message("Cannot leave until all Blue Mushrooms have been defeated."); - return false; - } - else{ - var eim = pi.getEventInstance(); - eim.stopEventTimer(); - eim.dispose(); - - pi.playPortalSound(); - pi.warp(101000000, 26); + if (pi.getMap().countMonster(2220100) > 0) { + pi.getPlayer().message("Cannot leave until all Blue Mushrooms have been defeated."); + return false; + } else { + var eim = pi.getEventInstance(); + eim.stopEventTimer(); + eim.dispose(); - if(pi.isQuestCompleted(20718)) - pi.openNpc(1103003, "MaybeItsGrendel_end"); - - return true; - } + pi.playPortalSound(); + pi.warp(101000000, 26); + + if (pi.isQuestCompleted(20718)) { + pi.openNpc(1103003, "MaybeItsGrendel_end"); + } + + return true; + } } \ No newline at end of file diff --git a/scripts/portal/outMaha.js b/scripts/portal/outMaha.js index 2de8711663..8c3eaa8819 100644 --- a/scripts/portal/outMaha.js +++ b/scripts/portal/outMaha.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 c778a58310..7999af41ae 100644 --- a/scripts/portal/outNix1.js +++ b/scripts/portal/outNix1.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); 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 419e4bda53..bcddd46dea 100644 --- a/scripts/portal/outNix2.js +++ b/scripts/portal/outNix2.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); 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 065e5ccc18..51b8975822 100644 --- a/scripts/portal/outPerrion_1.js +++ b/scripts/portal/outPerrion_1.js @@ -1,5 +1,6 @@ function enter(pi) { pi.message("You found a shortcut to the start of the underground temple."); - pi.playPortalSound(); pi.warp(105100000, 2); + 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 3002486106..35b73caacd 100644 --- a/scripts/portal/outPerrion_2.js +++ b/scripts/portal/outPerrion_2.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(105100000, 0); + 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 cedd84ffcc..be65b495f9 100644 --- a/scripts/portal/outRider.js +++ b/scripts/portal/outRider.js @@ -1,7 +1,8 @@ function enter(pi) { - if(pi.canHold(4001193, 1)) { + if (pi.canHold(4001193, 1)) { pi.gainItem(4001193, 1); - pi.playPortalSound(); 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 dc34c28123..c21019dff0 100644 --- a/scripts/portal/outSpecialSchool.js +++ b/scripts/portal/outSpecialSchool.js @@ -20,6 +20,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); 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 6430791153..5cd6cb01b2 100644 --- a/scripts/portal/outTemple.js +++ b/scripts/portal/outTemple.js @@ -21,6 +21,7 @@ */ function enter(pi) { pi.useItem(2210016); - pi.playPortalSound(); pi.warp(200090510, 0); + pi.playPortalSound(); + pi.warp(200090510, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/out_pepeking.js b/scripts/portal/out_pepeking.js index 67d59554f4..1b0648c98b 100644 --- a/scripts/portal/out_pepeking.js +++ b/scripts/portal/out_pepeking.js @@ -1,26 +1,26 @@ function enter(pi) { - var eim = pi.getEventInstance(); - if(eim != null) { - eim.stopEventTimer(); - eim.dispose(); + var eim = pi.getEventInstance(); + if (eim != null) { + eim.stopEventTimer(); + eim.dispose(); + } + + var questProgress = pi.getQuestProgressInt(2330, 3300005) + pi.getQuestProgressInt(2330, 3300006) + pi.getQuestProgressInt(2330, 3300007); //3 Yetis + if (questProgress == 3 && !pi.hasItem(4032388)) { + if (pi.canHold(4032388)) { + pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it."); + pi.gainItem(4032388, 1); + + pi.playPortalSound(); + pi.warp(106021400, 2); + return true; + } else { + pi.getPlayer().message("Please make room in your ETC inventory."); + return false; } - - var questProgress = pi.getQuestProgressInt(2330, 3300005) + pi.getQuestProgressInt(2330, 3300006) + pi.getQuestProgressInt(2330, 3300007); //3 Yetis - if(questProgress == 3 && !pi.hasItem(4032388)) { - if(pi.canHold(4032388)){ - pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it."); - pi.gainItem(4032388, 1); - - pi.playPortalSound(); - pi.warp(106021400, 2); - return true; - } else { - pi.getPlayer().message("Please make room in your ETC inventory."); - return false; - } - } else { - pi.playPortalSound(); - pi.warp(106021400, 2); - return true; - } + } else { + pi.playPortalSound(); + pi.warp(106021400, 2); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/outtestWolf.js b/scripts/portal/outtestWolf.js index 0786173c9e..ffe8c5717a 100644 --- a/scripts/portal/outtestWolf.js +++ b/scripts/portal/outtestWolf.js @@ -1,8 +1,9 @@ function enter(pi) { - if(pi.getMap().countMonsters() == 0) { - if(pi.canHold(4001193, 1)) { + if (pi.getMap().countMonsters() == 0) { + if (pi.canHold(4001193, 1)) { pi.gainItem(4001193, 1); - pi.playPortalSound(); 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_gardenin.js b/scripts/portal/party3_gardenin.js index 1f2148a2ea..32b456a41a 100644 --- a/scripts/portal/party3_gardenin.js +++ b/scripts/portal/party3_gardenin.js @@ -1,10 +1,10 @@ function enter(pi) { - if (pi.getPlayer().getParty() != null && pi.isEventLeader() && pi.haveItem(4001055,1)) { - pi.playPortalSound(); - pi.getEventInstance().warpEventTeam(920010100); - return true; - } else { - pi.playerMessage(5,"Please get the leader in this portal, make sure you have the Root of Life."); - return false; - } + if (pi.getPlayer().getParty() != null && pi.isEventLeader() && pi.haveItem(4001055, 1)) { + pi.playPortalSound(); + pi.getEventInstance().warpEventTeam(920010100); + return true; + } else { + pi.playerMessage(5, "Please get the leader in this portal, make sure you have the Root of Life."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/party3_jail1.js b/scripts/portal/party3_jail1.js index ee81f079df..eaee299fbf 100644 --- a/scripts/portal/party3_jail1.js +++ b/scripts/portal/party3_jail1.js @@ -1,9 +1,9 @@ function enter(pi) { - if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.playPortalSound(); pi.warp(920010910,0); + if (pi.getEventInstance().getIntProperty("statusStg8") == 1) { + pi.playPortalSound(); + pi.warp(920010910, 0); return true; - } - else { + } else { pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower."); return false; } diff --git a/scripts/portal/party3_jail2.js b/scripts/portal/party3_jail2.js index 30f18d7fed..7d8bb867c8 100644 --- a/scripts/portal/party3_jail2.js +++ b/scripts/portal/party3_jail2.js @@ -1,9 +1,9 @@ function enter(pi) { - if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.playPortalSound(); pi.warp(920010920,0); + if (pi.getEventInstance().getIntProperty("statusStg8") == 1) { + pi.playPortalSound(); + pi.warp(920010920, 0); return true; - } - else { + } else { pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower."); return false; } diff --git a/scripts/portal/party3_jail3.js b/scripts/portal/party3_jail3.js index 5efdc133c8..3108e1c694 100644 --- a/scripts/portal/party3_jail3.js +++ b/scripts/portal/party3_jail3.js @@ -1,9 +1,9 @@ function enter(pi) { - if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.playPortalSound(); pi.warp(920010930,0); + if (pi.getEventInstance().getIntProperty("statusStg8") == 1) { + pi.playPortalSound(); + pi.warp(920010930, 0); return true; - } - else { + } else { pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower."); return false; } diff --git a/scripts/portal/party3_jailin.js b/scripts/portal/party3_jailin.js index 8e87dee8a0..efb79f69f7 100644 --- a/scripts/portal/party3_jailin.js +++ b/scripts/portal/party3_jailin.js @@ -2,17 +2,19 @@ var leverSequenceExit = false; function enterLeverSequence(pi) { var map = pi.getMap(); - + var jailn = (pi.getMap().getId() / 10) % 10; var maxToggles = (jailn == 1) ? 7 : 6; var mapProp = pi.getEventInstance().getProperty("jail" + jailn); - if(mapProp == null) { + if (mapProp == null) { var seq = 0; - for(var i = 1; i <= maxToggles; i++) { - if(Math.random() < 0.5) seq += (1 << i); + for (var i = 1; i <= maxToggles; i++) { + if (Math.random() < 0.5) { + seq += (1 << i); + } } pi.getEventInstance().setProperty("jail" + jailn, seq); @@ -20,16 +22,16 @@ function enterLeverSequence(pi) { } mapProp = Number(mapProp); - if(mapProp != 0) { + if (mapProp != 0) { var countMiss = 0; - for(var i = 1; i <= maxToggles; i++) { - if(!(pi.getMap().getReactorByName("lever" + i).getState() == (mapProp >> i) % 2)) { + for (var i = 1; i <= maxToggles; i++) { + if (!(pi.getMap().getReactorByName("lever" + i).getState() == (mapProp >> i) % 2)) { countMiss++; } } const PacketCreator = Java.type('tools.PacketCreator'); - if(countMiss > 0) { + if (countMiss > 0) { map.broadcastMessage(PacketCreator.showEffect("quest/party/wrong_kor")); map.broadcastMessage(PacketCreator.playSound("Party1/Failed")); @@ -42,7 +44,8 @@ function enterLeverSequence(pi) { pi.getEventInstance().setProperty("jail" + jailn, "0"); } - pi.playPortalSound(); pi.warp(pi.getMapId() + 2,0); + pi.playPortalSound(); + pi.warp(pi.getMapId() + 2, 0); return true; } @@ -54,7 +57,8 @@ function enterNoMobs(pi) { pi.playerMessage(5, "Please use the levers to defeat all the threats before you proceed."); return false; } else { - pi.playPortalSound(); pi.warp(pi.getMapId() + 2,0); + pi.playPortalSound(); + pi.warp(pi.getMapId() + 2, 0); return true; } } diff --git a/scripts/portal/party3_r4pt.js b/scripts/portal/party3_r4pt.js index aa32951d7b..d4dc45cc6f 100644 --- a/scripts/portal/party3_r4pt.js +++ b/scripts/portal/party3_r4pt.js @@ -23,31 +23,36 @@ function enter(pi) { var eim = pi.getEventInstance(); - if(eim.getProperty("stage4_comb") == null) { + if (eim.getProperty("stage4_comb") == null) { var r = Math.floor((Math.random() * 3)) + 1; var s = Math.floor((Math.random() * 3)) + 1; - + eim.setProperty("stage4_comb", "" + r + s); } var pname = Number(pi.getPortal().getName().substring(4, 6)); var cname = Number(eim.getProperty("stage4_comb")); - + var secondPt = true; - if(pi.getPortal().getId() < 14) { + if (pi.getPortal().getId() < 14) { cname = Math.floor(cname / 10); secondPt = false; } - + if ((pname % 10) == (cname % 10)) { //climb var nextPortal; - if(secondPt) nextPortal = 1; - else nextPortal = pi.getPortal().getId() + 3; - - pi.playPortalSound(); pi.warp(pi.getMapId(), nextPortal); + if (secondPt) { + nextPortal = 1; + } else { + nextPortal = pi.getPortal().getId() + 3; + } + + pi.playPortalSound(); + pi.warp(pi.getMapId(), nextPortal); } else { //fail - pi.playPortalSound(); pi.warp(pi.getMapId(), 2); + pi.playPortalSound(); + pi.warp(pi.getMapId(), 2); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party3_r4pt1.js b/scripts/portal/party3_r4pt1.js index af9454977b..d31a1a1cb6 100644 --- a/scripts/portal/party3_r4pt1.js +++ b/scripts/portal/party3_r4pt1.js @@ -25,6 +25,7 @@ */ function enter(pi) { - pi.playPortalSound(); 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 b9d7a2a5d4..89f32498d3 100644 --- a/scripts/portal/party3_r6pt.js +++ b/scripts/portal/party3_r6pt.js @@ -23,10 +23,10 @@ function enter(pi) { var eim = pi.getEventInstance(); - if(eim.getProperty("stage6_comb") == null) { + if (eim.getProperty("stage6_comb") == null) { var comb = "0"; - for(var i = 0; i < 16; i++) { + for (var i = 0; i < 16; i++) { var r = Math.floor((Math.random() * 4)) + 1; comb += r.toString(); } @@ -35,20 +35,22 @@ function enter(pi) { } var comb = eim.getProperty("stage6_comb"); - + var name = pi.getPortal().getName().substring(2, 5); var portalId = parseInt(name, 10); - - + + var pRow = Math.floor(portalId / 10); var pCol = portalId % 10; - + if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb - pi.playPortalSound(); 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 pRow--; - pi.playPortalSound(); pi.warp(pi.getMapId(), (pRow / 4) > 1 ? (pRow / 4) : 5); // thanks Chloek3, seth1 for noticing next plaform issues + pi.playPortalSound(); + pi.warp(pi.getMapId(), (pRow / 4) > 1 ? (pRow / 4) : 5); // thanks Chloek3, seth1 for noticing next plaform issues } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party3_room1.js b/scripts/portal/party3_room1.js index b3e0dc3bd7..7368ec0cb8 100644 --- a/scripts/portal/party3_room1.js +++ b/scripts/portal/party3_room1.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(920010200, 13); - return true; + 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 b0b6447f8d..9f03b00c18 100644 --- a/scripts/portal/party3_room2.js +++ b/scripts/portal/party3_room2.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(920010300, 1); - return true; + 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 c32c34925b..350f7185b8 100644 --- a/scripts/portal/party3_room3.js +++ b/scripts/portal/party3_room3.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(920010400, 8); - return true; + 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 6f1dc6576e..99b1350645 100644 --- a/scripts/portal/party3_room4.js +++ b/scripts/portal/party3_room4.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(920010500, 3); - return true; + 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 58cc977632..8b32a15b3a 100644 --- a/scripts/portal/party3_room5.js +++ b/scripts/portal/party3_room5.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(920010600, 17); - return true; + 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 e7a6904de7..f060723056 100644 --- a/scripts/portal/party3_room6.js +++ b/scripts/portal/party3_room6.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(920010700, 23); - return true; + 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 6815f90918..aee8a2fb21 100644 --- a/scripts/portal/party3_room8.js +++ b/scripts/portal/party3_room8.js @@ -1,9 +1,9 @@ function enter(pi) { - if(pi.getEventInstance().getIntProperty("statusStg8") == 1) { - pi.playPortalSound(); pi.warp(920011000,0); + if (pi.getEventInstance().getIntProperty("statusStg8") == 1) { + pi.playPortalSound(); + pi.warp(920011000, 0); return true; - } - else { + } else { pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower."); return false; } diff --git a/scripts/portal/party3_roomout.js b/scripts/portal/party3_roomout.js index c8b3a66128..ce62353333 100644 --- a/scripts/portal/party3_roomout.js +++ b/scripts/portal/party3_roomout.js @@ -1,36 +1,37 @@ function enter(pi) { - var exitPortal = 0; - - switch(pi.getMapId()) { - case 920010200: - exitPortal = 4; - break; + var exitPortal = 0; - case 920010300: - exitPortal = 12; - break; + switch (pi.getMapId()) { + case 920010200: + exitPortal = 4; + break; - case 920010400: - exitPortal = 5; - break; + case 920010300: + exitPortal = 12; + break; - case 920010500: - exitPortal = 13; - break; + case 920010400: + exitPortal = 5; + break; - case 920010600: - exitPortal = 15; - break; + case 920010500: + exitPortal = 13; + break; - case 920010700: - exitPortal = 14; - break; - - case 920011000: - exitPortal = 16; - break; - } + case 920010600: + exitPortal = 15; + break; - pi.playPortalSound(); pi.warp(920010100, exitPortal); - return true; + case 920010700: + exitPortal = 14; + break; + + case 920011000: + exitPortal = 16; + break; + } + + pi.playPortalSound(); + pi.warp(920010100, exitPortal); + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_out.js b/scripts/portal/party6_out.js index cd0ca2aef5..c71815f3b3 100644 --- a/scripts/portal/party6_out.js +++ b/scripts/portal/party6_out.js @@ -1,17 +1,17 @@ function enter(pi) { - var eim = pi.getEventInstance(); - - if (eim.isEventCleared()) { - if(pi.isEventLeader()) { - pi.playPortalSound(); - eim.warpEventTeam(930000800); - return true; - } else { - pi.playerMessage(5, "Wait for the leader to pass through the portal."); - return false; - } + var eim = pi.getEventInstance(); + + if (eim.isEventCleared()) { + if (pi.isEventLeader()) { + pi.playPortalSound(); + eim.warpEventTeam(930000800); + return true; } else { - pi.playerMessage(5, "Please eliminate the Poison Golem."); - return false; + pi.playerMessage(5, "Wait for the leader to pass through the portal."); + return false; } + } else { + pi.playerMessage(5, "Please eliminate the Poison Golem."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/party6_stage.js b/scripts/portal/party6_stage.js index 0434ca4921..1c2ed8b76d 100644 --- a/scripts/portal/party6_stage.js +++ b/scripts/portal/party6_stage.js @@ -1,30 +1,33 @@ function enter(pi) { - switch(pi.getMapId()) { - case 930000000: - pi.playPortalSound(); pi.warp(930000100,0); - return true; - break; - case 930000100: - if (pi.getMap().getMonsters().size() == 0) { - pi.playPortalSound(); pi.warp(930000200,0); - return true; - } else { - pi.playerMessage(5, "Eliminate all the monsters."); - return false; - } - break; - case 930000200: - if (pi.getMap().getReactorByName("spine") != null && pi.getMap().getReactorByName("spine").getState() < 4) { - pi.playerMessage(5, "The spine blocks the way."); - return false; - } else { - pi.playPortalSound(); pi.warp(930000300,0); //assuming they cant get past reactor without it being gone - return true; - } - break; - - default: - pi.playerMessage(5, "This portal leads to an unbound path."); - return false; - } + switch (pi.getMapId()) { + case 930000000: + pi.playPortalSound(); + pi.warp(930000100, 0); + return true; + break; + case 930000100: + if (pi.getMap().getMonsters().size() == 0) { + pi.playPortalSound(); + pi.warp(930000200, 0); + return true; + } else { + pi.playerMessage(5, "Eliminate all the monsters."); + return false; + } + break; + case 930000200: + if (pi.getMap().getReactorByName("spine") != null && pi.getMap().getReactorByName("spine").getState() < 4) { + pi.playerMessage(5, "The spine blocks the way."); + return false; + } else { + pi.playPortalSound(); + pi.warp(930000300, 0); //assuming they cant get past reactor without it being gone + return true; + } + break; + + default: + pi.playerMessage(5, "This portal leads to an unbound path."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/party6_stage501.js b/scripts/portal/party6_stage501.js index 2788e39c89..846b993c0b 100644 --- a/scripts/portal/party6_stage501.js +++ b/scripts/portal/party6_stage501.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "02st"); + pi.playPortalSound(); + pi.warp(930000300, "02st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage502.js b/scripts/portal/party6_stage502.js index 2b9dc73d03..20da1557b4 100644 --- a/scripts/portal/party6_stage502.js +++ b/scripts/portal/party6_stage502.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "03st"); + pi.playPortalSound(); + pi.warp(930000300, "03st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage503.js b/scripts/portal/party6_stage503.js index 29706f649b..db67494781 100644 --- a/scripts/portal/party6_stage503.js +++ b/scripts/portal/party6_stage503.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "04st"); + pi.playPortalSound(); + pi.warp(930000300, "04st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage504.js b/scripts/portal/party6_stage504.js index 94b7f6d513..c22b78f9a4 100644 --- a/scripts/portal/party6_stage504.js +++ b/scripts/portal/party6_stage504.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "05st"); + pi.playPortalSound(); + pi.warp(930000300, "05st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage505.js b/scripts/portal/party6_stage505.js index 5ae1c318da..e40a6e5f6b 100644 --- a/scripts/portal/party6_stage505.js +++ b/scripts/portal/party6_stage505.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "06st"); + pi.playPortalSound(); + pi.warp(930000300, "06st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage506.js b/scripts/portal/party6_stage506.js index 1078adff06..035c4bee02 100644 --- a/scripts/portal/party6_stage506.js +++ b/scripts/portal/party6_stage506.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "07st"); + pi.playPortalSound(); + pi.warp(930000300, "07st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage507.js b/scripts/portal/party6_stage507.js index e8f41aa0ac..2f4b5a7300 100644 --- a/scripts/portal/party6_stage507.js +++ b/scripts/portal/party6_stage507.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "08st"); + pi.playPortalSound(); + pi.warp(930000300, "08st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage508.js b/scripts/portal/party6_stage508.js index acade52b73..4753e6ea9c 100644 --- a/scripts/portal/party6_stage508.js +++ b/scripts/portal/party6_stage508.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "09st"); + pi.playPortalSound(); + pi.warp(930000300, "09st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage509.js b/scripts/portal/party6_stage509.js index 57c8694fcb..a8ee4223b8 100644 --- a/scripts/portal/party6_stage509.js +++ b/scripts/portal/party6_stage509.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "10st"); + pi.playPortalSound(); + pi.warp(930000300, "10st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage510.js b/scripts/portal/party6_stage510.js index 6632bbd4d1..0521229168 100644 --- a/scripts/portal/party6_stage510.js +++ b/scripts/portal/party6_stage510.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "11st"); + pi.playPortalSound(); + pi.warp(930000300, "11st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage511.js b/scripts/portal/party6_stage511.js index 93c7f56cfb..5f6b5b37ca 100644 --- a/scripts/portal/party6_stage511.js +++ b/scripts/portal/party6_stage511.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "12st"); + pi.playPortalSound(); + pi.warp(930000300, "12st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage512.js b/scripts/portal/party6_stage512.js index 8c91b29407..2f8f5d5b3b 100644 --- a/scripts/portal/party6_stage512.js +++ b/scripts/portal/party6_stage512.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "13st"); + pi.playPortalSound(); + pi.warp(930000300, "13st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage513.js b/scripts/portal/party6_stage513.js index a27b6cb44e..e6c769c654 100644 --- a/scripts/portal/party6_stage513.js +++ b/scripts/portal/party6_stage513.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "14st"); + pi.playPortalSound(); + pi.warp(930000300, "14st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage514.js b/scripts/portal/party6_stage514.js index 903971ec18..833befeb7d 100644 --- a/scripts/portal/party6_stage514.js +++ b/scripts/portal/party6_stage514.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "15st"); + pi.playPortalSound(); + pi.warp(930000300, "15st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage515.js b/scripts/portal/party6_stage515.js index 4c3f689ad4..e214c1692f 100644 --- a/scripts/portal/party6_stage515.js +++ b/scripts/portal/party6_stage515.js @@ -1,9 +1,11 @@ function enter(pi) { if (Math.random() < 0.1) { - pi.playPortalSound(); pi.warp(930000300,"16st"); + pi.playPortalSound(); + pi.warp(930000300, "16st"); } else { - pi.playPortalSound(); pi.warp(930000300, "01st"); + pi.playPortalSound(); + pi.warp(930000300, "01st"); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/party6_stage800.js b/scripts/portal/party6_stage800.js index e80f27a744..20254188e2 100644 --- a/scripts/portal/party6_stage800.js +++ b/scripts/portal/party6_stage800.js @@ -4,17 +4,18 @@ function enter(pi) { pi.removeAll(4001164); pi.removeAll(4001169); pi.removeAll(2270004); - + var spring = pi.getMap().getReactorById(3008000); // thanks Chloek3, seth1 for noticing fragments not being awarded properly - if(spring != null && spring.getState() > 0) { - if(!pi.canHold(4001198, 1)) { + if (spring != null && spring.getState() > 0) { + if (!pi.canHold(4001198, 1)) { pi.playerMessage(5, "Check for a free space on your ETC inventory before entering this portal."); return false; } - + pi.gainItem(4001198, 1); } - - pi.playPortalSound(); pi.warp(300030100,0); + + pi.playPortalSound(); + pi.warp(300030100, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/q2073.js b/scripts/portal/q2073.js index e1af259317..274c61b79f 100644 --- a/scripts/portal/q2073.js +++ b/scripts/portal/q2073.js @@ -24,12 +24,12 @@ * @purpose Warps to Utah's Pig Farm for the quest Camila's Gem. */ function enter(pi) { - if(pi.isQuestStarted(2073)) { - pi.playPortalSound(); - pi.warp(900000000, 0); - return true; - } else { - pi.message("Private property. This place can only be entered when running an errand from Camila."); - return false; - } + if (pi.isQuestStarted(2073)) { + pi.playPortalSound(); + pi.warp(900000000, 0); + return true; + } else { + pi.message("Private property. This place can only be entered when running an errand from Camila."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/q3366in.js b/scripts/portal/q3366in.js index 0fd61c7228..dd06faf948 100644 --- a/scripts/portal/q3366in.js +++ b/scripts/portal/q3366in.js @@ -18,12 +18,13 @@ along with this program. If not, see . */ function enter(pi) { - if(pi.isQuestStarted(3366)) { - pi.playPortalSound(); pi.warp(926130101, 0); - return true; - } else { - pi.message("You don't have permission to access this room."); - return false; - } - + if (pi.isQuestStarted(3366)) { + pi.playPortalSound(); + pi.warp(926130101, 0); + return true; + } else { + pi.message("You don't have permission to access this room."); + return false; + } + } \ No newline at end of file diff --git a/scripts/portal/q3366out.js b/scripts/portal/q3366out.js index 9d241586b5..de0055bb8b 100644 --- a/scripts/portal/q3366out.js +++ b/scripts/portal/q3366out.js @@ -18,6 +18,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(926130100, "in00"); - return true; + 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 daf52bf2cf..9658dd9f4d 100644 --- a/scripts/portal/q3367in.js +++ b/scripts/portal/q3367in.js @@ -18,19 +18,20 @@ along with this program. If not, see . */ function enter(pi) { - if(pi.isQuestStarted(3367)) { - var booksDone = pi.getQuestProgressInt(3367, 31); - var booksInv = pi.getItemQuantity(4031797); + if (pi.isQuestStarted(3367)) { + var booksDone = pi.getQuestProgressInt(3367, 31); + var booksInv = pi.getItemQuantity(4031797); - if(booksInv < booksDone) { - pi.gainItem(4031797, booksDone - booksInv); - } - - pi.playPortalSound(); pi.warp(926130102, 0); - return true; - } else { - pi.message("You don't have permission to access this room."); - return false; + if (booksInv < booksDone) { + pi.gainItem(4031797, booksDone - booksInv); } - + + pi.playPortalSound(); + pi.warp(926130102, 0); + return true; + } else { + pi.message("You don't have permission to access this room."); + return false; + } + } \ No newline at end of file diff --git a/scripts/portal/q3367out.js b/scripts/portal/q3367out.js index cafc8dde7b..7da2d91511 100644 --- a/scripts/portal/q3367out.js +++ b/scripts/portal/q3367out.js @@ -18,6 +18,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(926130100, "in01"); - return true; + 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 6e9164fd9c..fb34f73d36 100644 --- a/scripts/portal/q3368in.js +++ b/scripts/portal/q3368in.js @@ -18,12 +18,13 @@ along with this program. If not, see . */ function enter(pi) { - if(pi.isQuestStarted(3368)) { - pi.playPortalSound(); pi.warp(926130103, 0); - return true; - } else { - pi.message("You don't have permission to access this room."); - return false; - } - + if (pi.isQuestStarted(3368)) { + pi.playPortalSound(); + pi.warp(926130103, 0); + return true; + } else { + pi.message("You don't have permission to access this room."); + return false; + } + } \ No newline at end of file diff --git a/scripts/portal/q3368out.js b/scripts/portal/q3368out.js index af430f9866..f2de72940a 100644 --- a/scripts/portal/q3368out.js +++ b/scripts/portal/q3368out.js @@ -18,6 +18,7 @@ along with this program. If not, see . */ function enter(pi) { - pi.playPortalSound(); pi.warp(926130100, "in02"); - return true; + 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 024677c186..809effb75a 100644 --- a/scripts/portal/raid_rest.js +++ b/scripts/portal/raid_rest.js @@ -25,19 +25,19 @@ BossRushPQ - Rest Spot portal */ function enter(pi) { - var evLevel = ((pi.getMapId() - 1) % 5) + 1; - - if(pi.getPlayer().getEventInstance().isEventLeader(pi.getPlayer()) && pi.getPlayer().getEventInstance().getPlayerCount() > 1) { - pi.message("Being the party leader, you cannot leave before your teammates leave first or you pass leadership."); - return false; - } - - if(pi.getPlayer().getEventInstance().giveEventReward(pi.getPlayer(), evLevel)) { - pi.playPortalSound(); pi.warp(970030000); - return true; - } - else { - pi.message("Make a room available on all EQUIP, USE, SET-UP and ETC inventory to claim an instance prize."); - return false; - } + var evLevel = ((pi.getMapId() - 1) % 5) + 1; + + if (pi.getPlayer().getEventInstance().isEventLeader(pi.getPlayer()) && pi.getPlayer().getEventInstance().getPlayerCount() > 1) { + pi.message("Being the party leader, you cannot leave before your teammates leave first or you pass leadership."); + return false; + } + + if (pi.getPlayer().getEventInstance().giveEventReward(pi.getPlayer(), evLevel)) { + pi.playPortalSound(); + pi.warp(970030000); + return true; + } else { + pi.message("Make a room available on all EQUIP, USE, SET-UP and ETC inventory to claim an instance prize."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/raid_stage.js b/scripts/portal/raid_stage.js index 927115f73a..70f6c12299 100644 --- a/scripts/portal/raid_stage.js +++ b/scripts/portal/raid_stage.js @@ -25,16 +25,19 @@ BossRushPQ - Next Stage */ function enter(pi) { - if(pi.getMap().getMonsters().isEmpty()) { + if (pi.getMap().getMonsters().isEmpty()) { var nextStage; - - if(pi.getMapId() % 500 >= 100) nextStage = pi.getMapId() + 100; - else nextStage = 970030001 + (Math.floor((pi.getMapId() - 970030100) / 500)); - - pi.playPortalSound(); pi.warp(nextStage); + + if (pi.getMapId() % 500 >= 100) { + nextStage = pi.getMapId() + 100; + } else { + nextStage = 970030001 + (Math.floor((pi.getMapId() - 970030100) / 500)); + } + + pi.playPortalSound(); + pi.warp(nextStage); return true; - } - else { + } else { pi.getPlayer().dropMessage(6, "Defeat all monsters before proceeding to the next stage."); return false; } diff --git a/scripts/portal/raidout.js b/scripts/portal/raidout.js index b2d3096ad4..e4bccee76d 100644 --- a/scripts/portal/raidout.js +++ b/scripts/portal/raidout.js @@ -1,8 +1,10 @@ function enter(pi) { - var map = pi.getPlayer().getSavedLocation("BOSSPQ"); - if (map == -1) - map = 100000000; - - pi.playPortalSound(); pi.warp(map,0); - return true; + var map = pi.getPlayer().getSavedLocation("BOSSPQ"); + if (map == -1) { + map = 100000000; + } + + pi.playPortalSound(); + pi.warp(map, 0); + return true; } \ No newline at end of file diff --git a/scripts/portal/rankDeveloperRoom.js b/scripts/portal/rankDeveloperRoom.js index 2ec93fc548..a70549311f 100644 --- a/scripts/portal/rankDeveloperRoom.js +++ b/scripts/portal/rankDeveloperRoom.js @@ -1,21 +1,24 @@ function enter(pi) { if (pi.getPlayer().getMapId() != 777777777) { const Server = Java.type('net.server.Server'); - if(!Server.getInstance().canEnterDeveloperRoom()) { + if (!Server.getInstance().canEnterDeveloperRoom()) { pi.message("The next room is currently unavailable."); return false; } - + pi.getPlayer().saveLocation("DEVELOPER"); - pi.playPortalSound(); pi.warp(777777777, "out00"); + pi.playPortalSound(); + pi.warp(777777777, "out00"); } else { try { var toMap = pi.getPlayer().getSavedLocation("DEVELOPER"); - pi.playPortalSound(); pi.warp(toMap, "in00"); - } catch(err) { - pi.playPortalSound(); pi.warp(100000000, 0); + pi.playPortalSound(); + pi.warp(toMap, "in00"); + } catch (err) { + pi.playPortalSound(); + pi.warp(100000000, 0); } } - + return true; } \ No newline at end of file diff --git a/scripts/portal/rankRoom.js b/scripts/portal/rankRoom.js index c112ece152..478a06167c 100644 --- a/scripts/portal/rankRoom.js +++ b/scripts/portal/rankRoom.js @@ -1,32 +1,32 @@ function enter(pi) { pi.playPortalSound(); - + switch (pi.getPlayer().getMapId()) { - case 130000000: - pi.warp(130000100, 5); //or 130000101 - break; - case 130000200: - pi.warp(130000100, 4); //or 130000101 - break; - case 140010100: + case 130000000: + pi.warp(130000100, 5); //or 130000101 + break; + case 130000200: + pi.warp(130000100, 4); //or 130000101 + break; + case 140010100: pi.warp(140010110, 1); //or 140010111 break; - case 120000101: + case 120000101: pi.warp(120000105, 1); break; - case 103000003: + case 103000003: pi.warp(103000008, 1); //or 103000009 break; - case 100000201: + case 100000201: pi.warp(100000204, 2); //or 100000205 break; case 101000003: // portal warp fix thanks to Vcoc pi.warp(101000004, 2); //or 101000005 break; - default: + default: pi.warp(pi.getMapId() + 1, 1); //or + 2 break; } - + return true; } \ No newline at end of file diff --git a/scripts/portal/reundodraco.js b/scripts/portal/reundodraco.js index 553ab9c030..a6a074cbc5 100644 --- a/scripts/portal/reundodraco.js +++ b/scripts/portal/reundodraco.js @@ -1,4 +1,4 @@ function enter(pi) { - pi.blockPortal(); - return true; + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/rienCaveEnter.js b/scripts/portal/rienCaveEnter.js index 2946b3b473..ed7e20d89a 100644 --- a/scripts/portal/rienCaveEnter.js +++ b/scripts/portal/rienCaveEnter.js @@ -1,8 +1,8 @@ -function enter(pi) { +function enter(pi) { if (pi.isQuestStarted(21201) || pi.isQuestStarted(21302)) { //aran first job - pi.playPortalSound(); - pi.warp(140030000, 1); - return true; + pi.playPortalSound(); + pi.warp(140030000, 1); + return true; } else { pi.playerMessage(5, "Something seems to be blocking this portal!"); return false; diff --git a/scripts/portal/rienTutor1.js b/scripts/portal/rienTutor1.js index 5a34f9f150..7bc6aaafde 100644 --- a/scripts/portal/rienTutor1.js +++ b/scripts/portal/rienTutor1.js @@ -18,14 +18,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - if (!pi.isQuestCompleted(21010)) { - pi.message("You must complete the quest before proceeding to the next map."); - return false; - } - pi.playPortalSound(); pi.warp(140090200, 1); - return true; + if (!pi.isQuestCompleted(21010)) { + pi.message("You must complete the quest before proceeding to the next map."); + return false; + } + 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 58c78e3ee7..8aa5310a63 100644 --- a/scripts/portal/rienTutor2.js +++ b/scripts/portal/rienTutor2.js @@ -18,14 +18,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - if (!pi.isQuestCompleted(21011)) { - pi.message("You must complete the quest before proceeding to the next map.."); - return false; - } - pi.playPortalSound(); pi.warp(140090300, 1); - return true; + if (!pi.isQuestCompleted(21011)) { + pi.message("You must complete the quest before proceeding to the next map.."); + return false; + } + 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 fe57062e75..f42acee7e0 100644 --- a/scripts/portal/rienTutor3.js +++ b/scripts/portal/rienTutor3.js @@ -18,14 +18,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - if (!pi.isQuestCompleted(21012)) { - pi.message("You must complete the quest before proceeding to the next map.."); - return false; - } - pi.playPortalSound(); pi.warp(140090400, 1); - return true; + if (!pi.isQuestCompleted(21012)) { + pi.message("You must complete the quest before proceeding to the next map.."); + return false; + } + 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 0ce7dc7ee7..1c15bf8d65 100644 --- a/scripts/portal/rienTutor4.js +++ b/scripts/portal/rienTutor4.js @@ -18,14 +18,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - if (!pi.isQuestCompleted(21013)) { - pi.message("You must complete the quest before proceeding to the next map.."); - return false; - } - pi.playPortalSound(); pi.warp(140090500, 1); - return true; + if (!pi.isQuestCompleted(21013)) { + pi.message("You must complete the quest before proceeding to the next map.."); + return false; + } + pi.playPortalSound(); + pi.warp(140090500, 1); + return true; } \ No newline at end of file diff --git a/scripts/portal/rienTutor5.js b/scripts/portal/rienTutor5.js index e8dc01eeb7..460a0dcc4e 100644 --- a/scripts/portal/rienTutor5.js +++ b/scripts/portal/rienTutor5.js @@ -18,11 +18,12 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - pi.talkGuide("You're very close to town. I'll head over there first since I have some things to take care of. You take your time."); - pi.blockPortal(); - return false; + pi.talkGuide("You're very close to town. I'll head over there first since I have some things to take care of. You take your time."); + pi.blockPortal(); + return false; } \ No newline at end of file diff --git a/scripts/portal/rienTutor6.js b/scripts/portal/rienTutor6.js index 7ac474e8c8..a5c592e57f 100644 --- a/scripts/portal/rienTutor6.js +++ b/scripts/portal/rienTutor6.js @@ -18,11 +18,12 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - pi.removeGuide(); - pi.blockPortal(); - return true; + pi.removeGuide(); + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/rienTutor7.js b/scripts/portal/rienTutor7.js index c5cd2dfdbc..b87bbb922e 100644 --- a/scripts/portal/rienTutor7.js +++ b/scripts/portal/rienTutor7.js @@ -18,16 +18,17 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - if (pi.getPlayer().getJob().getId() == 2000 && !pi.isQuestCompleted(21014)) { - pi.showInfoText("The town of Rien is to the right. Take the portal on the right and go into town to meet Lilin."); - return false; - } else { - pi.playPortalSound(); - pi.warp(140010100, 2); - return true; - } + if (pi.getPlayer().getJob().getId() == 2000 && !pi.isQuestCompleted(21014)) { + pi.showInfoText("The town of Rien is to the right. Take the portal on the right and go into town to meet Lilin."); + return false; + } else { + pi.playPortalSound(); + pi.warp(140010100, 2); + return true; + } } \ No newline at end of file diff --git a/scripts/portal/rienTutor8.js b/scripts/portal/rienTutor8.js index 432657dace..0dbe9de71d 100644 --- a/scripts/portal/rienTutor8.js +++ b/scripts/portal/rienTutor8.js @@ -18,23 +18,24 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Author: kevintjuh93 */ function enter(pi) { - if (pi.getPlayer().getJob().getId() == 2000) { - if (pi.isQuestStarted(21015)) { - pi.showInfoText("You must exit to the right in order to find Murupas."); - return false; - } else if (pi.isQuestStarted(21016)) { - pi.showInfoText("You must exit to the right in order to find Murupias."); - return false; - } else if (pi.isQuestStarted(21017)) { - pi.showInfoText("You must exit to the right in order to find MuruMurus."); - return false; - } - } - pi.playPortalSound(); - pi.warp(140010000, 2); - return true; + if (pi.getPlayer().getJob().getId() == 2000) { + if (pi.isQuestStarted(21015)) { + pi.showInfoText("You must exit to the right in order to find Murupas."); + return false; + } else if (pi.isQuestStarted(21016)) { + pi.showInfoText("You must exit to the right in order to find Murupias."); + return false; + } else if (pi.isQuestStarted(21017)) { + pi.showInfoText("You must exit to the right in order to find MuruMurus."); + return false; + } + } + pi.playPortalSound(); + pi.warp(140010000, 2); + return true; } \ No newline at end of file diff --git a/scripts/portal/rnj12_in.js b/scripts/portal/rnj12_in.js index 0e3661b56b..eabfdb774b 100644 --- a/scripts/portal/rnj12_in.js +++ b/scripts/portal/rnj12_in.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(926100401, 0); //next + 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 1f5308141a..be815b4fc5 100644 --- a/scripts/portal/rnj1_out.js +++ b/scripts/portal/rnj1_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg2") == 1) { - pi.playPortalSound(); pi.warp(926100100, 0); //next + pi.playPortalSound(); + pi.warp(926100100, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj1_pt00.js b/scripts/portal/rnj1_pt00.js index b528889e6b..a49fb66f95 100644 --- a/scripts/portal/rnj1_pt00.js +++ b/scripts/portal/rnj1_pt00.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg1") == 1) { - pi.playPortalSound(); pi.warp(926100001, 0); //next + pi.playPortalSound(); + pi.warp(926100001, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj2_out.js b/scripts/portal/rnj2_out.js index edd8f0a911..a7545d97c6 100644 --- a/scripts/portal/rnj2_out.js +++ b/scripts/portal/rnj2_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getEventInstance().getIntProperty("statusStg3") == 3) { - pi.playPortalSound(); pi.warp(926100200, 0); //next + pi.playPortalSound(); + pi.warp(926100200, 0); //next return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj3_in0.js b/scripts/portal/rnj3_in0.js index 1b30a2a21e..12d8a39f9e 100644 --- a/scripts/portal/rnj3_in0.js +++ b/scripts/portal/rnj3_in0.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj3_out1").getState() == 1) { - pi.playPortalSound(); pi.warp(926100201, 0); + pi.playPortalSound(); + pi.warp(926100201, 0); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj3_in1.js b/scripts/portal/rnj3_in1.js index fe9a7e481b..a52e813f67 100644 --- a/scripts/portal/rnj3_in1.js +++ b/scripts/portal/rnj3_in1.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj3_out2").getState() == 1) { - pi.playPortalSound(); pi.warp(926100202, 0); + pi.playPortalSound(); + pi.warp(926100202, 0); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj3_out.js b/scripts/portal/rnj3_out.js index 5b8d96a129..07764ce0e6 100644 --- a/scripts/portal/rnj3_out.js +++ b/scripts/portal/rnj3_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj3_out3").getState() == 1) { - pi.playPortalSound(); pi.warp(926100203, 0); //next + pi.playPortalSound(); + pi.warp(926100203, 0); //next return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r1.js b/scripts/portal/rnj4_r1.js index a03880acd1..a7347b11ef 100644 --- a/scripts/portal/rnj4_r1.js +++ b/scripts/portal/rnj4_r1.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 0; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926100301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r2.js b/scripts/portal/rnj4_r2.js index b4a94f1e69..790983a4ba 100644 --- a/scripts/portal/rnj4_r2.js +++ b/scripts/portal/rnj4_r2.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 1; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926100301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r3.js b/scripts/portal/rnj4_r3.js index a65bde77ec..249519d03f 100644 --- a/scripts/portal/rnj4_r3.js +++ b/scripts/portal/rnj4_r3.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 2; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926100301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj4_r4.js b/scripts/portal/rnj4_r4.js index f6251e84a1..a1493a9cc1 100644 --- a/scripts/portal/rnj4_r4.js +++ b/scripts/portal/rnj4_r4.js @@ -2,15 +2,16 @@ function enter(pi) { var eim = pi.getEventInstance(); var area = eim.getIntProperty("statusStg5"); var reg = 3; - - if((area >> reg) % 2 == 0) { + + if ((area >> reg) % 2 == 0) { area |= (1 << reg); eim.setIntProperty("statusStg5", area); - - pi.playPortalSound(); pi.warp(926100301 + reg, 0); //next + + pi.playPortalSound(); + pi.warp(926100301 + reg, 0); //next return true; } else { - pi.playerMessage(5, "This room is already being explored."); + pi.playerMessage(5, "This room is already being explored."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj5_rp.js b/scripts/portal/rnj5_rp.js index 3dbaf07121..d9ac74ad14 100644 --- a/scripts/portal/rnj5_rp.js +++ b/scripts/portal/rnj5_rp.js @@ -24,31 +24,34 @@ function enter(pi) { var mapplayer = "stage6_comb" + (pi.getMapId() % 10); var eim = pi.getEventInstance(); - + var comb = eim.getProperty(mapplayer); - + var name = pi.getPortal().getName().substring(2, 4); var portalId = parseInt(name, 10); - - + + var pRow = Math.floor(portalId / 10); var pCol = (portalId % 10); - + if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb - if(pRow < 9) { - pi.playPortalSound(); pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); + if (pRow < 9) { + pi.playPortalSound(); + pi.warp(pi.getMapId(), pi.getPortal().getId() + 4); } else { - if(eim.getIntProperty("statusStg6") == 0) { + if (eim.getIntProperty("statusStg6") == 0) { eim.setIntProperty("statusStg6", 1); eim.giveEventPlayersStageReward(6); } - - pi.playPortalSound(); pi.warp(pi.getMapId(), 1); + + pi.playPortalSound(); + pi.warp(pi.getMapId(), 1); } - + } else { //fail - pi.playPortalSound(); pi.warp(pi.getMapId(), 2); + pi.playPortalSound(); + pi.warp(pi.getMapId(), 2); } - + return true; } \ No newline at end of file diff --git a/scripts/portal/rnj6_out.js b/scripts/portal/rnj6_out.js index 88cbcc86b3..b0912dc6db 100644 --- a/scripts/portal/rnj6_out.js +++ b/scripts/portal/rnj6_out.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj6_out").getState() == 1) { - pi.playPortalSound(); pi.warp(926100300, 0); + pi.playPortalSound(); + pi.warp(926100300, 0); return true; } else { - pi.playerMessage(5, "The portal is not opened yet."); + pi.playerMessage(5, "The portal is not opened yet."); 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 a778e0207d..8694c1a995 100644 --- a/scripts/portal/rnj_201_0.js +++ b/scripts/portal/rnj_201_0.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj31_out").getState() == 1) { - pi.playPortalSound(); pi.warp(926100200, 1); + pi.playPortalSound(); + pi.warp(926100200, 1); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj_202.js b/scripts/portal/rnj_202.js index 95c6da9391..df01f730c0 100644 --- a/scripts/portal/rnj_202.js +++ b/scripts/portal/rnj_202.js @@ -1,9 +1,10 @@ function enter(pi) { if (pi.getMap().getReactorByName("rnj32_out").getState() == 1) { - pi.playPortalSound(); pi.warp(926100200, 2); + pi.playPortalSound(); + pi.warp(926100200, 2); return true; } else { - pi.playerMessage(5, "The door is not opened yet."); + pi.playerMessage(5, "The door is not opened yet."); return false; } } \ No newline at end of file diff --git a/scripts/portal/rnj_exit.js b/scripts/portal/rnj_exit.js index d80f0b7380..0c6219a525 100644 --- a/scripts/portal/rnj_exit.js +++ b/scripts/portal/rnj_exit.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(261000011, 0); + 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 4f23a76e31..c291771445 100644 --- a/scripts/portal/s4berserk.js +++ b/scripts/portal/s4berserk.js @@ -24,13 +24,14 @@ * @purpose Warps to the Junior Balrog map for the Rush Skill. */ function enter(pi) { - if(pi.isQuestStarted(6153) && pi.haveItem(4031475)) { + if (pi.isQuestStarted(6153) && pi.haveItem(4031475)) { var mapobj = pi.getWarpMap(910500200); - if(mapobj.countPlayers() == 0) { + if (mapobj.countPlayers() == 0) { pi.resetMapObjects(910500200); mapobj.shuffleReactors(); - pi.playPortalSound(); pi.warp(910500200, "out01"); - + pi.playPortalSound(); + pi.warp(910500200, "out01"); + return true; } else { pi.getPlayer().message("Some other player is currently inside."); diff --git a/scripts/portal/s4berserk_move.js b/scripts/portal/s4berserk_move.js index 4c4830eab0..57d5ac4a81 100644 --- a/scripts/portal/s4berserk_move.js +++ b/scripts/portal/s4berserk_move.js @@ -21,7 +21,8 @@ */ function enter(pi) { if (pi.getPlayer().getMap().countMonsters() == 0) { - pi.playPortalSound(); pi.warp(910500200, "out00"); + pi.playPortalSound(); + pi.warp(910500200, "out00"); 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 4c2fc29580..2baaba65c3 100644 --- a/scripts/portal/s4common1_exit.js +++ b/scripts/portal/s4common1_exit.js @@ -1,11 +1,13 @@ //Author: Ronan -function enter(pi) { - if(pi.hasItem(4031495)) { - pi.playPortalSound(); pi.warp(921100301); - } else { - pi.playPortalSound(); pi.warp(211040100); - } - - return true; +function enter(pi) { + if (pi.hasItem(4031495)) { + pi.playPortalSound(); + pi.warp(921100301); + } else { + pi.playPortalSound(); + pi.warp(211040100); + } + + return true; } \ No newline at end of file diff --git a/scripts/portal/s4firehawk.js b/scripts/portal/s4firehawk.js index 5ff01d8411..3a02622fa6 100644 --- a/scripts/portal/s4firehawk.js +++ b/scripts/portal/s4firehawk.js @@ -24,11 +24,12 @@ * @purpose Warps to the Junior Balrog map for the Rush Skill. */ function enter(pi) { - if(pi.isQuestStarted(6240)) { - if(pi.getWarpMap(921100200).countPlayers() == 0) { + if (pi.isQuestStarted(6240)) { + if (pi.getWarpMap(921100200).countPlayers() == 0) { pi.resetMapObjects(921100200); - pi.playPortalSound(); pi.warp(921100200, 0); - + pi.playPortalSound(); + pi.warp(921100200, 0); + return true; } else { pi.getPlayer().message("Some other player is currently inside."); diff --git a/scripts/portal/s4hitman.js b/scripts/portal/s4hitman.js index 9f157300c8..5728e019ab 100644 --- a/scripts/portal/s4hitman.js +++ b/scripts/portal/s4hitman.js @@ -24,18 +24,19 @@ * @purpose Warps to the Relic map for the Assassinate Skill. */ function enter(pi) { - if(pi.isQuestStarted(6201)) { - if(pi.getWarpMap(910200000).countPlayers() == 0) { + if (pi.isQuestStarted(6201)) { + if (pi.getWarpMap(910200000).countPlayers() == 0) { pi.resetMapObjects(910200000); - pi.playPortalSound(); pi.warp(910200000, 0); - + pi.playPortalSound(); + pi.warp(910200000, 0); + return true; } else { pi.getPlayer().message("Some other player is currently inside."); return false; } } - + pi.getPlayer().message("A mysterious force won't let you in."); return false; } \ No newline at end of file diff --git a/scripts/portal/s4iceeagle.js b/scripts/portal/s4iceeagle.js index f8e3a2a273..5576c4c4d7 100644 --- a/scripts/portal/s4iceeagle.js +++ b/scripts/portal/s4iceeagle.js @@ -24,11 +24,12 @@ * @purpose Warps to the Junior Balrog map for the Rush Skill. */ function enter(pi) { - if(pi.isQuestStarted(6242)) { - if(pi.getWarpMap(921100210).countPlayers() == 0) { + if (pi.isQuestStarted(6242)) { + if (pi.getWarpMap(921100210).countPlayers() == 0) { pi.resetMapObjects(921100210); - pi.playPortalSound(); pi.warp(921100210, 0); - + pi.playPortalSound(); + pi.warp(921100210, 0); + return true; } else { pi.getPlayer().message("Some other player is currently inside."); diff --git a/scripts/portal/s4mind_end.js b/scripts/portal/s4mind_end.js index 7067e76d11..87df5f969c 100644 --- a/scripts/portal/s4mind_end.js +++ b/scripts/portal/s4mind_end.js @@ -25,7 +25,7 @@ function enter(pi) { if (pi.isQuestStarted(6410)) { pi.setQuestProgress(6410, 6411, "p2"); } - + pi.playPortalSound(); pi.warp(925010400); return true; diff --git a/scripts/portal/s4nest.js b/scripts/portal/s4nest.js index a49c06e20e..48ac4ed448 100644 --- a/scripts/portal/s4nest.js +++ b/scripts/portal/s4nest.js @@ -24,18 +24,19 @@ * @purpose Warps to the Junior Balrog map for the Rush Skill. */ function enter(pi) { - if(pi.isQuestStarted(6241) || pi.isQuestStarted(6243)) { - if(pi.getWarpMap(924000100).countPlayers() == 0) { + if (pi.isQuestStarted(6241) || pi.isQuestStarted(6243)) { + if (pi.getWarpMap(924000100).countPlayers() == 0) { pi.resetMapObjects(924000100); - pi.playPortalSound(); pi.warp(924000100, 0); - + pi.playPortalSound(); + pi.warp(924000100, 0); + return true; } else { pi.getPlayer().message("Some other player is currently inside."); return false; } } - + pi.getPlayer().message("A mysterious force won't let you in."); return false; } \ No newline at end of file diff --git a/scripts/portal/s4resur_enter.js b/scripts/portal/s4resur_enter.js index a54e3a0390..e6c1b0fab8 100644 --- a/scripts/portal/s4resur_enter.js +++ b/scripts/portal/s4resur_enter.js @@ -24,11 +24,12 @@ * @purpose Warps to the Junior Balrog map for the Rush Skill. */ function enter(pi) { - if(pi.isQuestStarted(6134)) { - pi.playPortalSound(); pi.warp(922020000, 0); + if (pi.isQuestStarted(6134)) { + pi.playPortalSound(); + pi.warp(922020000, 0); return true; } - + pi.getPlayer().message("A mysterious force won't let you in."); return false; } \ No newline at end of file diff --git a/scripts/portal/s4resur_out.js b/scripts/portal/s4resur_out.js index 504dae4c0e..32875fb074 100644 --- a/scripts/portal/s4resur_out.js +++ b/scripts/portal/s4resur_out.js @@ -24,18 +24,20 @@ * @purpose Warps to the Forgotten Passage and gives you the needed item for the resurrection. */ function enter(pi) { - if(pi.isQuestStarted(6134)) { - if(pi.canHold(4031448)) { + if (pi.isQuestStarted(6134)) { + if (pi.canHold(4031448)) { pi.gainItem(4031448, 1); - pi.playPortalSound(); pi.warp(220070400, 3); - + pi.playPortalSound(); + pi.warp(220070400, 3); + return true; } else { pi.getPlayer().message("Make room on your ETC to receive the quest item."); return false; } } else { - pi.playPortalSound(); 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 a1d6976725..d593ba8cd0 100644 --- a/scripts/portal/s4resurrection.js +++ b/scripts/portal/s4resurrection.js @@ -24,18 +24,19 @@ * @purpose Warps to the Cold Cave for Resurection. */ function enter(pi) { - if(pi.haveItem(4001108)) { - if(pi.getWarpMap(923000100).countPlayers() == 0) { + if (pi.haveItem(4001108)) { + if (pi.getWarpMap(923000100).countPlayers() == 0) { pi.resetMapObjects(923000100); - pi.playPortalSound(); pi.warp(923000100, 0); - + pi.playPortalSound(); + pi.warp(923000100, 0); + return true; } else { pi.getPlayer().message("Some other player is currently inside."); return false; } } - + pi.getPlayer().message("A mysterious force won't let you in."); return false; } \ No newline at end of file diff --git a/scripts/portal/s4rush.js b/scripts/portal/s4rush.js index 96d105db05..8543230f9a 100644 --- a/scripts/portal/s4rush.js +++ b/scripts/portal/s4rush.js @@ -24,8 +24,9 @@ * @purpose Warps to the Junior Balrog map for the Rush Skill. */ function enter(pi) { - if(pi.isQuestStarted(6110)) { - pi.playPortalSound(); pi.warp(910500100, 0); + if (pi.isQuestStarted(6110)) { + pi.playPortalSound(); + pi.warp(910500100, 0); return true; } else { pi.getPlayer().message("A mysterious force won't let you in."); diff --git a/scripts/portal/s4tornado_enter.js b/scripts/portal/s4tornado_enter.js index e6219dbeee..d1f2b89724 100644 --- a/scripts/portal/s4tornado_enter.js +++ b/scripts/portal/s4tornado_enter.js @@ -24,17 +24,18 @@ * @purpose Warps to the Junior Balrog map for the Rush Skill. */ function enter(pi) { - if(pi.isQuestStarted(6230) || pi.isQuestStarted(6231) || pi.haveItem(4001110)) { - if(pi.getWarpMap(922020200).countPlayers() == 0) { + if (pi.isQuestStarted(6230) || pi.isQuestStarted(6231) || pi.haveItem(4001110)) { + if (pi.getWarpMap(922020200).countPlayers() == 0) { pi.resetMapObjects(922020200); - pi.playPortalSound(); pi.warp(922020200, 0); - + pi.playPortalSound(); + pi.warp(922020200, 0); + return true; } else { pi.getPlayer().message("Some other player is currently inside."); return false; } } - + return false; } \ No newline at end of file diff --git a/scripts/portal/secretDoor.js b/scripts/portal/secretDoor.js index 43fb733eed..8d8d9c6596 100644 --- a/scripts/portal/secretDoor.js +++ b/scripts/portal/secretDoor.js @@ -22,23 +22,24 @@ */ function doorCross(pi) { - pi.playPortalSound(); pi.warp(261030000, "sp_" + ((pi.getMapId() == 261010000) ? "jenu" : "alca")); - return true; + pi.playPortalSound(); + pi.warp(261030000, "sp_" + ((pi.getMapId() == 261010000) ? "jenu" : "alca")); + return true; } function enter(pi) { - if(pi.isQuestCompleted(3360)) { - return doorCross(pi); - } else if(pi.isQuestStarted(3360)) { - var pw = pi.getQuestProgress(3360); - if(pw.length() > 1) { - pi.openNpc(2111024, "MagatiaPassword"); - return false; - } else { - return doorCross(pi); - } + if (pi.isQuestCompleted(3360)) { + return doorCross(pi); + } else if (pi.isQuestStarted(3360)) { + var pw = pi.getQuestProgress(3360); + if (pw.length() > 1) { + pi.openNpc(2111024, "MagatiaPassword"); + return false; } else { - pi.message("This door is locked."); - return false; + return doorCross(pi); } + } else { + pi.message("This door is locked."); + return false; + } } \ No newline at end of file diff --git a/scripts/portal/secretgate1_open.js b/scripts/portal/secretgate1_open.js index 70a9696d2f..e42f04a65b 100644 --- a/scripts/portal/secretgate1_open.js +++ b/scripts/portal/secretgate1_open.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 4: Mark of Evil Door - Guild Quest @Author Lerk @@ -26,7 +27,8 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("secretgate1").getState() == 1) { - pi.playPortalSound(); 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 98f2ca082d..9a7ee573b7 100644 --- a/scripts/portal/secretgate2_open.js +++ b/scripts/portal/secretgate2_open.js @@ -18,6 +18,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 4: Mark of Evil Door - Guild Quest @Author Lerk @@ -25,7 +26,8 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("secretgate2").getState() == 1) { - pi.playPortalSound(); 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 2510ee7640..fcbb7d2303 100644 --- a/scripts/portal/secretgate3_open.js +++ b/scripts/portal/secretgate3_open.js @@ -18,6 +18,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 4: Mark of Evil Door - Guild Quest @Author Lerk @@ -25,7 +26,8 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("secretgate3").getState() == 1) { - pi.playPortalSound(); 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 dbb7c9a4d5..eb481e2f5f 100644 --- a/scripts/portal/skyrom.js +++ b/scripts/portal/skyrom.js @@ -19,9 +19,10 @@ */ function enter(pi) { - if(pi.isQuestStarted(3935) && !pi.haveItem(4031574, 1)) { - if(pi.getWarpMap(926000010).countPlayers() == 0) { - pi.playPortalSound(); pi.warp(926000010, 0); + if (pi.isQuestStarted(3935) && !pi.haveItem(4031574, 1)) { + if (pi.getWarpMap(926000010).countPlayers() == 0) { + pi.playPortalSound(); + pi.warp(926000010, 0); 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 105fcfe137..7552c0c0fb 100644 --- a/scripts/portal/space_return.js +++ b/scripts/portal/space_return.js @@ -1,6 +1,7 @@ //Author: kevintjuh93 -function enter(pi) { - pi.playPortalSound(); pi.warp(pi.getPlayer().getSavedLocation("EVENT")); - return true; +function enter(pi) { + 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 55047d9769..3cbfeb3732 100644 --- a/scripts/portal/speargate_open.js +++ b/scripts/portal/speargate_open.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 2: Exit Door - Guild Quest @Author Lerk @@ -26,7 +27,8 @@ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("speargate").getState() == 4) { - pi.playPortalSound(); 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 115efd4a7e..cd41d55243 100644 --- a/scripts/portal/stageBogo.js +++ b/scripts/portal/stageBogo.js @@ -19,11 +19,13 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage Bonus - Amoria PQ @Author Ronan */ function enter(pi) { - pi.playPortalSound(); pi.warp(670010800, 0); + pi.playPortalSound(); + pi.warp(670010800, 0); return true; } \ No newline at end of file diff --git a/scripts/portal/statuegate_open.js b/scripts/portal/statuegate_open.js index 3b6c2dcdde..87158723ad 100644 --- a/scripts/portal/statuegate_open.js +++ b/scripts/portal/statuegate_open.js @@ -19,13 +19,15 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 1: Gatekeeper door - Guild Quest @Author Lerk */ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("statuegate").getState() == 1) { - pi.playPortalSound(); 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 e1be4df8ef..0cbd628290 100644 --- a/scripts/portal/stonegate_open.js +++ b/scripts/portal/stonegate_open.js @@ -18,13 +18,15 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 2: Key door - Guild Quest @Author Lerk */ function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("stonegate").getState() == 1) { - pi.playPortalSound(); 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 a675a663a6..ac406d6862 100644 --- a/scripts/portal/subway_in2.js +++ b/scripts/portal/subway_in2.js @@ -1,4 +1,5 @@ function enter(pi) { - pi.playPortalSound(); pi.warp(103000101, 3); - return true; + 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 fe862b7366..103f573807 100644 --- a/scripts/portal/tamepig_out2.js +++ b/scripts/portal/tamepig_out2.js @@ -20,17 +20,22 @@ along with this program. If not, see . */ function enter(pi) { - if(!(pi.haveItem(4031507, 5) && pi.haveItem(4031508, 5) && pi.isQuestStarted(6002))) { + if (!(pi.haveItem(4031507, 5) && pi.haveItem(4031508, 5) && pi.isQuestStarted(6002))) { pi.removeAll(4031507); pi.removeAll(4031508); } - + var pCount = pi.getPlayer().countItem(4031507); var rCount = pi.getPlayer().countItem(4031508); - if(pCount > 5) pi.gainItem(4031507, -1 * (pCount - 5)); - if(rCount > 5) pi.gainItem(4031508, -1 * (rCount - 5)); - - pi.playPortalSound(); pi.warp(230000003, "out00"); + if (pCount > 5) { + pi.gainItem(4031507, -1 * (pCount - 5)); + } + if (rCount > 5) { + pi.gainItem(4031508, -1 * (rCount - 5)); + } + + 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 a03f349a47..dd56a55004 100644 --- a/scripts/portal/templeenter.js +++ b/scripts/portal/templeenter.js @@ -21,6 +21,7 @@ */ function enter(pi) { pi.cancelItem(2210016); - pi.playPortalSound(); 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 796f9541bf..12ef04da14 100644 --- a/scripts/portal/thief_in1.js +++ b/scripts/portal/thief_in1.js @@ -1,6 +1,6 @@ function enter(pi) { - // unexpected warp condition noticed thanks to IxianMace + // unexpected warp condition noticed thanks to IxianMace - pi.openNpc(1063011, "ThiefPassword"); - return false; + pi.openNpc(1063011, "ThiefPassword"); + return false; } \ No newline at end of file diff --git a/scripts/portal/timeQuest.js b/scripts/portal/timeQuest.js index c1c1039392..553c5dcf12 100644 --- a/scripts/portal/timeQuest.js +++ b/scripts/portal/timeQuest.js @@ -19,39 +19,40 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* * @author Moogra */ function enter(pi) { var mapid = pi.getPlayer().getMapId(); - pi.playPortalSound(); - var map = (mapid - 270010000) / 100; - //pi.getPlayer().dropMessage(5, map + " " + pi.isQuestCompleted(3534)); - if(map < 5 && pi.isQuestCompleted(3500 + map)) { - pi.warp(mapid + 10, "out00"); - } else if(map == 5 && pi.isQuestCompleted(3502 + map)) { - pi.warp(270020000, "out00"); - } else if(map > 100 && map < 105 && pi.isQuestCompleted(3407 + map)) { - pi.warp(mapid + 10, "out00"); - } else if(map == 105 && pi.isQuestCompleted(3514)) { - pi.warp(270030000, "out00"); - } else if(map > 200 && map < 205 && pi.isQuestCompleted(3314 + map)) { - pi.warp(mapid + 10, "out00"); - } else if(map == 205 && pi.isQuestCompleted(3519)) { - pi.warp(270040000, "out00"); - } else if(map == 300 && (pi.haveItem(4032002) || pi.isQuestCompleted(3522))) { - pi.warp(270040100, "out00"); - } else { - if(map > 200) { - pi.playerMessage(5, "As the time starts to flow oddly, you are transported back to a safe lane."); - pi.warp(270030000, "in00"); - } else if(map > 100) { - pi.playerMessage(5, "As the time starts to flow oddly, you are transported back to a safe lane."); - pi.warp(270020000, "in00"); - } else { - pi.playerMessage(5, "As the time starts to flow oddly, you are transported back to a safe lane."); - pi.warp(270010000, "in00"); - } - } - return true; + pi.playPortalSound(); + var map = (mapid - 270010000) / 100; + //pi.getPlayer().dropMessage(5, map + " " + pi.isQuestCompleted(3534)); + if (map < 5 && pi.isQuestCompleted(3500 + map)) { + pi.warp(mapid + 10, "out00"); + } else if (map == 5 && pi.isQuestCompleted(3502 + map)) { + pi.warp(270020000, "out00"); + } else if (map > 100 && map < 105 && pi.isQuestCompleted(3407 + map)) { + pi.warp(mapid + 10, "out00"); + } else if (map == 105 && pi.isQuestCompleted(3514)) { + pi.warp(270030000, "out00"); + } else if (map > 200 && map < 205 && pi.isQuestCompleted(3314 + map)) { + pi.warp(mapid + 10, "out00"); + } else if (map == 205 && pi.isQuestCompleted(3519)) { + pi.warp(270040000, "out00"); + } else if (map == 300 && (pi.haveItem(4032002) || pi.isQuestCompleted(3522))) { + pi.warp(270040100, "out00"); + } else { + if (map > 200) { + pi.playerMessage(5, "As the time starts to flow oddly, you are transported back to a safe lane."); + pi.warp(270030000, "in00"); + } else if (map > 100) { + pi.playerMessage(5, "As the time starts to flow oddly, you are transported back to a safe lane."); + pi.warp(270020000, "in00"); + } else { + pi.playerMessage(5, "As the time starts to flow oddly, you are transported back to a safe lane."); + pi.warp(270010000, "in00"); + } + } + return true; } \ No newline at end of file diff --git a/scripts/portal/tristanEnter.js b/scripts/portal/tristanEnter.js index 2d5d1836eb..10329b737c 100644 --- a/scripts/portal/tristanEnter.js +++ b/scripts/portal/tristanEnter.js @@ -1,6 +1,7 @@ function enter(pi) { - if(pi.isQuestCompleted(2238)) { - pi.playPortalSound(); pi.warp(105100101, "in00"); + if (pi.isQuestCompleted(2238)) { + pi.playPortalSound(); + pi.warp(105100101, "in00"); return true; } else { pi.message("A mysterious force won't let you in."); diff --git a/scripts/portal/tutoChatNPC.js b/scripts/portal/tutoChatNPC.js index 1e890201fe..69b9ca9891 100644 --- a/scripts/portal/tutoChatNPC.js +++ b/scripts/portal/tutoChatNPC.js @@ -1,7 +1,7 @@ function enter(pi) { - if (pi.hasLevel30Character()) { - pi.openNpc(2007); - } - pi.blockPortal(); - return true; + if (pi.hasLevel30Character()) { + pi.openNpc(2007); + } + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/tutorHelper.js b/scripts/portal/tutorHelper.js index 620860c5d0..84e4248c88 100644 --- a/scripts/portal/tutorHelper.js +++ b/scripts/portal/tutorHelper.js @@ -19,12 +19,13 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* * @author kevintjuh93 */ function enter(pi) { - pi.spawnGuide(); - pi.talkGuide("Welcome to Maple World! I'm Mimo. I'm in charge of guiding you until you reach Lv. 10 and become a Knight-In-Training. Double-click for further information!"); - pi.blockPortal(); - return true; + pi.spawnGuide(); + pi.talkGuide("Welcome to Maple World! I'm Mimo. I'm in charge of guiding you until you reach Lv. 10 and become a Knight-In-Training. Double-click for further information!"); + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/tutorMinimap.js b/scripts/portal/tutorMinimap.js index 3e0e58dc98..334d390e97 100644 --- a/scripts/portal/tutorMinimap.js +++ b/scripts/portal/tutorMinimap.js @@ -1,5 +1,5 @@ function enter(pi) { - pi.guideHint(1); - pi.blockPortal(); - return true; + pi.guideHint(1); + pi.blockPortal(); + return true; } \ No newline at end of file diff --git a/scripts/portal/tutorialNPC.js b/scripts/portal/tutorialNPC.js index 158c71891d..607d74345d 100644 --- a/scripts/portal/tutorialNPC.js +++ b/scripts/portal/tutorialNPC.js @@ -1,24 +1,24 @@ function enter(pi) { - if (pi.getPlayer().getLevel() <= 10 && pi.getPlayer().getJob().getId() == 0) { - var m = pi.getPlayer().getMap().getId(); - var npcid = 0; - - if (m == 120000101) { // Navigation Room, The Nautilus - npcid = 1090000; // Maybe 1090000? - } else if (m == 102000003) { // Warrior's Sanctuary - npcid = 1022000; - }else if (m == 103000003) { // Thieves' Hideout - npcid = 1052001; - }else if (m == 100000201) { // Bowman Instructional School - npcid = 1012100; - } else if (m == 101000003) { // Magic Library - npcid = 1032001; - } - - if (npcid != 0) { - pi.openNpc(npcid); - return true; - } - } - return false; + if (pi.getPlayer().getLevel() <= 10 && pi.getPlayer().getJob().getId() == 0) { + var m = pi.getPlayer().getMap().getId(); + var npcid = 0; + + if (m == 120000101) { // Navigation Room, The Nautilus + npcid = 1090000; // Maybe 1090000? + } else if (m == 102000003) { // Warrior's Sanctuary + npcid = 1022000; + } else if (m == 103000003) { // Thieves' Hideout + npcid = 1052001; + } else if (m == 100000201) { // Bowman Instructional School + npcid = 1012100; + } else if (m == 101000003) { // Magic Library + npcid = 1032001; + } + + if (npcid != 0) { + pi.openNpc(npcid); + return true; + } + } + return false; } \ No newline at end of file diff --git a/scripts/portal/tutorquest.js b/scripts/portal/tutorquest.js index 9b7d260685..77cc579e2e 100644 --- a/scripts/portal/tutorquest.js +++ b/scripts/portal/tutorquest.js @@ -1,33 +1,37 @@ function enter(pi) { - if(pi.getPlayer().getMapId() == 130030001){ - if(pi.isQuestStarted(20010)){ - pi.playPortalSound(); pi.warp(130030002, 0); - return true; - } else { - pi.message("Please click on the NPC first to receive a quest."); - } - } else if(pi.getPlayer().getMapId() == 130030002){ - if(pi.isQuestCompleted(20011)){ - pi.playPortalSound(); pi.warp(130030003, 0); - return true; - } else { - pi.message("Please complete the required quest before proceeding."); - } - } else if(pi.getPlayer().getMapId() == 130030003){ - if(pi.isQuestCompleted(20012)){ - pi.playPortalSound(); pi.warp(130030004, 0); - return true; - } else { - pi.message("Please complete the required quest before proceeding."); - } - } else if(pi.getPlayer().getMapId() == 130030004){ - if(pi.isQuestCompleted(20013)){ - pi.playPortalSound(); pi.warp(130030005, 0); - return true; - } else { - pi.message("Please complete the required quest before proceeding."); - } - } - - return false; + if (pi.getPlayer().getMapId() == 130030001) { + if (pi.isQuestStarted(20010)) { + pi.playPortalSound(); + pi.warp(130030002, 0); + return true; + } else { + pi.message("Please click on the NPC first to receive a quest."); + } + } else if (pi.getPlayer().getMapId() == 130030002) { + if (pi.isQuestCompleted(20011)) { + pi.playPortalSound(); + pi.warp(130030003, 0); + return true; + } else { + pi.message("Please complete the required quest before proceeding."); + } + } else if (pi.getPlayer().getMapId() == 130030003) { + if (pi.isQuestCompleted(20012)) { + pi.playPortalSound(); + pi.warp(130030004, 0); + return true; + } else { + pi.message("Please complete the required quest before proceeding."); + } + } else if (pi.getPlayer().getMapId() == 130030004) { + if (pi.isQuestCompleted(20013)) { + pi.playPortalSound(); + pi.warp(130030005, 0); + return true; + } else { + pi.message("Please complete the required quest before proceeding."); + } + } + + return false; } \ No newline at end of file diff --git a/scripts/portal/under30gate.js b/scripts/portal/under30gate.js index 34b1e102d1..3917d9dd40 100644 --- a/scripts/portal/under30gate.js +++ b/scripts/portal/under30gate.js @@ -18,6 +18,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Warp to Sharen III's Grave - Guild Quest Give guild points if holding appropriate item and not gained already @@ -28,7 +29,8 @@ Save location to return. function enter(pi) { if (pi.getPlayer().getLevel() <= 30) { - pi.playPortalSound(); 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 161c26ec0e..f0d58ac497 100644 --- a/scripts/portal/undodraco.js +++ b/scripts/portal/undodraco.js @@ -21,6 +21,7 @@ */ function enter(pi) { pi.cancelItem(2210016); - pi.playPortalSound(); 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 f8844b00af..fbd380f8b6 100644 --- a/scripts/portal/watergate_open.js +++ b/scripts/portal/watergate_open.js @@ -19,6 +19,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + /* Stage 3: Exit Door - Guild Quest @Author Lerk @@ -26,9 +27,11 @@ Stage 3: Exit Door - Guild Quest function enter(pi) { if (pi.getPlayer().getMap().getReactorByName("watergate").getState() == 1) { - pi.playPortalSound(); pi.warp(990000600, 1); + pi.playPortalSound(); + pi.warp(990000600, 1); return true; - } else + } else { pi.getPlayer().dropMessage(5, "This way forward is not open yet."); + } return false; }